Loading core/java/android/window/flags/windowing_frontend.aconfig +8 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ flag { bug: "294925498" } flag { name: "wallpaper_offset_async" namespace: "windowing_frontend" Loading @@ -52,3 +51,11 @@ flag { bug: "293248754" is_fixed_read_only: true } flag { name: "predictive_back_system_animations" namespace: "systemui" description: "Predictive back for system animations" bug: "309545085" is_fixed_read_only: true } No newline at end of file libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java +19 −6 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.wm.shell.back; import static com.android.internal.jank.InteractionJankMonitor.CUJ_PREDICTIVE_BACK_HOME; import static com.android.window.flags.Flags.predictiveBackSystemAnimations; import static com.android.wm.shell.common.ExecutorUtils.executeRemoteCallWithTaskPermission; import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BACK_PREVIEW; import static com.android.wm.shell.sysui.ShellSharedConstants.KEY_EXTRA_SHELL_BACK_ANIMATION; Loading Loading @@ -221,6 +222,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont private void onInit() { setupAnimationDeveloperSettingsObserver(mContentResolver, mBgHandler); updateEnableAnimationFromFlags(); createAdapter(); mShellController.addExternalInterface(KEY_EXTRA_SHELL_BACK_ANIMATION, this::createExternalInterface, this); Loading @@ -229,28 +231,39 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont private void setupAnimationDeveloperSettingsObserver( @NonNull ContentResolver contentResolver, @NonNull @ShellBackgroundThread final Handler backgroundHandler) { if (predictiveBackSystemAnimations()) { ProtoLog.d(WM_SHELL_BACK_PREVIEW, "Back animation aconfig flag is enabled, therefore " + "developer settings flag is ignored and no content observer registered"); return; } ContentObserver settingsObserver = new ContentObserver(backgroundHandler) { @Override public void onChange(boolean selfChange, Uri uri) { updateEnableAnimationFromSetting(); updateEnableAnimationFromFlags(); } }; contentResolver.registerContentObserver( Global.getUriFor(Global.ENABLE_BACK_ANIMATION), false, settingsObserver, UserHandle.USER_SYSTEM ); updateEnableAnimationFromSetting(); } /** * Updates {@link BackAnimationController#mEnableAnimations} based on the current values of the * aconfig flag and the developer settings flag */ @ShellBackgroundThread private void updateEnableAnimationFromSetting() { int settingValue = Global.getInt(mContext.getContentResolver(), Global.ENABLE_BACK_ANIMATION, SETTING_VALUE_OFF); boolean isEnabled = settingValue == SETTING_VALUE_ON; private void updateEnableAnimationFromFlags() { boolean isEnabled = predictiveBackSystemAnimations() || isDeveloperSettingEnabled(); mEnableAnimations.set(isEnabled); ProtoLog.d(WM_SHELL_BACK_PREVIEW, "Back animation enabled=%s", isEnabled); } private boolean isDeveloperSettingEnabled() { return Global.getInt(mContext.getContentResolver(), Global.ENABLE_BACK_ANIMATION, SETTING_VALUE_OFF) == SETTING_VALUE_ON; } public BackAnimation getBackAnimationImpl() { return mBackAnimation; } Loading packages/SystemUI/src/com/android/systemui/flags/Flags.kt +0 −5 Original line number Diff line number Diff line Loading @@ -435,11 +435,6 @@ object Flags { unreleasedFlag("lockscreen.enable_landscape") // 1200 - predictive back @Keep @JvmField val WM_ENABLE_PREDICTIVE_BACK = sysPropBooleanFlag("persist.wm.debug.predictive_back", default = true) @Keep @JvmField val WM_ENABLE_PREDICTIVE_BACK_ANIM = Loading Loading
core/java/android/window/flags/windowing_frontend.aconfig +8 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ flag { bug: "294925498" } flag { name: "wallpaper_offset_async" namespace: "windowing_frontend" Loading @@ -52,3 +51,11 @@ flag { bug: "293248754" is_fixed_read_only: true } flag { name: "predictive_back_system_animations" namespace: "systemui" description: "Predictive back for system animations" bug: "309545085" is_fixed_read_only: true } No newline at end of file
libs/WindowManager/Shell/src/com/android/wm/shell/back/BackAnimationController.java +19 −6 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.wm.shell.back; import static com.android.internal.jank.InteractionJankMonitor.CUJ_PREDICTIVE_BACK_HOME; import static com.android.window.flags.Flags.predictiveBackSystemAnimations; import static com.android.wm.shell.common.ExecutorUtils.executeRemoteCallWithTaskPermission; import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BACK_PREVIEW; import static com.android.wm.shell.sysui.ShellSharedConstants.KEY_EXTRA_SHELL_BACK_ANIMATION; Loading Loading @@ -221,6 +222,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont private void onInit() { setupAnimationDeveloperSettingsObserver(mContentResolver, mBgHandler); updateEnableAnimationFromFlags(); createAdapter(); mShellController.addExternalInterface(KEY_EXTRA_SHELL_BACK_ANIMATION, this::createExternalInterface, this); Loading @@ -229,28 +231,39 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont private void setupAnimationDeveloperSettingsObserver( @NonNull ContentResolver contentResolver, @NonNull @ShellBackgroundThread final Handler backgroundHandler) { if (predictiveBackSystemAnimations()) { ProtoLog.d(WM_SHELL_BACK_PREVIEW, "Back animation aconfig flag is enabled, therefore " + "developer settings flag is ignored and no content observer registered"); return; } ContentObserver settingsObserver = new ContentObserver(backgroundHandler) { @Override public void onChange(boolean selfChange, Uri uri) { updateEnableAnimationFromSetting(); updateEnableAnimationFromFlags(); } }; contentResolver.registerContentObserver( Global.getUriFor(Global.ENABLE_BACK_ANIMATION), false, settingsObserver, UserHandle.USER_SYSTEM ); updateEnableAnimationFromSetting(); } /** * Updates {@link BackAnimationController#mEnableAnimations} based on the current values of the * aconfig flag and the developer settings flag */ @ShellBackgroundThread private void updateEnableAnimationFromSetting() { int settingValue = Global.getInt(mContext.getContentResolver(), Global.ENABLE_BACK_ANIMATION, SETTING_VALUE_OFF); boolean isEnabled = settingValue == SETTING_VALUE_ON; private void updateEnableAnimationFromFlags() { boolean isEnabled = predictiveBackSystemAnimations() || isDeveloperSettingEnabled(); mEnableAnimations.set(isEnabled); ProtoLog.d(WM_SHELL_BACK_PREVIEW, "Back animation enabled=%s", isEnabled); } private boolean isDeveloperSettingEnabled() { return Global.getInt(mContext.getContentResolver(), Global.ENABLE_BACK_ANIMATION, SETTING_VALUE_OFF) == SETTING_VALUE_ON; } public BackAnimation getBackAnimationImpl() { return mBackAnimation; } Loading
packages/SystemUI/src/com/android/systemui/flags/Flags.kt +0 −5 Original line number Diff line number Diff line Loading @@ -435,11 +435,6 @@ object Flags { unreleasedFlag("lockscreen.enable_landscape") // 1200 - predictive back @Keep @JvmField val WM_ENABLE_PREDICTIVE_BACK = sysPropBooleanFlag("persist.wm.debug.predictive_back", default = true) @Keep @JvmField val WM_ENABLE_PREDICTIVE_BACK_ANIM = Loading