Skip to content

Commit

Permalink
Add support for LTE, LTE+ data icons display
Browse files Browse the repository at this point in the history
LTE/LTE+ data icons must be displayed on signal bar
when PS is registered to LTE/LTE_CA RATs as per
operator requirement.

Change-Id: I60b8e50c92d06c0d847df501178add070b98273b
CRs-Fixed: 957277, 957403
  • Loading branch information
Susheel nyamala committed Feb 10, 2016
1 parent 7f2210d commit 0d6d29e
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 21 deletions.
8 changes: 4 additions & 4 deletions packages/SystemUI/res/drawable/ic_qs_signal_lte_plus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="30dp"
android:height="27dp"
android:height="14dp"
android:viewportHeight="24.0"
android:viewportWidth="30"
android:viewportHeight="27">
android:width="15dp" >

<path
android:fillColor="#FFFFFF"
Expand All @@ -45,4 +45,4 @@
<path
android:fillColor="#FFFFFF"
android:pathData="M25.863,7.498h2.969v1.734h-2.969v3.383H24.02V9.232h-2.984V7.498h2.984V4.334h1.844V7.498z" />
</vector>
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Copyright (C) 2014 The Android Open Source Project
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="9.208dp"
android:height="17dp"
android:viewportWidth="13.0"
android:viewportHeight="24.0">
android:height="17dp"
android:viewportHeight="24.0"
android:viewportWidth="13.0"
android:width="8dp" >
<path
android:fillColor="#FFFFFFFF"
android:pathData="M2.000000,9.700000l2.000000,0.000000L4.000000,11.000000L0.300000,11.000000L0.300000,2.500000L2.000000,2.500000L2.000000,9.700000z"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="15dp"
android:height="13.5dp"
android:viewportWidth="30"
android:viewportHeight="27">
android:width="16.5dp"
android:height="12dp"
android:viewportWidth="45"
android:viewportHeight="24.0">

<path
android:fillColor="#FFFFFF"
Expand Down
6 changes: 5 additions & 1 deletion packages/SystemUI/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<!--NETWORK_TYPE_EVDO_B-->
<item>drawable/stat_sys_data_fully_connected_3g</item>
<!--NETWORK_TYPE_LTE-->
<item>drawable/stat_sys_data_fully_connected_3g</item>
<item>drawable/stat_sys_data_fully_connected_lte</item>
<!--NETWORK_TYPE_EHRPD-->
<item>drawable/stat_sys_data_fully_connected_3g</item>
<!--NETWORK_TYPE_HSPAP-->
Expand All @@ -89,6 +89,8 @@
<item>drawable/stat_sys_data_fully_connected_3g</item>
<!--NETWORK_TYPE_IWLAN-->
<item>0</item>
<!--NETWORK_TYPE_LTE_CA-->
<item>drawable/stat_sys_data_fully_connected_lte_plus</item>
</string-array>

<!--reserved for overlay-->
Expand Down Expand Up @@ -148,6 +150,8 @@
<item>string/accessibility_data_connection_3g</item>
<!--NETWORK_TYPE_IWLAN-->
<item>0</item>
<!--NETWORK_TYPE_LTE_CA-->
<item>string/accessibility_data_connection_lte_plus</item>
</string-array>

<string-array name="telephony_data_type_generation_description">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import android.util.Log;
import android.util.SparseArray;

import com.android.internal.telephony.CarrierAppUtils;
import com.android.systemui.R;
import com.android.systemui.statusbar.policy.MobileSignalController.MobileIconGroup;

Expand Down Expand Up @@ -308,6 +309,7 @@ class TelephonyIcons {
static int[] mSelectedDataActivityIndex;
static int[] mSelectedSignalStreagthIndex;
static SparseArray<Integer> mStacked2SingleIconLookup;
static CarrierAppUtils.CARRIER carrier = CarrierAppUtils.getCarrierId();

private static Resources mRes;
private static boolean isInitiated = false;
Expand Down Expand Up @@ -538,7 +540,22 @@ static void updateDataType(int slot, int type, boolean showAtLeast3G,
break;
case TelephonyManager.NETWORK_TYPE_LTE:
case TelephonyManager.NETWORK_TYPE_LTE_CA:
if (show4GforLte) {
if (!show4GforLte || (carrier != null && (CarrierAppUtils.
CARRIER.TELEPHONY_CARRIER_ONE == carrier))) {
mSelectedDataActivityIndex[slot] = DATA_TYPE_LTE;
mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
dataTypeArray[type], null, NS);
if ( type == TelephonyManager.NETWORK_TYPE_LTE_CA) {
mSelectedQSDataTypeIcon[slot] = QS_DATA_LTE_PLUS;
} else {
mSelectedQSDataTypeIcon[slot] = QS_DATA_LTE;
}
mSelectedDataTypeDesc[slot] = mDataTypeDescriptionArray[type];
mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_4G;
} else {
mSelectedDataActivityIndex[slot] = DATA_TYPE_4G;
mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
mDataTypeGenerationArray[1], null, NS);
if ( type == TelephonyManager.NETWORK_TYPE_LTE_CA) {
mSelectedDataActivityIndex[slot] = DATA_TYPE_4G_PLUS;
//Select 4G+ icon.
Expand All @@ -552,13 +569,6 @@ static void updateDataType(int slot, int type, boolean showAtLeast3G,
mSelectedQSDataTypeIcon[slot] = QS_DATA_4G;
mSelectedDataTypeDesc[slot] = mDataTypeGenerationDescArray[1];
mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_4G;
} else {
mSelectedDataActivityIndex[slot] = DATA_TYPE_LTE;
mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
dataTypeArray[type], null, NS);
mSelectedQSDataTypeIcon[slot] = QS_DATA_LTE;
mSelectedDataTypeDesc[slot] = mDataTypeDescriptionArray[type];
mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_4G;
}
break;
case TelephonyManager.NETWORK_TYPE_GPRS:
Expand Down

0 comments on commit 0d6d29e

Please sign in to comment.