Add additional APM logs for PhoneGlobals
Easier RCA for issues like b/241507235 and potentially b/285480877.
Test: build
Change-Id: Ie918215048866179f26c7ae6624f40fd373a2d16
diff --git a/src/com/android/phone/PhoneGlobals.java b/src/com/android/phone/PhoneGlobals.java
index 7a61dd1..96929bf 100644
--- a/src/com/android/phone/PhoneGlobals.java
+++ b/src/com/android/phone/PhoneGlobals.java
@@ -728,13 +728,14 @@
}
private void handleAirplaneModeChange(boolean isAirplaneNewlyOn) {
+ Log.i(LOG_TAG, "handleAirplaneModeChange: isAirplaneNewlyOn=" + isAirplaneNewlyOn);
int cellState =
Settings.Global.getInt(
getContentResolver(), Settings.Global.CELL_ON, PhoneConstants.CELL_ON_FLAG);
switch (cellState) {
case PhoneConstants.CELL_OFF_FLAG:
- // Airplane mode does not affect the cell radio if user
- // has turned it off.
+ // Airplane mode does not affect the cell radio if user has turned it off.
+ Log.i(LOG_TAG, "Ignore airplane mode change due to cell off.");
break;
case PhoneConstants.CELL_ON_FLAG:
maybeTurnCellOff(isAirplaneNewlyOn);
@@ -805,12 +806,16 @@
} else {
Log.i(LOG_TAG, "Ignoring airplane mode: settings prevent cell radio power off");
}
+ } else {
+ Log.i(LOG_TAG, "Ignoring airplane mode: not newly on");
}
}
private void maybeTurnCellOn(boolean isAirplaneNewlyOn) {
if (!isAirplaneNewlyOn) {
setRadioPowerOn();
+ } else {
+ Log.i(LOG_TAG, "Ignoring airplane mode off: radio is already on.");
}
}