Merge "Don't trampoline twice when opening security or privacy" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
062b18c736
@@ -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