Update signal strength on ServiceState in service
Test: make RunSettingsRobotTests
Bug: 167643728
Change-Id: Ibf69f9e9ec2acafef1316069d37b8d2a27d7d4d7
Merged-In: Ibf69f9e9ec2acafef1316069d37b8d2a27d7d4d7
(cherry picked from commit 3b3704d693
)
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;
|
||||
@@ -425,6 +426,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;
|
||||
@@ -472,7 +476,7 @@ public class SimStatusDialogController implements LifecycleObserver, OnResume, O
|
||||
}
|
||||
|
||||
ServiceState serviceState = mTelephonyManager.getServiceState();
|
||||
if (serviceState == null || !Utils.isInService(serviceState)) {
|
||||
if (!Utils.isInService(serviceState)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -755,6 +759,7 @@ public class SimStatusDialogController implements LifecycleObserver, OnResume, O
|
||||
updateNetworkProvider();
|
||||
updateServiceState(serviceState);
|
||||
updateRoamingStatus(serviceState);
|
||||
mPreviousServiceState = serviceState;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user