[Settings] update the db list when back to UI
Bug: 271524675 Test: local test Change-Id: I26c7d64e6f040c62c9efb1438efe328f5744fa02
This commit is contained in:
@@ -75,7 +75,7 @@ public abstract class DefaultSubscriptionController extends TelephonyBasePrefere
|
||||
mManager = context.getSystemService(SubscriptionManager.class);
|
||||
mIsRtlMode = context.getResources().getConfiguration().getLayoutDirection()
|
||||
== View.LAYOUT_DIRECTION_RTL;
|
||||
mMobileNetworkRepository = MobileNetworkRepository.create(context, this);
|
||||
mMobileNetworkRepository = MobileNetworkRepository.getInstance(context);
|
||||
mLifecycleOwner = lifecycleOwner;
|
||||
if (lifecycle != null) {
|
||||
lifecycle.addObserver(this);
|
||||
@@ -104,13 +104,13 @@ public abstract class DefaultSubscriptionController extends TelephonyBasePrefere
|
||||
|
||||
@OnLifecycleEvent(ON_RESUME)
|
||||
public void onResume() {
|
||||
mMobileNetworkRepository.addRegister(mLifecycleOwner);
|
||||
updateEntries();
|
||||
mMobileNetworkRepository.addRegister(mLifecycleOwner, this, getDefaultSubscriptionId());
|
||||
mMobileNetworkRepository.updateEntity();
|
||||
}
|
||||
|
||||
@OnLifecycleEvent(ON_PAUSE)
|
||||
public void onPause() {
|
||||
mMobileNetworkRepository.removeRegister();
|
||||
mMobileNetworkRepository.removeRegister(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -303,6 +303,4 @@ public abstract class DefaultSubscriptionController extends TelephonyBasePrefere
|
||||
updateEntries();
|
||||
refreshSummary(mPreference);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user