Readd predictive back developer setting
Bug: 315859328
Test: atest BackAnimationPreferenceControllerTest
Test: Verifying that predictive back developer setting is present
Change-Id: I8734a4cb135fbeb0d1787ca2acf569948c08c9ed
diff --git a/res/xml/development_settings.xml b/res/xml/development_settings.xml
index e1ccad8..f0a2881 100644
--- a/res/xml/development_settings.xml
+++ b/res/xml/development_settings.xml
@@ -727,11 +727,10 @@
android:title="@string/enable_non_resizable_multi_window"
android:summary="@string/enable_non_resizable_multi_window_summary" />
- // TODO(b/315859328): Temporally removed since causing search indexing failure.
-<!-- <SwitchPreferenceCompat-->
-<!-- android:key="back_navigation_animation"-->
-<!-- android:title="@string/back_navigation_animation"-->
-<!-- android:summary="@string/back_navigation_animation_summary" />-->
+ <SwitchPreferenceCompat
+ android:key="back_navigation_animation"
+ android:title="@string/back_navigation_animation"
+ android:summary="@string/back_navigation_animation_summary" />
<Preference
android:key="reset_shortcut_manager_throttling"
diff --git a/src/com/android/settings/development/BackAnimationPreferenceController.java b/src/com/android/settings/development/BackAnimationPreferenceController.java
index 95ffc25..8c731a4 100644
--- a/src/com/android/settings/development/BackAnimationPreferenceController.java
+++ b/src/com/android/settings/development/BackAnimationPreferenceController.java
@@ -18,6 +18,7 @@
import static com.android.window.flags.Flags.predictiveBackSystemAnimations;
+import android.annotation.Nullable;
import android.content.Context;
import android.provider.Settings;
@@ -28,8 +29,6 @@
import com.android.settings.core.PreferenceControllerMixin;
import com.android.settingslib.development.DeveloperOptionsPreferenceController;
-import java.util.Objects;
-
/**
* PreferenceController for enabling/disabling animation related to back button and back gestures.
*/
@@ -51,9 +50,8 @@
public BackAnimationPreferenceController(Context context,
- DevelopmentSettingsDashboardFragment fragment) {
+ @Nullable DevelopmentSettingsDashboardFragment fragment) {
super(context);
- Objects.requireNonNull(fragment);
mFragment = fragment;
}
diff --git a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
index a483f9f..b52409d 100644
--- a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
+++ b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
@@ -737,7 +737,7 @@
controllers.add(new OverlaySettingsPreferenceController(context));
controllers.add(new StylusHandwritingPreferenceController(context));
controllers.add(new IngressRateLimitPreferenceController((context)));
- // controllers.add(new BackAnimationPreferenceController(context, fragment));
+ controllers.add(new BackAnimationPreferenceController(context, fragment));
controllers.add(new PhantomProcessPreferenceController(context));
controllers.add(new ContrastPreferenceController(
context, context.getSystemService(UiModeManager.class)));