Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Snippets Groups Projects
Commit a3531ba5 authored by Rashed Abdel-Tawab's avatar Rashed Abdel-Tawab Committed by Steve Kondik
Browse files

Status bar: Add HSPA+ icons

Forward port H+ icon in the status bar when connected to HSPA+
Uses new vector drawables by @blunden

PS1: Initial commit
PS2: New vectors (thanks @blunden)
PS3: Cleanup
PS4: Use correct indentation (oops)
PS5: Show correct icon in status bar (thanks @mikeNG)
PS6: Remove leftover Holo icons (thanks @mikeNG)
PS7: Rebase to depend on Holo icon removal (thanks @mikeNG)
PS8: Update commit message

Change-Id: Ia745c524d5e2530f50f12f961ea8533a4c8f5842
parent e3a5a496
Branches
No related tags found
No related merge requests found
<!--
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>
<!--
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>
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<!--NETWORK_TYPE_EHRPD--> <!--NETWORK_TYPE_EHRPD-->
<item>drawable/stat_sys_data_fully_connected_3g</item> <item>drawable/stat_sys_data_fully_connected_3g</item>
<!--NETWORK_TYPE_HSPAP--> <!--NETWORK_TYPE_HSPAP-->
<item>drawable/stat_sys_data_fully_connected_h</item> <item>drawable/stat_sys_data_fully_connected_hp</item>
<!--NETWORK_TYPE_GSM--> <!--NETWORK_TYPE_GSM-->
<item>drawable/stat_sys_data_fully_connected_g</item> <item>drawable/stat_sys_data_fully_connected_g</item>
<!--NETWORK_TYPE_TD_SCDMA--> <!--NETWORK_TYPE_TD_SCDMA-->
......
...@@ -144,6 +144,24 @@ class TelephonyIcons { ...@@ -144,6 +144,24 @@ class TelephonyIcons {
R.drawable.ic_qs_signal_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,
R.drawable.ic_qs_signal_hp
};
//CDMA //CDMA
// Use 3G icons for EVDO data and 1x icons for 1XRTT data // Use 3G icons for EVDO data and 1x icons for 1XRTT data
static final int[][] DATA_1X = { static final int[][] DATA_1X = {
...@@ -409,22 +427,12 @@ class TelephonyIcons { ...@@ -409,22 +427,12 @@ class TelephonyIcons {
} }
break; break;
case TelephonyManager.NETWORK_TYPE_HSPAP: case TelephonyManager.NETWORK_TYPE_HSPAP:
if (hspaDistinguishable) { mSelectedDataActivityIndex[sub] = DATA_TYPE_HP;
mSelectedDataActivityIndex[sub] = DATA_TYPE_HP; mSelectedDataTypeIcon[sub] = mRes.getIdentifier(
mSelectedDataTypeIcon[sub] = mRes.getIdentifier( dataTypeArray[type], null, NS);
dataTypeArray[type], null, NS); mSelectedQSDataTypeIcon[sub] = QS_DATA_HP[inetCondition];
mSelectedQSDataTypeIcon[sub] = QS_DATA_H[inetCondition]; mSelectedDataTypeDesc = mDataTypeDescriptionArray[type];
mSelectedDataTypeDesc = mDataTypeDescriptionArray[type]; mSelectedSignalStreagthIndex[sub] = SIGNAL_STRENGTH_TYPE_HP;
mSelectedSignalStreagthIndex[sub] = SIGNAL_STRENGTH_TYPE_HP;
} else {
mSelectedDataActivityIndex[sub] = DATA_TYPE_3G;
mSelectedDataTypeIcon[sub] = mRes.getIdentifier(
mDataTypeGenerationArray[0], null, NS);
mSelectedQSDataTypeIcon[sub] = QS_DATA_3G[inetCondition];
mSelectedDataTypeDesc = mDataTypeGenerationDescArray[0];
mSelectedSignalStreagthIndex[sub] = SIGNAL_STRENGTH_TYPE_3G;
}
break; break;
case TelephonyManager.NETWORK_TYPE_CDMA: case TelephonyManager.NETWORK_TYPE_CDMA:
if (!showAtLeast3G) { if (!showAtLeast3G) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment