Update Launcher for removed shared wrappers
- Launcher can reference system code directly now Bug: 219861883 Test: Builds/Presubmit Change-Id: I3f656b6c7fce93243ccb7591e52441e99137dec6 Merged-In: I3f656b6c7fce93243ccb7591e52441e99137dec6
This commit is contained in:
1 parent
1c8e630381
commit
3f649ef892
20 files changed
+143
-91
No files matched your search
@@ -48,6 +48,7 @@ import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.FloatProperty;
|
||||
import android.util.Log;
|
||||
@@ -99,7 +100,6 @@ import com.android.quickstep.views.TaskThumbnailView.PreviewPositionHelper;
|
||||
import com.android.systemui.shared.recents.model.Task;
|
||||
import com.android.systemui.shared.recents.model.ThumbnailData;
|
||||
import com.android.systemui.shared.system.ActivityManagerWrapper;
|
||||
import com.android.systemui.shared.system.ActivityOptionsCompat;
|
||||
import com.android.systemui.shared.system.QuickStepContract;
|
||||
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
|
||||
|
||||
@@ -659,12 +659,12 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
TestProtocol.SEQUENCE_MAIN, "startActivityFromRecentsAsync", mTask);
|
||||
|
||||
// Indicate success once the system has indicated that the transition has started
|
||||
ActivityOptions opts = ActivityOptionsCompat.makeCustomAnimation(
|
||||
getContext(), 0, 0, () -> callback.accept(true), MAIN_EXECUTOR.getHandler());
|
||||
ActivityOptions opts = makeCustomAnimation(getContext(), 0, 0,
|
||||
() -> callback.accept(true), MAIN_EXECUTOR.getHandler());
|
||||
opts.setLaunchDisplayId(
|
||||
getDisplay() == null ? DEFAULT_DISPLAY : getDisplay().getDisplayId());
|
||||
if (freezeTaskList) {
|
||||
ActivityOptionsCompat.setFreezeRecentTasksList(opts);
|
||||
opts.setFreezeRecentTasksReordering();
|
||||
}
|
||||
// TODO(b/202826469): Replace setSplashScreenStyle with setDisableStartingWindow.
|
||||
opts.setSplashScreenStyle(mSnapshotView.shouldShowSplashView()
|
||||
@@ -686,6 +686,20 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns ActivityOptions for overriding task transition animation.
|
||||
*/
|
||||
private ActivityOptions makeCustomAnimation(Context context, int enterResId,
|
||||
int exitResId, final Runnable callback, final Handler callbackHandler) {
|
||||
return ActivityOptions.makeCustomTaskAnimation(context, enterResId, exitResId,
|
||||
callbackHandler,
|
||||
elapsedRealTime -> {
|
||||
if (callback != null) {
|
||||
callbackHandler.post(callback);
|
||||
}
|
||||
}, null /* finishedListener */);
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch of the current task (both live and inactive tasks) with an animation.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user