Search in sources :

Example 46 with WidgetItem

use of com.android.launcher3.model.WidgetItem in project android_packages_apps_Launcher3 by crdroidandroid.

the class CachingWidgetPreviewLoader method removeCacheResult.

private void removeCacheResult(@NonNull WidgetItem item, @NonNull Size previewSize) {
    ComponentKey key = toComponentKey(item);
    synchronized (mCache) {
        Map<Size, CacheResult> cacheResults = mCache.getOrDefault(key, new ArrayMap<>());
        cacheResults.remove(previewSize);
        mCache.put(key, cacheResults);
    }
}
Also used : Size(android.util.Size) ComponentKey(com.android.launcher3.util.ComponentKey)

Aggregations

WidgetItem (com.android.launcher3.model.WidgetItem)37 WidgetsListContentEntry (com.android.launcher3.widget.model.WidgetsListContentEntry)17 ArrayList (java.util.ArrayList)15 LauncherAppWidgetProviderInfo (com.android.launcher3.widget.LauncherAppWidgetProviderInfo)11 AppWidgetProviderInfo (android.appwidget.AppWidgetProviderInfo)10 ComponentName (android.content.ComponentName)9 Test (org.junit.Test)9 ShadowPackageManager (org.robolectric.shadows.ShadowPackageManager)9 PackageItemInfo (com.android.launcher3.model.data.PackageItemInfo)8 WidgetsListBaseEntry (com.android.launcher3.widget.model.WidgetsListBaseEntry)7 Size (android.util.Size)6 WidgetsListHeaderEntry (com.android.launcher3.widget.model.WidgetsListHeaderEntry)6 List (java.util.List)6 Collectors (java.util.stream.Collectors)5 TableRow (android.widget.TableRow)4 PackageUserKey (com.android.launcher3.util.PackageUserKey)4 PackageManager (android.content.pm.PackageManager)3 Nullable (androidx.annotation.Nullable)3 DeviceProfile (com.android.launcher3.DeviceProfile)3 InvariantDeviceProfile (com.android.launcher3.InvariantDeviceProfile)3