From e25bd01ad662d1a5b19592c98fac0a3035081375 Mon Sep 17 00:00:00 2001 From: Shishir Agrawal Date: Thu, 10 Sep 2015 14:42:08 -0700 Subject: Allow non-persistent manual network selection. Allow the API to specify if the selection should be persisted across reboots. This also has the side affect of not notifying the user when signal is lost. Necessary becasue the API might be used transparent to the user and the notifications will be bizarre. Bug: 23971948 Change-Id: Ibb15144fb8a61f63a9c967d875d9ce8c70520ff0 --- telephony/java/android/telephony/TelephonyManager.java | 5 +++-- telephony/java/com/android/internal/telephony/ITelephony.aidl | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'telephony') diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index eca0cc0..47f13c9 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -3571,11 +3571,12 @@ public class TelephonyManager { * * @hide */ - public boolean setNetworkSelectionModeManual(int subId, OperatorInfo operator) { + public boolean setNetworkSelectionModeManual(int subId, OperatorInfo operator, + boolean persistSelection) { try { ITelephony telephony = getITelephony(); if (telephony != null) - return telephony.setNetworkSelectionModeManual(subId, operator); + return telephony.setNetworkSelectionModeManual(subId, operator, persistSelection); } catch (RemoteException ex) { Rlog.e(TAG, "setNetworkSelectionModeManual RemoteException", ex); } catch (NullPointerException ex) { diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 661f12d..dcece26 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -707,9 +707,13 @@ interface ITelephony { * * @param subId the id of the subscription. * @param operatorInfo the operator to attach to. + * @param persistSelection should the selection persist till reboot or its + * turned off? Will also result in notification being not shown to + * the user if the signal is lost. * @return true if the request suceeded. */ - boolean setNetworkSelectionModeManual(int subId, in OperatorInfo operator); + boolean setNetworkSelectionModeManual(int subId, in OperatorInfo operator, + boolean persistSelection); /** * Set the preferred network type. -- cgit v1.1