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

Commit 3358a966 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Merge "No translating down for Dream to Keyguard (unoccluding)...

Merge "Merge "No translating down for Dream to Keyguard (unoccluding) transit." into tm-qpr-dev am: 5ee0e5c3" into tm-qpr-dev-plus-aosp am: 24a1552a

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



Change-Id: I02027fa4f2f373b9f07c0e7919f9919a821a3d1c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 8649176c 24a1552a
Loading
Loading
Loading
Loading
+19 −12
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import android.app.ActivityTaskManager;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.app.StatusBarManager;
import android.app.WindowConfiguration;
import android.app.trust.TrustManager;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
@@ -921,6 +922,8 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
                    }

                    final RemoteAnimationTarget primary = apps[0];
                    final boolean isDream = (apps[0].taskInfo.topActivityType
                            == WindowConfiguration.ACTIVITY_TYPE_DREAM);

                    final SyncRtSurfaceTransactionApplier applier =
                            new SyncRtSurfaceTransactionApplier(
@@ -942,20 +945,24 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,

                                    final float surfaceHeight = primary.screenSpaceBounds.height();

                                    // Fade for all types of activities.
                                    SyncRtSurfaceTransactionApplier.SurfaceParams.Builder
                                            paramsBuilder =
                                            new SyncRtSurfaceTransactionApplier.SurfaceParams
                                                    .Builder(primary.leash)
                                                    .withAlpha(animatedValue);
                                    // Set translate if the occluding activity isn't Dream.
                                    if (!isDream) {
                                        mUnoccludeMatrix.setTranslate(
                                                0f,
                                                (1f - animatedValue)
                                                        * surfaceHeight
                                                        * UNOCCLUDE_TRANSLATE_DISTANCE_PERCENT);

                                    SyncRtSurfaceTransactionApplier.SurfaceParams params =
                                            new SyncRtSurfaceTransactionApplier.SurfaceParams
                                                    .Builder(primary.leash)
                                                    .withMatrix(mUnoccludeMatrix)
                                                    .withCornerRadius(mWindowCornerRadius)
                                                    .withAlpha(animatedValue)
                                                    .build();
                                    applier.scheduleApply(params);
                                        paramsBuilder.withMatrix(mUnoccludeMatrix).withCornerRadius(
                                                mWindowCornerRadius);
                                    }
                                    applier.scheduleApply(paramsBuilder.build());
                                });
                        mUnoccludeAnimator.addListener(new AnimatorListenerAdapter() {
                            @Override