diff options
author | Sanket Padawe <sanketpadawe@google.com> | 2014-12-04 13:41:17 -0800 |
---|---|---|
committer | Sanket Padawe <sanketpadawe@google.com> | 2014-12-04 13:41:17 -0800 |
commit | a2bf987b742b328f56e71eab32a9fa37ec1961ca (patch) | |
tree | 1720b9172e224c1211d5917a922b8f220e17340f /packages/SystemUI/src/com/android/systemui/qs | |
parent | b13c12f58db3026ad30849873b3b6fc664f5ce7b (diff) | |
download | frameworks_base-a2bf987b742b328f56e71eab32a9fa37ec1961ca.zip frameworks_base-a2bf987b742b328f56e71eab32a9fa37ec1961ca.tar.gz frameworks_base-a2bf987b742b328f56e71eab32a9fa37ec1961ca.tar.bz2 |
Doing provisioning check for wifi tethering from SystemUI
+ Calling activity which calls provisioning app only if provisioning
is needed.
+ Hiding Hotspot tile from quick settings when screen is locked.
Bug: 18368949
Change-Id: I5b92a7f2d46c8b5d9b323d6a5d49315694c599f7
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(); |