[Settings] Do not creat multiple database

Bug: 254405469
Test: manual
Change-Id: I96ea77899270439a87569bd1676d38b52dd36650
This commit is contained in:
Zoey Chen
2022-10-25 03:21:30 +00:00
parent 93b0b686bd
commit 97291ac0ad
8 changed files with 128 additions and 44 deletions

View File

@@ -71,7 +71,7 @@ public class NetworkProviderCallsSmsController extends AbstractPreferenceControl
mIsRtlMode = context.getResources().getConfiguration().getLayoutDirection()
== View.LAYOUT_DIRECTION_RTL;
mLifecycleOwner = lifecycleOwner;
mMobileNetworkRepository = new MobileNetworkRepository(context, this);
mMobileNetworkRepository = MobileNetworkRepository.create(context, this);
if (lifecycle != null) {
lifecycle.addObserver(this);
}
@@ -85,7 +85,6 @@ public class NetworkProviderCallsSmsController extends AbstractPreferenceControl
@OnLifecycleEvent(Event.ON_PAUSE)
public void onPause() {
mMobileNetworkRepository.removeRegister();
}
@Override