From e0d09999e9f36d6aca3705d012eddfdcbbb6f053 Mon Sep 17 00:00:00 2001 From: Mitchell Wills Date: Mon, 29 Aug 2016 20:21:37 -0700 Subject: [PATCH 1/2] DO NOT MERGE Revert "Add WiFi toggle prompts - framework" This reverts commit 40f8b9251831c5f009fd476b1a3d216e126d3ef0. Change-Id: I9a1d861277e5d32405da5815c8b4e5d616febf10 --- .../com/android/commands/svc/WifiCommand.java | 2 +- wifi/java/android/net/wifi/IWifiManager.aidl | 2 +- wifi/java/android/net/wifi/WifiManager.java | 25 +------------------ 3 files changed, 3 insertions(+), 26 deletions(-) diff --git a/cmds/svc/src/com/android/commands/svc/WifiCommand.java b/cmds/svc/src/com/android/commands/svc/WifiCommand.java index 633dd9787cb11..94214ff9694fb 100644 --- a/cmds/svc/src/com/android/commands/svc/WifiCommand.java +++ b/cmds/svc/src/com/android/commands/svc/WifiCommand.java @@ -52,7 +52,7 @@ public class WifiCommand extends Svc.Command { IWifiManager wifiMgr = IWifiManager.Stub.asInterface(ServiceManager.getService(Context.WIFI_SERVICE)); try { - wifiMgr.setWifiEnabled("com.android.shell", flag); + wifiMgr.setWifiEnabled(flag); } catch (RemoteException e) { System.err.println("Wi-Fi operation failed: " + e); diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl index b62ffac3efa97..3674f0f4baa7c 100644 --- a/wifi/java/android/net/wifi/IWifiManager.aidl +++ b/wifi/java/android/net/wifi/IWifiManager.aidl @@ -89,7 +89,7 @@ interface IWifiManager WifiInfo getConnectionInfo(); - boolean setWifiEnabled(String packageName, boolean enable); + boolean setWifiEnabled(boolean enable); int getWifiEnabledState(); diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index 2b73facfda3e1..19ecbdbd893af 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -19,7 +19,6 @@ package android.net.wifi; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.annotation.SystemApi; -import android.bluetooth.BluetoothAdapter; import android.content.Context; import android.net.ConnectivityManager; import android.net.DhcpInfo; @@ -561,28 +560,6 @@ public class WifiManager { @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String ACTION_PICK_WIFI_NETWORK = "android.net.wifi.PICK_WIFI_NETWORK"; - /** - * Activity Action: Show UI to get user approval to enable WiFi. - *

Input: {@link android.content.Intent#EXTRA_PACKAGE_NAME} string extra with - * the name of the app requesting the action. - *

Output: Nothing. - * - * @hide - */ - @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) - public static final String ACTION_REQUEST_ENABLE = "android.net.wifi.action.REQUEST_ENABLE"; - - /** - * Activity Action: Show UI to get user approval to disable WiFi. - *

Input: {@link android.content.Intent#EXTRA_PACKAGE_NAME} string extra with - * the name of the app requesting the action. - *

Output: Nothing. - * - * @hide - */ - @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) - public static final String ACTION_REQUEST_DISABLE = "android.net.wifi.action.REQUEST_DISABLE"; - /** * Internally used Wi-Fi lock mode representing the case were no locks are held. * @hide @@ -1466,7 +1443,7 @@ public class WifiManager { */ public boolean setWifiEnabled(boolean enabled) { try { - return mService.setWifiEnabled(mContext.getOpPackageName(), enabled); + return mService.setWifiEnabled(enabled); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } From accde60f09508f9543a094247ed95ce2ae605912 Mon Sep 17 00:00:00 2001 From: Mitchell Wills Date: Mon, 29 Aug 2016 20:21:57 -0700 Subject: [PATCH 2/2] DO NOT MERGE Revert "Add Bluetooth toggle prompts - framework" This reverts commit 6bc2a92a5983e971ab9a04301fe4070e5b1f9179. Change-Id: Ie00d00d3f1649bef02abb0107e1f93445ba7a950 --- core/res/res/values/config.xml | 7 ------- core/res/res/values/symbols.xml | 3 --- 2 files changed, 10 deletions(-) diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index e87d8de679311..05d9a28333b76 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -2492,11 +2492,4 @@ - - false - diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index a3dd91b4559c3..5018e2fb63c05 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -2613,7 +2613,4 @@ - - -