Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c30ec00b authored by Johannes Gallmann's avatar Johannes Gallmann Committed by Android (Google) Code Review
Browse files

Merge "Change predictive back system animations flag to runtime flag" into main

parents b738e563 3b59c649
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -69,11 +69,10 @@ flag {
}
}


flag {
flag {
    name: "predictive_back_system_animations"
    name: "predictive_back_system_anims"
    namespace: "systemui"
    namespace: "systemui"
    description: "Predictive back for system animations"
    description: "Predictive back for system animations"
    bug: "319421778"
    bug: "320510464"
    is_fixed_read_only: true
}
}


flag {
flag {
+3 −3
Original line number Original line Diff line number Diff line
@@ -17,7 +17,7 @@
package com.android.wm.shell.back;
package com.android.wm.shell.back;


import static com.android.internal.jank.InteractionJankMonitor.CUJ_PREDICTIVE_BACK_HOME;
import static com.android.internal.jank.InteractionJankMonitor.CUJ_PREDICTIVE_BACK_HOME;
import static com.android.window.flags.Flags.predictiveBackSystemAnimations;
import static com.android.window.flags.Flags.predictiveBackSystemAnims;
import static com.android.wm.shell.common.ExecutorUtils.executeRemoteCallWithTaskPermission;
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.protolog.ShellProtoLogGroup.WM_SHELL_BACK_PREVIEW;
import static com.android.wm.shell.sysui.ShellSharedConstants.KEY_EXTRA_SHELL_BACK_ANIMATION;
import static com.android.wm.shell.sysui.ShellSharedConstants.KEY_EXTRA_SHELL_BACK_ANIMATION;
@@ -244,7 +244,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
    private void setupAnimationDeveloperSettingsObserver(
    private void setupAnimationDeveloperSettingsObserver(
            @NonNull ContentResolver contentResolver,
            @NonNull ContentResolver contentResolver,
            @NonNull @ShellBackgroundThread final Handler backgroundHandler) {
            @NonNull @ShellBackgroundThread final Handler backgroundHandler) {
        if (predictiveBackSystemAnimations()) {
        if (predictiveBackSystemAnims()) {
            ProtoLog.d(WM_SHELL_BACK_PREVIEW, "Back animation aconfig flag is enabled, therefore "
            ProtoLog.d(WM_SHELL_BACK_PREVIEW, "Back animation aconfig flag is enabled, therefore "
                    + "developer settings flag is ignored and no content observer registered");
                    + "developer settings flag is ignored and no content observer registered");
            return;
            return;
@@ -267,7 +267,7 @@ public class BackAnimationController implements RemoteCallable<BackAnimationCont
     */
     */
    @ShellBackgroundThread
    @ShellBackgroundThread
    private void updateEnableAnimationFromFlags() {
    private void updateEnableAnimationFromFlags() {
        boolean isEnabled = predictiveBackSystemAnimations() || isDeveloperSettingEnabled();
        boolean isEnabled = predictiveBackSystemAnims() || isDeveloperSettingEnabled();
        mEnableAnimations.set(isEnabled);
        mEnableAnimations.set(isEnabled);
        ProtoLog.d(WM_SHELL_BACK_PREVIEW, "Back animation enabled=%s", isEnabled);
        ProtoLog.d(WM_SHELL_BACK_PREVIEW, "Back animation enabled=%s", isEnabled);
    }
    }