From 0a8155e0c52058f1c2e7249620ac6d285ec7de3e Mon Sep 17 00:00:00 2001 From: Amin Shaikh Date: Thu, 6 Sep 2018 17:23:32 -0400 Subject: [PATCH] Hide arrows in QS tile if mobile data is disabled. Change-Id: I9cc56c569f75c9e8022d0f50bf1d9137211cac54 Fixes: 114147803 Test: manual --- .../src/com/android/systemui/qs/tiles/CellularTile.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java index fb4fcd43a3c58..9e341e2988210 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java @@ -168,12 +168,12 @@ public class CellularTile extends QSTileImpl { } final Resources r = mContext.getResources(); - state.activityIn = cb.enabled && cb.activityIn; - state.activityOut = cb.enabled && cb.activityOut; state.label = r.getString(R.string.mobile_data); boolean mobileDataEnabled = mDataController.isMobileDataSupported() && mDataController.isMobileDataEnabled(); state.value = mobileDataEnabled; + state.activityIn = mobileDataEnabled && cb.activityIn; + state.activityOut = mobileDataEnabled && cb.activityOut; state.expandedAccessibilityClassName = Switch.class.getName(); if (cb.noSim) { state.icon = ResourceIcon.get(R.drawable.ic_qs_no_sim); @@ -231,7 +231,6 @@ public class CellularTile extends QSTileImpl { } private static final class CallbackInfo { - boolean enabled; boolean airplaneModeEnabled; String dataContentDescription; boolean activityIn; @@ -251,7 +250,6 @@ public class CellularTile extends QSTileImpl { // Not data sim, don't display. return; } - mInfo.enabled = qsIcon.visible; mInfo.dataContentDescription = typeContentDescription; mInfo.activityIn = activityIn; mInfo.activityOut = activityOut;