Enforcing background thread when accessing iconCacheDb.

> Moving any icon cache access to background thread
> Updating Apps list to avoid loading icons for ignored apps

Bug: 21325319
Change-Id: Id72755100f1176ccfcc99249c5e02873cc249a13
This commit is contained in:
Sunny Goyal
2017-01-06 16:32:57 -08:00
parent 19ea5cc0c8
commit 1cc1c9ad83
10 changed files with 67 additions and 35 deletions

View File

@@ -30,6 +30,11 @@ public class CacheDataUpdatedTaskTest extends BaseModelUpdateTaskTestCase {
}
public void testCacheUpdate_update_apps() throws Exception {
// Clear all icons from apps list so that its easy to check what was updated
for (AppInfo info : allAppsList.data) {
info.iconBitmap = null;
}
executeTaskForTest(newTask(CacheDataUpdatedTask.OP_CACHE_UPDATE, "app1"));
// Verify that only the app icons of app1 (id 1 & 2) are updated. Custom shortcut (id 7)