Preloads the icon drawable for app open to reduce latency b/w swapping views.

For app close, we already load the icon as soon as we can.

Bug: 135130011
Change-Id: Ia2c45737cf24d1ab5911b222ae097d7a1f9d6a31
This commit is contained in:
Jon Miranda
2019-06-12 13:33:51 -07:00
parent 3d6e96d526
commit 6dfa312896
4 changed files with 263 additions and 143 deletions

View File

@@ -59,6 +59,7 @@ import android.view.View;
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
import com.android.launcher3.allapps.AllAppsTransitionController;
import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.dragndrop.DragLayer;
import com.android.launcher3.shortcuts.DeepShortcutView;
import com.android.launcher3.util.MultiValueAlpha;
@@ -182,6 +183,12 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
mDeviceProfile = dp;
}
@Override
public boolean supportsAdaptiveIconAnimation() {
return hasControlRemoteAppTransitionPermission()
&& FeatureFlags.ADAPTIVE_ICON_WINDOW_ANIM.get();
}
/**
* @return ActivityOptions with remote animations that controls how the window of the opening
* targets are displayed.