Loading packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java +5 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,11 @@ public class HotspotTile extends QSTile<QSTile.BooleanState> { mController = host.getHotspotController(); } @Override public boolean isAvailable() { return mController.isHotspotSupported(); } @Override protected void handleDestroy() { super.handleDestroy(); Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotController.java +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ public interface HotspotController { void removeCallback(Callback callback); boolean isHotspotEnabled(); void setHotspotEnabled(boolean enabled); boolean isHotspotSupported(); public interface Callback { void onHotspotChanged(boolean enabled); Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java +6 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,12 @@ public class HotspotControllerImpl implements HotspotController { Context.CONNECTIVITY_SERVICE); } @Override public boolean isHotspotSupported() { return mConnectivityManager.isTetheringSupported() && mConnectivityManager.getTetherableWifiRegexs().length != 0; } public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("HotspotController state:"); pw.print(" mHotspotEnabled="); pw.println(stateToString(mHotspotState)); Loading Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java +5 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,11 @@ public class HotspotTile extends QSTile<QSTile.BooleanState> { mController = host.getHotspotController(); } @Override public boolean isAvailable() { return mController.isHotspotSupported(); } @Override protected void handleDestroy() { super.handleDestroy(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotController.java +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ public interface HotspotController { void removeCallback(Callback callback); boolean isHotspotEnabled(); void setHotspotEnabled(boolean enabled); boolean isHotspotSupported(); public interface Callback { void onHotspotChanged(boolean enabled); Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java +6 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,12 @@ public class HotspotControllerImpl implements HotspotController { Context.CONNECTIVITY_SERVICE); } @Override public boolean isHotspotSupported() { return mConnectivityManager.isTetheringSupported() && mConnectivityManager.getTetherableWifiRegexs().length != 0; } public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("HotspotController state:"); pw.print(" mHotspotEnabled="); pw.println(stateToString(mHotspotState)); Loading