Merge "Removing obsolete shadows"
diff --git a/src/com/android/launcher3/views/RecyclerViewFastScroller.java b/src/com/android/launcher3/views/RecyclerViewFastScroller.java
index 6a83332..804fb3e 100644
--- a/src/com/android/launcher3/views/RecyclerViewFastScroller.java
+++ b/src/com/android/launcher3/views/RecyclerViewFastScroller.java
@@ -16,6 +16,8 @@
package com.android.launcher3.views;
+import static android.view.HapticFeedbackConstants.CLOCK_TICK;
+
import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.res.Resources;
@@ -288,6 +290,7 @@
if (!sectionName.equals(mPopupSectionName)) {
mPopupSectionName = sectionName;
mPopupView.setText(sectionName);
+ performHapticFeedback(CLOCK_TICK);
}
animatePopupVisibility(!sectionName.isEmpty());
mLastTouchY = boundedY;
diff --git a/src/com/android/launcher3/views/SearchResultIcon.java b/src/com/android/launcher3/views/SearchResultIcon.java
index 51c741b..9bcfb8c 100644
--- a/src/com/android/launcher3/views/SearchResultIcon.java
+++ b/src/com/android/launcher3/views/SearchResultIcon.java
@@ -111,6 +111,7 @@
public void applySearchTarget(SearchTarget searchTarget) {
mSearchTarget = searchTarget;
SearchEventTracker.getInstance(getContext()).registerWeakHandler(mSearchTarget, this);
+ setVisibility(VISIBLE);
switch (searchTarget.getItemType()) {
case TARGET_TYPE_APP:
case TARGET_TYPE_HERO_APP:
@@ -131,6 +132,10 @@
private void prepareUsingApp(ComponentName componentName, UserHandle userHandle) {
AllAppsStore appsStore = mLauncher.getAppsView().getAppsStore();
AppInfo appInfo = appsStore.getApp(new ComponentKey(componentName, userHandle));
+ if (appInfo == null) {
+ setVisibility(GONE);
+ return;
+ }
applyFromApplicationInfo(appInfo);
notifyItemInfoChanged(appInfo);
}
diff --git a/tests/src/com/android/launcher3/ui/WorkTabTest.java b/tests/src/com/android/launcher3/ui/WorkTabTest.java
index df0770d..1e1cf04 100644
--- a/tests/src/com/android/launcher3/ui/WorkTabTest.java
+++ b/tests/src/com/android/launcher3/ui/WorkTabTest.java
@@ -45,6 +45,7 @@
import java.util.List;
import java.util.Objects;
+import java.util.concurrent.atomic.AtomicInteger;
@LargeTest
@RunWith(AndroidJUnit4.class)
@@ -71,7 +72,8 @@
@After
public void removeWorkProfile() throws Exception {
- Log.d(TestProtocol.WORK_PROFILE_REMOVED, "(teardown) removing uid" + mProfileUserId);
+ Log.d(TestProtocol.WORK_PROFILE_REMOVED, "(teardown) removing uid" + mProfileUserId,
+ new Exception());
mDevice.executeShellCommand("pm remove-user " + mProfileUserId);
}
@@ -142,12 +144,16 @@
"work profile status (" + mProfileUserId + ") :"
+ launcher.getAppsView().isWorkTabVisible()));
+ AtomicInteger attempt = new AtomicInteger(0);
// verify work edu is seen next
- waitForLauncherCondition("Launcher did not show the next edu screen", l ->
- ((AllAppsPagedView) l.getAppsView().getContentView()).getCurrentPage() == WORK_PAGE
- && ((TextView) workEduView.findViewById(
- R.id.content_text)).getText().equals(
- l.getResources().getString(R.string.work_profile_edu_work_apps)));
+ waitForLauncherCondition("Launcher did not show the next edu screen", l -> {
+ Log.d(TestProtocol.WORK_PROFILE_REMOVED,
+ "running test attempt" + attempt.getAndIncrement());
+ return ((AllAppsPagedView) l.getAppsView().getContentView()).getCurrentPage()
+ == WORK_PAGE && ((TextView) workEduView.findViewById(
+ R.id.content_text)).getText().equals(
+ l.getResources().getString(R.string.work_profile_edu_work_apps));
+ });
}
@Test