diff options
author | Sanket Padawe <sanketpadawe@google.com> | 2014-12-05 20:55:51 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-12-05 20:55:52 +0000 |
commit | 0c1a5bea2eb897b3f1d34b9c25ea6ed0bd5ca6eb (patch) | |
tree | c612a4d675d37f05af985469900e6b71a2a3360e /packages/SystemUI/src/com/android/systemui/qs | |
parent | 2ff214b603939af60cae11727e189eb350b34c39 (diff) | |
parent | a2bf987b742b328f56e71eab32a9fa37ec1961ca (diff) | |
download | frameworks_base-0c1a5bea2eb897b3f1d34b9c25ea6ed0bd5ca6eb.zip frameworks_base-0c1a5bea2eb897b3f1d34b9c25ea6ed0bd5ca6eb.tar.gz frameworks_base-0c1a5bea2eb897b3f1d34b9c25ea6ed0bd5ca6eb.tar.bz2 |
Merge "Doing provisioning check for wifi tethering from SystemUI" into lmp-mr1-dev
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/qs')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java index 9744dca..6e710ef 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java @@ -24,6 +24,7 @@ import com.android.systemui.R; import com.android.systemui.qs.UsageTracker; import com.android.systemui.qs.QSTile; import com.android.systemui.statusbar.policy.HotspotController; +import com.android.systemui.statusbar.policy.KeyguardMonitor; /** Quick settings tile: Hotspot **/ public class HotspotTile extends QSTile<QSTile.BooleanState> { @@ -34,12 +35,14 @@ public class HotspotTile extends QSTile<QSTile.BooleanState> { private final HotspotController mController; private final Callback mCallback = new Callback(); private final UsageTracker mUsageTracker; + private final KeyguardMonitor mKeyguard; public HotspotTile(Host host) { super(host); mController = host.getHotspotController(); mUsageTracker = newUsageTracker(host.getContext()); mUsageTracker.setListening(true); + mKeyguard = host.getKeyguardMonitor(); } @Override @@ -85,7 +88,9 @@ public class HotspotTile extends QSTile<QSTile.BooleanState> { @Override protected void handleUpdateState(BooleanState state, Object arg) { - state.visible = mController.isHotspotSupported() && mUsageTracker.isRecentlyUsed(); + state.visible = mController.isHotspotSupported() && mUsageTracker.isRecentlyUsed() + && !(mController.isProvisioningNeeded() && mKeyguard.isSecure() + && mKeyguard.isShowing()); state.label = mContext.getString(R.string.quick_settings_hotspot_label); state.value = mController.isHotspotEnabled(); |