Merge "Updating some non-final static objects" into ub-launcher3-master
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index fed2498..7265a1a 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -121,6 +121,7 @@
import com.android.launcher3.popup.SystemShortcut;
import com.android.launcher3.qsb.QsbContainerView;
import com.android.launcher3.states.RotationHelper;
+import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.touch.AllAppsSwipeController;
import com.android.launcher3.touch.ItemClickHandler;
import com.android.launcher3.uioverrides.plugins.PluginManagerWrapper;
@@ -2636,6 +2637,9 @@
// Setting the touch point to (-1, -1) will show the options popup in the center of
// the screen.
+ if (Utilities.IS_RUNNING_IN_TEST_HARNESS) {
+ Log.d(TestProtocol.PERMANENT_DIAG_TAG, "Opening options popup on key up");
+ }
OptionsPopupView.showDefaultOptions(this, -1, -1);
}
return true;
diff --git a/src/com/android/launcher3/testing/TestProtocol.java b/src/com/android/launcher3/testing/TestProtocol.java
index 832f7f0..5aae841 100644
--- a/src/com/android/launcher3/testing/TestProtocol.java
+++ b/src/com/android/launcher3/testing/TestProtocol.java
@@ -83,6 +83,8 @@
public static final String REQUEST_ENABLE_DEBUG_TRACING = "enable-debug-tracing";
public static final String REQUEST_DISABLE_DEBUG_TRACING = "disable-debug-tracing";
+ public static final String PERMANENT_DIAG_TAG = "TaplTarget";
+
public static final String NO_BACKGROUND_TO_OVERVIEW_TAG = "b/138251824";
public static final String NO_DRAG_TO_WORKSPACE = "b/138729456";
public static final String APP_NOT_DISABLED = "b/139891609";
diff --git a/src/com/android/launcher3/touch/WorkspaceTouchListener.java b/src/com/android/launcher3/touch/WorkspaceTouchListener.java
index 310d598..66fdc94 100644
--- a/src/com/android/launcher3/touch/WorkspaceTouchListener.java
+++ b/src/com/android/launcher3/touch/WorkspaceTouchListener.java
@@ -25,6 +25,7 @@
import android.graphics.PointF;
import android.graphics.Rect;
+import android.util.Log;
import android.view.GestureDetector;
import android.view.HapticFeedbackConstants;
import android.view.MotionEvent;
@@ -36,8 +37,10 @@
import com.android.launcher3.CellLayout;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Launcher;
+import com.android.launcher3.Utilities;
import com.android.launcher3.Workspace;
import com.android.launcher3.dragndrop.DragLayer;
+import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.views.OptionsPopupView;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action;
import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
@@ -175,6 +178,9 @@
mLauncher.getUserEventDispatcher().logActionOnContainer(Action.Touch.LONGPRESS,
Action.Direction.NONE, ContainerType.WORKSPACE,
mWorkspace.getCurrentPage());
+ if (Utilities.IS_RUNNING_IN_TEST_HARNESS) {
+ Log.d(TestProtocol.PERMANENT_DIAG_TAG, "Opening options popup on long press");
+ }
OptionsPopupView.showDefaultOptions(mLauncher, mTouchDownPoint.x, mTouchDownPoint.y);
} else {
cancelLongPress();
diff --git a/tests/src/com/android/launcher3/util/rule/TestStabilityRule.java b/tests/src/com/android/launcher3/util/rule/TestStabilityRule.java
index 858cb38..f98957e 100644
--- a/tests/src/com/android/launcher3/util/rule/TestStabilityRule.java
+++ b/tests/src/com/android/launcher3/util/rule/TestStabilityRule.java
@@ -114,21 +114,20 @@
throw new RuntimeException(e);
}
- final Matcher launcherBuildMatcher = LAUNCHER_BUILD.matcher(launcherVersion);
+ final String platformVersion = Build.VERSION.INCREMENTAL;
+ Log.d(TAG, "Launcher: " + launcherVersion + ", platform: " + platformVersion);
+
+ final Matcher launcherBuildMatcher = LAUNCHER_BUILD.matcher(launcherVersion);
if (!launcherBuildMatcher.find()) {
throw new AssertionError("Launcher build match not found");
}
- final String platformVersion = Build.VERSION.INCREMENTAL;
final Matcher platformBuildMatcher = PLATFORM_BUILD.matcher(platformVersion);
-
if (!platformBuildMatcher.find()) {
throw new AssertionError("Platform build match not found");
}
- Log.d(TAG, "Launcher: " + launcherVersion + ", platform: " + platformVersion);
-
final int runFlavor;
if (launcherBuildMatcher.group("local") != null && (