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

Commit debadca4 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Adjust animation end callback for SystemUI

This avoids the potential heavy operation in onAnimationEnd
from being included in animation frame, so the last frame
jank might reduce.

Bug: 300035126
Flag: com.android.window.flags.system_ui_post_animation_end
Test: presubmit
Change-Id: I40a59e594b36450c8fa5406f29d90eb3668b4910
parent 66b4d2f7
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -259,6 +259,16 @@ flag {
  }
}

flag {
  name: "system_ui_post_animation_end"
  namespace: "windowing_frontend"
  description: "Run AnimatorListener#onAnimationEnd on next frame for SystemUI"
  bug: "300035126"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "system_ui_immersive_confirmation_dialog"
  namespace: "windowing_frontend"
+4 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.systemui;

import android.animation.Animator;
import android.annotation.SuppressLint;
import android.app.ActivityThread;
import android.app.Application;
@@ -135,6 +136,9 @@ public class SystemUIApplication extends Application implements
        if (Flags.enableLayoutTracing()) {
            View.setTraceLayoutSteps(true);
        }
        if (com.android.window.flags.Flags.systemUiPostAnimationEnd()) {
            Animator.setPostNotifyEndListenerEnabled(true);
        }

        if (mProcessWrapper.isSystemUser()) {
            IntentFilter bootCompletedFilter = new