Snap for 8078460 from 29004de0d1 to tm-release
Change-Id: I74845c478597abacf30e06e9aefd68397c953cf2
This commit is contained in:
@@ -39,6 +39,9 @@
|
||||
<!-- Accessibility title for the list of recent apps [CHAR_LIMIT=none] -->
|
||||
<string name="accessibility_recent_apps">Recent apps</string>
|
||||
|
||||
<!-- Accessibility confirmation for task closed -->
|
||||
<string name="task_view_closed">Task Closed</string>
|
||||
|
||||
<!-- Accessibility title for an app card in Recents for apps that have time limit set
|
||||
[CHAR_LIMIT=none] -->
|
||||
<string name="task_contents_description_with_remaining_time"><xliff:g id="task_description" example="GMail">%1$s</xliff:g>, <xliff:g id="remaining_time" example="7 minutes left today">%2$s</xliff:g></string>
|
||||
|
||||
@@ -289,9 +289,8 @@ public class DepthController implements StateHandler<LauncherState>,
|
||||
if (Float.compare(mDepth, depthF) == 0) {
|
||||
return;
|
||||
}
|
||||
if (dispatchTransactionSurface(depthF)) {
|
||||
mDepth = depthF;
|
||||
}
|
||||
dispatchTransactionSurface(depthF);
|
||||
mDepth = depthF;
|
||||
}
|
||||
|
||||
public void onOverlayScrollChanged(float progress) {
|
||||
|
||||
@@ -34,7 +34,6 @@ import android.os.IBinder.DeathRecipient;
|
||||
import android.os.RemoteException;
|
||||
import android.os.UserHandle;
|
||||
import android.util.Log;
|
||||
import android.util.Slog;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.RemoteAnimationAdapter;
|
||||
import android.view.RemoteAnimationTarget;
|
||||
@@ -772,10 +771,8 @@ public class SystemUiProxy implements ISystemUiProxy,
|
||||
public ArrayList<GroupedRecentTaskInfo> getRecentTasks(int numTasks, int userId) {
|
||||
if (mRecentTasks != null) {
|
||||
try {
|
||||
final GroupedRecentTaskInfo[] tasks = mRecentTasks.getRecentTasks(numTasks,
|
||||
RECENT_IGNORE_UNAVAILABLE, userId);
|
||||
Log.d("b/206648922", "getRecentTasks(" + numTasks + "): result=" + tasks);
|
||||
return new ArrayList<>(Arrays.asList(tasks));
|
||||
return new ArrayList<>(Arrays.asList(mRecentTasks.getRecentTasks(numTasks,
|
||||
RECENT_IGNORE_UNAVAILABLE, userId)));
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Failed call getRecentTasks", e);
|
||||
}
|
||||
|
||||
@@ -2783,6 +2783,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
}
|
||||
}
|
||||
|
||||
announceForAccessibility(getResources().getString(R.string.task_view_closed));
|
||||
|
||||
float dismissTranslationInterpolationEnd = 1;
|
||||
boolean closeGapBetweenClearAll = false;
|
||||
boolean isClearAllHidden = isClearAllHidden();
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.quickstep.views;
|
||||
|
||||
import static android.view.Display.DEFAULT_DISPLAY;
|
||||
import static android.widget.Toast.LENGTH_SHORT;
|
||||
|
||||
import static com.android.launcher3.AbstractFloatingView.TYPE_TASK_MENU;
|
||||
@@ -51,6 +52,7 @@ import android.os.Bundle;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.FloatProperty;
|
||||
import android.util.Log;
|
||||
import android.view.Display;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.TouchDelegate;
|
||||
import android.view.View;
|
||||
@@ -638,6 +640,7 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
// If the recents animation is cancelled somehow between the parent if block and
|
||||
// here, try to launch the task as a non live tile task.
|
||||
launchTaskAnimated();
|
||||
mIsClickableAsLiveTile = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -659,6 +662,9 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animator) {
|
||||
if (mTask != null && mTask.key.displayId != getRootViewDisplayId()) {
|
||||
launchTaskAnimated();
|
||||
}
|
||||
mIsClickableAsLiveTile = true;
|
||||
}
|
||||
});
|
||||
@@ -1519,7 +1525,8 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
|
||||
|
||||
private int getRootViewDisplayId() {
|
||||
return getRootView().getDisplay().getDisplayId();
|
||||
Display display = getRootView().getDisplay();
|
||||
return display != null ? display.getDisplayId() : DEFAULT_DISPLAY;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,9 +20,7 @@ import static androidx.test.InstrumentationRegistry.getInstrumentation;
|
||||
|
||||
import static com.android.quickstep.NavigationModeSwitchRule.Mode.ALL;
|
||||
import static com.android.quickstep.NavigationModeSwitchRule.Mode.THREE_BUTTON;
|
||||
import static com.android.quickstep.NavigationModeSwitchRule.Mode.TWO_BUTTON;
|
||||
import static com.android.quickstep.NavigationModeSwitchRule.Mode.ZERO_BUTTON;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.NAV_BAR_MODE_2BUTTON_OVERLAY;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.NAV_BAR_MODE_3BUTTON_OVERLAY;
|
||||
import static com.android.systemui.shared.system.QuickStepContract.NAV_BAR_MODE_GESTURAL_OVERLAY;
|
||||
|
||||
@@ -61,7 +59,7 @@ public class NavigationModeSwitchRule implements TestRule {
|
||||
public static final int WAIT_TIME_MS = 10000;
|
||||
|
||||
public enum Mode {
|
||||
THREE_BUTTON, TWO_BUTTON, ZERO_BUTTON, ALL
|
||||
THREE_BUTTON, ZERO_BUTTON, ALL
|
||||
}
|
||||
|
||||
// Annotation for tests that need to be run with quickstep enabled and disabled.
|
||||
@@ -99,9 +97,6 @@ public class NavigationModeSwitchRule implements TestRule {
|
||||
if (mode == ZERO_BUTTON || mode == ALL) {
|
||||
evaluateWithZeroButtons();
|
||||
}
|
||||
if (mode == TWO_BUTTON || mode == ALL) {
|
||||
evaluateWithTwoButtons();
|
||||
}
|
||||
if (mode == THREE_BUTTON || mode == ALL) {
|
||||
evaluateWithThreeButtons();
|
||||
}
|
||||
@@ -123,13 +118,6 @@ public class NavigationModeSwitchRule implements TestRule {
|
||||
}
|
||||
}
|
||||
|
||||
private void evaluateWithTwoButtons() throws Throwable {
|
||||
if (setActiveOverlay(mLauncher, NAV_BAR_MODE_2BUTTON_OVERLAY,
|
||||
LauncherInstrumentation.NavigationModel.TWO_BUTTON, description)) {
|
||||
base.evaluate();
|
||||
}
|
||||
}
|
||||
|
||||
private void evaluateWithZeroButtons() throws Throwable {
|
||||
if (setActiveOverlay(mLauncher, NAV_BAR_MODE_GESTURAL_OVERLAY,
|
||||
LauncherInstrumentation.NavigationModel.ZERO_BUTTON, description)) {
|
||||
@@ -145,9 +133,7 @@ public class NavigationModeSwitchRule implements TestRule {
|
||||
public static String getCurrentOverlayPackage(int currentInteractionMode) {
|
||||
return QuickStepContract.isGesturalMode(currentInteractionMode)
|
||||
? NAV_BAR_MODE_GESTURAL_OVERLAY
|
||||
: QuickStepContract.isSwipeUpMode(currentInteractionMode)
|
||||
? NAV_BAR_MODE_2BUTTON_OVERLAY
|
||||
: NAV_BAR_MODE_3BUTTON_OVERLAY;
|
||||
: NAV_BAR_MODE_3BUTTON_OVERLAY;
|
||||
}
|
||||
|
||||
private static LauncherInstrumentation.NavigationModel currentSysUiNavigationMode() {
|
||||
|
||||
@@ -16,23 +16,16 @@
|
||||
|
||||
package com.android.quickstep;
|
||||
|
||||
import static com.android.launcher3.util.RaceConditionReproducer.enterEvt;
|
||||
import static com.android.launcher3.util.RaceConditionReproducer.exitEvt;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.test.filters.LargeTest;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.ui.TaplTestsLauncher3;
|
||||
import com.android.launcher3.util.RaceConditionReproducer;
|
||||
import com.android.quickstep.NavigationModeSwitchRule.Mode;
|
||||
import com.android.quickstep.NavigationModeSwitchRule.NavigationModeSwitch;
|
||||
import com.android.quickstep.inputconsumers.OtherActivityInputConsumer;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -65,21 +58,6 @@ public class StartLauncherViaGestureTests extends AbstractQuickStepTest {
|
||||
eventProcessor.finishIteration();
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore // Ignoring until race condition repro framework is changes for multi-process case.
|
||||
@NavigationModeSwitch(mode = Mode.TWO_BUTTON)
|
||||
public void testPressHome() {
|
||||
runTest(enterEvt(Launcher.ON_CREATE_EVT),
|
||||
exitEvt(Launcher.ON_CREATE_EVT),
|
||||
enterEvt(OtherActivityInputConsumer.DOWN_EVT),
|
||||
exitEvt(OtherActivityInputConsumer.DOWN_EVT));
|
||||
|
||||
runTest(enterEvt(OtherActivityInputConsumer.DOWN_EVT),
|
||||
exitEvt(OtherActivityInputConsumer.DOWN_EVT),
|
||||
enterEvt(Launcher.ON_CREATE_EVT),
|
||||
exitEvt(Launcher.ON_CREATE_EVT));
|
||||
}
|
||||
|
||||
@Test
|
||||
@NavigationModeSwitch
|
||||
public void testStressPressHome() {
|
||||
|
||||
@@ -134,31 +134,6 @@ public class Background extends LauncherInstrumentation.VisibleContainer {
|
||||
break;
|
||||
}
|
||||
|
||||
case TWO_BUTTON: {
|
||||
final int startX;
|
||||
final int startY;
|
||||
final int endX;
|
||||
final int endY;
|
||||
final int swipeLength = mLauncher.getTestInfo(getSwipeHeightRequestName()).
|
||||
getInt(TestProtocol.TEST_INFO_RESPONSE_FIELD) + mLauncher.getTouchSlop();
|
||||
|
||||
if (mLauncher.getDevice().isNaturalOrientation()) {
|
||||
startX = endX = mLauncher.getDevice().getDisplayWidth() / 2;
|
||||
startY = getSwipeStartY();
|
||||
endY = startY - swipeLength;
|
||||
} else {
|
||||
startX = getSwipeStartX();
|
||||
// TODO(b/184059820) make horizontal swipe use swipe width not height, for the
|
||||
// moment just double the swipe length.
|
||||
endX = startX - swipeLength * 2;
|
||||
startY = endY = mLauncher.getDevice().getDisplayHeight() / 2;
|
||||
}
|
||||
|
||||
mLauncher.swipeToState(startX, startY, endX, endY, 10, OVERVIEW_STATE_ORDINAL,
|
||||
LauncherInstrumentation.GestureScope.OUTSIDE_WITH_PILFER);
|
||||
break;
|
||||
}
|
||||
|
||||
case THREE_BUTTON:
|
||||
if (mLauncher.isTablet()) {
|
||||
mLauncher.expectEvent(TestProtocol.SEQUENCE_MAIN,
|
||||
@@ -253,11 +228,7 @@ public class Background extends LauncherInstrumentation.VisibleContainer {
|
||||
"want to quick switch to the previous app")) {
|
||||
verifyActiveContainer();
|
||||
final boolean launcherWasVisible = mLauncher.isLauncherVisible();
|
||||
boolean transposeInLandscape = false;
|
||||
switch (mLauncher.getNavigationModel()) {
|
||||
case TWO_BUTTON:
|
||||
transposeInLandscape = true;
|
||||
// Fall through, zero button and two button modes behave the same.
|
||||
case ZERO_BUTTON: {
|
||||
final int startX;
|
||||
final int startY;
|
||||
@@ -265,33 +236,17 @@ public class Background extends LauncherInstrumentation.VisibleContainer {
|
||||
final int endY;
|
||||
final int cornerRadius = (int) Math.ceil(mLauncher.getWindowCornerRadius());
|
||||
if (toRight) {
|
||||
if (mLauncher.getDevice().isNaturalOrientation() || !transposeInLandscape) {
|
||||
// Swipe from the bottom left to the bottom right of the screen.
|
||||
startX = cornerRadius;
|
||||
startY = getSwipeStartY();
|
||||
endX = mLauncher.getDevice().getDisplayWidth() - cornerRadius;
|
||||
endY = startY;
|
||||
} else {
|
||||
// Swipe from the bottom right to the top right of the screen.
|
||||
startX = getSwipeStartX();
|
||||
startY = mLauncher.getRealDisplaySize().y - 1 - cornerRadius;
|
||||
endX = startX;
|
||||
endY = cornerRadius;
|
||||
}
|
||||
// Swipe from the bottom left to the bottom right of the screen.
|
||||
startX = cornerRadius;
|
||||
startY = getSwipeStartY();
|
||||
endX = mLauncher.getDevice().getDisplayWidth() - cornerRadius;
|
||||
endY = startY;
|
||||
} else {
|
||||
if (mLauncher.getDevice().isNaturalOrientation() || !transposeInLandscape) {
|
||||
// Swipe from the bottom right to the bottom left of the screen.
|
||||
startX = mLauncher.getDevice().getDisplayWidth() - cornerRadius;
|
||||
startY = getSwipeStartY();
|
||||
endX = cornerRadius;
|
||||
endY = startY;
|
||||
} else {
|
||||
// Swipe from the bottom left to the top left of the screen.
|
||||
startX = getSwipeStartX();
|
||||
startY = cornerRadius;
|
||||
endX = startX;
|
||||
endY = mLauncher.getRealDisplaySize().y - 1 - cornerRadius;
|
||||
}
|
||||
// Swipe from the bottom right to the bottom left of the screen.
|
||||
startX = mLauncher.getDevice().getDisplayWidth() - cornerRadius;
|
||||
startY = getSwipeStartY();
|
||||
endX = cornerRadius;
|
||||
endY = startY;
|
||||
}
|
||||
|
||||
final boolean isZeroButton = mLauncher.getNavigationModel()
|
||||
|
||||
@@ -124,7 +124,7 @@ public final class LauncherInstrumentation {
|
||||
WORKSPACE, ALL_APPS, OVERVIEW, WIDGETS, BACKGROUND, FALLBACK_OVERVIEW
|
||||
}
|
||||
|
||||
public enum NavigationModel {ZERO_BUTTON, TWO_BUTTON, THREE_BUTTON}
|
||||
public enum NavigationModel {ZERO_BUTTON, THREE_BUTTON}
|
||||
|
||||
// Where the gesture happens: outside of Launcher, inside or from inside to outside and
|
||||
// whether the gesture recognition triggers pilfer.
|
||||
@@ -391,8 +391,6 @@ public final class LauncherInstrumentation {
|
||||
public static NavigationModel getNavigationModel(int currentInteractionMode) {
|
||||
if (QuickStepContract.isGesturalMode(currentInteractionMode)) {
|
||||
return NavigationModel.ZERO_BUTTON;
|
||||
} else if (QuickStepContract.isSwipeUpMode(currentInteractionMode)) {
|
||||
return NavigationModel.TWO_BUTTON;
|
||||
} else if (QuickStepContract.isLegacyMode(currentInteractionMode)) {
|
||||
return NavigationModel.THREE_BUTTON;
|
||||
}
|
||||
@@ -864,7 +862,7 @@ public final class LauncherInstrumentation {
|
||||
|
||||
swipeToState(
|
||||
displaySize.x / 2, displaySize.y - 1,
|
||||
displaySize.x / 2, 0,
|
||||
displaySize.x / 2, displaySize.y / 2,
|
||||
ZERO_BUTTON_STEPS_FROM_BACKGROUND_TO_HOME, NORMAL_STATE_ORDINAL,
|
||||
gestureStartFromLauncher ? GestureScope.INSIDE_TO_OUTSIDE
|
||||
: GestureScope.OUTSIDE_WITH_PILFER);
|
||||
@@ -873,10 +871,6 @@ public final class LauncherInstrumentation {
|
||||
log("Hierarchy before clicking home:");
|
||||
dumpViewHierarchy();
|
||||
action = "clicking home button";
|
||||
if (!isLauncher3() && getNavigationModel() == NavigationModel.TWO_BUTTON) {
|
||||
expectEvent(TestProtocol.SEQUENCE_TIS, EVENT_TOUCH_DOWN_TIS);
|
||||
expectEvent(TestProtocol.SEQUENCE_TIS, EVENT_TOUCH_UP_TIS);
|
||||
}
|
||||
if (isTablet()) {
|
||||
expectEvent(TestProtocol.SEQUENCE_MAIN, EVENT_TOUCH_DOWN);
|
||||
expectEvent(TestProtocol.SEQUENCE_MAIN, EVENT_TOUCH_UP);
|
||||
@@ -917,9 +911,6 @@ public final class LauncherInstrumentation {
|
||||
if (isTablet()) {
|
||||
expectEvent(TestProtocol.SEQUENCE_MAIN, EVENT_TOUCH_DOWN);
|
||||
expectEvent(TestProtocol.SEQUENCE_MAIN, EVENT_TOUCH_UP);
|
||||
} else if (!isLauncher3() && getNavigationModel() == NavigationModel.TWO_BUTTON) {
|
||||
expectEvent(TestProtocol.SEQUENCE_TIS, EVENT_TOUCH_DOWN_TIS);
|
||||
expectEvent(TestProtocol.SEQUENCE_TIS, EVENT_TOUCH_UP_TIS);
|
||||
}
|
||||
}
|
||||
if (launcherVisible) {
|
||||
|
||||
Reference in New Issue
Block a user