Loading packages/SystemUI/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -487,6 +487,9 @@ <!-- Content description of the data connection type 5Ge. [CHAR LIMIT=NONE] --> <string name="data_connection_5ge" translatable="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" translatable="false">5G</string> Loading packages/SystemUI/src/com/android/systemui/qs/QSCarrierGroupController.java +5 −3 Original line number Diff line number Diff line Loading @@ -69,8 +69,10 @@ public class QSCarrierGroupController { @Override 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) { boolean activityIn, boolean activityOut, 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); Loading @@ -83,7 +85,7 @@ public class QSCarrierGroupController { 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; mMainHandler.obtainMessage(H.MSG_UPDATE_STATE).sendToTarget(); } Loading packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java +11 −6 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -205,12 +206,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) { Loading Loading @@ -251,14 +253,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; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java +5 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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(); Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/CallbackHandler.java +13 −18 Original line number Diff line number Diff line Loading @@ -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() { 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() { 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, description, isWide, subId, roaming); } activityIn, activityOut, typeContentDescription, typeContentDescriptionHtml, description, isWide, subId, roaming); } }); } Loading Loading
packages/SystemUI/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -487,6 +487,9 @@ <!-- Content description of the data connection type 5Ge. [CHAR LIMIT=NONE] --> <string name="data_connection_5ge" translatable="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" translatable="false">5G</string> Loading
packages/SystemUI/src/com/android/systemui/qs/QSCarrierGroupController.java +5 −3 Original line number Diff line number Diff line Loading @@ -69,8 +69,10 @@ public class QSCarrierGroupController { @Override 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) { boolean activityIn, boolean activityOut, 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); Loading @@ -83,7 +85,7 @@ public class QSCarrierGroupController { 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; mMainHandler.obtainMessage(H.MSG_UPDATE_STATE).sendToTarget(); } Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java +11 −6 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -205,12 +206,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) { Loading Loading @@ -251,14 +253,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; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java +5 −3 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/CallbackHandler.java +13 −18 Original line number Diff line number Diff line Loading @@ -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() { 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() { 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, description, isWide, subId, roaming); } activityIn, activityOut, typeContentDescription, typeContentDescriptionHtml, description, isWide, subId, roaming); } }); } Loading