diff options
| author | Michael Bestas <mkbestas@lineageos.org> | 2022-01-15 04:28:01 +0200 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2022-01-15 04:28:01 +0200 |
| commit | c057258f3dc7c2fd21773692b5e54bd00d669ccd (patch) | |
| tree | 4a28a36899ec610761e61fde9e8b9440bea4e64a /src | |
| parent | f469ca2456dc6c6ac75b4150829927ea0b52dfa4 (diff) | |
| parent | dbf896f79319c215af27bacaed25d0ee506414f4 (diff) | |
Android 12.0.0 release 27
# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCYeHDugAKCRDorT+BmrEO
# eEk2AJ48vhUAokS8m8v/D7ZVhIo+gtvuwgCfQ1Su9Nlo9mAysjr/aiAelc9/FE0=
# =JkRZ
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri Jan 14 20:40:58 2022 EET
# gpg: using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [marginal]
# gpg: initial-contribution@android.com: Verified 1042 signatures in the past
# 2 months. Encrypted 4 messages in the past 4 days.
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg: It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 4340 D135 70EF 945E 8381 0964 E8AD 3F81 9AB1 0E78
# By Brad Ebinger (1) and Tyler Gunn (1)
# Via Android Build Coastguard Worker
* tag 'android-12.0.0_r27':
Ensure PIN/PUK status is taken into account on HAL 1.4+
Fix crash in SubscriptionInfoHelper for null display name.
Change-Id: I4ffa38b0d37c60e5c66395e964c4818b17de6b8b
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/phone/SubscriptionInfoHelper.java | 3 | ||||
| -rw-r--r-- | src/com/android/services/telephony/TelephonyConnectionService.java | 16 |
2 files changed, 10 insertions, 9 deletions
diff --git a/src/com/android/phone/SubscriptionInfoHelper.java b/src/com/android/phone/SubscriptionInfoHelper.java index 7c373e041..14faebc1e 100644 --- a/src/com/android/phone/SubscriptionInfoHelper.java +++ b/src/com/android/phone/SubscriptionInfoHelper.java @@ -91,7 +91,8 @@ public class SubscriptionInfoHelper { intent.putExtra(SubscriptionInfoHelper.SUB_ID_EXTRA, subscription.getSubscriptionId()); intent.putExtra( - SubscriptionInfoHelper.SUB_LABEL_EXTRA, subscription.getDisplayName().toString()); + SubscriptionInfoHelper.SUB_LABEL_EXTRA, subscription.getDisplayName() == null ? null + : subscription.getDisplayName().toString()); } /** diff --git a/src/com/android/services/telephony/TelephonyConnectionService.java b/src/com/android/services/telephony/TelephonyConnectionService.java index 766a75e6c..4f6acc8f2 100644 --- a/src/com/android/services/telephony/TelephonyConnectionService.java +++ b/src/com/android/services/telephony/TelephonyConnectionService.java @@ -2084,8 +2084,7 @@ public class TelephonyConnectionService extends ConnectionService { if (phone.getEmergencyNumberTracker() != null) { if (phone.getEmergencyNumberTracker().isEmergencyNumber( emergencyNumberAddress, true)) { - if (phone.getHalVersion().greaterOrEqual(RIL.RADIO_HAL_VERSION_1_4) - || isAvailableForEmergencyCalls(phone)) { + if (isAvailableForEmergencyCalls(phone)) { // a) if (phone.getPhoneId() == defaultVoicePhoneId) { Log.i(this, "getPhoneForEmergencyCall, Phone Id that supports" @@ -2208,12 +2207,6 @@ public class TelephonyConnectionService extends ConnectionService { // Only sort if there are enough elements to do so. if (phoneSlotStatus.size() > 1) { Collections.sort(phoneSlotStatus, (o1, o2) -> { - if (!o1.hasDialedEmergencyNumber && o2.hasDialedEmergencyNumber) { - return -1; - } - if (o1.hasDialedEmergencyNumber && !o2.hasDialedEmergencyNumber) { - return 1; - } // Sort by non-absent SIM. if (o1.simState == TelephonyManager.SIM_STATE_ABSENT && o2.simState != TelephonyManager.SIM_STATE_ABSENT) { @@ -2232,6 +2225,13 @@ public class TelephonyConnectionService extends ConnectionService { if (o2.isLocked && !o1.isLocked) { return 1; } + // Prefer slots where the number is considered emergency. + if (!o1.hasDialedEmergencyNumber && o2.hasDialedEmergencyNumber) { + return -1; + } + if (o1.hasDialedEmergencyNumber && !o2.hasDialedEmergencyNumber) { + return 1; + } // sort by number of RadioAccessFamily Capabilities. int compare = RadioAccessFamily.compare(o1.capabilities, o2.capabilities); if (compare == 0) { |
