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

Commit cb924c50 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Guarantee transitions always update occlude status" into tm-qpr-dev

parents d411fe5a fb4656b7
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -964,13 +964,24 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
                public void onAnimationStart(int transit, RemoteAnimationTarget[] apps,
                        RemoteAnimationTarget[] wallpapers, RemoteAnimationTarget[] nonApps,
                        IRemoteAnimationFinishedCallback finishedCallback) throws RemoteException {
                    if (!handleOnAnimationStart(
                                transit, apps, wallpapers, nonApps, finishedCallback)) {
                        // Usually we rely on animation completion to synchronize occluded status,
                        // but there was no animation to play, so just update it now.
                        setOccluded(true /* isOccluded */, false /* animate */);
                    }
                }

                private boolean handleOnAnimationStart(int transit, RemoteAnimationTarget[] apps,
                        RemoteAnimationTarget[] wallpapers, RemoteAnimationTarget[] nonApps,
                        IRemoteAnimationFinishedCallback finishedCallback) throws RemoteException {
                    if (apps == null || apps.length == 0 || apps[0] == null) {
                        if (DEBUG) {
                            Log.d(TAG, "No apps provided to the OccludeByDream runner; "
                                    + "skipping occluding animation.");
                        }
                        finishedCallback.onAnimationFinished();
                        return;
                        return false;
                    }

                    final RemoteAnimationTarget primary = apps[0];
@@ -980,7 +991,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
                        Log.w(TAG, "The occluding app isn't Dream; "
                                + "finishing up. Please check that the config is correct.");
                        finishedCallback.onAnimationFinished();
                        return;
                        return false;
                    }

                    final SyncRtSurfaceTransactionApplier applier =
@@ -1029,6 +1040,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,

                        mOccludeByDreamAnimator.start();
                    });
                    return true;
                }
            };