Fix the BasePreferenceController.createInstance's IllegalStateException am: 7489c93347
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/27358857 Change-Id: I7fe4219091a7428f42e4b33d0ccc4445b66569f3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -64,16 +64,20 @@ public abstract class DefaultSubscriptionController extends TelephonyBasePrefere
|
||||
|
||||
public DefaultSubscriptionController(Context context, String preferenceKey, Lifecycle lifecycle,
|
||||
LifecycleOwner lifecycleOwner) {
|
||||
this(context, preferenceKey);
|
||||
mLifecycleOwner = lifecycleOwner;
|
||||
if (lifecycle != null) {
|
||||
lifecycle.addObserver(this);
|
||||
}
|
||||
}
|
||||
|
||||
public DefaultSubscriptionController(Context context, String preferenceKey) {
|
||||
super(context, preferenceKey);
|
||||
mManager = context.getSystemService(SubscriptionManager.class);
|
||||
mIsRtlMode = context.getResources().getConfiguration().getLayoutDirection()
|
||||
== View.LAYOUT_DIRECTION_RTL;
|
||||
mMobileNetworkRepository = MobileNetworkRepository.getInstance(context);
|
||||
mDataSubscriptionChangedReceiver = new DefaultSubscriptionReceiver(context, this);
|
||||
mLifecycleOwner = lifecycleOwner;
|
||||
if (lifecycle != null) {
|
||||
lifecycle.addObserver(this);
|
||||
}
|
||||
}
|
||||
|
||||
/** @return the id of the default subscription for the service, or
|
||||
|
Reference in New Issue
Block a user