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

This commit is contained in:
Simon Wingrove
2022-10-19 08:32:10 +00:00
committed by Android (Google) Code Review

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 {