diff options
Diffstat (limited to 'telephony/java')
3 files changed, 5 insertions, 10 deletions
diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java index 8f4a92b..fce4ae7 100644 --- a/telephony/java/android/telephony/PhoneStateListener.java +++ b/telephony/java/android/telephony/PhoneStateListener.java @@ -233,8 +233,7 @@ public class PhoneStateListener { /** * Create a PhoneStateListener for the Phone with the default subscription. - * This class requires Looper.myLooper() not return null. To supply your - * own non-null looper use PhoneStateListener(Looper looper) below. + * This class requires Looper.myLooper() not return null. */ public PhoneStateListener() { this(SubscriptionManager.DEFAULT_SUBSCRIPTION_ID, Looper.myLooper()); diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 99d0af1..34315bf 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -2161,11 +2161,7 @@ public class TelephonyManager { * Returns a constant indicating the call state (cellular) on the device. */ public int getCallState() { - try { - return getTelecomService().getCallState(); - } catch (RemoteException | NullPointerException e) { - return CALL_STATE_IDLE; - } + return getCallState(getDefaultSubscription()); } /** diff --git a/telephony/java/android/telephony/gsm/GsmCellLocation.java b/telephony/java/android/telephony/gsm/GsmCellLocation.java index 313bc82..a3889b2 100644 --- a/telephony/java/android/telephony/gsm/GsmCellLocation.java +++ b/telephony/java/android/telephony/gsm/GsmCellLocation.java @@ -40,9 +40,9 @@ public class GsmCellLocation extends CellLocation { * Initialize the object from a bundle. */ public GsmCellLocation(Bundle bundle) { - mLac = bundle.getInt("lac", mLac); - mCid = bundle.getInt("cid", mCid); - mPsc = bundle.getInt("psc", mPsc); + mLac = bundle.getInt("lac", -1); + mCid = bundle.getInt("cid", -1); + mPsc = bundle.getInt("psc", -1); } /** |
