Merge "Fix launcher leaks" into ub-launcher3-master
diff --git a/res/layout/search_result_people_item.xml b/res/layout/search_result_people_item.xml
index a505e4a..a603941 100644
--- a/res/layout/search_result_people_item.xml
+++ b/res/layout/search_result_people_item.xml
@@ -22,8 +22,8 @@
<View
android:id="@+id/icon"
android:layout_marginRight="8dp"
- android:layout_width="@dimen/default_icon_bitmap_size"
- android:layout_height="@dimen/default_icon_bitmap_size" />
+ android:layout_width="@dimen/deep_shortcut_icon_size"
+ android:layout_height="@dimen/deep_shortcut_icon_size" />
<TextView
android:layout_width="0dp"
@@ -38,8 +38,8 @@
android:adjustViewBounds="true"
android:layout_margin="5dp"
android:background="?android:attr/selectableItemBackground"
- android:layout_width="@dimen/default_icon_bitmap_size"
- android:layout_height="@dimen/default_icon_bitmap_size" />
+ android:layout_width="@dimen/deep_shortcut_icon_size"
+ android:layout_height="@dimen/deep_shortcut_icon_size" />
<ImageButton
android:id="@+id/provider_1"
@@ -47,8 +47,8 @@
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:background="?android:attr/selectableItemBackground"
- android:layout_width="@dimen/default_icon_bitmap_size"
- android:layout_height="@dimen/default_icon_bitmap_size" />
+ android:layout_width="@dimen/deep_shortcut_icon_size"
+ android:layout_height="@dimen/deep_shortcut_icon_size" />
<ImageButton
android:id="@+id/provider_2"
@@ -56,7 +56,7 @@
android:scaleType="fitCenter"
android:adjustViewBounds="true"
android:background="?android:attr/selectableItemBackground"
- android:layout_width="@dimen/default_icon_bitmap_size"
- android:layout_height="@dimen/default_icon_bitmap_size" />
+ android:layout_width="@dimen/deep_shortcut_icon_size"
+ android:layout_height="@dimen/deep_shortcut_icon_size" />
</com.android.launcher3.views.SearchResultPeopleView>
\ No newline at end of file
diff --git a/src/com/android/launcher3/views/SearchResultPeopleView.java b/src/com/android/launcher3/views/SearchResultPeopleView.java
index 78e9841..6e45e88 100644
--- a/src/com/android/launcher3/views/SearchResultPeopleView.java
+++ b/src/com/android/launcher3/views/SearchResultPeopleView.java
@@ -18,6 +18,7 @@
import static android.content.Intent.URI_ALLOW_UNSAFE;
import static android.content.Intent.URI_ANDROID_APP_SCHEME;
+import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
import android.content.Context;
@@ -135,7 +136,7 @@
ApplicationInfo applicationInfo = mPackageManager.getApplicationInfo(
pkg, 0);
Drawable appIcon = applicationInfo.loadIcon(mPackageManager);
- button.setImageDrawable(appIcon);
+ MAIN_EXECUTOR.post(()-> button.setImageDrawable(appIcon));
} catch (PackageManager.NameNotFoundException ignored) {
}