diff options
author | Rashed Abdel-Tawab <rashed@linux.com> | 2014-11-30 00:17:03 -0500 |
---|---|---|
committer | Michael Bestas <mikeioannina@gmail.com> | 2015-12-12 10:07:27 -0800 |
commit | ecb5cdb170d4caceea603e15428cea6267c1dcf7 (patch) | |
tree | 7cfc3f9eb98d6a974a62f6a8cead38867ac77e15 | |
parent | 02b98156165c56c1e8d563cf3e33d097ffe8762b (diff) | |
download | frameworks_base-ecb5cdb170d4caceea603e15428cea6267c1dcf7.zip frameworks_base-ecb5cdb170d4caceea603e15428cea6267c1dcf7.tar.gz frameworks_base-ecb5cdb170d4caceea603e15428cea6267c1dcf7.tar.bz2 |
Status bar: Add HSPA+ icons
Forward port H+ icon in the status bar when connected to HSPA+
Uses new vector drawables by blunden
Change-Id: Ia745c524d5e2530f50f12f961ea8533a4c8f5842
6 files changed, 92 insertions, 1 deletions
diff --git a/packages/SystemUI/res/drawable/ic_qs_signal_hp.xml b/packages/SystemUI/res/drawable/ic_qs_signal_hp.xml new file mode 100644 index 0000000..b8ff918 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_signal_hp.xml @@ -0,0 +1,27 @@ +<!-- + Copyright (C) 2014 The CyanogenMod Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="16.4dp" + android:height="32dp" + android:viewportWidth="16.4" + android:viewportHeight="32"> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M8,14.667H5.867V10h-3.6v4.667H0V3.333h2.267v4.933h3.6V3.333H8V14.667Z" /> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M16.4,5.6h-2.267V3.333H12V5.6H9.733v2.133H12V10h2.133V7.733H16.4V5.6Z" /> +</vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_hp.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_hp.xml new file mode 100644 index 0000000..a464e18 --- /dev/null +++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_hp.xml @@ -0,0 +1,27 @@ +<!-- + Copyright (C) 2014 The CyanogenMod Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="8.454dp" + android:height="17dp" + android:viewportWidth="8.454" + android:viewportHeight="17"> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M4.25,7.792H3.117V5.313H1.204v2.479H0V1.771h1.204v2.621h1.912V1.771H4.25V7.792Z" /> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M8.454,2.975H7.25V1.771H6.117v1.204H4.912v1.133h1.205v1.205H7.25V4.108h1.204V2.975Z" /> +</vector> diff --git a/packages/SystemUI/res/values/cm_strings.xml b/packages/SystemUI/res/values/cm_strings.xml index 8363efa..93b66e1 100644 --- a/packages/SystemUI/res/values/cm_strings.xml +++ b/packages/SystemUI/res/values/cm_strings.xml @@ -19,6 +19,9 @@ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Content description of the data connection type HSPA+ for accessibility (not shown on the screen). [CHAR LIMIT=NONE] --> + <string name="accessibility_data_connection_hspap">HSPA+</string> + <!-- Weather string format in expanded statusbar header --> <string name="status_bar_expanded_header_weather_format"><xliff:g id="temp">%1$s</xliff:g> - <xliff:g id="condition">%2$s</xliff:g></string> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java index f79b428..33df7a8 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java @@ -188,6 +188,9 @@ public class MobileSignalController extends SignalController< mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSDPA, hGroup); mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSUPA, hGroup); mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSPA, hGroup); + if (mConfig.hspaDataDistinguishable) { + hGroup = TelephonyIcons.HP; + } mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSPAP, hGroup); if (mConfig.show4gForLte) { 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 b59f283..78507be 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java @@ -755,6 +755,7 @@ public class NetworkControllerImpl extends BroadcastReceiver datatype.equals("e") ? TelephonyIcons.E : datatype.equals("g") ? TelephonyIcons.G : datatype.equals("h") ? TelephonyIcons.H : + datatype.equals("h+") ? TelephonyIcons.HP : datatype.equals("lte") ? TelephonyIcons.LTE : datatype.equals("roam") ? TelephonyIcons.ROAMING : TelephonyIcons.UNKNOWN; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java index 68f8191..d770681 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java @@ -153,6 +153,20 @@ class TelephonyIcons { static final int QS_DATA_H = R.drawable.ic_qs_signal_h; + //HSPA+ + static final int[][] DATA_HP = { + { R.drawable.stat_sys_data_fully_connected_hp, + R.drawable.stat_sys_data_fully_connected_hp, + R.drawable.stat_sys_data_fully_connected_hp, + R.drawable.stat_sys_data_fully_connected_hp }, + { R.drawable.stat_sys_data_fully_connected_hp, + R.drawable.stat_sys_data_fully_connected_hp, + R.drawable.stat_sys_data_fully_connected_hp, + R.drawable.stat_sys_data_fully_connected_hp } + }; + + static final int QS_DATA_HP = R.drawable.ic_qs_signal_hp; + //CDMA // Use 3G icons for EVDO data and 1x icons for 1XRTT data static final int[][] DATA_1X = { @@ -215,6 +229,7 @@ class TelephonyIcons { static final int ICON_G = R.drawable.stat_sys_data_fully_connected_g; static final int ICON_E = R.drawable.stat_sys_data_fully_connected_e; static final int ICON_H = R.drawable.stat_sys_data_fully_connected_h; + static final int ICON_HP = R.drawable.stat_sys_data_fully_connected_hp; static final int ICON_3G = R.drawable.stat_sys_data_fully_connected_3g; static final int ICON_4G = R.drawable.stat_sys_data_fully_connected_4g; static final int ICON_4G_PLUS = R.drawable.stat_sys_data_fully_connected_4g_plus; @@ -338,12 +353,27 @@ class TelephonyIcons { TelephonyIcons.TELEPHONY_NO_NETWORK, TelephonyIcons.QS_TELEPHONY_NO_NETWORK, AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], - R.string.accessibility_data_connection_3_5g, + R.string.accessibility_data_connection_hspa, TelephonyIcons.ICON_H, false, TelephonyIcons.QS_DATA_H ); + static final MobileIconGroup HP = new MobileIconGroup( + "HP", + TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH, + TelephonyIcons.QS_TELEPHONY_SIGNAL_STRENGTH, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH, + 0, 0, + TelephonyIcons.TELEPHONY_NO_NETWORK, + TelephonyIcons.QS_TELEPHONY_NO_NETWORK, + AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0], + R.string.accessibility_data_connection_hspap, + TelephonyIcons.ICON_HP, + false, + TelephonyIcons.QS_DATA_HP + ); + static final MobileIconGroup FOUR_G = new MobileIconGroup( "4G", TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH, |