Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Add LTE overlays for signal strength indicators.
Browse files Browse the repository at this point in the history
Note that operators that wish to show "4G" instead of "LTE"
on these networks can set config_show4GForLTE to true.

Bug: 9265513
Bug: 9265217
Change-Id: If7f3580da7266b0d0c62639e30684393d4e03392
  • Loading branch information
dsandler committed Jun 7, 2013
1 parent 38bdf10 commit 2fe71d0
Show file tree
Hide file tree
Showing 28 changed files with 32 additions and 5 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/SystemUI/res/values/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,8 @@

<!-- Enable the "flip settings" panel -->
<bool name="config_hasFlipSettingsPanel">true</bool>

<!-- Should "4G" be shown instead of "LTE" when the network is NETWORK_TYPE_LTE? -->
<bool name="config_show4GForLTE">false</bool>
</resources>

3 changes: 3 additions & 0 deletions packages/SystemUI/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@
<!-- Content description of the data connection type 4G for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_data_connection_4g">4G</string>

<!-- Content description of the data connection type LTE for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_data_connection_lte">LTE</string>

<!-- Content description of the data connection type CDMA for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_data_connection_cdma">CDMA</string>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public class NetworkController extends BroadcastReceiver {
boolean mShowPhoneRSSIForData = false;
boolean mShowAtLeastThreeGees = false;
boolean mAlwaysShowCdmaRssi = false;
boolean mShow4GforLTE = false;

String mContentDescriptionPhoneSignal;
String mContentDescriptionWifi;
Expand Down Expand Up @@ -199,6 +200,7 @@ public NetworkController(Context context) {

mShowPhoneRSSIForData = res.getBoolean(R.bool.config_showPhoneRSSIForData);
mShowAtLeastThreeGees = res.getBoolean(R.bool.config_showMin3G);
mShow4GforLTE = res.getBoolean(R.bool.config_show4GForLTE);
mAlwaysShowCdmaRssi = res.getBoolean(
com.android.internal.R.bool.config_alwaysUseCdmaRssi);

Expand Down Expand Up @@ -678,11 +680,19 @@ private final void updateDataNetType() {
R.string.accessibility_data_connection_3g);
break;
case TelephonyManager.NETWORK_TYPE_LTE:
mDataIconList = TelephonyIcons.DATA_4G[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_4g;
mQSDataTypeIconId = R.drawable.ic_qs_signal_4g;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_4g);
if (mShow4GforLTE) {
mDataIconList = TelephonyIcons.DATA_4G[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_4g;
mQSDataTypeIconId = R.drawable.ic_qs_signal_4g;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_4g);
} else {
mDataIconList = TelephonyIcons.DATA_LTE[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_lte;
mQSDataTypeIconId = R.drawable.ic_qs_signal_lte;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_lte);
}
break;
default:
if (!mShowAtLeastThreeGees) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,17 @@ class TelephonyIcons {
R.drawable.stat_sys_data_fully_connected_4g }
};

// LTE branded "LTE"
static final int[][] DATA_LTE = {
{ R.drawable.stat_sys_data_connected_lte,
R.drawable.stat_sys_data_connected_lte,
R.drawable.stat_sys_data_connected_lte,
R.drawable.stat_sys_data_connected_lte },
{ R.drawable.stat_sys_data_fully_connected_lte,
R.drawable.stat_sys_data_fully_connected_lte,
R.drawable.stat_sys_data_fully_connected_lte,
R.drawable.stat_sys_data_fully_connected_lte }
};

}

0 comments on commit 2fe71d0

Please sign in to comment.