[automerger] Defer starting the high-res thumbnail loader until quick step/scrub am: 8eb49e079e
Change-Id: I3b69862c42175d7680fd6a4878247c3cf7c0081f
This commit is contained in:
commit
498a9bd559
|
@ -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) {
|
public static void onLauncherStateOrResumeChanged(Launcher launcher) {
|
||||||
LauncherState state = launcher.getStateManager().getState();
|
LauncherState state = launcher.getStateManager().getState();
|
||||||
DeviceProfile profile = launcher.getDeviceProfile();
|
DeviceProfile profile = launcher.getDeviceProfile();
|
||||||
|
|
|
@ -232,7 +232,6 @@ public class RecentsModel extends TaskStackChangeListener {
|
||||||
|
|
||||||
public void onStart() {
|
public void onStart() {
|
||||||
mRecentsTaskLoader.startLoader(mContext);
|
mRecentsTaskLoader.startLoader(mContext);
|
||||||
mRecentsTaskLoader.getHighResThumbnailLoader().setVisible(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onTrimMemory(int level) {
|
public void onTrimMemory(int level) {
|
||||||
|
|
|
@ -477,6 +477,12 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> {
|
||||||
if (LatencyTrackerCompat.isEnabled(mContext)) {
|
if (LatencyTrackerCompat.isEnabled(mContext)) {
|
||||||
LatencyTrackerCompat.logToggleRecents((int) (mLauncherFrameDrawnTime - mTouchTimeMs));
|
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) {
|
public void updateInteractionType(@InteractionType int interactionType) {
|
||||||
|
|
|
@ -346,6 +346,12 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
|
||||||
TraceHelper.endSection("Launcher-onCreate");
|
TraceHelper.endSection("Launcher-onCreate");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEnterAnimationComplete() {
|
||||||
|
super.onEnterAnimationComplete();
|
||||||
|
UiFactory.onEnterAnimationComplete(this);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onConfigurationChanged(Configuration newConfig) {
|
public void onConfigurationChanged(Configuration newConfig) {
|
||||||
int diff = newConfig.diff(mOldConfig);
|
int diff = newConfig.diff(mOldConfig);
|
||||||
|
|
|
@ -48,6 +48,8 @@ public class UiFactory {
|
||||||
|
|
||||||
public static void onStart(Launcher launcher) { }
|
public static void onStart(Launcher launcher) { }
|
||||||
|
|
||||||
|
public static void onEnterAnimationComplete(Context context) {}
|
||||||
|
|
||||||
public static void onLauncherStateOrResumeChanged(Launcher launcher) { }
|
public static void onLauncherStateOrResumeChanged(Launcher launcher) { }
|
||||||
|
|
||||||
public static void onTrimMemory(Launcher launcher, int level) { }
|
public static void onTrimMemory(Launcher launcher, int level) { }
|
||||||
|
|
Loading…
Reference in New Issue