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

Unverified Commit dd76b6aa authored by Michael Bestas's avatar Michael Bestas
Browse files

Merge tag 'android-13.0.0_r4' into staging/lineage-20.0_merge-android-13.0.0_r4

Android 13.0.0 release 4

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCYxeEmAAKCRDorT+BmrEO
# eC6CAJ9b74FPbAWN2+7aM2fJf6UPsKzVcwCfRGJCckIRcTQDVDl2bdRV2cqsjNE=
# =70MU
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Sep  6 20:34:16 2022 EEST
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [marginal]
# gpg: initial-contribution@android.com: Verified 1282 signatures in the past
#      10 months.  Encrypted 4 messages in the past 7 months.
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 4340 D135 70EF 945E 8381  0964 E8AD 3F81 9AB1 0E78

# By Jason Chiu (1) and SongFerngWang (1)
# Via Android Build Coastguard Worker
* tag 'android-13.0.0_r4':
  [MEP] Hide the preferred SIM dialog when the user has replaced the SIM
  Make bluetooth not discoverable via large screen deep link flow

Change-Id: Ifbdc19fd83ab5c761079965c3d53a63eaaff1989
parents 58b87494 79eeb2d7
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ import com.android.settings.homepage.DeepLinkHomepageActivityInternal;
import com.android.settings.homepage.SettingsHomepageActivity;
import com.android.settings.homepage.TopLevelSettings;
import com.android.settings.overlay.FeatureFactory;
import com.android.settings.password.PasswordUtils;
import com.android.settings.wfd.WifiDisplaySettings;
import com.android.settings.widget.SettingsMainSwitchBar;
import com.android.settingslib.core.instrumentation.Instrumentable;
@@ -154,6 +155,7 @@ public class SettingsActivity extends SettingsBaseActivity
    public static final String EXTRA_IS_FROM_SLICE = "is_from_slice";

    public static final String EXTRA_USER_HANDLE = "user_handle";
    public static final String EXTRA_INITIAL_CALLING_PACKAGE = "initial_calling_package";

    /**
     * Personal or Work profile tab of {@link ProfileSelectFragment}
@@ -418,6 +420,8 @@ public class SettingsActivity extends SettingsBaseActivity
    }

    private boolean tryStartTwoPaneDeepLink(Intent intent) {
        intent.putExtra(EXTRA_INITIAL_CALLING_PACKAGE, PasswordUtils.getCallingAppPackageName(
                getActivityToken()));
        final Intent trampolineIntent;
        if (intent.getBooleanExtra(EXTRA_IS_FROM_SLICE, false)) {
            // Get menu key for slice deep link case.
@@ -505,6 +509,17 @@ public class SettingsActivity extends SettingsBaseActivity
        return true;
    }

    /** Returns the initial calling package name that launches the activity. */
    public String getInitialCallingPackage() {
        String callingPackage = PasswordUtils.getCallingAppPackageName(getActivityToken());
        if (!TextUtils.equals(callingPackage, getPackageName())) {
            return callingPackage;
        }

        String initialCallingPackage = getIntent().getStringExtra(EXTRA_INITIAL_CALLING_PACKAGE);
        return TextUtils.isEmpty(initialCallingPackage) ? callingPackage : initialCallingPackage;
    }

    /** Returns the initial fragment name that the activity will launch. */
    @VisibleForTesting
    public String getInitialFragmentName(Intent intent) {
+3 −3
Original line number Diff line number Diff line
@@ -25,9 +25,9 @@ import android.util.Log;
import androidx.annotation.VisibleForTesting;

import com.android.settings.R;
import com.android.settings.SettingsActivity;
import com.android.settings.core.SettingsUIDeviceConfig;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.password.PasswordUtils;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settings.slices.SlicePreferenceController;
import com.android.settingslib.search.SearchIndexable;
@@ -71,8 +71,8 @@ public class ConnectedDeviceDashboardFragment extends DashboardFragment {
        super.onAttach(context);
        final boolean nearbyEnabled = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SETTINGS_UI,
                SettingsUIDeviceConfig.BT_NEAR_BY_SUGGESTION_ENABLED, true);
        String callingAppPackageName = PasswordUtils.getCallingAppPackageName(
                getActivity().getActivityToken());
        String callingAppPackageName = ((SettingsActivity) getActivity())
                .getInitialCallingPackage();
        String action = getIntent() != null ? getIntent().getAction() : "";
        if (DEBUG) {
            Log.d(TAG, "onAttach() calling package name is : " + callingAppPackageName
+13 −1
Original line number Diff line number Diff line
@@ -60,9 +60,21 @@ public class SubscriptionActionDialogActivity extends FragmentActivity {
     * @param message The string content should be displayed in the progress dialog.
     */
    protected void showProgressDialog(String message) {
        showProgressDialog(message,false);
    }

    /**
     * Displays a loading dialog.
     *
     * @param message The string content should be displayed in the progress dialog.
     * @param updateIfNeeded is whether to update the progress state in the SharedPreferences.
     */
    protected void showProgressDialog(String message, boolean updateIfNeeded) {
        ProgressDialogFragment.show(getFragmentManager(), message, null);
        if (updateIfNeeded) {
            setProgressState(PROGRESS_IS_SHOWING);
        }
    }

    /** Dismisses the loading dialog. */
    protected void dismissProgressDialog() {
+2 −2
Original line number Diff line number Diff line
@@ -220,8 +220,8 @@ public class ToggleSubscriptionDialogActivity extends SubscriptionActionDialogAc
                showProgressDialog(
                        getString(
                                R.string.sim_action_switch_sub_dialog_progress,
                                SubscriptionUtil.getUniqueSubscriptionDisplayName(
                                        mSubInfo, this)));
                                SubscriptionUtil.getUniqueSubscriptionDisplayName(mSubInfo, this)),
                        removedSubInfo != null ? true : false);
                if (mIsEsimOperation) {
                    mSwitchToEuiccSubscriptionSidecar.run(mSubInfo.getSubscriptionId(),
                            UiccSlotUtil.INVALID_PORT_ID,