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

Commit 498a9bd5 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role)
Browse files

[automerger] Defer starting the high-res thumbnail loader until quick step/scrub am: 8eb49e07

Change-Id: I3b69862c42175d7680fd6a4878247c3cf7c0081f
parents eb9cc9db 8eb49e07
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -165,6 +165,14 @@ public class UiFactory {
        }
    }

    public static void onEnterAnimationComplete(Context context) {
        // After the transition to home, enable the high-res thumbnail loader if it wasn't enabled
        // as a part of quickstep/scrub, so that high-res thumbnails can load the next time we
        // enter overview
        RecentsModel.getInstance(context).getRecentsTaskLoader()
                .getHighResThumbnailLoader().setVisible(true);
    }

    public static void onLauncherStateOrResumeChanged(Launcher launcher) {
        LauncherState state = launcher.getStateManager().getState();
        DeviceProfile profile = launcher.getDeviceProfile();
+0 −1
Original line number Diff line number Diff line
@@ -232,7 +232,6 @@ public class RecentsModel extends TaskStackChangeListener {

    public void onStart() {
        mRecentsTaskLoader.startLoader(mContext);
        mRecentsTaskLoader.getHighResThumbnailLoader().setVisible(true);
    }

    public void onTrimMemory(int level) {
+6 −0
Original line number Diff line number Diff line
@@ -477,6 +477,12 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> {
        if (LatencyTrackerCompat.isEnabled(mContext)) {
            LatencyTrackerCompat.logToggleRecents((int) (mLauncherFrameDrawnTime - mTouchTimeMs));
        }

        // This method is only called when STATE_GESTURE_STARTED_QUICKSTEP/
        // STATE_GESTURE_STARTED_QUICKSCRUB is set, so we can enable the high-res thumbnail loader
        // here once we are sure that we will end up in an overview state
        RecentsModel.getInstance(mContext).getRecentsTaskLoader()
                .getHighResThumbnailLoader().setVisible(true);
    }

    public void updateInteractionType(@InteractionType int interactionType) {
+6 −0
Original line number Diff line number Diff line
@@ -346,6 +346,12 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
        TraceHelper.endSection("Launcher-onCreate");
    }

    @Override
    public void onEnterAnimationComplete() {
        super.onEnterAnimationComplete();
        UiFactory.onEnterAnimationComplete(this);
    }

    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        int diff = newConfig.diff(mOldConfig);
+2 −0
Original line number Diff line number Diff line
@@ -48,6 +48,8 @@ public class UiFactory {

    public static void onStart(Launcher launcher) { }

    public static void onEnterAnimationComplete(Context context) {}

    public static void onLauncherStateOrResumeChanged(Launcher launcher) { }

    public static void onTrimMemory(Launcher launcher, int level) { }