Skip to content

Commit 0fa9d2d

Browse files
author
Andrew Flynn
committed
Refresh signal cluster for airplane switch.
This fixes a bug where if Airplane mode on/off is the only icon that is changing in the signal cluster (for example, someone on a wifi-only device has wifi turned on in airplane mode, so wifi icon is not changing), this will refresh the signal cluster. Bug: 6531918 Change-Id: I7a440b84c9dfa0b300b81d14426b99fd48fad06c
1 parent 20c15a4 commit 0fa9d2d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public class NetworkController extends BroadcastReceiver {
127127
private static final int INET_CONDITION_THRESHOLD = 50;
128128

129129
private boolean mAirplaneMode = false;
130+
private boolean mLastAirplaneMode = true;
130131

131132
// our ui
132133
Context mContext;
@@ -1062,14 +1063,19 @@ else if (!mDataConnected && !mWifiConnected && !mBluetoothTethered && !mWimaxCon
10621063
|| mLastDataDirectionOverlayIconId != combinedActivityIconId
10631064
|| mLastWifiIconId != mWifiIconId
10641065
|| mLastWimaxIconId != mWimaxIconId
1065-
|| mLastDataTypeIconId != mDataTypeIconId)
1066+
|| mLastDataTypeIconId != mDataTypeIconId
1067+
|| mLastAirplaneMode != mAirplaneMode)
10661068
{
10671069
// NB: the mLast*s will be updated later
10681070
for (SignalCluster cluster : mSignalClusters) {
10691071
refreshSignalCluster(cluster);
10701072
}
10711073
}
10721074

1075+
if (mLastAirplaneMode != mAirplaneMode) {
1076+
mLastAirplaneMode = mAirplaneMode;
1077+
}
1078+
10731079
// the phone icon on phones
10741080
if (mLastPhoneSignalIconId != mPhoneSignalIconId) {
10751081
mLastPhoneSignalIconId = mPhoneSignalIconId;

0 commit comments

Comments
 (0)