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:
@@ -73,16 +73,20 @@ public class MobileDataPreferenceController extends TelephonyTogglePreferenceCon
|
||||
|
||||
public MobileDataPreferenceController(Context context, String key, Lifecycle lifecycle,
|
||||
LifecycleOwner lifecycleOwner, int subId) {
|
||||
super(context, key);
|
||||
this(context, key);
|
||||
mSubId = subId;
|
||||
mSubscriptionManager = context.getSystemService(SubscriptionManager.class);
|
||||
mMobileNetworkRepository = MobileNetworkRepository.getInstance(context);
|
||||
mLifecycleOwner = lifecycleOwner;
|
||||
if (lifecycle != null) {
|
||||
lifecycle.addObserver(this);
|
||||
}
|
||||
}
|
||||
|
||||
public MobileDataPreferenceController(Context context, String key) {
|
||||
super(context, key);
|
||||
mSubscriptionManager = context.getSystemService(SubscriptionManager.class);
|
||||
mMobileNetworkRepository = MobileNetworkRepository.getInstance(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus(int subId) {
|
||||
if (Flags.isDualSimOnboardingEnabled()) {
|
||||
|
Reference in New Issue
Block a user