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

Commit 5be4873d authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5674462 from d64b6c88 to qt-release

Change-Id: Ic4fbcd54ada1df8c98c43386873d67539c84a0f1
parents 68f12d5d d64b6c88
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -72,7 +72,8 @@ public class DisabledSubscriptionController extends BasePreferenceController imp
        if (mCategory == null || mSubId ==  SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
            return;
        }
        mCategory.setVisible(mSubscriptionManager.isSubscriptionEnabled(mSubId));
        // TODO b/135222940: re-evaluate whether to use mSubscriptionManager#isSubscriptionEnabled
        mCategory.setVisible(mSubscriptionManager.isActiveSubId(mSubId));
    }

    @Override
+4 −22
Original line number Diff line number Diff line
@@ -78,16 +78,14 @@ public class MobileDataSlice implements CustomSliceable {
        final String title = mContext.getText(R.string.mobile_data_settings_title).toString();
        @ColorInt final int color = Utils.getColorAccentDefaultColor(mContext);

        // Return a Slice without the mobile data toggle when airplane mode is on.
        // Return null until we can show a disabled-action Slice, blaming Airplane mode.
        if (isAirplaneModeEnabled()) {
            return buildUnavailableMobileDataSlice(title,
                    mContext.getText(R.string.mobile_data_ap_mode_disabled), icon, color);
            return null;
        }

        // Return a Slice without the mobile data toggle when mobile data disabled.
        // Return null until we can show a disabled-action Slice.
        if (!isMobileDataAvailable()) {
            return buildUnavailableMobileDataSlice(title,
                    mContext.getText(R.string.sim_cellular_data_unavailable), icon, color);
            return null;
        }

        final CharSequence summary = getSummary();
@@ -201,22 +199,6 @@ public class MobileDataSlice implements CustomSliceable {
        return mTelephonyManager.isDataEnabled();
    }

    private Slice buildUnavailableMobileDataSlice(String title, CharSequence summary,
            IconCompat icon, int color) {
        final PendingIntent intent = PendingIntent.getActivity(mContext, 0 /* requestCode */,
                new Intent(), 0 /* flags */);
        final SliceAction deadAction =
                SliceAction.create(intent, icon, ListBuilder.ICON_IMAGE, title);
        final ListBuilder listBuilder = new ListBuilder(mContext, getUri(),
                ListBuilder.INFINITY)
                .setAccentColor(color)
                .addRow(new ListBuilder.RowBuilder()
                        .setTitle(title)
                        .setSubtitle(summary)
                        .setPrimaryAction(deadAction));
        return listBuilder.build();
    }

    /**
     * Listener for mobile data state changes.
     *
+6 −2
Original line number Diff line number Diff line
@@ -81,7 +81,9 @@ public class MobileNetworkSwitchController extends BasePreferenceController impl
                R.string.mobile_network_use_sim_off);

        mSwitchBar.addOnSwitchChangeListener((switchView, isChecked) -> {
            if (mSubscriptionManager.isSubscriptionEnabled(mSubId) != isChecked
            // TODO b/135222940: re-evaluate whether to use
            // mSubscriptionManager#isSubscriptionEnabled
            if (mSubscriptionManager.isActiveSubId(mSubId) != isChecked
                    && (!mSubscriptionManager.setSubscriptionEnabled(mSubId, isChecked))) {
                mSwitchBar.setChecked(!isChecked);
            }
@@ -108,7 +110,9 @@ public class MobileNetworkSwitchController extends BasePreferenceController impl
            mSwitchBar.hide();
        } else {
            mSwitchBar.show();
            mSwitchBar.setChecked(mSubscriptionManager.isSubscriptionEnabled(mSubId));
            // TODO b/135222940: re-evaluate whether to use
            // mSubscriptionManager#isSubscriptionEnabled
            mSwitchBar.setChecked(mSubscriptionManager.isActiveSubId(mSubId));
        }
    }

+4 −0
Original line number Diff line number Diff line
@@ -686,6 +686,10 @@ public class WifiDppQrCodeScannerFragment extends WifiDppQrCodeBaseFragment impl
            return;
        }

        if (mCamera.isDecodeTaskAlive()) {
            mCamera.stop();
        }

        final SurfaceTexture surfaceTexture = mTextureView.getSurfaceTexture();
        if (surfaceTexture == null) {
            throw new IllegalStateException("SurfaceTexture is not ready for restarting camera");
+8 −0
Original line number Diff line number Diff line
@@ -205,6 +205,11 @@ public class WifiDppUtils {
        final WifiConfiguration wifiConfiguration = accessPoint.getConfig();
        setConfiguratorIntentExtra(intent, wifiManager, wifiConfiguration);

        // For a transition mode Wi-Fi AP, creates a QR code that's compatible with more devices
        if (accessPoint.getSecurity() == AccessPoint.SECURITY_PSK_SAE_TRANSITION) {
            intent.putExtra(EXTRA_WIFI_SECURITY, WifiQrCode.SECURITY_WPA_PSK);
        }

        return intent;
    }

@@ -400,6 +405,7 @@ public class WifiDppUtils {
                }
                break;
            case AccessPoint.SECURITY_PSK:
            case AccessPoint.SECURITY_PSK_SAE_TRANSITION:
                return true;
            default:
        }
@@ -412,6 +418,8 @@ public class WifiDppUtils {
            case AccessPoint.SECURITY_PSK:
            case AccessPoint.SECURITY_WEP:
            case AccessPoint.SECURITY_NONE:
            case AccessPoint.SECURITY_PSK_SAE_TRANSITION:
            case AccessPoint.SECURITY_OWE_TRANSITION:
                return true;
            case AccessPoint.SECURITY_SAE:
                if (wifiManager.isWpa3SaeSupported()) {
Loading