Merge "Dump notification dot counts" into ub-launcher3-rvc-dev
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java
index 85741ed..70b139d 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java
@@ -197,33 +197,18 @@
}
protected void startNewTask(int successStateFlag, Consumer<Boolean> resultCallback) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_START_FROM_RECENTS, "startNewTask1");
- }
// Launch the task user scrolled to (mRecentsView.getNextPage()).
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
// We finish recents animation inside launchTask() when live tile is enabled.
mRecentsView.getNextPageTaskView().launchTask(false /* animate */,
true /* freezeTaskList */);
} else {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_START_FROM_RECENTS, "startNewTask2");
- }
int taskId = mRecentsView.getNextPageTaskView().getTask().key.id;
mFinishingRecentsAnimationForNewTaskId = taskId;
mRecentsAnimationController.finish(true /* toRecents */, () -> {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_START_FROM_RECENTS, "onFinishComplete1");
- }
if (!mCanceled) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_START_FROM_RECENTS, "onFinishComplete2");
- }
TaskView nextTask = mRecentsView.getTaskView(taskId);
if (nextTask != null) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_START_FROM_RECENTS, "onFinishComplete3");
- }
nextTask.launchTask(false /* animate */, true /* freezeTaskList */,
success -> {
resultCallback.accept(success);
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java
index 1bd0333..8574cf1 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java
@@ -965,9 +965,6 @@
windowAnim.addListener(new AnimationSuccessListener() {
@Override
public void onAnimationSuccess(Animator animator) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_START_FROM_RECENTS, "onAnimationSuccess");
- }
if (mRecentsAnimationController == null) {
// If the recents animation is interrupted, we still end the running
// animation (not canceled) so this is still called. In that case, we can
@@ -1191,9 +1188,6 @@
}
private void switchToScreenshot() {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_START_FROM_RECENTS, "switchToScreenshot");
- }
final int runningTaskId = mGestureState.getRunningTaskId();
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
if (mRecentsAnimationController != null) {
diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java b/quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java
index 783978d..d1dbcfb 100644
--- a/quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java
+++ b/quickstep/src/com/android/quickstep/RecentsAnimationCallbacks.java
@@ -91,9 +91,6 @@
RemoteAnimationTargetCompat[] appTargets,
RemoteAnimationTargetCompat[] wallpaperTargets,
Rect homeContentInsets, Rect minimizedHomeBounds) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_START_FROM_RECENTS, "onAnimationStart");
- }
RecentsAnimationTargets targets = new RecentsAnimationTargets(appTargets,
wallpaperTargets, homeContentInsets, minimizedHomeBounds);
mController = new RecentsAnimationController(animationController,
diff --git a/quickstep/src/com/android/quickstep/TaskAnimationManager.java b/quickstep/src/com/android/quickstep/TaskAnimationManager.java
index b04a1ae..bbca568 100644
--- a/quickstep/src/com/android/quickstep/TaskAnimationManager.java
+++ b/quickstep/src/com/android/quickstep/TaskAnimationManager.java
@@ -53,9 +53,6 @@
@UiThread
public RecentsAnimationCallbacks startRecentsAnimation(GestureState gestureState,
Intent intent, RecentsAnimationCallbacks.RecentsAnimationListener listener) {
- if (TestProtocol.sDebugTracing) {
- Log.d(TestProtocol.NO_START_FROM_RECENTS, "startRecentsAnimation");
- }
// Notify if recents animation is still running
if (mController != null) {
String msg = "New recents animation started before old animation completed";
diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
index 36c8ee2..331298f 100644
--- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java
+++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
@@ -51,6 +51,7 @@
import com.android.launcher3.DropTarget.DragObject;
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
+import com.android.launcher3.Utilities;
import com.android.launcher3.accessibility.LauncherAccessibilityDelegate;
import com.android.launcher3.accessibility.ShortcutMenuAccessibilityDelegate;
import com.android.launcher3.dot.DotInfo;
@@ -397,6 +398,9 @@
} else if (view instanceof ImageView) {
// Only the system shortcut icon shows on a gray background header.
info.setIconAndContentDescriptionFor((ImageView) view);
+ if (Utilities.ATLEAST_OREO) {
+ view.setTooltipText(view.getContentDescription());
+ }
}
view.setTag(info);
view.setOnClickListener(info);
diff --git a/src/com/android/launcher3/testing/TestProtocol.java b/src/com/android/launcher3/testing/TestProtocol.java
index 3181752..015de59 100644
--- a/src/com/android/launcher3/testing/TestProtocol.java
+++ b/src/com/android/launcher3/testing/TestProtocol.java
@@ -100,5 +100,4 @@
public static final String NO_BACKGROUND_TO_OVERVIEW_TAG = "b/138251824";
public static final String APP_NOT_DISABLED = "b/139891609";
public static final String NO_SCROLL_END_WIDGETS = "b/152354290";
- public static final String NO_START_FROM_RECENTS = "b/152658211";
}
diff --git a/tests/tapl/com/android/launcher3/tapl/LogEventChecker.java b/tests/tapl/com/android/launcher3/tapl/LogEventChecker.java
index 49901ea..78dfc36 100644
--- a/tests/tapl/com/android/launcher3/tapl/LogEventChecker.java
+++ b/tests/tapl/com/android/launcher3/tapl/LogEventChecker.java
@@ -44,6 +44,7 @@
private static final String START_PREFIX = "START_READER ";
private static final String FINISH_PREFIX = "FINISH_READER ";
+ private static final String SKIP_EVENTS_TAG = "b/153670015";
private volatile CountDownLatch mFinished;
@@ -72,6 +73,7 @@
mFinished = null;
}
mEvents.clear();
+ Log.d(SKIP_EVENTS_TAG, "Cleared events");
mExpectedEvents.clear();
mEventsCounter.drainPermits();
final String id = UUID.randomUUID().toString();
@@ -89,27 +91,30 @@
try (BufferedReader reader = new BufferedReader(new InputStreamReader(
Runtime.getRuntime().exec(cmd).getInputStream()))) {
- for (;;) {
+ for (; ; ) {
// Skip everything before the next start command.
- for (;;) {
+ for (; ; ) {
final String event = reader.readLine();
if (event.contains(TestProtocol.TAPL_EVENTS_TAG)
&& event.contains(mStartCommand)) {
+ Log.d(SKIP_EVENTS_TAG, "Read start: " + event);
break;
}
}
// Store all actual events until the finish command.
- for (;;) {
+ for (; ; ) {
final String event = reader.readLine();
if (event.contains(TestProtocol.TAPL_EVENTS_TAG)) {
if (event.contains(mFinishCommand)) {
mFinished.countDown();
+ Log.d(SKIP_EVENTS_TAG, "Read finish: " + event);
break;
} else {
final Matcher matcher = EVENT_LOG_ENTRY.matcher(event);
if (matcher.find()) {
mEvents.add(matcher.group("sequence"), matcher.group("event"));
+ Log.d(SKIP_EVENTS_TAG, "Read event: " + event);
mEventsCounter.release();
}
}
@@ -154,6 +159,7 @@
String sequence = expectedEvents.getKey();
List<String> actual = new ArrayList<>(mEvents.getNonNull(sequence));
+ Log.d(SKIP_EVENTS_TAG, "Verifying events");
final int mismatchPosition = getMismatchPosition(expectedEvents.getValue(), actual);
hasMismatches = hasMismatches || mismatchPosition != -1;
formatSequenceWithMismatch(