Don't trampoline twice when opening security or privacy
Settings already trampolines to a two-pane version of deeplink activities, doing another trampoline will wind up creating a second task covering up the first, with the wrong layout. Bug: 253554698 Test: manually Change-Id: Ib7ba5c95cac2f644ade37a41f321d11c8f1d1b89
This commit is contained in:
@@ -152,6 +152,11 @@ public class Settings extends SettingsActivity {
|
|||||||
/** Redirects to SafetyCenter if enabled. */
|
/** Redirects to SafetyCenter if enabled. */
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
public void handleSafetyCenterRedirection() {
|
public void handleSafetyCenterRedirection() {
|
||||||
|
if (isFinishing()) {
|
||||||
|
// Don't trampoline if already exiting this activity.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (SafetyCenterManagerWrapper.get().isEnabled(this)) {
|
if (SafetyCenterManagerWrapper.get().isEnabled(this)) {
|
||||||
try {
|
try {
|
||||||
startActivity(new Intent(Intent.ACTION_SAFETY_CENTER));
|
startActivity(new Intent(Intent.ACTION_SAFETY_CENTER));
|
||||||
@@ -213,6 +218,11 @@ public class Settings extends SettingsActivity {
|
|||||||
/** Redirects to SafetyCenter if enabled. */
|
/** Redirects to SafetyCenter if enabled. */
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
public void handleSafetyCenterRedirection() {
|
public void handleSafetyCenterRedirection() {
|
||||||
|
if (isFinishing()) {
|
||||||
|
// Don't trampoline if already exiting this activity.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (ACTION_PRIVACY_SETTINGS.equals(getIntent().getAction())
|
if (ACTION_PRIVACY_SETTINGS.equals(getIntent().getAction())
|
||||||
&& SafetyCenterManagerWrapper.get().isEnabled(this)) {
|
&& SafetyCenterManagerWrapper.get().isEnabled(this)) {
|
||||||
try {
|
try {
|
||||||
|
Reference in New Issue
Block a user