Merge "Don't trampoline twice when opening security or privacy" into tm-qpr-dev am: 062b18c736

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20209765

Change-Id: Ie86adb15224dc9052d6b017959b78114bbcb6a04
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Simon Wingrove
2022-10-19 09:17:47 +00:00
committed by Automerger Merge Worker

View File

@@ -152,6 +152,11 @@ public class Settings extends SettingsActivity {
/** Redirects to SafetyCenter if enabled. */
@VisibleForTesting
public void handleSafetyCenterRedirection() {
if (isFinishing()) {
// Don't trampoline if already exiting this activity.
return;
}
if (SafetyCenterManagerWrapper.get().isEnabled(this)) {
try {
startActivity(new Intent(Intent.ACTION_SAFETY_CENTER));
@@ -213,6 +218,11 @@ public class Settings extends SettingsActivity {
/** Redirects to SafetyCenter if enabled. */
@VisibleForTesting
public void handleSafetyCenterRedirection() {
if (isFinishing()) {
// Don't trampoline if already exiting this activity.
return;
}
if (ACTION_PRIVACY_SETTINGS.equals(getIntent().getAction())
&& SafetyCenterManagerWrapper.get().isEnabled(this)) {
try {