Skip to content

Commit

Permalink
Roaming indication not shown on UE when camped on VPLMN
Browse files Browse the repository at this point in the history
Roaming indication not shown on UE even though roaming status
was ON in CM service confirmation message when UE camped on
Roaming PLMN.

Change-Id: I62409a6c8d60e5dabccb23160b68d201eabef716
CRs-Fixed: 963381
  • Loading branch information
Fang Yunong authored and Gerrit - the friendly Code Review server committed Jan 29, 2016
1 parent dc9575a commit 72ebf0d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 26 deletions.
20 changes: 10 additions & 10 deletions packages/SystemUI/res/layout/mobile_signal_group.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<ImageView
android:id="@+id/mobile_roaming"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
/>
<FrameLayout
android:id="@+id/mobile_signal_single"
android:layout_width="wrap_content"
Expand All @@ -64,23 +73,14 @@
android:layout_height="wrap_content"
android:layout_width="wrap_content"
/>
<ImageView
android:id="@+id/mobile_roaming"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
/>
<ImageView
android:id="@+id/mobile_type"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
/>
<ImageView
android:id="@+id/mobile_inout"
android:layout_height="17dp"
android:layout_width="17dp"
android:layout_gravity="end|bottom"
/>
</FrameLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/mobile_signal_stacked"
android:layout_width="wrap_content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,6 @@ public boolean apply(boolean isSecondaryIcon) {
ad.start();
}
}

mMobileType.setImageResource(mMobileTypeId);

mDataActivity.setImageResource(mDataActivityId);
Expand Down Expand Up @@ -639,13 +638,10 @@ public boolean apply(boolean isSecondaryIcon) {

TelephonyManager tm =
(TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
if (tm != null && tm.isNetworkRoaming(mSubId)) {
if (!(mContext.getResources().getBoolean(R.bool.config_data_signal_control))) {
mRoaming.setImageDrawable(getContext().getResources().getDrawable(
R.drawable.stat_sys_data_fully_connected_roam));
} else {
mRoaming.setImageDrawable(null);
}
if (tm != null && tm.isNetworkRoaming(mSubId) &&
(mContext.getResources().getBoolean(R.bool.show_roaming_and_network_icons))) {
mRoaming.setImageDrawable(getContext().getResources().getDrawable(
R.drawable.stat_sys_data_fully_connected_roam));
} else {
mRoaming.setImageDrawable(null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,13 @@ public void notifyListeners() {
String dataContentDescription = getStringIfExists(icons.mDataContentDescription);

// Show icon in QS when we are connected or need to show roaming.
boolean showDataIcon = mCurrentState.dataConnected
|| mCurrentState.iconGroup == TelephonyIcons.ROAMING;
boolean showDataIcon = false;
if (mContext.getResources().getBoolean(R.bool.show_roaming_and_network_icons)) {
showDataIcon = mCurrentState.dataConnected;
} else {
showDataIcon = mCurrentState.dataConnected
|| mCurrentState.iconGroup == TelephonyIcons.ROAMING;
}
IconState statusIcon = new IconState(mCurrentState.enabled && !mCurrentState.airplaneMode,
getCurrentIconId(), contentDescription);

Expand All @@ -309,8 +314,10 @@ public void notifyListeners() {
boolean activityOut = mCurrentState.dataConnected
&& !mCurrentState.carrierNetworkChangeMode
&& mCurrentState.activityOut;
showDataIcon &= mCurrentState.isDefault
|| mCurrentState.iconGroup == TelephonyIcons.ROAMING;
if (!mContext.getResources().getBoolean(R.bool.show_roaming_and_network_icons)) {
showDataIcon &= mCurrentState.isDefault
|| mCurrentState.iconGroup == TelephonyIcons.ROAMING;
}
showDataIcon &= mStyle == STATUS_BAR_STYLE_ANDROID_DEFAULT;
int typeIcon = showDataIcon ? icons.mDataType : 0;
int dataActivityId = showMobileActivity() ? 0 : icons.mActivityId;
Expand Down Expand Up @@ -560,9 +567,7 @@ private final void updateTelephony() {
if (isCarrierNetworkChangeActive()) {
mCurrentState.iconGroup = TelephonyIcons.CARRIER_NETWORK_CHANGE;
} else if (isRoaming()) {
if (!mContext.getResources().getBoolean(R.bool.show_roaming_and_network_icons)) {
mCurrentState.iconGroup = TelephonyIcons.ROAMING;
}
mCurrentState.iconGroup = TelephonyIcons.ROAMING;
}
if (isEmergencyOnly() != mCurrentState.isEmergency) {
mCurrentState.isEmergency = isEmergencyOnly();
Expand Down Expand Up @@ -676,7 +681,8 @@ private void generateIconGroup() {
dataContentDesc = TelephonyIcons.getDataTypeDesc(slotId);
qsDataTypeIcon = TelephonyIcons.getQSDataTypeIcon(slotId);
}
if (roaming) {
if (roaming && !mContext.getResources().getBoolean(
R.bool.show_roaming_and_network_icons)) {
dataTypeIcon = TelephonyIcons.ROAMING_ICON;
qsDataTypeIcon = TelephonyIcons.QS_DATA_R;
}
Expand Down

0 comments on commit 72ebf0d

Please sign in to comment.