diff options
author | Derek Tan <derektan@google.com> | 2014-07-08 16:55:43 -0700 |
---|---|---|
committer | Derek Tan <derektan@google.com> | 2014-07-12 10:36:58 -0700 |
commit | f9aefdb534c6cb2af22dfb7614a1c15c2d67dd9c (patch) | |
tree | afe48f32b770da85a6f05b8702ca985691298289 /telephony/java/android | |
parent | dec17299fef93f673d8e8cab0ec0f734bf6b8539 (diff) | |
download | frameworks_base-f9aefdb534c6cb2af22dfb7614a1c15c2d67dd9c.zip frameworks_base-f9aefdb534c6cb2af22dfb7614a1c15c2d67dd9c.tar.gz frameworks_base-f9aefdb534c6cb2af22dfb7614a1c15c2d67dd9c.tar.bz2 |
Different Mobile Network Settings screen for Nova multi-profile SIMs.
Simplify the Mobile Network Settings screen regardless CDMA or GSM activeness
to provide a unified experience for Nova users.
For more details, please refer to b/15854628.
Bug: 15854628
Change-Id: Ieba04eff49824aa09a056cd4fb142cbd268207a3
Diffstat (limited to 'telephony/java/android')
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index f136292..4459c36 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -3184,4 +3184,73 @@ public class TelephonyManager { Log.e(TAG, "Error calling ITelephony#setSystemDefault", e); } } + + /** + * Set whether Android should display a simplified Mobile Network Settings UI. + * The setting won't be persisted during power cycle. + * <p> + * Requires Permission: + * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} + * + * @param enable true means enabling the simplified UI. + * + * @hide + */ + public void enableSimplifiedNetworkSettings(boolean enable) { + enableSimplifiedNetworkSettings(getDefaultSubscription(), enable); + } + + /** + * Set whether Android should display a simplified Mobile Network Settings UI. + * The setting won't be persisted during power cycle. + * <p> + * Requires Permission: + * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} + * + * @param subId for which the simplified UI should be enabled or disabled. + * @param enable true means enabling the simplified UI. + * + * @hide + */ + public void enableSimplifiedNetworkSettings(long subId, boolean enable) { + try { + getITelephony().enableSimplifiedNetworkSettings(subId, enable); + } catch (RemoteException ex) { + } catch (NullPointerException ex) { + } + } + + /** + * Get whether a simplified Mobile Network Settings UI is enabled. + * <p> + * Requires Permission: + * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} + * + * @return true if the simplified UI is enabled. + * + * @hide + */ + public boolean getSimplifiedNetworkSettingsEnabled() { + return getSimplifiedNetworkSettingsEnabled(getDefaultSubscription()); + } + + /** + * Get whether a simplified Mobile Network Settings UI is enabled. + * <p> + * Requires Permission: + * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} + * + * @param subId for which the simplified UI should be enabled or disabled. + * @return true if the simplified UI is enabled. + * + * @hide + */ + public boolean getSimplifiedNetworkSettingsEnabled(long subId) { + try { + return getITelephony().getSimplifiedNetworkSettingsEnabled(subId); + } catch (RemoteException ex) { + } catch (NullPointerException ex) { + } + return false; + } } |