Snap for 7883892 from a8c19019c6 to sc-v2-release
Change-Id: I3aa62158c0c178294e61e75fd89992a87251fd13
This commit is contained in:
@@ -17,11 +17,8 @@ package com.android.launcher3;
|
||||
|
||||
import android.animation.AnimatorSet;
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.CancellationSignal;
|
||||
import android.os.Handler;
|
||||
|
||||
import com.android.quickstep.util.ActivityInitListener;
|
||||
import com.android.quickstep.util.RemoteAnimationProvider;
|
||||
@@ -78,11 +75,4 @@ public class LauncherInitListener extends ActivityInitListener<Launcher> {
|
||||
mRemoteAnimationProvider = null;
|
||||
super.unregister();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerAndStartActivity(Intent intent, RemoteAnimationProvider animProvider,
|
||||
Context context, Handler handler, long duration) {
|
||||
mRemoteAnimationProvider = animProvider;
|
||||
super.registerAndStartActivity(intent, animProvider, context, handler, duration);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,7 +285,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
long statusBarTransitionDelay = duration - STATUS_BAR_TRANSITION_DURATION
|
||||
- STATUS_BAR_TRANSITION_PRE_DELAY;
|
||||
RemoteAnimationAdapterCompat adapterCompat =
|
||||
new RemoteAnimationAdapterCompat(runner, duration, statusBarTransitionDelay);
|
||||
new RemoteAnimationAdapterCompat(runner, duration, statusBarTransitionDelay,
|
||||
mLauncher.getIApplicationThread());
|
||||
return new ActivityOptionsWrapper(
|
||||
ActivityOptionsCompat.makeRemoteAnimation(adapterCompat), onEndCallback);
|
||||
}
|
||||
@@ -1081,7 +1082,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
new RemoteAnimationAdapterCompat(
|
||||
new LauncherAnimationRunner(mHandler, mWallpaperOpenRunner,
|
||||
false /* startAtFrontOfQueue */),
|
||||
CLOSING_TRANSITION_DURATION_MS, 0 /* statusBarTransitionDelay */));
|
||||
CLOSING_TRANSITION_DURATION_MS, 0 /* statusBarTransitionDelay */,
|
||||
mLauncher.getIApplicationThread()));
|
||||
|
||||
if (KEYGUARD_ANIMATION.get()) {
|
||||
mKeyguardGoingAwayRunner = createWallpaperOpenRunner(true /* fromUnlock */);
|
||||
@@ -1091,7 +1093,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
new LauncherAnimationRunner(
|
||||
mHandler, mKeyguardGoingAwayRunner,
|
||||
true /* startAtFrontOfQueue */),
|
||||
CLOSING_TRANSITION_DURATION_MS, 0 /* statusBarTransitionDelay */));
|
||||
CLOSING_TRANSITION_DURATION_MS, 0 /* statusBarTransitionDelay */,
|
||||
mLauncher.getIApplicationThread()));
|
||||
}
|
||||
|
||||
new ActivityCompat(mLauncher).registerRemoteAnimations(definition);
|
||||
@@ -1109,7 +1112,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
mWallpaperOpenTransitionRunner = createWallpaperOpenRunner(false /* fromUnlock */);
|
||||
mLauncherOpenTransition = RemoteAnimationAdapterCompat.buildRemoteTransition(
|
||||
new LauncherAnimationRunner(mHandler, mWallpaperOpenTransitionRunner,
|
||||
false /* startAtFrontOfQueue */));
|
||||
false /* startAtFrontOfQueue */), mLauncher.getIApplicationThread());
|
||||
mLauncherOpenTransition.addHomeOpenCheck(mLauncher.getComponentName());
|
||||
SystemUiProxy.INSTANCE.getNoCreate().registerRemoteTransition(mLauncherOpenTransition);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_M
|
||||
import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL;
|
||||
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_FOLDER_OPEN;
|
||||
import static com.android.launcher3.testing.TestProtocol.TASKBAR_WINDOW_CRASH;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_QUICK_SETTINGS_EXPANDED;
|
||||
import static com.android.systemui.shared.system.WindowManagerWrapper.ITYPE_BOTTOM_TAPPABLE_ELEMENT;
|
||||
@@ -60,6 +61,7 @@ import com.android.launcher3.folder.FolderIcon;
|
||||
import com.android.launcher3.logger.LauncherAtom;
|
||||
import com.android.launcher3.model.data.FolderInfo;
|
||||
import com.android.launcher3.model.data.WorkspaceItemInfo;
|
||||
import com.android.launcher3.testing.TestProtocol;
|
||||
import com.android.launcher3.touch.ItemClickHandler;
|
||||
import com.android.launcher3.util.PackageManagerHelper;
|
||||
import com.android.launcher3.util.SettingsCache;
|
||||
@@ -200,6 +202,9 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
updateSysuiStateFlags(sharedState.sysuiStateFlags, true /* fromInit */);
|
||||
|
||||
mWindowManager.addView(mDragLayer, mWindowLayoutParams);
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.e(TASKBAR_WINDOW_CRASH, "Adding taskbar window");
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isThreeButtonNav() {
|
||||
@@ -330,6 +335,9 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
|
||||
setUIController(TaskbarUIController.DEFAULT);
|
||||
mControllers.onDestroy();
|
||||
mWindowManager.removeViewImmediate(mDragLayer);
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.e(TASKBAR_WINDOW_CRASH, "Removing taskbar window");
|
||||
}
|
||||
}
|
||||
|
||||
public void updateSysuiStateFlags(int systemUiStateFlags, boolean fromInit) {
|
||||
|
||||
@@ -17,6 +17,8 @@ package com.android.launcher3.taskbar;
|
||||
|
||||
import static android.view.Display.DEFAULT_DISPLAY;
|
||||
import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL;
|
||||
|
||||
import static com.android.launcher3.testing.TestProtocol.TASKBAR_WINDOW_CRASH;
|
||||
import static com.android.launcher3.util.DisplayController.CHANGE_ACTIVE_SCREEN;
|
||||
import static com.android.launcher3.util.DisplayController.CHANGE_DENSITY;
|
||||
import static com.android.launcher3.util.DisplayController.CHANGE_SUPPORTED_BOUNDS;
|
||||
@@ -29,6 +31,7 @@ import android.content.res.Configuration;
|
||||
import android.hardware.display.DisplayManager;
|
||||
import android.net.Uri;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
import android.view.Display;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -39,6 +42,7 @@ import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.statemanager.StatefulActivity;
|
||||
import com.android.launcher3.testing.TestProtocol;
|
||||
import com.android.launcher3.util.DisplayController;
|
||||
import com.android.launcher3.util.DisplayController.Info;
|
||||
import com.android.launcher3.util.SettingsCache;
|
||||
@@ -203,6 +207,10 @@ public class TaskbarManager implements DisplayController.DisplayInfoChangeListen
|
||||
}
|
||||
|
||||
private void recreateTaskbar() {
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.e(TASKBAR_WINDOW_CRASH, "Recreating taskbar: mTaskbarActivityContext="
|
||||
+ mTaskbarActivityContext);
|
||||
}
|
||||
destroyExistingTaskbar();
|
||||
|
||||
DeviceProfile dp =
|
||||
@@ -225,6 +233,9 @@ public class TaskbarManager implements DisplayController.DisplayInfoChangeListen
|
||||
mTaskbarActivityContext.setUIController(
|
||||
createTaskbarUIControllerForActivity(mActivity));
|
||||
}
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.e(TASKBAR_WINDOW_CRASH, "Finished recreating taskbar");
|
||||
}
|
||||
}
|
||||
|
||||
public void onSystemUiFlagsChanged(int systemUiStateFlags) {
|
||||
|
||||
@@ -245,7 +245,7 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> {
|
||||
RemoteAnimationAdapterCompat adapterCompat = new RemoteAnimationAdapterCompat(
|
||||
wrapper, RECENTS_LAUNCH_DURATION,
|
||||
RECENTS_LAUNCH_DURATION - STATUS_BAR_TRANSITION_DURATION
|
||||
- STATUS_BAR_TRANSITION_PRE_DELAY);
|
||||
- STATUS_BAR_TRANSITION_PRE_DELAY, getIApplicationThread());
|
||||
final ActivityOptionsWrapper activityOptions = new ActivityOptionsWrapper(
|
||||
ActivityOptionsCompat.makeRemoteAnimation(adapterCompat),
|
||||
onEndCallback);
|
||||
@@ -394,7 +394,8 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> {
|
||||
LauncherAnimationRunner runner = new LauncherAnimationRunner(
|
||||
getMainThreadHandler(), mAnimationToHomeFactory, true);
|
||||
RemoteAnimationAdapterCompat adapterCompat =
|
||||
new RemoteAnimationAdapterCompat(runner, HOME_APPEAR_DURATION, 0);
|
||||
new RemoteAnimationAdapterCompat(runner, HOME_APPEAR_DURATION, 0,
|
||||
getIApplicationThread());
|
||||
startActivity(createHomeIntent(),
|
||||
ActivityOptionsCompat.makeRemoteAnimation(adapterCompat).toBundle());
|
||||
}
|
||||
|
||||
@@ -178,7 +178,8 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn
|
||||
|
||||
if (ENABLE_SHELL_TRANSITIONS) {
|
||||
RemoteTransitionCompat transition = new RemoteTransitionCompat(mCallbacks,
|
||||
mController != null ? mController.getController() : null);
|
||||
mController != null ? mController.getController() : null,
|
||||
mCtx.getIApplicationThread());
|
||||
Bundle options = ActivityOptionsCompat.makeRemoteTransition(transition)
|
||||
.setTransientLaunch().toBundle();
|
||||
mCtx.startActivity(intent, options);
|
||||
|
||||
@@ -22,6 +22,7 @@ import static android.view.MotionEvent.ACTION_UP;
|
||||
|
||||
import static com.android.launcher3.config.FeatureFlags.ASSISTANT_GIVES_LAUNCHER_FOCUS;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.testing.TestProtocol.TASKBAR_WINDOW_CRASH;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
import static com.android.quickstep.GestureState.DEFAULT_STATE;
|
||||
import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS;
|
||||
@@ -350,6 +351,9 @@ public class TouchInteractionService extends Service
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.e(TASKBAR_WINDOW_CRASH, "TIS created");
|
||||
}
|
||||
// Initialize anything here that is needed in direct boot mode.
|
||||
// Everything else should be initialized in onUserUnlocked() below.
|
||||
mMainChoreographer = Choreographer.getInstance();
|
||||
@@ -511,6 +515,9 @@ public class TouchInteractionService extends Service
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
Log.d(TAG, "Touch service destroyed: user=" + getUserId());
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.e(TASKBAR_WINDOW_CRASH, "TIS destroyed");
|
||||
}
|
||||
sIsInitialized = false;
|
||||
if (mDeviceState.isUserUnlocked()) {
|
||||
mInputConsumer.unregisterInputConsumer();
|
||||
|
||||
@@ -15,11 +15,6 @@
|
||||
*/
|
||||
package com.android.quickstep.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
||||
import com.android.launcher3.BaseActivity;
|
||||
import com.android.launcher3.util.ActivityTracker;
|
||||
import com.android.launcher3.util.ActivityTracker.SchedulerCallback;
|
||||
@@ -75,17 +70,4 @@ public class ActivityInitListener<T extends BaseActivity> implements
|
||||
mIsRegistered = false;
|
||||
mOnInitListener = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the given intent with the provided animation. Unlike {@link #register(Intent)}, this
|
||||
* method will not call {@link #init} if the activity already exists, it will only call it when
|
||||
* we get handleIntent() for the provided intent that we're starting.
|
||||
*/
|
||||
public void registerAndStartActivity(Intent intent, RemoteAnimationProvider animProvider,
|
||||
Context context, Handler handler, long duration) {
|
||||
register();
|
||||
|
||||
Bundle options = animProvider.toActivityOptions(handler, duration, context).toBundle();
|
||||
context.startActivity(new Intent(intent), options);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,32 +16,14 @@
|
||||
package com.android.quickstep.util;
|
||||
|
||||
import android.animation.AnimatorSet;
|
||||
import android.app.ActivityOptions;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
|
||||
import com.android.launcher3.LauncherAnimationRunner;
|
||||
import com.android.launcher3.LauncherAnimationRunner.RemoteAnimationFactory;
|
||||
import com.android.systemui.shared.system.ActivityOptionsCompat;
|
||||
import com.android.systemui.shared.system.RemoteAnimationAdapterCompat;
|
||||
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
|
||||
|
||||
public abstract class RemoteAnimationProvider {
|
||||
|
||||
RemoteAnimationFactory mAnimationRunner;
|
||||
|
||||
public abstract AnimatorSet createWindowAnimation(RemoteAnimationTargetCompat[] appTargets,
|
||||
RemoteAnimationTargetCompat[] wallpaperTargets);
|
||||
|
||||
ActivityOptions toActivityOptions(Handler handler, long duration, Context context) {
|
||||
mAnimationRunner = (transit, appTargets, wallpaperTargets, nonApps, result) ->
|
||||
result.setAnimation(createWindowAnimation(appTargets, wallpaperTargets), context);
|
||||
final LauncherAnimationRunner wrapper = new LauncherAnimationRunner(
|
||||
handler, mAnimationRunner, false /* startAtFrontOfQueue */);
|
||||
return ActivityOptionsCompat.makeRemoteAnimation(
|
||||
new RemoteAnimationAdapterCompat(wrapper, duration, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the target with the lowest opaque layer for a certain app animation, or null.
|
||||
*/
|
||||
|
||||
@@ -94,7 +94,8 @@ public class SplitSelectStateController {
|
||||
new RemoteSplitLaunchTransitionRunner(task1, task2);
|
||||
mSystemUiProxy.startTasks(taskIds[0], null /* mainOptions */, taskIds[1],
|
||||
null /* sideOptions */, STAGE_POSITION_BOTTOM_OR_RIGHT,
|
||||
new RemoteTransitionCompat(animationRunner, MAIN_EXECUTOR));
|
||||
new RemoteTransitionCompat(animationRunner, MAIN_EXECUTOR,
|
||||
ActivityThread.currentActivityThread().getApplicationThread()));
|
||||
} else {
|
||||
RemoteSplitLaunchAnimationRunner animationRunner =
|
||||
new RemoteSplitLaunchAnimationRunner(task1, task2, callback);
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.android.quickstep.util;
|
||||
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.states.RotationHelper.deltaRotation;
|
||||
import static com.android.launcher3.touch.PagedOrientationHandler.MATRIX_POST_TRANSLATE;
|
||||
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT;
|
||||
@@ -99,6 +100,7 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
|
||||
private boolean mLayoutValid = false;
|
||||
private int mOrientationStateId;
|
||||
private StagedSplitBounds mStagedSplitBounds;
|
||||
private boolean mDrawsBelowRecents;
|
||||
|
||||
public TaskViewSimulator(Context context, BaseActivityInterface sizeStrategy) {
|
||||
mContext = context;
|
||||
@@ -198,6 +200,10 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
|
||||
recentsViewScroll.value = scroll;
|
||||
}
|
||||
|
||||
public void setDrawsBelowRecents(boolean drawsBelowRecents) {
|
||||
mDrawsBelowRecents = drawsBelowRecents;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds animation for all the components corresponding to transition from an app to overview.
|
||||
*/
|
||||
@@ -351,6 +357,12 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
|
||||
builder.withMatrix(mMatrix)
|
||||
.withWindowCrop(mTmpCropRect)
|
||||
.withCornerRadius(getCurrentCornerRadius());
|
||||
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && params.getRecentsSurface() != null) {
|
||||
// When relativeLayer = 0, it reverts the surfaces back to the original order.
|
||||
builder.withRelativeLayerTo(params.getRecentsSurface(),
|
||||
mDrawsBelowRecents ? Integer.MIN_VALUE : 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1911,8 +1911,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
}
|
||||
}
|
||||
setEnableDrawingLiveTile(false);
|
||||
runActionOnRemoteHandles(remoteTargetHandle -> remoteTargetHandle.getTransformParams()
|
||||
.setTargetSet(null));
|
||||
runActionOnRemoteHandles(remoteTargetHandle -> {
|
||||
remoteTargetHandle.getTransformParams().setTargetSet(null);
|
||||
remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents(true);
|
||||
});
|
||||
|
||||
// These are relatively expensive and don't need to be done this frame (RecentsView isn't
|
||||
// visible anyway), so defer by a frame to get off the critical path, e.g. app to home.
|
||||
@@ -4368,12 +4370,13 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
TaskViewSimulator tvs = remoteTargetHandle.getTaskViewSimulator();
|
||||
tvs.setOrientationState(mOrientationState);
|
||||
tvs.setDp(mActivity.getDeviceProfile());
|
||||
tvs.setDrawsBelowRecents(true);
|
||||
tvs.recentsViewScale.value = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/** Helper to avoid writing some for-loops to iterate over {@link #mRemoteTargetHandles} */
|
||||
private void runActionOnRemoteHandles(Consumer<RemoteTargetHandle> consumer) {
|
||||
public void runActionOnRemoteHandles(Consumer<RemoteTargetHandle> consumer) {
|
||||
if (mRemoteTargetHandles == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.quickstep.views;
|
||||
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT;
|
||||
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_UNDEFINED;
|
||||
import static com.android.quickstep.views.TaskThumbnailView.DIM_ALPHA;
|
||||
@@ -242,7 +243,17 @@ public class TaskMenuView extends AbstractFloatingView implements OnScrollChange
|
||||
LayoutParams lp = (LayoutParams) menuOptionView.getLayoutParams();
|
||||
mTaskView.getPagedOrientationHandler().setLayoutParamsForTaskMenuOptionItem(lp,
|
||||
menuOptionView, mActivity.getDeviceProfile());
|
||||
menuOptionView.setOnClickListener(menuOption::onClick);
|
||||
menuOptionView.setOnClickListener(view -> {
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
RecentsView recentsView = mTaskView.getRecentsView();
|
||||
recentsView.switchToScreenshot(null,
|
||||
() -> recentsView.finishRecentsAnimation(true /* toRecents */,
|
||||
false /* shouldPip */,
|
||||
() -> menuOption.onClick(view)));
|
||||
} else {
|
||||
menuOption.onClick(view);
|
||||
}
|
||||
});
|
||||
mOptionLayout.addView(menuOptionView);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@ import android.graphics.ColorFilter;
|
||||
import android.graphics.Insets;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffXfermode;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.Shader;
|
||||
@@ -78,6 +80,7 @@ public class TaskThumbnailView extends View {
|
||||
private TaskOverlay mOverlay;
|
||||
private final Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
private final Paint mBackgroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
private final Paint mClearPaint = new Paint();
|
||||
private final Paint mDimmingPaintAfterClearing = new Paint();
|
||||
private final int mDimColor;
|
||||
|
||||
@@ -107,6 +110,7 @@ public class TaskThumbnailView extends View {
|
||||
super(context, attrs, defStyleAttr);
|
||||
mPaint.setFilterBitmap(true);
|
||||
mBackgroundPaint.setColor(Color.WHITE);
|
||||
mClearPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
|
||||
mActivity = BaseActivity.fromContext(context);
|
||||
// Initialize with placeholder value. It is overridden later by TaskView
|
||||
mFullscreenParams = TEMP_PARAMS.get(context);
|
||||
@@ -271,6 +275,7 @@ public class TaskThumbnailView extends View {
|
||||
float cornerRadius) {
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
if (mTask != null && getTaskView().isRunningTask() && !getTaskView().showScreenshot()) {
|
||||
canvas.drawRoundRect(x, y, width, height, cornerRadius, cornerRadius, mClearPaint);
|
||||
canvas.drawRoundRect(x, y, width, height, cornerRadius, cornerRadius,
|
||||
mDimmingPaintAfterClearing);
|
||||
return;
|
||||
|
||||
@@ -94,6 +94,7 @@ import com.android.quickstep.util.CancellableTask;
|
||||
import com.android.quickstep.util.LauncherSplitScreenListener;
|
||||
import com.android.quickstep.util.RecentsOrientedState;
|
||||
import com.android.quickstep.util.TaskCornerRadius;
|
||||
import com.android.quickstep.util.TaskViewSimulator;
|
||||
import com.android.quickstep.util.TransformParams;
|
||||
import com.android.quickstep.views.TaskThumbnailView.PreviewPositionHelper;
|
||||
import com.android.systemui.shared.recents.model.Task;
|
||||
@@ -624,8 +625,22 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
mActivity.getStateManager(), recentsView,
|
||||
recentsView.getDepthController());
|
||||
anim.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animator) {
|
||||
recentsView.runActionOnRemoteHandles(
|
||||
(Consumer<RemoteTargetHandle>) remoteTargetHandle ->
|
||||
remoteTargetHandle
|
||||
.getTaskViewSimulator()
|
||||
.setDrawsBelowRecents(false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animator) {
|
||||
recentsView.runActionOnRemoteHandles(
|
||||
(Consumer<RemoteTargetHandle>) remoteTargetHandle ->
|
||||
remoteTargetHandle
|
||||
.getTaskViewSimulator()
|
||||
.setDrawsBelowRecents(true));
|
||||
mIsClickableAsLiveTile = true;
|
||||
}
|
||||
});
|
||||
@@ -821,15 +836,7 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
if (confirmSecondSplitSelectApp()) {
|
||||
return;
|
||||
}
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && isRunningTask()) {
|
||||
RecentsView recentsView = getRecentsView();
|
||||
recentsView.switchToScreenshot(
|
||||
() -> recentsView.finishRecentsAnimation(true /* toRecents */,
|
||||
false /* shouldPip */,
|
||||
() -> showTaskMenu(iconView)));
|
||||
} else {
|
||||
showTaskMenu(iconView);
|
||||
}
|
||||
showTaskMenu(iconView);
|
||||
});
|
||||
iconView.setOnLongClickListener(v -> {
|
||||
requestDisallowInterceptTouchEvent(true);
|
||||
|
||||
@@ -44,6 +44,7 @@ import com.android.quickstep.views.RecentsView;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -292,6 +293,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
|
||||
|
||||
// TODO(b/204830798): test with all navigation modes(add @NavigationModeSwitch annotation)
|
||||
// after the bug resolved.
|
||||
@Ignore("b/205027405")
|
||||
@Test
|
||||
@PortraitLandscape
|
||||
@ScreenRecord
|
||||
|
||||
@@ -121,6 +121,7 @@ public final class TestProtocol {
|
||||
public static final String REQUEST_MOCK_SENSOR_ROTATION = "mock-sensor-rotation";
|
||||
|
||||
public static final String PERMANENT_DIAG_TAG = "TaplTarget";
|
||||
public static final String TASKBAR_WINDOW_CRASH = "b/201305599";
|
||||
public static final String TASK_VIEW_ID_CRASH = "b/195430732";
|
||||
public static final String NO_DROP_TARGET = "b/195031154";
|
||||
public static final String NULL_INT_SET = "b/200572078";
|
||||
|
||||
@@ -387,6 +387,7 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
|
||||
return appIcon;
|
||||
}
|
||||
|
||||
@Ignore("b/205014516")
|
||||
@Test
|
||||
@PortraitLandscape
|
||||
public void testDragToFolder() throws Exception {
|
||||
@@ -413,6 +414,7 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
|
||||
folder.close();
|
||||
}
|
||||
|
||||
@Ignore("b/205027405")
|
||||
@Test
|
||||
@PortraitLandscape
|
||||
public void testPressBack() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user