Refacotr mobile data observer for repository
In current design, the mobile data observer might be removed due to SIM absence after registered so that mobile data network info can't be updated to clients. To fix it, migrate it to use API TelephonyCallback.onUserMobileDataStateChanged Bug: 327696232 Change-Id: I26c8f946823abb7505f0227c8dd8ab0700d0c5f2
This commit is contained in:
committed by
SongFerng Wang
parent
eda8e23f78
commit
120adb2349
@@ -100,9 +100,6 @@ public abstract class DefaultSubscriptionController extends TelephonyBasePrefere
|
||||
mMobileNetworkRepository.addRegister(mLifecycleOwner, this,
|
||||
SubscriptionManager.INVALID_SUBSCRIPTION_ID);
|
||||
mMobileNetworkRepository.updateEntity();
|
||||
// Can not get default subId from database until get the callback, add register by subId
|
||||
// later.
|
||||
mMobileNetworkRepository.addRegisterBySubId(getDefaultSubscriptionId());
|
||||
mDataSubscriptionChangedReceiver.registerReceiver();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user