Merge "Annotating Quick Switch CUJ for 3-button mode" into ub-launcher3-master
diff --git a/protos/launcher_trace.proto b/protos/launcher_trace.proto
index c6f3543..65fcfe5 100644
--- a/protos/launcher_trace.proto
+++ b/protos/launcher_trace.proto
@@ -28,4 +28,40 @@
message TouchInteractionServiceProto {
optional bool service_connected = 1;
+ optional OverviewComponentObserverProto overview_component_obvserver = 2;
+ optional InputConsumerProto input_consumer = 3;
+}
+
+message OverviewComponentObserverProto {
+
+ optional bool overview_activity_started = 1;
+ optional bool overview_activity_resumed = 2;
+}
+
+message InputConsumerProto {
+
+ optional string name = 1;
+ optional SwipeHandlerProto swipe_handler = 2;
+}
+
+message SwipeHandlerProto {
+
+ optional GestureStateProto gesture_state = 1;
+ optional bool is_recents_attached_to_app_window = 2;
+ optional int32 scroll_offset = 3;
+ // Swipe up progress from 0 (app) to 1 (overview); can be > 1 if swiping past overview.
+ optional float app_to_overview_progress = 4;
+}
+
+message GestureStateProto {
+
+ optional GestureEndTarget endTarget = 1 [default = UNSET];
+
+ enum GestureEndTarget {
+ UNSET = 0;
+ HOME = 1;
+ RECENTS = 2;
+ NEW_TASK = 3;
+ LAST_TASK = 4;
+ }
}
diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
index dbf75fa..b43d63b 100644
--- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
+++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
@@ -81,6 +81,8 @@
import com.android.launcher3.logging.StatsLogManager.StatsLogger;
import com.android.launcher3.statemanager.StatefulActivity;
import com.android.launcher3.testing.TestProtocol;
+import com.android.launcher3.tracing.InputConsumerProto;
+import com.android.launcher3.tracing.SwipeHandlerProto;
import com.android.launcher3.util.TraceHelper;
import com.android.launcher3.util.VibratorWrapper;
import com.android.launcher3.util.WindowBounds;
@@ -92,6 +94,7 @@
import com.android.quickstep.util.AnimatorControllerWithResistance;
import com.android.quickstep.util.InputConsumerProxy;
import com.android.quickstep.util.MotionPauseDetector;
+import com.android.quickstep.util.ProtoTracer;
import com.android.quickstep.util.RectFSpringAnim;
import com.android.quickstep.util.SurfaceTransactionApplier;
import com.android.quickstep.util.TransformParams;
@@ -1608,6 +1611,27 @@
}
mTaskViewSimulator.apply(mTransformParams);
}
+ ProtoTracer.INSTANCE.get(mContext).scheduleFrameUpdate();
+ }
+
+ /**
+ * Used for winscope tracing, see launcher_trace.proto
+ * @see com.android.systemui.shared.tracing.ProtoTraceable#writeToProto
+ * @param inputConsumerProto The parent of this proto message.
+ */
+ public void writeToProto(InputConsumerProto.Builder inputConsumerProto) {
+ SwipeHandlerProto.Builder swipeHandlerProto = SwipeHandlerProto.newBuilder();
+
+ mGestureState.writeToProto(swipeHandlerProto);
+
+ swipeHandlerProto.setIsRecentsAttachedToAppWindow(
+ mAnimationFactory.isRecentsAttachedToAppWindow());
+ swipeHandlerProto.setScrollOffset(mRecentsView == null
+ ? 0
+ : mRecentsView.getScrollOffset());
+ swipeHandlerProto.setAppToOverviewProgress(mCurrentShift.value);
+
+ inputConsumerProto.setSwipeHandler(swipeHandlerProto);
}
public interface Factory {
diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
index d35e270..9089ae5 100644
--- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
@@ -297,6 +297,10 @@
* @param animate Whether to animate recents to/from its new attached state.
*/
default void setRecentsAttachedToAppWindow(boolean attached, boolean animate) { }
+
+ default boolean isRecentsAttachedToAppWindow() {
+ return false;
+ }
}
class DefaultAnimationFactory implements AnimationFactory {
@@ -388,6 +392,11 @@
fadeAnim.setDuration(animate ? RECENTS_ATTACH_DURATION : 0).start();
}
+ @Override
+ public boolean isRecentsAttachedToAppWindow() {
+ return mIsAttachedToWindow;
+ }
+
protected void createBackgroundToOverviewAnim(ACTIVITY_TYPE activity, PendingAnimation pa) {
// Scale down recents from being full screen to being in overview.
RecentsView recentsView = activity.getOverviewPanel();
diff --git a/quickstep/src/com/android/quickstep/GestureState.java b/quickstep/src/com/android/quickstep/GestureState.java
index 9c23c83..f788996 100644
--- a/quickstep/src/com/android/quickstep/GestureState.java
+++ b/quickstep/src/com/android/quickstep/GestureState.java
@@ -26,6 +26,8 @@
import android.os.Build;
import com.android.launcher3.statemanager.StatefulActivity;
+import com.android.launcher3.tracing.GestureStateProto;
+import com.android.launcher3.tracing.SwipeHandlerProto;
import com.android.quickstep.util.ActiveGestureLog;
import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
@@ -46,19 +48,22 @@
* Defines the end targets of a gesture and the associated state.
*/
public enum GestureEndTarget {
- HOME(true, LAUNCHER_STATE_HOME, false),
+ HOME(true, LAUNCHER_STATE_HOME, false, GestureStateProto.GestureEndTarget.HOME),
- RECENTS(true, LAUNCHER_STATE_OVERVIEW, true),
+ RECENTS(true, LAUNCHER_STATE_OVERVIEW, true, GestureStateProto.GestureEndTarget.RECENTS),
- NEW_TASK(false, LAUNCHER_STATE_BACKGROUND, true),
+ NEW_TASK(false, LAUNCHER_STATE_BACKGROUND, true,
+ GestureStateProto.GestureEndTarget.NEW_TASK),
- LAST_TASK(false, LAUNCHER_STATE_BACKGROUND, true);
+ LAST_TASK(false, LAUNCHER_STATE_BACKGROUND, true,
+ GestureStateProto.GestureEndTarget.LAST_TASK);
- GestureEndTarget(boolean isLauncher, int containerType,
- boolean recentsAttachedToAppWindow) {
+ GestureEndTarget(boolean isLauncher, int containerType, boolean recentsAttachedToAppWindow,
+ GestureStateProto.GestureEndTarget protoEndTarget) {
this.isLauncher = isLauncher;
this.containerType = containerType;
this.recentsAttachedToAppWindow = recentsAttachedToAppWindow;
+ this.protoEndTarget = protoEndTarget;
}
/** Whether the target is in the launcher activity. Implicitly, if the end target is going
@@ -68,6 +73,8 @@
public final int containerType;
/** Whether RecentsView should be attached to the window as we animate to this target */
public final boolean recentsAttachedToAppWindow;
+ /** The GestureStateProto enum value, used for winscope tracing. See launcher_trace.proto */
+ public final GestureStateProto.GestureEndTarget protoEndTarget;
}
private static final String TAG = "GestureState";
@@ -345,4 +352,17 @@
pw.println(" lastStartedTaskId=" + mLastStartedTaskId);
pw.println(" isRecentsAnimationRunning=" + isRecentsAnimationRunning());
}
+
+ /**
+ * Used for winscope tracing, see launcher_trace.proto
+ * @see com.android.systemui.shared.tracing.ProtoTraceable#writeToProto
+ * @param swipeHandlerProto The parent of this proto message.
+ */
+ public void writeToProto(SwipeHandlerProto.Builder swipeHandlerProto) {
+ GestureStateProto.Builder gestureStateProto = GestureStateProto.newBuilder();
+ gestureStateProto.setEndTarget(mEndTarget == null
+ ? GestureStateProto.GestureEndTarget.UNSET
+ : mEndTarget.protoEndTarget);
+ swipeHandlerProto.setGestureState(gestureStateProto);
+ }
}
diff --git a/quickstep/src/com/android/quickstep/InputConsumer.java b/quickstep/src/com/android/quickstep/InputConsumer.java
index 67711c0..0b2a057 100644
--- a/quickstep/src/com/android/quickstep/InputConsumer.java
+++ b/quickstep/src/com/android/quickstep/InputConsumer.java
@@ -21,6 +21,9 @@
import android.view.KeyEvent;
import android.view.MotionEvent;
+import com.android.launcher3.tracing.InputConsumerProto;
+import com.android.launcher3.tracing.TouchInteractionServiceProto;
+
@TargetApi(Build.VERSION_CODES.O)
public interface InputConsumer {
@@ -116,4 +119,21 @@
}
return name.toString();
}
+
+ /**
+ * Used for winscope tracing, see launcher_trace.proto
+ * @see com.android.systemui.shared.tracing.ProtoTraceable#writeToProto
+ * @param serviceProto The parent of this proto message.
+ */
+ default void writeToProto(TouchInteractionServiceProto.Builder serviceProto) {
+ InputConsumerProto.Builder inputConsumerProto = InputConsumerProto.newBuilder();
+ inputConsumerProto.setName(getName());
+ writeToProtoInternal(inputConsumerProto);
+ serviceProto.setInputConsumer(inputConsumerProto);
+ }
+
+ /**
+ * @see #writeToProto - allows subclasses to write additional info to the proto.
+ */
+ default void writeToProtoInternal(InputConsumerProto.Builder inputConsumerProto) {}
}
diff --git a/quickstep/src/com/android/quickstep/OverviewComponentObserver.java b/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
index 07f838b..49feef0 100644
--- a/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
+++ b/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
@@ -35,6 +35,8 @@
import android.content.pm.ResolveInfo;
import android.util.SparseIntArray;
+import com.android.launcher3.tracing.OverviewComponentObserverProto;
+import com.android.launcher3.tracing.TouchInteractionServiceProto;
import com.android.launcher3.util.SimpleBroadcastReceiver;
import com.android.systemui.shared.system.PackageManagerWrapper;
@@ -262,4 +264,17 @@
pw.println(" overviewIntent=" + mOverviewIntent);
pw.println(" homeIntent=" + mCurrentHomeIntent);
}
+
+ /**
+ * Used for winscope tracing, see launcher_trace.proto
+ * @see com.android.systemui.shared.tracing.ProtoTraceable#writeToProto
+ * @param serviceProto The parent of this proto message.
+ */
+ public void writeToProto(TouchInteractionServiceProto.Builder serviceProto) {
+ OverviewComponentObserverProto.Builder overviewComponentObserver =
+ OverviewComponentObserverProto.newBuilder();
+ overviewComponentObserver.setOverviewActivityStarted(mActivityInterface.isStarted());
+ overviewComponentObserver.setOverviewActivityResumed(mActivityInterface.isResumed());
+ serviceProto.setOverviewComponentObvserver(overviewComponentObserver);
+ }
}
diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java
index d3c4f55..eebb0de 100644
--- a/quickstep/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java
@@ -893,6 +893,12 @@
TouchInteractionServiceProto.Builder serviceProto =
TouchInteractionServiceProto.newBuilder();
serviceProto.setServiceConnected(true);
+
+ if (mOverviewComponentObserver != null) {
+ mOverviewComponentObserver.writeToProto(serviceProto);
+ }
+ mConsumer.writeToProto(serviceProto);
+
proto.setTouchInteractionService(serviceProto);
}
}
diff --git a/quickstep/src/com/android/quickstep/inputconsumers/DelegateInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/DelegateInputConsumer.java
index 67a15a7..8da2fd3 100644
--- a/quickstep/src/com/android/quickstep/inputconsumers/DelegateInputConsumer.java
+++ b/quickstep/src/com/android/quickstep/inputconsumers/DelegateInputConsumer.java
@@ -4,6 +4,7 @@
import com.android.launcher3.testing.TestLogging;
import com.android.launcher3.testing.TestProtocol;
+import com.android.launcher3.tracing.InputConsumerProto;
import com.android.quickstep.InputConsumer;
import com.android.systemui.shared.system.InputMonitorCompat;
@@ -53,4 +54,9 @@
mDelegate.onMotionEvent(event);
event.recycle();
}
+
+ @Override
+ public void writeToProtoInternal(InputConsumerProto.Builder inputConsumerProto) {
+ mDelegate.writeToProtoInternal(inputConsumerProto);
+ }
}
diff --git a/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
index 35dbee9..82f489f 100644
--- a/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
+++ b/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java
@@ -51,6 +51,7 @@
import com.android.launcher3.R;
import com.android.launcher3.testing.TestLogging;
import com.android.launcher3.testing.TestProtocol;
+import com.android.launcher3.tracing.InputConsumerProto;
import com.android.launcher3.util.Preconditions;
import com.android.launcher3.util.TraceHelper;
import com.android.quickstep.AbsSwipeUpHandler;
@@ -478,4 +479,11 @@
public boolean allowInterceptByParent() {
return !mPassedPilferInputSlop || mGestureState.hasState(STATE_OVERSCROLL_WINDOW_CREATED);
}
+
+ @Override
+ public void writeToProtoInternal(InputConsumerProto.Builder inputConsumerProto) {
+ if (mInteractionHandler != null) {
+ mInteractionHandler.writeToProto(inputConsumerProto);
+ }
+ }
}
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index a817bd3..65a445b 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -539,6 +539,9 @@
@Override
protected void onWindowVisibilityChanged(int visibility) {
super.onWindowVisibilityChanged(visibility);
+ if (visibility == GONE && ENABLE_QUICKSTEP_LIVE_TILE.get()) {
+ finishRecentsAnimation(true /* toRecents */, null);
+ }
updateTaskStackListenerState();
}
diff --git a/res/drawable/ic_allapps_search.xml b/res/drawable/ic_allapps_search.xml
index 2aeb947..c0e20f1 100644
--- a/res/drawable/ic_allapps_search.xml
+++ b/res/drawable/ic_allapps_search.xml
@@ -19,6 +19,6 @@
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
- android:fillColor="?android:attr/colorAccent"
+ android:fillColor="?android:attr/textColorTertiary"
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z" />
</vector>
diff --git a/res/layout/all_apps.xml b/res/layout/all_apps.xml
index 67ec664..0041c9a 100644
--- a/res/layout/all_apps.xml
+++ b/res/layout/all_apps.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2016 The Android Open Source Project
+<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2016 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.
@@ -16,8 +15,7 @@
<!-- The top and bottom paddings are defined in this container, but since we want
the list view to span the full width (for touch interception purposes), we
will bake the left/right padding into that view's background itself. -->
-<com.android.launcher3.allapps.LauncherAllAppsContainerView
- xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.launcher3.allapps.LauncherAllAppsContainerView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/apps_view"
android:theme="?attr/allAppsTheme"
android:layout_width="match_parent"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6ab8150..6c58c0e 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -59,7 +59,7 @@
<!-- Search bar text in the apps view. [CHAR_LIMIT=50] -->
<string name="all_apps_search_bar_hint">Search apps</string>
<!-- Search bar text in the apps view. [CHAR_LIMIT=50] -->
- <string name="all_apps_on_device_search_bar_hint">Search this phone and more...</string>
+ <string name="all_apps_on_device_search_bar_hint">Search this phone and more…</string>
<!-- Loading apps text. [CHAR_LIMIT=50] -->
<string name="all_apps_loading_message">Loading apps…</string>
<!-- No-search-results text. [CHAR_LIMIT=50] -->
diff --git a/src/com/android/launcher3/allapps/AllAppsSectionDecorator.java b/src/com/android/launcher3/allapps/AllAppsSectionDecorator.java
index 0214c35..f2a1f85 100644
--- a/src/com/android/launcher3/allapps/AllAppsSectionDecorator.java
+++ b/src/com/android/launcher3/allapps/AllAppsSectionDecorator.java
@@ -101,8 +101,8 @@
* Handles grouping and drawing of items in the same all apps sections.
*/
public static class SectionDecorationHandler {
- private static final int FILL_ALPHA = (int) (.3f * 255);
- private static final int FOCUS_ALPHA = (int) (.8f * 255);
+ private static final int FILL_ALPHA = 0;
+ private static final int FOCUS_ALPHA = (int) (.9f * 255);
protected RectF mBounds = new RectF();
private final boolean mIsFullWidth;
diff --git a/src/com/android/launcher3/views/ScrimView.java b/src/com/android/launcher3/views/ScrimView.java
index 77cec80..15ff2f5 100644
--- a/src/com/android/launcher3/views/ScrimView.java
+++ b/src/com/android/launcher3/views/ScrimView.java
@@ -42,7 +42,7 @@
*/
public class ScrimView<T extends Launcher> extends View implements Insettable, OnChangeListener {
- private static final float SCRIM_ALPHA = .75f;
+ private static final float SCRIM_ALPHA = .8f;
protected final T mLauncher;
private final WallpaperColorInfo mWallpaperColorInfo;
protected final int mEndScrim;
diff --git a/src/com/android/launcher3/views/SearchResultPeopleView.java b/src/com/android/launcher3/views/SearchResultPeopleView.java
index 0c9a22f..f20b080 100644
--- a/src/com/android/launcher3/views/SearchResultPeopleView.java
+++ b/src/com/android/launcher3/views/SearchResultPeopleView.java
@@ -23,9 +23,12 @@
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
+import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
+import android.os.Build;
import android.os.Bundle;
+import android.os.Process;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageButton;
@@ -41,7 +44,8 @@
import com.android.launcher3.R;
import com.android.launcher3.allapps.AllAppsGridAdapter;
import com.android.launcher3.allapps.search.AllAppsSearchBarController;
-import com.android.launcher3.util.Themes;
+import com.android.launcher3.icons.BitmapInfo;
+import com.android.launcher3.icons.LauncherIcons;
import com.android.systemui.plugins.AllAppsSearchPlugin;
import com.android.systemui.plugins.shared.SearchTarget;
import com.android.systemui.plugins.shared.SearchTargetEvent;
@@ -105,15 +109,14 @@
mPlugin = adapterItemWithPayload.getPlugin();
mTitleView.setText(payload.getString("title"));
mIntent = payload.getParcelable("intent");
- Bitmap icon = payload.getParcelable("icon");
- if (icon != null) {
- RoundedBitmapDrawable d = RoundedBitmapDrawableFactory.create(getResources(), icon);
- float radius = Themes.getDialogCornerRadius(getContext());
- d.setCornerRadius(radius);
- d.setBounds(0, 0, mIconSize, mIconSize);
- BitmapDrawable bitmapDrawable = new BitmapDrawable(getResources(),
- Bitmap.createScaledBitmap(icon, mIconSize, mIconSize, false));
- mIconView.setBackground(d);
+ Bitmap contactIcon = payload.getParcelable("icon");
+ try (LauncherIcons li = LauncherIcons.obtain(getContext())) {
+ BitmapInfo badgeInfo = li.createBadgedIconBitmap(
+ getAppIcon(mIntent.getPackage()), Process.myUserHandle(),
+ Build.VERSION.SDK_INT);
+ setIcon(li.badgeBitmap(roundBitmap(contactIcon), badgeInfo).icon, false);
+ } catch (Exception e) {
+ setIcon(contactIcon, true);
}
ArrayList<Bundle> providers = payload.getParcelableArrayList("providers");
@@ -123,17 +126,14 @@
Bundle provider = providers.get(i);
Intent intent = provider.getParcelable("intent");
setupProviderButton(button, provider, intent, adapterItemWithPayload);
- String pkg = provider.getString("package_name");
UI_HELPER_EXECUTOR.post(() -> {
- try {
- ApplicationInfo applicationInfo = mPackageManager.getApplicationInfo(
- pkg, 0);
- Drawable appIcon = applicationInfo.loadIcon(mPackageManager);
+ String pkg = provider.getString("package_name");
+ Drawable appIcon = getAppIcon(pkg);
+ if (appIcon != null) {
MAIN_EXECUTOR.post(() -> button.setImageDrawable(appIcon));
- } catch (PackageManager.NameNotFoundException ignored) {
}
-
});
+ button.setVisibility(VISIBLE);
} else {
button.setVisibility(GONE);
}
@@ -141,6 +141,45 @@
adapterItemWithPayload.setSelectionHandler(this::handleSelection);
}
+ /**
+ * Normalizes the bitmap to look like rounded App Icon
+ * TODO(b/170234747) to support styling, generate adaptive icon drawable and generate
+ * bitmap from it.
+ */
+ private Bitmap roundBitmap(Bitmap icon) {
+ final RoundedBitmapDrawable d = RoundedBitmapDrawableFactory.create(getResources(), icon);
+ d.setCornerRadius(R.attr.folderIconRadius);
+ d.setBounds(0, 0, mIconSize, mIconSize);
+ final Bitmap bitmap = Bitmap.createBitmap(d.getBounds().width(), d.getBounds().height(),
+ Bitmap.Config.ARGB_8888);
+ Canvas canvas = new Canvas(bitmap);
+ d.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
+ d.draw(canvas);
+ return bitmap;
+ }
+
+ private void setIcon(Bitmap icon, Boolean round) {
+ if (round) {
+ RoundedBitmapDrawable d = RoundedBitmapDrawableFactory.create(getResources(), icon);
+ d.setCornerRadius(R.attr.folderIconRadius);
+ d.setBounds(0, 0, mIconSize, mIconSize);
+ mIconView.setBackground(d);
+ } else {
+ mIconView.setBackground(new BitmapDrawable(getResources(), icon));
+ }
+ }
+
+
+ private Drawable getAppIcon(String pkg) {
+ try {
+ ApplicationInfo applicationInfo = mPackageManager.getApplicationInfo(
+ pkg, 0);
+ return applicationInfo.loadIcon(mPackageManager);
+ } catch (PackageManager.NameNotFoundException ignored) {
+ return null;
+ }
+ }
+
@Override
public Object[] getTargetInfo() {
return mTargetInfo;
@@ -155,7 +194,8 @@
SearchTarget.ItemType.PEOPLE,
SearchTargetEvent.CHILD_SELECT);
searchTargetEvent.bundle = new Bundle();
- searchTargetEvent.bundle.putParcelable("intent", mIntent);
+ searchTargetEvent.bundle.putParcelable("intent", intent);
+ searchTargetEvent.bundle.putString("title", mTitleView.getText().toString());
searchTargetEvent.bundle.putBundle("provider", provider);
if (mPlugin != null) {
mPlugin.notifySearchTargetEvent(searchTargetEvent);
@@ -172,6 +212,7 @@
eventType);
searchTargetEvent.bundle = new Bundle();
searchTargetEvent.bundle.putParcelable("intent", mIntent);
+ searchTargetEvent.bundle.putString("title", mTitleView.getText().toString());
if (mPlugin != null) {
mPlugin.notifySearchTargetEvent(searchTargetEvent);
}
diff --git a/tests/tapl/com/android/launcher3/tapl/Background.java b/tests/tapl/com/android/launcher3/tapl/Background.java
index c9c846f..153b3ce 100644
--- a/tests/tapl/com/android/launcher3/tapl/Background.java
+++ b/tests/tapl/com/android/launcher3/tapl/Background.java
@@ -88,10 +88,6 @@
? LauncherInstrumentation.GestureScope.INSIDE_TO_OUTSIDE
: LauncherInstrumentation.GestureScope.OUTSIDE_WITH_PILFER;
- // b/156044202
- mLauncher.log("Hierarchy before swiping up to overview:");
- mLauncher.dumpViewHierarchy();
-
mLauncher.sendPointer(
downTime, downTime, MotionEvent.ACTION_DOWN, start, gestureScope);
mLauncher.executeAndWaitForLauncherEvent(