Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ca801ff authored by /e/ robot's avatar /e/ robot
Browse files

Merge remote-tracking branch 'origin/lineage-20.0' into v1-t

parents e682791c d46a80e4
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -288,6 +288,7 @@ public class InternetDialog extends SystemUIDialog implements
        mHandler.removeCallbacks(mHideProgressBarRunnable);
        mHandler.removeCallbacks(mHideSearchingRunnable);
        mMobileNetworkLayout.setOnClickListener(null);
        mMobileNetworkLayout.setOnLongClickListener(null);
        mMobileDataToggle.setOnCheckedChangeListener(null);
        mConnectedWifListLayout.setOnClickListener(null);
        if (mSecondaryMobileNetworkLayout != null) {
@@ -358,6 +359,13 @@ public class InternetDialog extends SystemUIDialog implements
                }
            }
        });
        mMobileNetworkLayout.setOnLongClickListener(v -> {
            if (!mInternetDialogController.isDeviceLocked()) {
                mInternetDialogController.launchMobileNetworkSettings(v, mDefaultDataSubId);
                return true;
            }
            return false;
        });
        mMobileDataToggle.setOnCheckedChangeListener(
                (buttonView, isChecked) -> {
                    if (!isChecked && shouldShowMobileDialog()) {
+4 −0
Original line number Diff line number Diff line
@@ -739,6 +739,10 @@ public class InternetDialogController implements AccessPointController.AccessPoi

    void launchMobileNetworkSettings(View view) {
        final int subId = getActiveAutoSwitchNonDdsSubId();
        launchMobileNetworkSettings(view, subId);
    }

    void launchMobileNetworkSettings(View view, int subId) {
        if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
            Log.w(TAG, "launchMobileNetworkSettings fail, invalid subId:" + subId);
            return;