DO NOT MERGE Allow for HTML styling in mobile data type content descriptions
This CL implements a (somewhat hacky) way to enable HTML attributes in the mobile data type content description strings. This way we can use some basic styling in the Quick Settings cellular data tile which uses it in a TextView. We do this by assuming that the content description is valid, escaped HTML, and send two separate CharSequences to all of the listeners, all of which can then decide if they need the regular content description or the prettified version. Test: atest SystemUITests; system ui demo mode Bug: 141177147 Change-Id: Idf387111b0cdc34ad3762eac0ec6c2b484b393e3 Merged-In: Idf387111b0cdc34ad3762eac0ec6c2b484b393e3
This commit is contained in:
@@ -440,6 +440,9 @@
|
||||
<!-- Content description of the data connection type 5Ge. [CHAR LIMIT=NONE] -->
|
||||
<string name="data_connection_5ge" translate="false">5Ge</string>
|
||||
|
||||
<!-- Content description of the data connection type 5Ge with HTML styling. DO NOT TRANSLATE [CHAR LIMIT=NONE] -->
|
||||
<string name="data_connection_5ge_html" translate="false"> <i>5G <small>E</small></i> </string>
|
||||
|
||||
<!-- Content description of the data connection type 5G. [CHAR LIMIT=NONE] -->
|
||||
<string name="data_connection_5g" translate="false">5G</string>
|
||||
|
||||
|
||||
@@ -205,8 +205,9 @@ public class QSCarrierGroup extends LinearLayout implements
|
||||
public void setMobileDataIndicators(NetworkController.IconState statusIcon,
|
||||
NetworkController.IconState qsIcon, int statusType,
|
||||
int qsType, boolean activityIn, boolean activityOut,
|
||||
String typeContentDescription,
|
||||
String description, boolean isWide, int subId, boolean roaming) {
|
||||
CharSequence typeContentDescription,
|
||||
CharSequence typeContentDescriptionHtml, CharSequence description,
|
||||
boolean isWide, int subId, boolean roaming) {
|
||||
int slotIndex = getSlotIndex(subId);
|
||||
if (slotIndex >= SIM_SLOTS) {
|
||||
Log.w(TAG, "setMobileDataIndicators - slot: " + slotIndex);
|
||||
@@ -219,7 +220,7 @@ public class QSCarrierGroup extends LinearLayout implements
|
||||
mInfos[slotIndex].visible = statusIcon.visible;
|
||||
mInfos[slotIndex].mobileSignalIconId = statusIcon.icon;
|
||||
mInfos[slotIndex].contentDescription = statusIcon.contentDescription;
|
||||
mInfos[slotIndex].typeContentDescription = typeContentDescription;
|
||||
mInfos[slotIndex].typeContentDescription = typeContentDescription.toString();
|
||||
mInfos[slotIndex].roaming = roaming;
|
||||
handleUpdateState();
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import android.content.res.Resources;
|
||||
import android.provider.Settings;
|
||||
import android.service.quicksettings.Tile;
|
||||
import android.telephony.SubscriptionManager;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -199,12 +200,13 @@ public class CellularTile extends QSTileImpl<SignalState> {
|
||||
|
||||
private CharSequence appendMobileDataType(CharSequence current, CharSequence dataType) {
|
||||
if (TextUtils.isEmpty(dataType)) {
|
||||
return current;
|
||||
return Html.fromHtml(current.toString(), 0);
|
||||
}
|
||||
if (TextUtils.isEmpty(current)) {
|
||||
return dataType;
|
||||
return Html.fromHtml(dataType.toString(), 0);
|
||||
}
|
||||
return mContext.getString(R.string.mobile_carrier_text_format, current, dataType);
|
||||
String concat = mContext.getString(R.string.mobile_carrier_text_format, current, dataType);
|
||||
return Html.fromHtml(concat, 0);
|
||||
}
|
||||
|
||||
private CharSequence getMobileDataContentName(CallbackInfo cb) {
|
||||
@@ -245,14 +247,17 @@ public class CellularTile extends QSTileImpl<SignalState> {
|
||||
|
||||
@Override
|
||||
public void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
|
||||
int qsType, boolean activityIn, boolean activityOut, String typeContentDescription,
|
||||
String description, boolean isWide, int subId, boolean roaming) {
|
||||
int qsType, boolean activityIn, boolean activityOut,
|
||||
CharSequence typeContentDescription,
|
||||
CharSequence typeContentDescriptionHtml, CharSequence description,
|
||||
boolean isWide, int subId, boolean roaming) {
|
||||
if (qsIcon == null) {
|
||||
// Not data sim, don't display.
|
||||
return;
|
||||
}
|
||||
mInfo.dataSubscriptionName = mController.getMobileDataNetworkName();
|
||||
mInfo.dataContentDescription = (description != null) ? typeContentDescription : null;
|
||||
mInfo.dataContentDescription =
|
||||
(description != null) ? typeContentDescriptionHtml : null;
|
||||
mInfo.activityIn = activityIn;
|
||||
mInfo.activityOut = activityOut;
|
||||
mInfo.roaming = roaming;
|
||||
|
||||
@@ -177,8 +177,10 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
|
||||
|
||||
@Override
|
||||
public void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
|
||||
int qsType, boolean activityIn, boolean activityOut, String typeContentDescription,
|
||||
String description, boolean isWide, int subId, boolean roaming) {
|
||||
int qsType, boolean activityIn, boolean activityOut,
|
||||
CharSequence typeContentDescription,
|
||||
CharSequence typeContentDescriptionHtml, CharSequence description,
|
||||
boolean isWide, int subId, boolean roaming) {
|
||||
MobileIconState state = getState(subId);
|
||||
if (state == null) {
|
||||
return;
|
||||
@@ -387,7 +389,7 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
|
||||
public int typeId;
|
||||
public boolean roaming;
|
||||
public boolean needsLeadingPadding;
|
||||
public String typeContentDescription;
|
||||
public CharSequence typeContentDescription;
|
||||
|
||||
private MobileIconState(int subId) {
|
||||
super();
|
||||
|
||||
@@ -111,30 +111,25 @@ public class CallbackHandler extends Handler implements EmergencyListener, Signa
|
||||
public void setWifiIndicators(final boolean enabled, final IconState statusIcon,
|
||||
final IconState qsIcon, final boolean activityIn, final boolean activityOut,
|
||||
final String description, boolean isTransient, String secondaryLabel) {
|
||||
post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
for (SignalCallback callback : mSignalCallbacks) {
|
||||
callback.setWifiIndicators(enabled, statusIcon, qsIcon, activityIn, activityOut,
|
||||
description, isTransient, secondaryLabel);
|
||||
}
|
||||
post(() -> {
|
||||
for (SignalCallback callback : mSignalCallbacks) {
|
||||
callback.setWifiIndicators(enabled, statusIcon, qsIcon, activityIn, activityOut,
|
||||
description, isTransient, secondaryLabel);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMobileDataIndicators(final IconState statusIcon, final IconState qsIcon,
|
||||
final int statusType, final int qsType,final boolean activityIn,
|
||||
final boolean activityOut, final String typeContentDescription,
|
||||
final String description, final boolean isWide, final int subId, boolean roaming) {
|
||||
post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
for (SignalCallback signalCluster : mSignalCallbacks) {
|
||||
signalCluster.setMobileDataIndicators(statusIcon, qsIcon, statusType, qsType,
|
||||
activityIn, activityOut, typeContentDescription, description, isWide,
|
||||
subId, roaming);
|
||||
}
|
||||
final int statusType, final int qsType, final boolean activityIn,
|
||||
final boolean activityOut, final CharSequence typeContentDescription,
|
||||
CharSequence typeContentDescriptionHtml, final CharSequence description,
|
||||
final boolean isWide, final int subId, boolean roaming) {
|
||||
post(() -> {
|
||||
for (SignalCallback signalCluster : mSignalCallbacks) {
|
||||
signalCluster.setMobileDataIndicators(statusIcon, qsIcon, statusType, qsType,
|
||||
activityIn, activityOut, typeContentDescription,
|
||||
typeContentDescriptionHtml, description, isWide, subId, roaming);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class EthernetSignalController extends
|
||||
@Override
|
||||
public void notifyListeners(SignalCallback callback) {
|
||||
boolean ethernetVisible = mCurrentState.connected;
|
||||
String contentDescription = getStringIfExists(getContentDescription());
|
||||
String contentDescription = getStringIfExists(getContentDescription()).toString();
|
||||
|
||||
// TODO: wire up data transfer using WifiSignalPoller.
|
||||
callback.setEthernetIndicators(new IconState(ethernetVisible, getCurrentIconId(),
|
||||
|
||||
@@ -29,6 +29,7 @@ import android.telephony.SignalStrength;
|
||||
import android.telephony.SubscriptionInfo;
|
||||
import android.telephony.SubscriptionManager;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
@@ -96,9 +97,10 @@ public class MobileSignalController extends SignalController<
|
||||
mDefaults = defaults;
|
||||
mSubscriptionInfo = info;
|
||||
mPhoneStateListener = new MobilePhoneStateListener(receiverLooper);
|
||||
mNetworkNameSeparator = getStringIfExists(R.string.status_bar_network_name_separator);
|
||||
mNetworkNameSeparator = getStringIfExists(R.string.status_bar_network_name_separator)
|
||||
.toString();
|
||||
mNetworkNameDefault = getStringIfExists(
|
||||
com.android.internal.R.string.lockscreen_carrier_default);
|
||||
com.android.internal.R.string.lockscreen_carrier_default).toString();
|
||||
|
||||
mapIconSets();
|
||||
|
||||
@@ -125,10 +127,6 @@ public class MobileSignalController extends SignalController<
|
||||
updateTelephony();
|
||||
}
|
||||
|
||||
public int getDataContentDescription() {
|
||||
return getIcons().mDataContentDescription;
|
||||
}
|
||||
|
||||
public void setAirplaneMode(boolean airplaneMode) {
|
||||
mCurrentState.airplaneMode = airplaneMode;
|
||||
notifyListenersIfNecessary();
|
||||
@@ -296,8 +294,14 @@ public class MobileSignalController extends SignalController<
|
||||
public void notifyListeners(SignalCallback callback) {
|
||||
MobileIconGroup icons = getIcons();
|
||||
|
||||
String contentDescription = getStringIfExists(getContentDescription());
|
||||
String dataContentDescription = getStringIfExists(icons.mDataContentDescription);
|
||||
String contentDescription = getStringIfExists(getContentDescription()).toString();
|
||||
CharSequence dataContentDescriptionHtml = getStringIfExists(icons.mDataContentDescription);
|
||||
|
||||
//TODO: Hacky
|
||||
// The data content description can sometimes be shown in a text view and might come to us
|
||||
// as HTML. Strip any styling here so that listeners don't have to care
|
||||
CharSequence dataContentDescription = Html.fromHtml(
|
||||
dataContentDescriptionHtml.toString(), 0).toString();
|
||||
if (mCurrentState.inetCondition == 0) {
|
||||
dataContentDescription = mContext.getString(R.string.data_connection_no_internet);
|
||||
}
|
||||
@@ -312,7 +316,7 @@ public class MobileSignalController extends SignalController<
|
||||
|
||||
int qsTypeIcon = 0;
|
||||
IconState qsIcon = null;
|
||||
String description = null;
|
||||
CharSequence description = null;
|
||||
// Only send data sim callbacks to QS.
|
||||
if (mCurrentState.dataSim) {
|
||||
qsTypeIcon = (showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.mQsDataType : 0;
|
||||
@@ -329,8 +333,9 @@ public class MobileSignalController extends SignalController<
|
||||
showDataIcon &= mCurrentState.isDefault || dataDisabled;
|
||||
int typeIcon = (showDataIcon || mConfig.alwaysShowDataRatIcon) ? icons.mDataType : 0;
|
||||
callback.setMobileDataIndicators(statusIcon, qsIcon, typeIcon, qsTypeIcon,
|
||||
activityIn, activityOut, dataContentDescription, description, icons.mIsWide,
|
||||
mSubscriptionInfo.getSubscriptionId(), mCurrentState.roaming);
|
||||
activityIn, activityOut, dataContentDescription, dataContentDescriptionHtml,
|
||||
description, icons.mIsWide, mSubscriptionInfo.getSubscriptionId(),
|
||||
mCurrentState.roaming);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -44,6 +44,7 @@ public interface NetworkController extends CallbackController<SignalCallback>, D
|
||||
void addEmergencyListener(EmergencyListener listener);
|
||||
void removeEmergencyListener(EmergencyListener listener);
|
||||
boolean hasEmergencyCryptKeeperText();
|
||||
|
||||
boolean isRadioOn();
|
||||
|
||||
public interface SignalCallback {
|
||||
@@ -51,10 +52,31 @@ public interface NetworkController extends CallbackController<SignalCallback>, D
|
||||
boolean activityIn, boolean activityOut, String description, boolean isTransient,
|
||||
String statusLabel) {}
|
||||
|
||||
/**
|
||||
* Callback for listeners to be able to update the state of any UI tracking connectivity
|
||||
* @param statusIcon the icon that should be shown in the status bar
|
||||
* @param qsIcon the icon to show in Quick Settings
|
||||
* @param statusType the resId of the data type icon (e.g. LTE) to show in the status bar
|
||||
* @param qsType similar to above, the resId of the data type icon to show in Quick Settings
|
||||
* @param activityIn indicates whether there is inbound activity
|
||||
* @param activityOut indicates outbound activity
|
||||
* @param typeContentDescription the contentDescription of the data type
|
||||
* @param typeContentDescriptionHtml the (possibly HTML-styled) contentDescription of the
|
||||
* data type. Suitable for display
|
||||
* @param description description of the network (usually just the network name)
|
||||
* @param isWide //TODO: unused?
|
||||
* @param subId subscription ID for which to update the UI
|
||||
* @param roaming indicates roaming
|
||||
*/
|
||||
default void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
|
||||
int qsType, boolean activityIn, boolean activityOut, String typeContentDescription,
|
||||
String description, boolean isWide, int subId, boolean roaming) {}
|
||||
int qsType, boolean activityIn, boolean activityOut,
|
||||
CharSequence typeContentDescription,
|
||||
CharSequence typeContentDescriptionHtml, CharSequence description,
|
||||
boolean isWide, int subId, boolean roaming) {
|
||||
}
|
||||
|
||||
default void setSubs(List<SubscriptionInfo> subs) {}
|
||||
|
||||
default void setNoSims(boolean show, boolean simDetected) {}
|
||||
|
||||
default void setEthernetIndicators(IconState icon) {}
|
||||
|
||||
@@ -992,6 +992,9 @@ public class NetworkControllerImpl extends BroadcastReceiver
|
||||
datatype.equals("3g") ? TelephonyIcons.THREE_G :
|
||||
datatype.equals("4g") ? TelephonyIcons.FOUR_G :
|
||||
datatype.equals("4g+") ? TelephonyIcons.FOUR_G_PLUS :
|
||||
datatype.equals("5g") ? TelephonyIcons.NR_5G :
|
||||
datatype.equals("5ge") ? TelephonyIcons.LTE_CA_5G_E :
|
||||
datatype.equals("5g+") ? TelephonyIcons.NR_5G_PLUS :
|
||||
datatype.equals("e") ? TelephonyIcons.E :
|
||||
datatype.equals("g") ? TelephonyIcons.G :
|
||||
datatype.equals("h") ? TelephonyIcons.H :
|
||||
|
||||
@@ -17,6 +17,7 @@ package com.android.systemui.statusbar.policy;
|
||||
|
||||
import static com.android.systemui.statusbar.policy.NetworkControllerImpl.TAG;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.content.Context;
|
||||
import android.text.format.DateFormat;
|
||||
import android.util.Log;
|
||||
@@ -166,8 +167,8 @@ public abstract class SignalController<T extends SignalController.State,
|
||||
/**
|
||||
* Returns the resource if resId is not 0, and an empty string otherwise.
|
||||
*/
|
||||
protected String getStringIfExists(int resId) {
|
||||
return resId != 0 ? mContext.getString(resId) : "";
|
||||
@NonNull CharSequence getStringIfExists(int resId) {
|
||||
return resId != 0 ? mContext.getText(resId) : "";
|
||||
}
|
||||
|
||||
protected I getIcons() {
|
||||
|
||||
@@ -214,7 +214,7 @@ class TelephonyIcons {
|
||||
0,
|
||||
0,
|
||||
AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0],
|
||||
R.string.data_connection_5ge,
|
||||
R.string.data_connection_5ge_html,
|
||||
TelephonyIcons.ICON_5G_E,
|
||||
true);
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ public class WifiSignalController extends
|
||||
&& (mCurrentState.connected || !mHasMobileData || visibleWhenEnabled);
|
||||
String wifiDesc = wifiVisible ? mCurrentState.ssid : null;
|
||||
boolean ssidPresent = wifiVisible && mCurrentState.ssid != null;
|
||||
String contentDescription = getStringIfExists(getContentDescription());
|
||||
String contentDescription = getStringIfExists(getContentDescription()).toString();
|
||||
if (mCurrentState.inetCondition == 0) {
|
||||
contentDescription += ("," + mContext.getString(R.string.data_connection_no_internet));
|
||||
}
|
||||
|
||||
@@ -172,6 +172,6 @@ public class QSCarrierGroupTest extends LeakCheckedTest {
|
||||
spiedCarrierGroup.setMobileDataIndicators(
|
||||
mock(NetworkController.IconState.class),
|
||||
mock(NetworkController.IconState.class),
|
||||
0, 0, true, true, "", "", true, 0, true);
|
||||
0, 0, true, true, "", "", "", true, 0, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,15 +115,16 @@ public class CallbackHandlerTest extends SysuiTestCase {
|
||||
IconState qs = new IconState(true, 1, "");
|
||||
boolean in = true;
|
||||
boolean out = true;
|
||||
String typeDescription = "Test 1";
|
||||
String description = "Test 2";
|
||||
CharSequence typeDescription = "Test 1";
|
||||
CharSequence typeDescriptionHtml = "<b>Test 1</b>";
|
||||
CharSequence description = "Test 2";
|
||||
int type = TelephonyIcons.ICON_1X;
|
||||
int qsType = TelephonyIcons.ICON_1X;
|
||||
boolean wide = true;
|
||||
int subId = 5;
|
||||
boolean roaming = true;
|
||||
mHandler.setMobileDataIndicators(status, qs, type, qsType, in, out, typeDescription,
|
||||
description, wide, subId, roaming);
|
||||
typeDescriptionHtml, description, wide, subId, roaming);
|
||||
waitForCallbacks();
|
||||
|
||||
ArgumentCaptor<IconState> statusArg = ArgumentCaptor.forClass(IconState.class);
|
||||
@@ -132,14 +133,16 @@ public class CallbackHandlerTest extends SysuiTestCase {
|
||||
ArgumentCaptor<Integer> qsTypeIconArg = ArgumentCaptor.forClass(Integer.class);
|
||||
ArgumentCaptor<Boolean> inArg = ArgumentCaptor.forClass(Boolean.class);
|
||||
ArgumentCaptor<Boolean> outArg = ArgumentCaptor.forClass(Boolean.class);
|
||||
ArgumentCaptor<String> typeContentArg = ArgumentCaptor.forClass(String.class);
|
||||
ArgumentCaptor<String> descArg = ArgumentCaptor.forClass(String.class);
|
||||
ArgumentCaptor<CharSequence> typeContentArg = ArgumentCaptor.forClass(CharSequence.class);
|
||||
ArgumentCaptor<CharSequence> typeContentHtmlArg =
|
||||
ArgumentCaptor.forClass(CharSequence.class);
|
||||
ArgumentCaptor<CharSequence> descArg = ArgumentCaptor.forClass(CharSequence.class);
|
||||
ArgumentCaptor<Boolean> wideArg = ArgumentCaptor.forClass(Boolean.class);
|
||||
ArgumentCaptor<Integer> subIdArg = ArgumentCaptor.forClass(Integer.class);
|
||||
Mockito.verify(mSignalCallback).setMobileDataIndicators(statusArg.capture(),
|
||||
qsArg.capture(), typeIconArg.capture(), qsTypeIconArg.capture(), inArg.capture(),
|
||||
outArg.capture(), typeContentArg.capture(), descArg.capture(), wideArg.capture(),
|
||||
subIdArg.capture(), eq(roaming));
|
||||
outArg.capture(), typeContentArg.capture(), typeContentHtmlArg.capture(),
|
||||
descArg.capture(), wideArg.capture(), subIdArg.capture(), eq(roaming));
|
||||
assertEquals(status, statusArg.getValue());
|
||||
assertEquals(qs, qsArg.getValue());
|
||||
assertEquals(type, (int) typeIconArg.getValue());
|
||||
@@ -147,6 +150,7 @@ public class CallbackHandlerTest extends SysuiTestCase {
|
||||
assertEquals(in, (boolean) inArg.getValue());
|
||||
assertEquals(out, (boolean) outArg.getValue());
|
||||
assertEquals(typeDescription, typeContentArg.getValue());
|
||||
assertEquals(typeDescriptionHtml, typeContentHtmlArg.getValue());
|
||||
assertEquals(description, descArg.getValue());
|
||||
assertEquals(wide, (boolean) wideArg.getValue());
|
||||
assertEquals(subId, (int) subIdArg.getValue());
|
||||
|
||||
@@ -350,7 +350,7 @@ public class NetworkControllerBaseTest extends SysuiTestCase {
|
||||
iconArg.capture(),
|
||||
anyInt(),
|
||||
typeIconArg.capture(), dataInArg.capture(), dataOutArg.capture(),
|
||||
anyString(), anyString(), anyBoolean(), anyInt(), anyBoolean());
|
||||
anyString(), anyString(), anyString(), anyBoolean(), anyInt(), anyBoolean());
|
||||
IconState iconState = iconArg.getValue();
|
||||
int state = SignalDrawable.getState(icon, SignalStrength.NUM_SIGNAL_STRENGTH_BINS,
|
||||
false);
|
||||
@@ -382,8 +382,8 @@ public class NetworkControllerBaseTest extends SysuiTestCase {
|
||||
iconArg.capture(),
|
||||
any(),
|
||||
typeIconArg.capture(),
|
||||
anyInt(), anyBoolean(), anyBoolean(), anyString(), anyString(), anyBoolean(),
|
||||
anyInt(), eq(roaming));
|
||||
anyInt(), anyBoolean(), anyBoolean(), anyString(), anyString(), anyString(),
|
||||
anyBoolean(), anyInt(), eq(roaming));
|
||||
IconState iconState = iconArg.getValue();
|
||||
|
||||
int state = icon == -1 ? 0
|
||||
@@ -426,6 +426,7 @@ public class NetworkControllerBaseTest extends SysuiTestCase {
|
||||
dataInArg.capture(),
|
||||
dataOutArg.capture(),
|
||||
typeContentDescriptionArg.capture(),
|
||||
typeContentDescriptionArg.capture(),
|
||||
anyString(), anyBoolean(), anyInt(), anyBoolean());
|
||||
|
||||
IconState iconState = iconArg.getValue();
|
||||
|
||||
@@ -370,7 +370,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
|
||||
|
||||
String defaultNetworkName = mMobileSignalController
|
||||
.getStringIfExists(
|
||||
com.android.internal.R.string.lockscreen_carrier_default);
|
||||
com.android.internal.R.string.lockscreen_carrier_default).toString();
|
||||
assertNetworkNameEquals(defaultNetworkName);
|
||||
}
|
||||
|
||||
@@ -384,7 +384,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
|
||||
mNetworkController.onReceive(mContext, intent);
|
||||
|
||||
String defaultNetworkName = mMobileSignalController.getStringIfExists(
|
||||
com.android.internal.R.string.lockscreen_carrier_default);
|
||||
com.android.internal.R.string.lockscreen_carrier_default).toString();
|
||||
assertNetworkNameEquals(defaultNetworkName);
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
|
||||
|
||||
assertNetworkNameEquals(plmn
|
||||
+ mMobileSignalController.getStringIfExists(
|
||||
R.string.status_bar_network_name_separator)
|
||||
R.string.status_bar_network_name_separator).toString()
|
||||
+ spn);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user