Merge "[Settings] Avoids disabled component when page start from setup wizard." into rvc-dev am: 3f8d40bd95 am: 0567bb7834 am: d5f6a66682 am: 8dc66ef820

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

Change-Id: I8b61d4f39dc18a105850f5c6e55da25c09019275
This commit is contained in:
Alex Li
2020-06-22 04:50:55 +00:00
committed by Automerger Merge Worker
2 changed files with 18 additions and 1 deletions

View File

@@ -48,6 +48,7 @@ import com.android.settingslib.RestrictedLockUtilsInternal;
import com.google.android.setupcompat.template.FooterBarMixin;
import com.google.android.setupcompat.template.FooterButton;
import com.google.android.setupcompat.util.WizardManagerHelper;
import com.google.android.setupdesign.GlifLayout;
public class RedactionInterstitial extends SettingsActivity {
@@ -144,7 +145,11 @@ public class RedactionInterstitial extends SettingsActivity {
}
private void onDoneButtonClicked(View view) {
SetupRedactionInterstitial.setEnabled(getContext(), false);
// If the activity starts by Setup Wizard, then skip disable component which avoids the
// framework force closing all activities on the same task when the system is busy.
if (!WizardManagerHelper.isAnySetupWizard(getIntent())) {
SetupRedactionInterstitial.setEnabled(getContext(), false);
}
final RedactionInterstitial activity = (RedactionInterstitial) getActivity();
if (activity != null) {
activity.setResult(RESULT_OK, null);