diff options
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/svc/src/com/android/commands/svc/DataCommand.java | 15 | ||||
-rw-r--r-- | cmds/svc/src/com/android/commands/svc/WifiCommand.java | 15 |
2 files changed, 4 insertions, 26 deletions
diff --git a/cmds/svc/src/com/android/commands/svc/DataCommand.java b/cmds/svc/src/com/android/commands/svc/DataCommand.java index 72cb86d..406e33b 100644 --- a/cmds/svc/src/com/android/commands/svc/DataCommand.java +++ b/cmds/svc/src/com/android/commands/svc/DataCommand.java @@ -36,9 +36,7 @@ public class DataCommand extends Svc.Command { return shortHelp() + "\n" + "\n" + "usage: svc data [enable|disable]\n" - + " Turn mobile data on or off.\n\n" - + " svc data prefer\n" - + " Set mobile as the preferred data network\n"; + + " Turn mobile data on or off.\n\n"; } public void run(String[] args) { @@ -51,15 +49,6 @@ public class DataCommand extends Svc.Command { } else if ("disable".equals(args[1])) { flag = false; validCommand = true; - } else if ("prefer".equals(args[1])) { - IConnectivityManager connMgr = - IConnectivityManager.Stub.asInterface(ServiceManager.getService(Context.CONNECTIVITY_SERVICE)); - try { - connMgr.setNetworkPreference(ConnectivityManager.TYPE_MOBILE); - } catch (RemoteException e) { - System.err.println("Failed to set preferred network: " + e); - } - return; } if (validCommand) { ITelephony phoneMgr @@ -78,4 +67,4 @@ public class DataCommand extends Svc.Command { } System.err.println(longHelp()); } -}
\ No newline at end of file +} diff --git a/cmds/svc/src/com/android/commands/svc/WifiCommand.java b/cmds/svc/src/com/android/commands/svc/WifiCommand.java index d29e8b2..39f0e35 100644 --- a/cmds/svc/src/com/android/commands/svc/WifiCommand.java +++ b/cmds/svc/src/com/android/commands/svc/WifiCommand.java @@ -36,9 +36,7 @@ public class WifiCommand extends Svc.Command { return shortHelp() + "\n" + "\n" + "usage: svc wifi [enable|disable]\n" - + " Turn Wi-Fi on or off.\n\n" - + " svc wifi prefer\n" - + " Set Wi-Fi as the preferred data network\n"; + + " Turn Wi-Fi on or off.\n\n"; } public void run(String[] args) { @@ -51,15 +49,6 @@ public class WifiCommand extends Svc.Command { } else if ("disable".equals(args[1])) { flag = false; validCommand = true; - } else if ("prefer".equals(args[1])) { - IConnectivityManager connMgr = - IConnectivityManager.Stub.asInterface(ServiceManager.getService(Context.CONNECTIVITY_SERVICE)); - try { - connMgr.setNetworkPreference(ConnectivityManager.TYPE_WIFI); - } catch (RemoteException e) { - System.err.println("Failed to set preferred network: " + e); - } - return; } if (validCommand) { IWifiManager wifiMgr @@ -75,4 +64,4 @@ public class WifiCommand extends Svc.Command { } System.err.println(longHelp()); } -}
\ No newline at end of file +} |