diff options
| author | 2014-08-28 19:45:52 +0000 | |
|---|---|---|
| committer | 2014-08-28 19:45:53 +0000 | |
| commit | 1a3febe711cf24d06c26a6f17d04d61a561d94eb (patch) | |
| tree | 7b6b5604fd60f571f3013b87bb201053b1844fe2 | |
| parent | a8528c642090525f0e5f3c35dc3ba5a50ff17093 (diff) | |
| parent | 14339c9edc2675d4757d572006625c2641db5653 (diff) | |
Merge "StatusBar: Allow roaming indicator even when also on wifi." into lmp-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java | 7 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java | 23 |
2 files changed, 17 insertions, 13 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java index fb131265a6f4..9da209a3f490 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java @@ -45,6 +45,7 @@ public class SignalClusterView private boolean mIsAirplaneMode = false; private int mAirplaneIconId = 0; private String mWifiDescription, mMobileDescription, mMobileTypeDescription; + private boolean mRoaming; ViewGroup mWifiGroup, mMobileGroup; ImageView mWifi, mMobile, mMobileType, mAirplane; @@ -106,12 +107,13 @@ public class SignalClusterView @Override public void setMobileDataIndicators(boolean visible, int strengthIcon, int typeIcon, - String contentDescription, String typeContentDescription) { + String contentDescription, String typeContentDescription, boolean roaming) { mMobileVisible = visible; mMobileStrengthId = strengthIcon; mMobileTypeId = typeIcon; mMobileDescription = contentDescription; mMobileTypeDescription = typeContentDescription; + mRoaming = roaming; apply(); } @@ -207,8 +209,7 @@ public class SignalClusterView (mMobileVisible ? "VISIBLE" : "GONE"), mMobileStrengthId, mMobileTypeId)); - mMobileType.setVisibility( - !mWifiVisible ? View.VISIBLE : View.GONE); + mMobileType.setVisibility(!mWifiVisible || mRoaming ? View.VISIBLE : View.GONE); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java index 15a704797394..9b59814d13c7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java @@ -64,6 +64,7 @@ public class NetworkControllerImpl extends BroadcastReceiver static final boolean CHATTY = false; // additional diagnostics, but not logspew private static final int FLIGHT_MODE_ICON = R.drawable.stat_sys_signal_flightmode; + private static final int ROAMING_ICON = R.drawable.stat_sys_data_fully_connected_roam; // telephony boolean mHspaDataDistinguishable; @@ -164,7 +165,7 @@ public class NetworkControllerImpl extends BroadcastReceiver public interface SignalCluster { void setWifiIndicators(boolean visible, int strengthIcon, String contentDescription); void setMobileDataIndicators(boolean visible, int strengthIcon, int typeIcon, - String contentDescription, String typeContentDescription); + String contentDescription, String typeContentDescription, boolean roaming); void setIsAirplaneMode(boolean is, int airplaneIcon); } @@ -372,7 +373,8 @@ public class NetworkControllerImpl extends BroadcastReceiver mAlwaysShowCdmaRssi ? mPhoneSignalIconId : mWimaxIconId, mDataTypeIconId, mContentDescriptionWimax, - mContentDescriptionDataType); + mContentDescriptionDataType, + mDataTypeIconId == ROAMING_ICON); } else { // normal mobile data cluster.setMobileDataIndicators( @@ -380,7 +382,8 @@ public class NetworkControllerImpl extends BroadcastReceiver mShowPhoneRSSIForData ? mPhoneSignalIconId : mDataSignalIconId, mDataTypeIconId, mContentDescriptionPhoneSignal, - mContentDescriptionDataType); + mContentDescriptionDataType, + mDataTypeIconId == ROAMING_ICON); } cluster.setIsAirplaneMode(mAirplaneMode, mAirplaneIconId); } @@ -777,11 +780,11 @@ public class NetworkControllerImpl extends BroadcastReceiver if (isCdma()) { if (isCdmaEri()) { - mDataTypeIconId = R.drawable.stat_sys_data_fully_connected_roam; + mDataTypeIconId = ROAMING_ICON; mQSDataTypeIconId = TelephonyIcons.QS_DATA_R[mInetCondition]; } } else if (mPhone.isNetworkRoaming()) { - mDataTypeIconId = R.drawable.stat_sys_data_fully_connected_roam; + mDataTypeIconId = ROAMING_ICON; mQSDataTypeIconId = TelephonyIcons.QS_DATA_R[mInetCondition]; } } @@ -1195,11 +1198,11 @@ public class NetworkControllerImpl extends BroadcastReceiver mQSDataTypeIconId = 0; if (isCdma()) { if (isCdmaEri()) { - mDataTypeIconId = R.drawable.stat_sys_data_fully_connected_roam; + mDataTypeIconId = ROAMING_ICON; mQSDataTypeIconId = TelephonyIcons.QS_DATA_R[mInetCondition]; } } else if (mPhone.isNetworkRoaming()) { - mDataTypeIconId = R.drawable.stat_sys_data_fully_connected_roam; + mDataTypeIconId = ROAMING_ICON; mQSDataTypeIconId = TelephonyIcons.QS_DATA_R[mInetCondition]; } } @@ -1544,8 +1547,7 @@ public class NetworkControllerImpl extends BroadcastReceiver datatype.equals("g") ? R.drawable.stat_sys_data_fully_connected_g : datatype.equals("h") ? R.drawable.stat_sys_data_fully_connected_h : datatype.equals("lte") ? R.drawable.stat_sys_data_fully_connected_lte : - datatype.equals("roam") - ? R.drawable.stat_sys_data_fully_connected_roam : + datatype.equals("roam") ? ROAMING_ICON : 0; mDemoQSDataTypeIconId = datatype.equals("1x") ? R.drawable.ic_qs_signal_1x : @@ -1572,7 +1574,8 @@ public class NetworkControllerImpl extends BroadcastReceiver iconId, mDemoDataTypeIconId, "Demo", - "Demo"); + "Demo", + mDemoDataTypeIconId == ROAMING_ICON); } refreshViews(); } |