diff options
author | John Spurlock <jspurlock@google.com> | 2014-08-28 20:10:41 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-08-28 20:10:41 +0000 |
commit | e4bb6b324b9ae8d673646362c494d71c678288ce (patch) | |
tree | e56c45205a917ff9d7fb89670c6b1c093544758b /packages/SystemUI | |
parent | 9130ae45015c2635860d71c88b3ab23a69c97cfb (diff) | |
parent | b581c097e625f7a6c33a030d1181d34ff2e7879e (diff) | |
download | frameworks_base-e4bb6b324b9ae8d673646362c494d71c678288ce.zip frameworks_base-e4bb6b324b9ae8d673646362c494d71c678288ce.tar.gz frameworks_base-e4bb6b324b9ae8d673646362c494d71c678288ce.tar.bz2 |
am e22aa0f8: am 6b7a237e: Merge "StatusBar: Allow roaming indicator even when also on wifi." into lmp-dev
* commit 'e22aa0f8ddb69d845513d086846cf2ae57b793b5':
StatusBar: Allow roaming indicator even when also on wifi.
Diffstat (limited to 'packages/SystemUI')
-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 fb13126..9da209a 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 15a7047..9b59814 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(); } |