[Settings] Make UI be able to update current status, after SIM absent.

- The cache of default data subscription id does not update when SIM
 absent. Therefore, uses getActiveSubscriptionIdList instead current to
 make it more precise.

Bug: 192032602
Test: Manual test. see b/192032602#7
Change-Id: I29e697e97d32ecb2e93c9620ec65215f963e4ebe
This commit is contained in:
tom hsu
2021-06-30 18:17:40 +08:00
committed by Tom Hsu
parent d60eae5539
commit a8456b4aa9

View File

@@ -80,8 +80,7 @@ public class ProviderModelSliceHelper {
public boolean hasCarrier() {
if (isAirplaneModeEnabled()
|| mSubscriptionManager == null || mTelephonyManager == null
|| mSubscriptionManager.getDefaultDataSubscriptionId()
== mSubscriptionManager.INVALID_SUBSCRIPTION_ID) {
|| mSubscriptionManager.getActiveSubscriptionIdList().length <= 0) {
return false;
}
return true;