Added logging to pinpoint source of bug
Sometimes the airplane mode banner will show up even though airplane mode is not on. Logging has been added to several areas around this condition in addition to where the actual view is created. This will be used to try and get a better handle on what the source of the bug is. Test: manual Bug: 30860132 Change-Id: I7213aa7e187c5a8c0e94a5ce7a3269e6667cd61b
This commit is contained in:
@@ -20,12 +20,14 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.util.Log;
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.Settings;
|
||||
import com.android.settingslib.WirelessUtils;
|
||||
|
||||
public class AirplaneModeCondition extends Condition {
|
||||
public static String TAG = "APM_Condition";
|
||||
|
||||
public AirplaneModeCondition(ConditionManager conditionManager) {
|
||||
super(conditionManager);
|
||||
@@ -33,6 +35,7 @@ public class AirplaneModeCondition extends Condition {
|
||||
|
||||
@Override
|
||||
public void refreshState() {
|
||||
Log.d(TAG, "APM condition refreshed");
|
||||
setActive(WirelessUtils.isAirplaneModeOn(mManager.getContext()));
|
||||
}
|
||||
|
||||
@@ -46,6 +49,12 @@ public class AirplaneModeCondition extends Condition {
|
||||
return Icon.createWithResource(mManager.getContext(), R.drawable.ic_airplane);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setActive(boolean active) {
|
||||
super.setActive(active);
|
||||
Log.d(TAG, "setActive was called with " + active);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getTitle() {
|
||||
return mManager.getContext().getString(R.string.condition_airplane_title);
|
||||
|
Reference in New Issue
Block a user