Merge "Enabling continuous testing of all 3 modes of navigation" into ub-launcher3-qt-dev
diff --git a/res/values/overlayable.xml b/res/values/overlayable.xml
new file mode 100644
index 0000000..b68d615
--- /dev/null
+++ b/res/values/overlayable.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2019 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <overlayable name="SystemIcons">
+ <policy type="product|system|vendor">
+ <item type="drawable" name="ic_corp"/>
+ <item type="drawable" name="ic_info_no_shadow"/>
+ <item type="drawable" name="ic_remove_no_shadow"/>
+ <item type="drawable" name="ic_setting"/>
+ <item type="drawable" name="ic_wallpaper"/>
+ <item type="drawable" name="ic_warning"/>
+ <item type="drawable" name="ic_widget"/>
+ </policy>
+ </overlayable>
+</resources>
diff --git a/src/com/android/launcher3/popup/SystemShortcut.java b/src/com/android/launcher3/popup/SystemShortcut.java
index 074c149..563f3b3 100644
--- a/src/com/android/launcher3/popup/SystemShortcut.java
+++ b/src/com/android/launcher3/popup/SystemShortcut.java
@@ -3,6 +3,7 @@
import static com.android.launcher3.userevent.nano.LauncherLogProto.Action;
import static com.android.launcher3.userevent.nano.LauncherLogProto.ControlType;
+import android.app.ActivityOptions;
import android.content.Context;
import android.content.Intent;
import android.graphics.Rect;
@@ -159,9 +160,8 @@
return (view) -> {
dismissTaskMenuView(activity);
Rect sourceBounds = activity.getViewBounds(view);
- Bundle opts = activity.getActivityLaunchOptionsAsBundle(view);
new PackageManagerHelper(activity).startDetailsActivityForInfo(
- itemInfo, sourceBounds, opts);
+ itemInfo, sourceBounds, ActivityOptions.makeBasic().toBundle());
activity.getUserEventDispatcher().logActionOnControl(Action.Touch.TAP,
ControlType.APPINFO_TARGET, view);
};
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
index 876afcc..8f777b6 100644
--- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
+++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -255,12 +255,14 @@
assertEquals("Unexpected display rotation",
mExpectedRotation, mDevice.getDisplayRotation());
final NavigationModel navigationModel = getNavigationModel();
- assertTrue("Presence of recents button doesn't match the interaction mode",
- (navigationModel == NavigationModel.THREE_BUTTON) ==
- hasSystemUiObject("recent_apps"));
- assertTrue("Presence of home button doesn't match the interaction mode",
- (navigationModel != NavigationModel.ZERO_BUTTON) ==
- hasSystemUiObject("home"));
+ final boolean hasRecentsButton = hasSystemUiObject("recent_apps");
+ final boolean hasHomeButton = hasSystemUiObject("home");
+ assertTrue("Presence of recents button doesn't match the interaction mode, mode="
+ + navigationModel.name() + ", hasRecents=" + hasRecentsButton,
+ (navigationModel == NavigationModel.THREE_BUTTON) == hasRecentsButton);
+ assertTrue("Presence of home button doesn't match the interaction mode, mode="
+ + navigationModel.name() + ", hasHome=" + hasHomeButton,
+ (navigationModel != NavigationModel.ZERO_BUTTON) == hasHomeButton);
log("verifyContainerType: " + containerType);
try (Closable c = addContextLayer(