Merge "Remove ENABLE_QUICKSTEP_LIVE_TILE flag" into tm-qpr-dev
This commit is contained in:
@@ -29,7 +29,6 @@ import static com.android.launcher3.LauncherState.OVERVIEW_MODAL_TASK;
|
||||
import static com.android.launcher3.LauncherState.OVERVIEW_SPLIT_SELECT;
|
||||
import static com.android.launcher3.anim.Interpolators.EMPHASIZED;
|
||||
import static com.android.launcher3.compat.AccessibilityManagerCompat.sendCustomAccessibilityEvent;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_SPLIT_FROM_WORKSPACE;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_WIDGET_PICKER_DEPTH;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_APP_LAUNCH_TAP;
|
||||
@@ -559,10 +558,8 @@ public class QuickstepLauncher extends Launcher {
|
||||
@Override
|
||||
protected void onScreenOff() {
|
||||
super.onScreenOff();
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
RecentsView recentsView = getOverviewPanel();
|
||||
recentsView.finishRecentsAnimation(true /* toRecents */, null);
|
||||
}
|
||||
RecentsView recentsView = getOverviewPanel();
|
||||
recentsView.finishRecentsAnimation(true /* toRecents */, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+4
-9
@@ -25,7 +25,6 @@ import static com.android.launcher3.allapps.AllAppsTransitionController.ALL_APPS
|
||||
import static com.android.launcher3.allapps.AllAppsTransitionController.ALL_APPS_PULL_BACK_TRANSLATION;
|
||||
import static com.android.launcher3.anim.AnimatorListeners.forSuccessCallback;
|
||||
import static com.android.launcher3.anim.Interpolators.DEACCEL_3;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_HOME_GESTURE;
|
||||
import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS;
|
||||
|
||||
@@ -139,9 +138,7 @@ public class NavBarToHomeTouchController implements TouchController,
|
||||
AnimatorControllerWithResistance.createRecentsResistanceFromOverviewAnim(mLauncher,
|
||||
builder);
|
||||
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
builder.addOnFrameCallback(recentsView::redrawLiveTile);
|
||||
}
|
||||
builder.addOnFrameCallback(recentsView::redrawLiveTile);
|
||||
|
||||
AbstractFloatingView.closeOpenContainer(mLauncher, AbstractFloatingView.TYPE_TASK_MENU);
|
||||
} else if (mStartState == ALL_APPS) {
|
||||
@@ -182,11 +179,9 @@ public class NavBarToHomeTouchController implements TouchController,
|
||||
boolean success = interpolatedProgress >= SUCCESS_TRANSITION_PROGRESS
|
||||
|| (velocity < 0 && fling);
|
||||
if (success) {
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
RecentsView recentsView = mLauncher.getOverviewPanel();
|
||||
recentsView.switchToScreenshot(null,
|
||||
() -> recentsView.finishRecentsAnimation(true /* toRecents */, null));
|
||||
}
|
||||
RecentsView recentsView = mLauncher.getOverviewPanel();
|
||||
recentsView.switchToScreenshot(null,
|
||||
() -> recentsView.finishRecentsAnimation(true /* toRecents */, null));
|
||||
if (mStartState.overviewUi) {
|
||||
new OverviewToHomeAnim(mLauncher, () -> onSwipeInteractionCompleted(mEndState))
|
||||
.animateWithVelocity(velocity);
|
||||
|
||||
@@ -26,7 +26,6 @@ import static com.android.launcher3.PagedView.INVALID_PAGE;
|
||||
import static com.android.launcher3.anim.Interpolators.ACCEL_DEACCEL;
|
||||
import static com.android.launcher3.anim.Interpolators.DEACCEL;
|
||||
import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_2;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_BACKGROUND;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.IGNORE;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_HOME_GESTURE;
|
||||
@@ -400,12 +399,6 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
this::resetStateForAnimationCancel);
|
||||
mStateCallback.runOnceAtState(STATE_HANDLER_INVALIDATED | STATE_FINISH_WITH_NO_END,
|
||||
this::resetStateForAnimationCancel);
|
||||
|
||||
if (!ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
mStateCallback.addChangeListener(STATE_APP_CONTROLLER_RECEIVED | STATE_LAUNCHER_PRESENT
|
||||
| STATE_SCREENSHOT_VIEW_SHOWN | STATE_CAPTURE_SCREENSHOT,
|
||||
(b) -> mRecentsView.setRunningTaskHidden(!b));
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean onActivityInit(Boolean alreadyOnHome) {
|
||||
@@ -583,14 +576,10 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
}
|
||||
|
||||
private void onDeferredActivityLaunch() {
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
mActivityInterface.switchRunningTaskViewToScreenshot(
|
||||
null, () -> {
|
||||
mTaskAnimationManager.finishRunningRecentsAnimation(true /* toHome */);
|
||||
});
|
||||
} else {
|
||||
mTaskAnimationManager.finishRunningRecentsAnimation(true /* toHome */);
|
||||
}
|
||||
mActivityInterface.switchRunningTaskViewToScreenshot(
|
||||
null, () -> {
|
||||
mTaskAnimationManager.finishRunningRecentsAnimation(true /* toHome */);
|
||||
});
|
||||
}
|
||||
|
||||
private void setupRecentsViewUi() {
|
||||
@@ -1719,8 +1708,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
}
|
||||
|
||||
private void invalidateHandler() {
|
||||
if (!ENABLE_QUICKSTEP_LIVE_TILE.get() || !mActivityInterface.isInLiveTileMode()
|
||||
|| mGestureState.getEndTarget() != RECENTS) {
|
||||
if (!mActivityInterface.isInLiveTileMode() || mGestureState.getEndTarget() != RECENTS) {
|
||||
mInputConsumerProxy.destroy();
|
||||
mTaskAnimationManager.setLiveTileCleanUpHandler(null);
|
||||
}
|
||||
@@ -1765,10 +1753,6 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
* continued quick switch gesture, which cancels the previous handler but doesn't invalidate it.
|
||||
*/
|
||||
private void resetLauncherListeners() {
|
||||
// Reset the callback for deferred activity launches
|
||||
if (!ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
mActivityInterface.setOnDeferredActivityLaunchCallback(null);
|
||||
}
|
||||
mActivity.getRootView().setOnApplyWindowInsetsListener(null);
|
||||
|
||||
mRecentsView.removeOnScrollChangedListener(mOnRecentsScrollListener);
|
||||
@@ -1790,7 +1774,6 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
mStateCallback.setStateOnUiThread(STATE_SCREENSHOT_CAPTURED);
|
||||
} else {
|
||||
final int runningTaskId = mGestureState.getRunningTaskId();
|
||||
final boolean refreshView = !ENABLE_QUICKSTEP_LIVE_TILE.get() /* refreshView */;
|
||||
boolean finishTransitionPosted = false;
|
||||
if (mRecentsAnimationController != null) {
|
||||
// Update the screenshot of the task
|
||||
@@ -1801,14 +1784,14 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
mRecentsAnimationController.screenshotTask(runningTaskId);
|
||||
MAIN_EXECUTOR.execute(() -> {
|
||||
mTaskSnapshot = taskSnapshot;
|
||||
if (!updateThumbnail(runningTaskId, refreshView)) {
|
||||
if (!updateThumbnail(runningTaskId, false /* refreshView */)) {
|
||||
setScreenshotCapturedState();
|
||||
}
|
||||
});
|
||||
});
|
||||
return;
|
||||
}
|
||||
finishTransitionPosted = updateThumbnail(runningTaskId, refreshView);
|
||||
finishTransitionPosted = updateThumbnail(runningTaskId, false /* refreshView */);
|
||||
}
|
||||
if (!finishTransitionPosted) {
|
||||
setScreenshotCapturedState();
|
||||
@@ -1846,17 +1829,9 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
}
|
||||
|
||||
private void finishCurrentTransitionToRecents() {
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED);
|
||||
if (mRecentsAnimationController != null) {
|
||||
mRecentsAnimationController.detachNavigationBarFromApp(true);
|
||||
}
|
||||
} else if (!hasTargets() || mRecentsAnimationController == null) {
|
||||
// If there are no targets or the animation not started, then there is nothing to finish
|
||||
mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED);
|
||||
} else {
|
||||
mRecentsAnimationController.finish(true /* toRecents */,
|
||||
() -> mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED));
|
||||
mStateCallback.setStateOnUiThread(STATE_CURRENT_TASK_FINISHED);
|
||||
if (mRecentsAnimationController != null) {
|
||||
mRecentsAnimationController.detachNavigationBarFromApp(true);
|
||||
}
|
||||
ActiveGestureLog.INSTANCE.addLog(
|
||||
/* event= */ "finishRecentsAnimation",
|
||||
@@ -1920,13 +1895,11 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
}
|
||||
endLauncherTransitionController();
|
||||
mRecentsView.onSwipeUpAnimationSuccess();
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
mTaskAnimationManager.setLiveTileCleanUpHandler(() -> {
|
||||
mRecentsView.cleanupRemoteTargets();
|
||||
mInputConsumerProxy.destroy();
|
||||
});
|
||||
mTaskAnimationManager.enableLiveTileRestartListener();
|
||||
}
|
||||
mTaskAnimationManager.setLiveTileCleanUpHandler(() -> {
|
||||
mRecentsView.cleanupRemoteTargets();
|
||||
mInputConsumerProxy.destroy();
|
||||
});
|
||||
mTaskAnimationManager.enableLiveTileRestartListener();
|
||||
|
||||
SystemUiProxy.INSTANCE.get(mContext).onOverviewShown(false, TAG);
|
||||
doLogGesture(RECENTS, mRecentsView.getCurrentPageTaskView());
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.android.quickstep;
|
||||
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.util.NavigationMode.NO_BUTTON;
|
||||
import static com.android.quickstep.fallback.RecentsState.BACKGROUND_APP;
|
||||
import static com.android.quickstep.fallback.RecentsState.DEFAULT;
|
||||
@@ -120,8 +119,7 @@ public final class FallbackActivityInterface extends
|
||||
public RecentsView getVisibleRecentsView() {
|
||||
RecentsActivity activity = getCreatedActivity();
|
||||
if (activity != null) {
|
||||
if (activity.hasBeenResumed()
|
||||
|| (ENABLE_QUICKSTEP_LIVE_TILE.get() && isInLiveTileMode())) {
|
||||
if (activity.hasBeenResumed() || isInLiveTileMode()) {
|
||||
return activity.getOverviewPanel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ import static com.android.launcher3.LauncherState.OVERVIEW;
|
||||
import static com.android.launcher3.LauncherState.QUICK_SWITCH;
|
||||
import static com.android.launcher3.anim.AnimatorListeners.forEndCallback;
|
||||
import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
|
||||
import android.animation.Animator;
|
||||
@@ -203,8 +202,7 @@ public final class LauncherActivityInterface extends
|
||||
private Launcher getVisibleLauncher() {
|
||||
Launcher launcher = getCreatedActivity();
|
||||
return (launcher != null) && launcher.isStarted()
|
||||
&& ((ENABLE_QUICKSTEP_LIVE_TILE.get() && isInLiveTileMode())
|
||||
|| launcher.hasBeenResumed()) ? launcher : null;
|
||||
&& (isInLiveTileMode() || launcher.hasBeenResumed()) ? launcher : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -213,7 +211,7 @@ public final class LauncherActivityInterface extends
|
||||
if (launcher == null) {
|
||||
return false;
|
||||
}
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && isInLiveTileMode()) {
|
||||
if (isInLiveTileMode()) {
|
||||
RecentsView recentsView = getVisibleRecentsView();
|
||||
if (recentsView == null) {
|
||||
return false;
|
||||
|
||||
@@ -18,7 +18,6 @@ package com.android.quickstep;
|
||||
import static com.android.launcher3.QuickstepTransitionManager.RECENTS_LAUNCH_DURATION;
|
||||
import static com.android.launcher3.QuickstepTransitionManager.STATUS_BAR_TRANSITION_DURATION;
|
||||
import static com.android.launcher3.QuickstepTransitionManager.STATUS_BAR_TRANSITION_PRE_DELAY;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.graphics.SysUiScrim.SYSUI_PROGRESS;
|
||||
import static com.android.launcher3.testing.shared.TestProtocol.OVERVIEW_STATE_ORDINAL;
|
||||
import static com.android.quickstep.OverviewComponentObserver.startHomeIntentSafely;
|
||||
@@ -393,13 +392,9 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> {
|
||||
}
|
||||
|
||||
public void startHome() {
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
RecentsView recentsView = getOverviewPanel();
|
||||
recentsView.switchToScreenshot(() -> recentsView.finishRecentsAnimation(true,
|
||||
this::startHomeInternal));
|
||||
} else {
|
||||
startHomeInternal();
|
||||
}
|
||||
RecentsView recentsView = getOverviewPanel();
|
||||
recentsView.switchToScreenshot(() -> recentsView.finishRecentsAnimation(true,
|
||||
this::startHomeInternal));
|
||||
}
|
||||
|
||||
private void startHomeInternal() {
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.android.quickstep;
|
||||
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
|
||||
import static com.android.quickstep.GestureState.STATE_RECENTS_ANIMATION_INITIALIZED;
|
||||
@@ -72,7 +71,7 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn
|
||||
return;
|
||||
}
|
||||
BaseActivityInterface activityInterface = mLastGestureState.getActivityInterface();
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && activityInterface.isInLiveTileMode()
|
||||
if (activityInterface.isInLiveTileMode()
|
||||
&& activityInterface.getCreatedActivity() != null) {
|
||||
RecentsView recentsView = activityInterface.getCreatedActivity().getOverviewPanel();
|
||||
if (recentsView != null) {
|
||||
@@ -171,7 +170,7 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn
|
||||
.map(RemoteAnimationTargetCompat::unwrap)
|
||||
.toArray(RemoteAnimationTarget[]::new));
|
||||
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && activityInterface.isInLiveTileMode()
|
||||
if (activityInterface.isInLiveTileMode()
|
||||
&& activityInterface.getCreatedActivity() != null) {
|
||||
RecentsView recentsView =
|
||||
activityInterface.getCreatedActivity().getOverviewPanel();
|
||||
@@ -204,7 +203,7 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn
|
||||
|
||||
@Override
|
||||
public boolean onSwitchToScreenshot(Runnable onFinished) {
|
||||
if (!ENABLE_QUICKSTEP_LIVE_TILE.get() || !activityInterface.isInLiveTileMode()
|
||||
if (!activityInterface.isInLiveTileMode()
|
||||
|| activityInterface.getCreatedActivity() == null) {
|
||||
// No need to switch since tile is already a screenshot.
|
||||
onFinished.run();
|
||||
@@ -266,7 +265,7 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn
|
||||
return;
|
||||
}
|
||||
BaseActivityInterface activityInterface = mLastGestureState.getActivityInterface();
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && activityInterface.isInLiveTileMode()
|
||||
if (activityInterface.isInLiveTileMode()
|
||||
&& activityInterface.getCreatedActivity() != null) {
|
||||
RecentsView recentsView = activityInterface.getCreatedActivity().getOverviewPanel();
|
||||
if (recentsView != null) {
|
||||
|
||||
@@ -18,7 +18,6 @@ package com.android.quickstep;
|
||||
|
||||
import static android.view.Surface.ROTATION_0;
|
||||
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.quickstep.views.OverviewActionsView.DISABLED_NO_THUMBNAIL;
|
||||
import static com.android.quickstep.views.OverviewActionsView.DISABLED_ROTATED;
|
||||
|
||||
@@ -174,14 +173,10 @@ public class TaskOverlayFactory implements ResourceBasedOverride {
|
||||
* @param callback callback to run, after switching to screenshot
|
||||
*/
|
||||
public void endLiveTileMode(@NonNull Runnable callback) {
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
RecentsView recentsView = mThumbnailView.getTaskView().getRecentsView();
|
||||
recentsView.switchToScreenshot(
|
||||
() -> recentsView.finishRecentsAnimation(true /* toRecents */,
|
||||
false /* shouldPip */, callback));
|
||||
} else {
|
||||
callback.run();
|
||||
}
|
||||
RecentsView recentsView = mThumbnailView.getTaskView().getRecentsView();
|
||||
recentsView.switchToScreenshot(
|
||||
() -> recentsView.finishRecentsAnimation(true /* toRecents */,
|
||||
false /* shouldPip */, callback));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -35,7 +35,6 @@ import static com.android.launcher3.Utilities.getDescendantCoordRelativeToAncest
|
||||
import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
import static com.android.launcher3.anim.Interpolators.TOUCH_RESPONSE_INTERPOLATOR;
|
||||
import static com.android.launcher3.anim.Interpolators.clampToProgress;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.statehandlers.DepthController.STATE_DEPTH;
|
||||
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING;
|
||||
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING;
|
||||
@@ -637,7 +636,7 @@ public final class TaskViewUtils {
|
||||
};
|
||||
}
|
||||
pa.add(launcherAnim);
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && recentsView.getRunningTaskIndex() != -1) {
|
||||
if (recentsView.getRunningTaskIndex() != -1) {
|
||||
pa.addOnFrameCallback(recentsView::redrawLiveTile);
|
||||
}
|
||||
anim.play(pa.buildAnim());
|
||||
|
||||
@@ -20,7 +20,6 @@ import static android.view.MotionEvent.ACTION_DOWN;
|
||||
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.util.Executors.MAIN_EXECUTOR;
|
||||
import static com.android.quickstep.GestureState.DEFAULT_STATE;
|
||||
import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.MOTION_DOWN;
|
||||
@@ -955,8 +954,7 @@ public class TouchInteractionService extends Service
|
||||
boolean launcherResumedThroughShellTransition =
|
||||
gestureState.getActivityInterface().isResumed()
|
||||
&& !previousGestureState.isRecentsAnimationRunning();
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()
|
||||
&& gestureState.getActivityInterface().isInLiveTileMode()) {
|
||||
if (gestureState.getActivityInterface().isInLiveTileMode()) {
|
||||
return createOverviewInputConsumer(
|
||||
previousGestureState,
|
||||
gestureState,
|
||||
@@ -1044,8 +1042,7 @@ public class TouchInteractionService extends Service
|
||||
previousGestureState.isRunningAnimationToLauncher();
|
||||
boolean forcingOverviewInputConsumer =
|
||||
ASSISTANT_GIVES_LAUNCHER_FOCUS.get() && forceOverviewInputConsumer;
|
||||
boolean isInLiveTileMode = ENABLE_QUICKSTEP_LIVE_TILE.get()
|
||||
&& gestureState.getActivityInterface().isInLiveTileMode();
|
||||
boolean isInLiveTileMode = gestureState.getActivityInterface().isInLiveTileMode();
|
||||
reasonString.append(SUBSTRING_PREFIX)
|
||||
.append(hasWindowFocus
|
||||
? "activity has window focus"
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
package com.android.quickstep.fallback;
|
||||
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
|
||||
import com.android.launcher3.uioverrides.touchcontrollers.TaskViewTouchController;
|
||||
import com.android.quickstep.RecentsActivity;
|
||||
|
||||
@@ -28,8 +26,7 @@ public class RecentsTaskController extends TaskViewTouchController<RecentsActivi
|
||||
|
||||
@Override
|
||||
protected boolean isRecentsInteractive() {
|
||||
return mActivity.hasWindowFocus() || (ENABLE_QUICKSTEP_LIVE_TILE.get()
|
||||
&& mActivity.getStateManager().getState().hasLiveTile());
|
||||
return mActivity.hasWindowFocus() || mActivity.getStateManager().getState().hasLiveTile();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.android.quickstep.inputconsumers;
|
||||
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS;
|
||||
|
||||
import android.media.AudioManager;
|
||||
@@ -100,27 +99,23 @@ public class OverviewInputConsumer<S extends BaseState<S>, T extends StatefulAct
|
||||
|
||||
@Override
|
||||
public void onHoverEvent(MotionEvent ev) {
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
mActivity.dispatchGenericMotionEvent(ev);
|
||||
}
|
||||
mActivity.dispatchGenericMotionEvent(ev);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onKeyEvent(KeyEvent ev) {
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
switch (ev.getKeyCode()) {
|
||||
case KeyEvent.KEYCODE_VOLUME_DOWN:
|
||||
case KeyEvent.KEYCODE_VOLUME_UP:
|
||||
case KeyEvent.KEYCODE_VOLUME_MUTE:
|
||||
MediaSessionManager mgr = mActivity.getSystemService(MediaSessionManager.class);
|
||||
mgr.dispatchVolumeKeyEventAsSystemService(ev,
|
||||
AudioManager.USE_DEFAULT_STREAM_TYPE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
mActivity.dispatchKeyEvent(ev);
|
||||
switch (ev.getKeyCode()) {
|
||||
case KeyEvent.KEYCODE_VOLUME_DOWN:
|
||||
case KeyEvent.KEYCODE_VOLUME_UP:
|
||||
case KeyEvent.KEYCODE_VOLUME_MUTE:
|
||||
MediaSessionManager mgr = mActivity.getSystemService(MediaSessionManager.class);
|
||||
mgr.dispatchVolumeKeyEventAsSystemService(ev,
|
||||
AudioManager.USE_DEFAULT_STREAM_TYPE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
mActivity.dispatchKeyEvent(ev);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ package com.android.quickstep.util;
|
||||
|
||||
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
|
||||
|
||||
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;
|
||||
@@ -393,7 +392,7 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
|
||||
.withCornerRadius(getCurrentCornerRadius());
|
||||
|
||||
// If mDrawsBelowRecents is unset, no reordering will be enforced.
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && mDrawsBelowRecents != null) {
|
||||
if (mDrawsBelowRecents != null) {
|
||||
// In legacy transitions, the animation leashes remain in same hierarchy in the
|
||||
// TaskDisplayArea, so we don't want to bump the layer too high otherwise it will
|
||||
// conflict with layers that WM core positions (ie. the input consumers). For shell
|
||||
|
||||
@@ -41,7 +41,6 @@ import static com.android.launcher3.anim.Interpolators.FINAL_FRAME;
|
||||
import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
import static com.android.launcher3.anim.Interpolators.OVERSHOOT_0_75;
|
||||
import static com.android.launcher3.anim.Interpolators.clampToProgress;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_OVERVIEW_ACTIONS_SPLIT;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_CLEAR_ALL;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_DISMISS_SWIPE_UP;
|
||||
@@ -817,8 +816,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
}
|
||||
super.dispatchDraw(canvas);
|
||||
}
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && mEnableDrawingLiveTile
|
||||
&& mRemoteTargetHandles != null) {
|
||||
if (mEnableDrawingLiveTile && mRemoteTargetHandles != null) {
|
||||
redrawLiveTile();
|
||||
}
|
||||
}
|
||||
@@ -1629,22 +1627,20 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
taskView.setTaskThumbnailSplashAlpha(mTaskThumbnailSplashAlpha);
|
||||
}
|
||||
}
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
// resetTaskVisuals is called at the end of dismiss animation which could update
|
||||
// primary and secondary translation of the live tile cut out. We will need to do so
|
||||
// here accordingly.
|
||||
runActionOnRemoteHandles(remoteTargetHandle -> {
|
||||
TaskViewSimulator simulator = remoteTargetHandle.getTaskViewSimulator();
|
||||
simulator.taskPrimaryTranslation.value = 0;
|
||||
simulator.taskSecondaryTranslation.value = 0;
|
||||
simulator.fullScreenProgress.value = 0;
|
||||
simulator.recentsViewScale.value = 1;
|
||||
});
|
||||
// Similar to setRunningTaskHidden below, reapply the state before runningTaskView is
|
||||
// null.
|
||||
if (!mRunningTaskShowScreenshot) {
|
||||
setRunningTaskViewShowScreenshot(mRunningTaskShowScreenshot);
|
||||
}
|
||||
// resetTaskVisuals is called at the end of dismiss animation which could update
|
||||
// primary and secondary translation of the live tile cut out. We will need to do so
|
||||
// here accordingly.
|
||||
runActionOnRemoteHandles(remoteTargetHandle -> {
|
||||
TaskViewSimulator simulator = remoteTargetHandle.getTaskViewSimulator();
|
||||
simulator.taskPrimaryTranslation.value = 0;
|
||||
simulator.taskSecondaryTranslation.value = 0;
|
||||
simulator.fullScreenProgress.value = 0;
|
||||
simulator.recentsViewScale.value = 1;
|
||||
});
|
||||
// Similar to setRunningTaskHidden below, reapply the state before runningTaskView is
|
||||
// null.
|
||||
if (!mRunningTaskShowScreenshot) {
|
||||
setRunningTaskViewShowScreenshot(mRunningTaskShowScreenshot);
|
||||
}
|
||||
if (mRunningTaskTileHidden) {
|
||||
setRunningTaskHidden(mRunningTaskTileHidden);
|
||||
@@ -2037,7 +2033,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
mFocusedTaskViewId = -1;
|
||||
|
||||
if (mRecentsAnimationController != null) {
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && mEnableDrawingLiveTile) {
|
||||
if (mEnableDrawingLiveTile) {
|
||||
// We are still drawing the live tile, finish it now to clean up.
|
||||
finishRecentsAnimation(true /* toRecents */, null);
|
||||
} else {
|
||||
@@ -2276,9 +2272,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
|
||||
setEnableFreeScroll(true);
|
||||
setEnableDrawingLiveTile(mCurrentGestureEndTarget == GestureState.GestureEndTarget.RECENTS);
|
||||
if (!ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
setRunningTaskViewShowScreenshot(true);
|
||||
}
|
||||
setRunningTaskHidden(false);
|
||||
animateUpTaskIconScale();
|
||||
animateActionsViewIn();
|
||||
@@ -2403,12 +2396,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
}
|
||||
|
||||
private void setRunningTaskViewShowScreenshot(boolean showScreenshot) {
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
mRunningTaskShowScreenshot = showScreenshot;
|
||||
TaskView runningTaskView = getRunningTaskView();
|
||||
if (runningTaskView != null) {
|
||||
runningTaskView.setShowScreenshot(mRunningTaskShowScreenshot);
|
||||
}
|
||||
mRunningTaskShowScreenshot = showScreenshot;
|
||||
TaskView runningTaskView = getRunningTaskView();
|
||||
if (runningTaskView != null) {
|
||||
runningTaskView.setShowScreenshot(mRunningTaskShowScreenshot);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2789,8 +2780,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
anim.add(ObjectAnimator.ofFloat(taskView, secondaryViewTranslate,
|
||||
verticalFactor * secondaryTaskDimension * 2).setDuration(duration), LINEAR, sp);
|
||||
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && mEnableDrawingLiveTile
|
||||
&& taskView.isRunningTask()) {
|
||||
if (mEnableDrawingLiveTile && taskView.isRunningTask()) {
|
||||
anim.addOnFrameCallback(() -> {
|
||||
runActionOnRemoteHandles(
|
||||
remoteTargetHandle -> remoteTargetHandle.getTaskViewSimulator()
|
||||
@@ -3029,8 +3019,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
dismissTranslationInterpolationEnd
|
||||
- halfAdditionalDismissTranslationOffset,
|
||||
END_DISMISS_TRANSLATION_INTERPOLATION_OFFSET, 1);
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && mEnableDrawingLiveTile
|
||||
&& taskView.isRunningTask()) {
|
||||
if (mEnableDrawingLiveTile && taskView.isRunningTask()) {
|
||||
anim.addOnFrameCallback(() -> {
|
||||
runActionOnRemoteHandles(
|
||||
remoteTargetHandle ->
|
||||
@@ -3125,8 +3114,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
)
|
||||
);
|
||||
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && mEnableDrawingLiveTile
|
||||
&& child instanceof TaskView
|
||||
if (mEnableDrawingLiveTile && child instanceof TaskView
|
||||
&& ((TaskView) child).isRunningTask()) {
|
||||
anim.addOnFrameCallback(() -> {
|
||||
runActionOnRemoteHandles(
|
||||
@@ -3249,8 +3237,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
mPendingAnimation.addEndListener(new Consumer<Boolean>() {
|
||||
@Override
|
||||
public void accept(Boolean success) {
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && mEnableDrawingLiveTile
|
||||
&& dismissedTaskView.isRunningTask() && success) {
|
||||
if (mEnableDrawingLiveTile && dismissedTaskView.isRunningTask() && success) {
|
||||
finishRecentsAnimation(true /* toRecents */, false /* shouldPip */,
|
||||
() -> onEnd(success));
|
||||
} else {
|
||||
@@ -3267,8 +3254,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
if (success) {
|
||||
if (shouldRemoveTask) {
|
||||
if (dismissedTaskView.getTask() != null) {
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()
|
||||
&& dismissedTaskView.isRunningTask()) {
|
||||
if (dismissedTaskView.isRunningTask()) {
|
||||
finishRecentsAnimation(true /* toRecents */, false /* shouldPip */,
|
||||
() -> removeTaskInternal(dismissedTaskViewId));
|
||||
} else {
|
||||
@@ -3927,8 +3913,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
? ((TaskView) child).getPrimaryTaskOffsetTranslationProperty()
|
||||
: mOrientationHandler.getPrimaryViewTranslate();
|
||||
translationProperty.set(child, totalTranslation);
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && mEnableDrawingLiveTile
|
||||
&& i == getRunningTaskIndex()) {
|
||||
if (mEnableDrawingLiveTile && i == getRunningTaskIndex()) {
|
||||
runActionOnRemoteHandles(
|
||||
remoteTargetHandle -> remoteTargetHandle.getTaskViewSimulator()
|
||||
.taskPrimaryTranslation.value = totalTranslation);
|
||||
@@ -4152,10 +4137,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
mSplitSelectStateController.setInitialTaskSelect(taskView.getTask().key.id,
|
||||
stagePosition, splitEvent, taskView.getItemInfo());
|
||||
mSplitHiddenTaskViewIndex = indexOfChild(taskView);
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
finishRecentsAnimation(true /* toRecents */, false /* shouldPip */,
|
||||
null /* onFinishComplete */);
|
||||
}
|
||||
finishRecentsAnimation(true /* toRecents */, false /* shouldPip */,
|
||||
null /* onFinishComplete */);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4442,9 +4425,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
anim.play(ObjectAnimator.ofFloat(getPageAt(centerTaskIndex),
|
||||
mOrientationHandler.getPrimaryViewTranslate(), primaryTranslation));
|
||||
int runningTaskIndex = getRunningTaskIndex();
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()
|
||||
&& runningTaskIndex != -1
|
||||
&& runningTaskIndex != taskIndex
|
||||
if (runningTaskIndex != -1 && runningTaskIndex != taskIndex
|
||||
&& getRemoteTargetHandles() != null) {
|
||||
for (RemoteTargetHandle remoteHandle : getRemoteTargetHandles()) {
|
||||
anim.play(ObjectAnimator.ofFloat(
|
||||
@@ -4533,12 +4514,10 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
|
||||
mPendingAnimation = new PendingAnimation(duration);
|
||||
mPendingAnimation.add(anim);
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
|
||||
runActionOnRemoteHandles(
|
||||
remoteTargetHandle -> remoteTargetHandle.getTaskViewSimulator()
|
||||
.addOverviewToAppAnim(mPendingAnimation, interpolator));
|
||||
mPendingAnimation.addOnFrameCallback(this::redrawLiveTile);
|
||||
}
|
||||
runActionOnRemoteHandles(
|
||||
remoteTargetHandle -> remoteTargetHandle.getTaskViewSimulator()
|
||||
.addOverviewToAppAnim(mPendingAnimation, interpolator));
|
||||
mPendingAnimation.addOnFrameCallback(this::redrawLiveTile);
|
||||
mPendingAnimation.addEndListener(isSuccess -> {
|
||||
if (isSuccess) {
|
||||
if (tv.getTaskIds()[1] != -1 && mRemoteTargetHandles != null) {
|
||||
@@ -4550,7 +4529,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
dividerAnimator.end();
|
||||
});
|
||||
}
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && tv.isRunningTask()) {
|
||||
if (tv.isRunningTask()) {
|
||||
finishRecentsAnimation(false /* toRecents */, null);
|
||||
onTaskLaunchAnimationEnd(true /* success */);
|
||||
} else {
|
||||
|
||||
@@ -20,8 +20,6 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
|
||||
import static android.view.WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS;
|
||||
import static android.view.WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS;
|
||||
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapShader;
|
||||
@@ -320,13 +318,11 @@ public class TaskThumbnailView extends View {
|
||||
|
||||
public void drawOnCanvas(Canvas canvas, float x, float y, float width, float height,
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
// Always draw the background since the snapshots might be translucent or partially empty
|
||||
|
||||
@@ -25,7 +25,6 @@ import static com.android.launcher3.Utilities.getDescendantCoordRelativeToAncest
|
||||
import static com.android.launcher3.anim.Interpolators.ACCEL_DEACCEL;
|
||||
import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
|
||||
import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_ICON_TAP_OR_LONGPRESS;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASK_LAUNCH_TAP;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
@@ -626,7 +625,7 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
if (ActivityManagerWrapper.getInstance()
|
||||
.startActivityFromRecents(mTask.key, opts.options)) {
|
||||
RecentsView recentsView = getRecentsView();
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && recentsView.getRunningTaskViewId() != -1) {
|
||||
if (recentsView.getRunningTaskViewId() != -1) {
|
||||
recentsView.onTaskLaunchedInLiveTileMode();
|
||||
|
||||
// Return a fresh callback in the live tile case, so that it's not accidentally
|
||||
@@ -714,7 +713,7 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
SystemUiProxy.INSTANCE.get(getContext()).showDesktopApps();
|
||||
return runnableList;
|
||||
}
|
||||
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && isRunningTask() && remoteTargetHandles != null) {
|
||||
if (isRunningTask() && remoteTargetHandles != null) {
|
||||
if (!mIsClickableAsLiveTile) {
|
||||
return runnableList;
|
||||
}
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
|
||||
package com.android.quickstep;
|
||||
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import android.os.SystemProperties;
|
||||
@@ -79,8 +77,7 @@ public abstract class AbstractQuickStepTest extends AbstractLauncherUiTest {
|
||||
|
||||
private boolean isInLiveTileMode(Launcher launcher,
|
||||
LauncherInstrumentation.ContainerType expectedContainerType) {
|
||||
if (!ENABLE_QUICKSTEP_LIVE_TILE.get()
|
||||
|| expectedContainerType != LauncherInstrumentation.ContainerType.OVERVIEW) {
|
||||
if (expectedContainerType != LauncherInstrumentation.ContainerType.OVERVIEW) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,9 +84,6 @@ public final class FeatureFlags {
|
||||
public static final BooleanFlag KEYGUARD_ANIMATION = getDebugFlag(
|
||||
"KEYGUARD_ANIMATION", false, "Enable animation for keyguard going away on wallpaper");
|
||||
|
||||
public static final BooleanFlag ENABLE_QUICKSTEP_LIVE_TILE = getDebugFlag(
|
||||
"ENABLE_QUICKSTEP_LIVE_TILE", true, "Enable live tile in Quickstep overview");
|
||||
|
||||
public static final BooleanFlag ENABLE_DEVICE_SEARCH = new DeviceFlag(
|
||||
"ENABLE_DEVICE_SEARCH", true, "Allows on device search in all apps");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user