Merge "Apply setup wizard's transition on a11y pages" into sc-dev
diff --git a/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivity.java b/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivity.java
index 2d58bed..48b3992 100644
--- a/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivity.java
+++ b/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivity.java
@@ -34,6 +34,7 @@
import com.android.settings.search.actionbar.SearchMenuController;
import com.android.settings.support.actionbar.HelpResourceProvider;
import com.android.settingslib.core.instrumentation.Instrumentable;
+import com.android.settingslib.transition.SettingsTransitionHelper;
import com.google.android.setupcompat.util.WizardManagerHelper;
import com.google.android.setupdesign.util.ThemeHelper;
@@ -92,6 +93,7 @@
: Instrumentable.METRICS_CATEGORY_UNKNOWN)
.setExtras(SetupWizardUtils.copyLifecycleExtra(getIntent().getExtras(),
new Bundle()))
+ .setTransitionType(SettingsTransitionHelper.TransitionType.TRANSITION_FADE)
.launch();
return true;
}
@@ -119,7 +121,8 @@
.setArguments(args)
.setSourceMetricsCategory(Instrumentable.METRICS_CATEGORY_UNKNOWN)
.setExtras(SetupWizardUtils.copyLifecycleExtra(getIntent().getExtras(),
- new Bundle()));
+ new Bundle()))
+ .setTransitionType(SettingsTransitionHelper.TransitionType.TRANSITION_FADE);
Log.d(LOG_TAG, "Launch font size settings");
subSettingLauncher.launch();
diff --git a/src/com/android/settings/core/SettingsBaseActivity.java b/src/com/android/settings/core/SettingsBaseActivity.java
index c2d3ad3..8caae71 100644
--- a/src/com/android/settings/core/SettingsBaseActivity.java
+++ b/src/com/android/settings/core/SettingsBaseActivity.java
@@ -178,6 +178,10 @@
} else if (transitionType == TransitionType.TRANSITION_NONE) {
super.startActivity(intent, null);
return;
+ } else if (transitionType == TransitionType.TRANSITION_FADE) {
+ super.startActivity(intent, null);
+ overridePendingTransition(android.R.anim.fade_in, R.anim.sud_stay);
+ return;
}
super.startActivity(intent, createActivityOptionsBundleForTransition(null));
}
@@ -267,6 +271,10 @@
@Override
protected void onPause() {
+ // For accessibility activities launched from setup wizard.
+ if (getTransitionType(getIntent()) == TransitionType.TRANSITION_FADE) {
+ overridePendingTransition(R.anim.sud_stay, android.R.anim.fade_out);
+ }
unregisterReceiver(mPackageReceiver);
super.onPause();
}