Loading services/core/java/com/android/server/wm/ActivityStartController.java +1 −1 Original line number Diff line number Diff line Loading @@ -135,7 +135,7 @@ public class ActivityStartController { mHandler = new StartHandler(mService.mH.getLooper()); mFactory = factory; mFactory.setController(this); mPendingRemoteAnimationRegistry = new PendingRemoteAnimationRegistry(service, mPendingRemoteAnimationRegistry = new PendingRemoteAnimationRegistry(service.mGlobalLock, service.mH); } Loading services/core/java/com/android/server/wm/DisplayContent.java +1 −2 Original line number Diff line number Diff line Loading @@ -230,7 +230,6 @@ import com.android.internal.util.function.pooled.PooledConsumer; import com.android.internal.util.function.pooled.PooledFunction; import com.android.internal.util.function.pooled.PooledLambda; import com.android.internal.util.function.pooled.PooledPredicate; import com.android.server.AnimationThread; import com.android.server.policy.WindowManagerPolicy; import com.android.server.protolog.common.ProtoLog; import com.android.server.wm.utils.DisplayRotationUtil; Loading Loading @@ -977,7 +976,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo AnimationHandler animationHandler = new AnimationHandler(); mBoundsAnimationController = new BoundsAnimationController(mWmService.mContext, mAppTransition, AnimationThread.getHandler(), animationHandler); mAppTransition, mWmService.mAnimationHandler, animationHandler); final InputChannel inputChannel = mWmService.mInputManager.monitorInput( "PointerEventDispatcher" + mDisplayId, mDisplayId); Loading services/core/java/com/android/server/wm/InputMonitor.java +1 −2 Original line number Diff line number Diff line Loading @@ -47,7 +47,6 @@ import android.view.InputEventReceiver; import android.view.InputWindowHandle; import android.view.SurfaceControl; import com.android.server.AnimationThread; import com.android.server.policy.WindowManagerPolicy; import com.android.server.protolog.common.ProtoLog; Loading Loading @@ -157,7 +156,7 @@ final class InputMonitor { mDisplayContent = mService.mRoot.getDisplayContent(displayId); mDisplayId = displayId; mInputTransaction = mService.mTransactionFactory.get(); mHandler = AnimationThread.getHandler(); mHandler = mService.mAnimationHandler; mUpdateInputForAllWindowsConsumer = new UpdateInputForAllWindowsConsumer(); } Loading services/core/java/com/android/server/wm/PendingRemoteAnimationRegistry.java +5 −7 Original line number Diff line number Diff line Loading @@ -22,12 +22,10 @@ import android.os.Handler; import android.util.ArrayMap; import android.view.RemoteAnimationAdapter; import com.android.server.am.ActivityManagerService; /** * Registry to keep track of remote animations to be run for activity starts from a certain package. * * @see ActivityManagerService#registerRemoteAnimationForNextActivityStart * @see ActivityTaskManagerService#registerRemoteAnimationForNextActivityStart */ class PendingRemoteAnimationRegistry { Loading @@ -35,10 +33,10 @@ class PendingRemoteAnimationRegistry { private final ArrayMap<String, Entry> mEntries = new ArrayMap<>(); private final Handler mHandler; private final ActivityTaskManagerService mService; private final WindowManagerGlobalLock mLock; PendingRemoteAnimationRegistry(ActivityTaskManagerService service, Handler handler) { mService = service; PendingRemoteAnimationRegistry(WindowManagerGlobalLock lock, Handler handler) { mLock = lock; mHandler = handler; } Loading Loading @@ -76,7 +74,7 @@ class PendingRemoteAnimationRegistry { this.packageName = packageName; this.adapter = adapter; mHandler.postDelayed(() -> { synchronized (mService.mGlobalLock) { synchronized (mLock) { final Entry entry = mEntries.get(packageName); if (entry == this) { mEntries.remove(packageName); Loading services/core/java/com/android/server/wm/SurfaceAnimationRunner.java +6 −3 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.annotation.Nullable; import android.hardware.power.V1_0.PowerHint; import android.os.Handler; import android.os.PowerManagerInternal; import android.util.ArrayMap; import android.view.Choreographer; Loading Loading @@ -57,6 +58,8 @@ class SurfaceAnimationRunner { @VisibleForTesting Choreographer mChoreographer; private final Handler mAnimationThreadHandler = AnimationThread.getHandler(); private final Handler mSurfaceAnimationHandler = SurfaceAnimationThread.getHandler(); private final Runnable mApplyTransactionRunnable = this::applyTransaction; private final AnimationHandler mAnimationHandler; private final Transaction mFrameTransaction; Loading Loading @@ -85,7 +88,7 @@ class SurfaceAnimationRunner { SurfaceAnimationRunner(@Nullable AnimationFrameCallbackProvider callbackProvider, AnimatorFactory animatorFactory, Transaction frameTransaction, PowerManagerInternal powerManagerInternal) { SurfaceAnimationThread.getHandler().runWithScissors(() -> mChoreographer = getSfInstance(), mSurfaceAnimationHandler.runWithScissors(() -> mChoreographer = getSfInstance(), 0 /* timeout */); mFrameTransaction = frameTransaction; mAnimationHandler = new AnimationHandler(); Loading Loading @@ -152,7 +155,7 @@ class SurfaceAnimationRunner { synchronized (mCancelLock) { anim.mCancelled = true; } SurfaceAnimationThread.getHandler().post(() -> { mSurfaceAnimationHandler.post(() -> { anim.mAnim.cancel(); applyTransaction(); }); Loading Loading @@ -211,7 +214,7 @@ class SurfaceAnimationRunner { if (!a.mCancelled) { // Post on other thread that we can push final state without jank. AnimationThread.getHandler().post(a.mFinishCallback); mAnimationThreadHandler.post(a.mFinishCallback); } } } Loading Loading
services/core/java/com/android/server/wm/ActivityStartController.java +1 −1 Original line number Diff line number Diff line Loading @@ -135,7 +135,7 @@ public class ActivityStartController { mHandler = new StartHandler(mService.mH.getLooper()); mFactory = factory; mFactory.setController(this); mPendingRemoteAnimationRegistry = new PendingRemoteAnimationRegistry(service, mPendingRemoteAnimationRegistry = new PendingRemoteAnimationRegistry(service.mGlobalLock, service.mH); } Loading
services/core/java/com/android/server/wm/DisplayContent.java +1 −2 Original line number Diff line number Diff line Loading @@ -230,7 +230,6 @@ import com.android.internal.util.function.pooled.PooledConsumer; import com.android.internal.util.function.pooled.PooledFunction; import com.android.internal.util.function.pooled.PooledLambda; import com.android.internal.util.function.pooled.PooledPredicate; import com.android.server.AnimationThread; import com.android.server.policy.WindowManagerPolicy; import com.android.server.protolog.common.ProtoLog; import com.android.server.wm.utils.DisplayRotationUtil; Loading Loading @@ -977,7 +976,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo AnimationHandler animationHandler = new AnimationHandler(); mBoundsAnimationController = new BoundsAnimationController(mWmService.mContext, mAppTransition, AnimationThread.getHandler(), animationHandler); mAppTransition, mWmService.mAnimationHandler, animationHandler); final InputChannel inputChannel = mWmService.mInputManager.monitorInput( "PointerEventDispatcher" + mDisplayId, mDisplayId); Loading
services/core/java/com/android/server/wm/InputMonitor.java +1 −2 Original line number Diff line number Diff line Loading @@ -47,7 +47,6 @@ import android.view.InputEventReceiver; import android.view.InputWindowHandle; import android.view.SurfaceControl; import com.android.server.AnimationThread; import com.android.server.policy.WindowManagerPolicy; import com.android.server.protolog.common.ProtoLog; Loading Loading @@ -157,7 +156,7 @@ final class InputMonitor { mDisplayContent = mService.mRoot.getDisplayContent(displayId); mDisplayId = displayId; mInputTransaction = mService.mTransactionFactory.get(); mHandler = AnimationThread.getHandler(); mHandler = mService.mAnimationHandler; mUpdateInputForAllWindowsConsumer = new UpdateInputForAllWindowsConsumer(); } Loading
services/core/java/com/android/server/wm/PendingRemoteAnimationRegistry.java +5 −7 Original line number Diff line number Diff line Loading @@ -22,12 +22,10 @@ import android.os.Handler; import android.util.ArrayMap; import android.view.RemoteAnimationAdapter; import com.android.server.am.ActivityManagerService; /** * Registry to keep track of remote animations to be run for activity starts from a certain package. * * @see ActivityManagerService#registerRemoteAnimationForNextActivityStart * @see ActivityTaskManagerService#registerRemoteAnimationForNextActivityStart */ class PendingRemoteAnimationRegistry { Loading @@ -35,10 +33,10 @@ class PendingRemoteAnimationRegistry { private final ArrayMap<String, Entry> mEntries = new ArrayMap<>(); private final Handler mHandler; private final ActivityTaskManagerService mService; private final WindowManagerGlobalLock mLock; PendingRemoteAnimationRegistry(ActivityTaskManagerService service, Handler handler) { mService = service; PendingRemoteAnimationRegistry(WindowManagerGlobalLock lock, Handler handler) { mLock = lock; mHandler = handler; } Loading Loading @@ -76,7 +74,7 @@ class PendingRemoteAnimationRegistry { this.packageName = packageName; this.adapter = adapter; mHandler.postDelayed(() -> { synchronized (mService.mGlobalLock) { synchronized (mLock) { final Entry entry = mEntries.get(packageName); if (entry == this) { mEntries.remove(packageName); Loading
services/core/java/com/android/server/wm/SurfaceAnimationRunner.java +6 −3 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.annotation.Nullable; import android.hardware.power.V1_0.PowerHint; import android.os.Handler; import android.os.PowerManagerInternal; import android.util.ArrayMap; import android.view.Choreographer; Loading Loading @@ -57,6 +58,8 @@ class SurfaceAnimationRunner { @VisibleForTesting Choreographer mChoreographer; private final Handler mAnimationThreadHandler = AnimationThread.getHandler(); private final Handler mSurfaceAnimationHandler = SurfaceAnimationThread.getHandler(); private final Runnable mApplyTransactionRunnable = this::applyTransaction; private final AnimationHandler mAnimationHandler; private final Transaction mFrameTransaction; Loading Loading @@ -85,7 +88,7 @@ class SurfaceAnimationRunner { SurfaceAnimationRunner(@Nullable AnimationFrameCallbackProvider callbackProvider, AnimatorFactory animatorFactory, Transaction frameTransaction, PowerManagerInternal powerManagerInternal) { SurfaceAnimationThread.getHandler().runWithScissors(() -> mChoreographer = getSfInstance(), mSurfaceAnimationHandler.runWithScissors(() -> mChoreographer = getSfInstance(), 0 /* timeout */); mFrameTransaction = frameTransaction; mAnimationHandler = new AnimationHandler(); Loading Loading @@ -152,7 +155,7 @@ class SurfaceAnimationRunner { synchronized (mCancelLock) { anim.mCancelled = true; } SurfaceAnimationThread.getHandler().post(() -> { mSurfaceAnimationHandler.post(() -> { anim.mAnim.cancel(); applyTransaction(); }); Loading Loading @@ -211,7 +214,7 @@ class SurfaceAnimationRunner { if (!a.mCancelled) { // Post on other thread that we can push final state without jank. AnimationThread.getHandler().post(a.mFinishCallback); mAnimationThreadHandler.post(a.mFinishCallback); } } } Loading