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

Commit 7265a36e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix default occlude animation to scale from 50%, not 0%." into...

Merge "Fix default occlude animation to scale from 50%, not 0%." into tm-qpr-dev am: 75920512 am: 4d217c1f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20501231



Change-Id: I86c6aeb49b0eadd412079948cb823dd0e27af7cd
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b8d28b3a 4d217c1f
Loading
Loading
Loading
Loading
+16 −9
Original line number Original line Diff line number Diff line
@@ -900,25 +900,32 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
                @NonNull
                @NonNull
                @Override
                @Override
                public LaunchAnimator.State createAnimatorState() {
                public LaunchAnimator.State createAnimatorState() {
                    final int width = getLaunchContainer().getWidth();
                    final int fullWidth = getLaunchContainer().getWidth();
                    final int height = getLaunchContainer().getHeight();
                    final int fullHeight = getLaunchContainer().getHeight();

                    final float initialHeight = height / 3f;
                    final float initialWidth = width / 3f;


                    if (mUpdateMonitor.isSecureCameraLaunchedOverKeyguard()) {
                    if (mUpdateMonitor.isSecureCameraLaunchedOverKeyguard()) {
                        final float initialHeight = fullHeight / 3f;
                        final float initialWidth = fullWidth / 3f;

                        // Start the animation near the power button, at one-third size, since the
                        // Start the animation near the power button, at one-third size, since the
                        // camera was launched from the power button.
                        // camera was launched from the power button.
                        return new LaunchAnimator.State(
                        return new LaunchAnimator.State(
                                (int) (mPowerButtonY - initialHeight / 2f) /* top */,
                                (int) (mPowerButtonY - initialHeight / 2f) /* top */,
                                (int) (mPowerButtonY + initialHeight / 2f) /* bottom */,
                                (int) (mPowerButtonY + initialHeight / 2f) /* bottom */,
                                (int) (width - initialWidth) /* left */,
                                (int) (fullWidth - initialWidth) /* left */,
                                width /* right */,
                                fullWidth /* right */,
                                mWindowCornerRadius, mWindowCornerRadius);
                                mWindowCornerRadius, mWindowCornerRadius);
                    } else {
                    } else {
                        // Start the animation in the center of the screen, scaled down.
                        final float initialHeight = fullHeight / 2f;
                        final float initialWidth = fullWidth / 2f;

                        // Start the animation in the center of the screen, scaled down to half
                        // size.
                        return new LaunchAnimator.State(
                        return new LaunchAnimator.State(
                                height / 2, height / 2, width / 2, width / 2,
                                (int) (fullHeight - initialHeight) / 2,
                                (int) (initialHeight + (fullHeight - initialHeight) / 2),
                                (int) (fullWidth - initialWidth) / 2,
                                (int) (initialWidth + (fullWidth - initialWidth) / 2),
                                mWindowCornerRadius, mWindowCornerRadius);
                                mWindowCornerRadius, mWindowCornerRadius);
                    }
                    }
                }
                }