summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andrew Flynn <flynn@google.com> 2012-05-31 15:39:15 -0700
committer Andrew Flynn <flynn@google.com> 2012-05-31 16:44:12 -0700
commit0fa9d2d03f2825e22408cda65a9bbb88a43d9a31 (patch)
tree562c47733171d26b5ecf9281406371eff0762cea
parent20c15a4271ea3a7fb2210430bfc53f611603cf76 (diff)
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
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
index 584a69e48210..273076c8f6fa 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -127,6 +127,7 @@ public class NetworkController extends BroadcastReceiver {
private static final int INET_CONDITION_THRESHOLD = 50;
private boolean mAirplaneMode = false;
+ private boolean mLastAirplaneMode = true;
// our ui
Context mContext;
@@ -1062,7 +1063,8 @@ public class NetworkController extends BroadcastReceiver {
|| mLastDataDirectionOverlayIconId != combinedActivityIconId
|| mLastWifiIconId != mWifiIconId
|| mLastWimaxIconId != mWimaxIconId
- || mLastDataTypeIconId != mDataTypeIconId)
+ || mLastDataTypeIconId != mDataTypeIconId
+ || mLastAirplaneMode != mAirplaneMode)
{
// NB: the mLast*s will be updated later
for (SignalCluster cluster : mSignalClusters) {
@@ -1070,6 +1072,10 @@ public class NetworkController extends BroadcastReceiver {
}
}
+ if (mLastAirplaneMode != mAirplaneMode) {
+ mLastAirplaneMode = mAirplaneMode;
+ }
+
// the phone icon on phones
if (mLastPhoneSignalIconId != mPhoneSignalIconId) {
mLastPhoneSignalIconId = mPhoneSignalIconId;