In the source code of AOSP:
packages/services/Telephony/src/com/android/phone/PhoneGlobals.java
/**
* Receiver for misc intent broadcasts the Phone app cares about.
*/
private class PhoneAppBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (action.equals(Intent.ACTION_AIRPLANE_MODE_CHANGED)) {
boolean airplaneMode = intent.getBooleanExtra("state", false);
handleAirplaneModeChange(airplaneMode);
This is a broadcast receiver, but I don’t know where the broadcast is sent. There are too many places where broadcasts are sent.
Ways I can think of:
Add logs to all places where broadcasts are sent. I have to add at least dozens of logs, and then determine whether the specific broadcast is sent in a certain piece of code.