Merge "Update signal strength on ServiceState in service" am: 3169b21b4e am: 4928687552
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1505031 Change-Id: I908564533b6813aeffe1ed57ef0416dd7f1fce25
This commit is contained in:
@@ -140,6 +140,7 @@ public class SimStatusDialogController implements LifecycleObserver, OnResume, O
|
||||
|
||||
private SubscriptionInfo mSubscriptionInfo;
|
||||
private TelephonyDisplayInfo mTelephonyDisplayInfo;
|
||||
private ServiceState mPreviousServiceState;
|
||||
|
||||
private final int mSlotIndex;
|
||||
private TelephonyManager mTelephonyManager;
|
||||
@@ -437,6 +438,9 @@ public class SimStatusDialogController implements LifecycleObserver, OnResume, O
|
||||
final int state = Utils.getCombinedServiceState(serviceState);
|
||||
if (!Utils.isInService(serviceState)) {
|
||||
resetSignalStrength();
|
||||
} else if (!Utils.isInService(mPreviousServiceState)) {
|
||||
// If ServiceState changed from out of service -> in service, update signal strength.
|
||||
updateSignalStrength(mTelephonyManager.getSignalStrength());
|
||||
}
|
||||
|
||||
String serviceStateValue;
|
||||
@@ -484,7 +488,7 @@ public class SimStatusDialogController implements LifecycleObserver, OnResume, O
|
||||
}
|
||||
|
||||
ServiceState serviceState = mTelephonyManager.getServiceState();
|
||||
if (serviceState == null || !Utils.isInService(serviceState)) {
|
||||
if (!Utils.isInService(serviceState)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -767,6 +771,7 @@ public class SimStatusDialogController implements LifecycleObserver, OnResume, O
|
||||
updateNetworkProvider();
|
||||
updateServiceState(serviceState);
|
||||
updateRoamingStatus(serviceState);
|
||||
mPreviousServiceState = serviceState;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user