From aa8749619f4c7a79354b23f34394823166031cc9 Mon Sep 17 00:00:00 2001 From: Amit Mahajan Date: Tue, 11 Jul 2017 11:58:07 -0700 Subject: [PATCH] Change return value of getTetherApnRequired() to a boolean. Test: Basic sanity - verified tethering for T-Mobile Bug: 63150712 Change-Id: I03ce7b6bcf4bbd9d0dfcd733141c0d20d9b3a790 --- telephony/java/android/telephony/TelephonyManager.java | 10 ++++------ .../com/android/internal/telephony/ITelephony.aidl | 9 ++++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 91f832b97ff30..8b4443eab224d 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -6274,14 +6274,12 @@ public class TelephonyManager { } /** - * Check TETHER_DUN_REQUIRED and TETHER_DUN_APN settings, net.tethering.noprovisioning - * SystemProperty to decide whether DUN APN is required for - * tethering. + * Check whether DUN APN is required for tethering. * - * @return 0: Not required. 1: required. 2: Not set. + * @return {@code true} if DUN APN is required for tethering. * @hide */ - public int getTetherApnRequired() { + public boolean getTetherApnRequired() { try { ITelephony telephony = getITelephony(); if (telephony != null) @@ -6291,7 +6289,7 @@ public class TelephonyManager { } catch (NullPointerException ex) { Rlog.e(TAG, "hasMatchedTetherApnSetting NPE", ex); } - return 2; + return false; } diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 2e79c61628447..ad1b25d71ebf3 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -681,13 +681,12 @@ interface ITelephony { int getPreferredNetworkType(int subId); /** - * Check TETHER_DUN_REQUIRED and TETHER_DUN_APN settings, net.tethering.noprovisioning - * SystemProperty to decide whether DUN APN is required for - * tethering. + * Check whether DUN APN is required for tethering. * - * @return 0: Not required. 1: required. 2: Not set. + * @return {@code true} if DUN APN is required for tethering. + * @hide */ - int getTetherApnRequired(); + boolean getTetherApnRequired(); /** * Enables framework IMS and triggers IMS Registration.