Loading packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java +6 −2 Original line number Original line Diff line number Diff line Loading @@ -94,7 +94,11 @@ public class HotspotTile extends QSTile<QSTile.BooleanState> { state.visible = mController.isHotspotSupported() && mUsageTracker.isRecentlyUsed(); state.visible = mController.isHotspotSupported() && mUsageTracker.isRecentlyUsed(); state.label = mContext.getString(R.string.quick_settings_hotspot_label); state.label = mContext.getString(R.string.quick_settings_hotspot_label); state.value = mController.isHotspotEnabled(); if (arg instanceof Boolean) { state.value = (boolean) arg; } else { mController.isHotspotEnabled(); } state.icon = state.visible && state.value ? mEnable : mDisable; state.icon = state.visible && state.value ? mEnable : mDisable; } } Loading @@ -120,7 +124,7 @@ public class HotspotTile extends QSTile<QSTile.BooleanState> { private final class Callback implements HotspotController.Callback { private final class Callback implements HotspotController.Callback { @Override @Override public void onHotspotChanged(boolean enabled) { public void onHotspotChanged(boolean enabled) { refreshState(); refreshState(enabled); } } }; }; Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -111,7 +111,9 @@ public class HotspotControllerImpl implements HotspotController { @Override @Override public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) { if (DEBUG) Log.d(TAG, "onReceive " + intent.getAction()); if (DEBUG) Log.d(TAG, "onReceive " + intent.getAction()); fireCallback(isHotspotEnabled()); int state = intent.getIntExtra( WifiManager.EXTRA_WIFI_AP_STATE, WifiManager.WIFI_AP_STATE_FAILED); fireCallback(WifiManager.WIFI_AP_STATE_ENABLED == state); } } } } } } Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java +6 −2 Original line number Original line Diff line number Diff line Loading @@ -94,7 +94,11 @@ public class HotspotTile extends QSTile<QSTile.BooleanState> { state.visible = mController.isHotspotSupported() && mUsageTracker.isRecentlyUsed(); state.visible = mController.isHotspotSupported() && mUsageTracker.isRecentlyUsed(); state.label = mContext.getString(R.string.quick_settings_hotspot_label); state.label = mContext.getString(R.string.quick_settings_hotspot_label); state.value = mController.isHotspotEnabled(); if (arg instanceof Boolean) { state.value = (boolean) arg; } else { mController.isHotspotEnabled(); } state.icon = state.visible && state.value ? mEnable : mDisable; state.icon = state.visible && state.value ? mEnable : mDisable; } } Loading @@ -120,7 +124,7 @@ public class HotspotTile extends QSTile<QSTile.BooleanState> { private final class Callback implements HotspotController.Callback { private final class Callback implements HotspotController.Callback { @Override @Override public void onHotspotChanged(boolean enabled) { public void onHotspotChanged(boolean enabled) { refreshState(); refreshState(enabled); } } }; }; Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java +3 −1 Original line number Original line Diff line number Diff line Loading @@ -111,7 +111,9 @@ public class HotspotControllerImpl implements HotspotController { @Override @Override public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) { if (DEBUG) Log.d(TAG, "onReceive " + intent.getAction()); if (DEBUG) Log.d(TAG, "onReceive " + intent.getAction()); fireCallback(isHotspotEnabled()); int state = intent.getIntExtra( WifiManager.EXTRA_WIFI_AP_STATE, WifiManager.WIFI_AP_STATE_FAILED); fireCallback(WifiManager.WIFI_AP_STATE_ENABLED == state); } } } } } }