diff --git a/src/com/android/settings/accessibility/ShortcutServicePickerFragment.java b/src/com/android/settings/accessibility/ShortcutServicePickerFragment.java
index 07f4c37..f66a5e2 100644
--- a/src/com/android/settings/accessibility/ShortcutServicePickerFragment.java
+++ b/src/com/android/settings/accessibility/ShortcutServicePickerFragment.java
@@ -23,6 +23,7 @@
 import android.app.DialogFragment;
 import android.app.Fragment;
 import android.content.ComponentName;
+import android.content.Context;
 import android.content.DialogInterface;
 import android.os.Binder;
 import android.os.Bundle;
@@ -54,7 +55,8 @@
 
     @Override
     protected List<? extends DefaultAppInfo> getCandidates() {
-        final AccessibilityManager accessibilityManager = getContext()
+        final Context context = getContext();
+        final AccessibilityManager accessibilityManager = context
                 .getSystemService(AccessibilityManager.class);
         final List<AccessibilityServiceInfo> installedServices =
                 accessibilityManager.getInstalledAccessibilityServiceList();
@@ -63,7 +65,7 @@
         List<DefaultAppInfo> candidates = new ArrayList<>(numInstalledServices);
         for (int i = 0; i < numInstalledServices; i++) {
             AccessibilityServiceInfo installedServiceInfo = installedServices.get(i);
-            candidates.add(new DefaultAppInfo(mPm,
+            candidates.add(new DefaultAppInfo(context, mPm,
                     UserHandle.myUserId(),
                     installedServiceInfo.getComponentName(),
                     (String) installedServiceInfo.loadSummary(mPm.getPackageManager()),
diff --git a/src/com/android/settings/applications/assist/DefaultAssistPicker.java b/src/com/android/settings/applications/assist/DefaultAssistPicker.java
index 51cb677..07bc809 100644
--- a/src/com/android/settings/applications/assist/DefaultAssistPicker.java
+++ b/src/com/android/settings/applications/assist/DefaultAssistPicker.java
@@ -79,7 +79,7 @@
                 continue;
             }
             packages.add(packageName);
-            candidates.add(new DefaultAppInfo(mPm, mUserId, info.component));
+            candidates.add(new DefaultAppInfo(getContext(), mPm, mUserId, info.component));
         }
         return candidates;
     }
@@ -88,7 +88,7 @@
     protected String getDefaultKey() {
         final ComponentName cn = getCurrentAssist();
         if (cn != null) {
-            return new DefaultAppInfo(mPm, mUserId, cn).getKey();
+            return new DefaultAppInfo(getContext(), mPm, mUserId, cn).getKey();
         }
         return null;
     }
diff --git a/src/com/android/settings/applications/assist/DefaultAssistPreferenceController.java b/src/com/android/settings/applications/assist/DefaultAssistPreferenceController.java
index 7520155..cba08c8 100644
--- a/src/com/android/settings/applications/assist/DefaultAssistPreferenceController.java
+++ b/src/com/android/settings/applications/assist/DefaultAssistPreferenceController.java
@@ -87,7 +87,7 @@
         if (cn == null) {
             return null;
         }
-        return new DefaultAppInfo(mPackageManager, mUserId, cn);
+        return new DefaultAppInfo(mContext, mPackageManager, mUserId, cn);
     }
 
     @VisibleForTesting
diff --git a/src/com/android/settings/applications/assist/DefaultVoiceInputPicker.java b/src/com/android/settings/applications/assist/DefaultVoiceInputPicker.java
index c1fc528..5adda23 100644
--- a/src/com/android/settings/applications/assist/DefaultVoiceInputPicker.java
+++ b/src/com/android/settings/applications/assist/DefaultVoiceInputPicker.java
@@ -57,17 +57,18 @@
     @Override
     protected List<VoiceInputDefaultAppInfo> getCandidates() {
         final List<VoiceInputDefaultAppInfo> candidates = new ArrayList<>();
+        final Context context = getContext();
         boolean hasEnabled = true;
         for (VoiceInputHelper.InteractionInfo info : mHelper.mAvailableInteractionInfos) {
             final boolean enabled = TextUtils.equals(info.key, mAssistRestrict);
             hasEnabled |= enabled;
-            candidates.add(new VoiceInputDefaultAppInfo(mPm, mUserId, info, enabled));
+            candidates.add(new VoiceInputDefaultAppInfo(context, mPm, mUserId, info, enabled));
         }
 
         final boolean assistIsService = !hasEnabled;
         for (VoiceInputHelper.RecognizerInfo info : mHelper.mAvailableRecognizerInfos) {
             final boolean enabled = !assistIsService;
-            candidates.add(new VoiceInputDefaultAppInfo(mPm, mUserId, info, enabled));
+            candidates.add(new VoiceInputDefaultAppInfo(context, mPm, mUserId, info, enabled));
         }
         return candidates;
     }
@@ -132,9 +133,9 @@
 
         public VoiceInputHelper.BaseInfo mInfo;
 
-        public VoiceInputDefaultAppInfo(PackageManagerWrapper pm, int userId,
+        public VoiceInputDefaultAppInfo(Context context, PackageManagerWrapper pm, int userId,
                 VoiceInputHelper.BaseInfo info, boolean enabled) {
-            super(pm, userId, info.componentName, null /* summary */, enabled);
+            super(context, pm, userId, info.componentName, null /* summary */, enabled);
             mInfo = info;
         }
 
diff --git a/src/com/android/settings/applications/assist/DefaultVoiceInputPreferenceController.java b/src/com/android/settings/applications/assist/DefaultVoiceInputPreferenceController.java
index 3443a44..c305ccf 100644
--- a/src/com/android/settings/applications/assist/DefaultVoiceInputPreferenceController.java
+++ b/src/com/android/settings/applications/assist/DefaultVoiceInputPreferenceController.java
@@ -104,15 +104,15 @@
         }
         for (VoiceInputHelper.InteractionInfo info : mHelper.mAvailableInteractionInfos) {
             if (TextUtils.equals(defaultKey, info.key)) {
-                return new DefaultVoiceInputPicker.VoiceInputDefaultAppInfo(mPackageManager,
-                        mUserId, info, true /* enabled */);
+                return new DefaultVoiceInputPicker.VoiceInputDefaultAppInfo(mContext,
+                        mPackageManager, mUserId, info, true /* enabled */);
             }
         }
 
         for (VoiceInputHelper.RecognizerInfo info : mHelper.mAvailableRecognizerInfos) {
             if (TextUtils.equals(defaultKey, info.key)) {
-                return new DefaultVoiceInputPicker.VoiceInputDefaultAppInfo(mPackageManager,
-                        mUserId, info, true /* enabled */);
+                return new DefaultVoiceInputPicker.VoiceInputDefaultAppInfo(mContext,
+                        mPackageManager, mUserId, info, true /* enabled */);
             }
         }
         return null;
diff --git a/src/com/android/settings/applications/defaultapps/DefaultAppInfo.java b/src/com/android/settings/applications/defaultapps/DefaultAppInfo.java
index ec44af4..71b5ec4 100644
--- a/src/com/android/settings/applications/defaultapps/DefaultAppInfo.java
+++ b/src/com/android/settings/applications/defaultapps/DefaultAppInfo.java
@@ -18,6 +18,7 @@
 
 import android.app.AppGlobals;
 import android.content.ComponentName;
+import android.content.Context;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.ComponentInfo;
 import android.content.pm.PackageItemInfo;
@@ -25,6 +26,7 @@
 import android.graphics.drawable.Drawable;
 import android.os.RemoteException;
 import android.os.UserHandle;
+import android.util.IconDrawableFactory;
 
 import com.android.settings.widget.RadioButtonPickerFragment;
 import com.android.settingslib.wrapper.PackageManagerWrapper;
@@ -39,18 +41,20 @@
     public final PackageItemInfo packageItemInfo;
     public final String summary;
     protected final PackageManagerWrapper mPm;
+    private final Context mContext;
 
-    public DefaultAppInfo(PackageManagerWrapper pm, int uid, ComponentName cn) {
-        this(pm, uid, cn, null /* summary */);
+    public DefaultAppInfo(Context context, PackageManagerWrapper pm, int uid, ComponentName cn) {
+        this(context, pm, uid, cn, null /* summary */, true /* enabled */);
     }
 
-    public DefaultAppInfo(PackageManagerWrapper pm, int uid, ComponentName cn, String summary) {
-        this(pm, uid, cn, summary, true /* enabled */);
+    public DefaultAppInfo(Context context, PackageManagerWrapper pm, PackageItemInfo info) {
+        this(context, pm, info, null /* summary */, true /* enabled */);
     }
 
-    public DefaultAppInfo(PackageManagerWrapper pm, int uid, ComponentName cn, String summary,
-            boolean enabled) {
+    public DefaultAppInfo(Context context, PackageManagerWrapper pm, int uid, ComponentName cn,
+            String summary, boolean enabled) {
         super(enabled);
+        mContext = context;
         mPm = pm;
         packageItemInfo = null;
         userId = uid;
@@ -58,9 +62,10 @@
         this.summary = summary;
     }
 
-    public DefaultAppInfo(PackageManagerWrapper pm, PackageItemInfo info, String summary,
-            boolean enabled) {
+    public DefaultAppInfo(Context context, PackageManagerWrapper pm, PackageItemInfo info,
+            String summary, boolean enabled) {
         super(enabled);
+        mContext = context;
         mPm = pm;
         userId = UserHandle.myUserId();
         packageItemInfo = info;
@@ -68,10 +73,6 @@
         this.summary = summary;
     }
 
-    public DefaultAppInfo(PackageManagerWrapper pm, PackageItemInfo info) {
-        this(pm, info, null /* summary */, true /* enabled */);
-    }
-
     @Override
     public CharSequence loadLabel() {
         if (componentName != null) {
@@ -97,22 +98,29 @@
 
     @Override
     public Drawable loadIcon() {
+        final IconDrawableFactory factory = IconDrawableFactory.newInstance(mContext);
         if (componentName != null) {
             try {
                 final ComponentInfo componentInfo = getComponentInfo();
+                final ApplicationInfo appInfo = mPm.getApplicationInfoAsUser(
+                        componentName.getPackageName(), 0, userId);
                 if (componentInfo != null) {
-                    return componentInfo.loadIcon(mPm.getPackageManager());
+                    return factory.getBadgedIcon(componentInfo, appInfo, userId);
                 } else {
-                    final ApplicationInfo appInfo = mPm.getApplicationInfoAsUser(
-                            componentName.getPackageName(), 0, userId);
-                    return appInfo.loadIcon(mPm.getPackageManager());
+                    return factory.getBadgedIcon(appInfo);
                 }
             } catch (PackageManager.NameNotFoundException e) {
                 return null;
             }
         }
         if (packageItemInfo != null) {
-            return packageItemInfo.loadIcon(mPm.getPackageManager());
+            try {
+                final ApplicationInfo appInfo = mPm.getApplicationInfoAsUser(
+                        packageItemInfo.packageName, 0, userId);
+                return factory.getBadgedIcon(packageItemInfo, appInfo, userId);
+            } catch (PackageManager.NameNotFoundException e) {
+                return null;
+            }
         } else {
             return null;
         }
diff --git a/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java b/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java
index 34d1338..cc85f77 100644
--- a/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java
+++ b/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java
@@ -187,10 +187,11 @@
         final List<DefaultAppInfo> candidates = new ArrayList<>();
         final List<ResolveInfo> resolveInfos = mPm.getPackageManager()
                 .queryIntentServices(AUTOFILL_PROBE, PackageManager.GET_META_DATA);
+        final Context context = getContext();
         for (ResolveInfo info : resolveInfos) {
             final String permission = info.serviceInfo.permission;
             if (Manifest.permission.BIND_AUTOFILL_SERVICE.equals(permission)) {
-                candidates.add(new DefaultAppInfo(mPm, mUserId, new ComponentName(
+                candidates.add(new DefaultAppInfo(context, mPm, mUserId, new ComponentName(
                         info.serviceInfo.packageName, info.serviceInfo.name)));
             }
         }
diff --git a/src/com/android/settings/applications/defaultapps/DefaultAutofillPreferenceController.java b/src/com/android/settings/applications/defaultapps/DefaultAutofillPreferenceController.java
index 30aaf64..508cc63 100644
--- a/src/com/android/settings/applications/defaultapps/DefaultAutofillPreferenceController.java
+++ b/src/com/android/settings/applications/defaultapps/DefaultAutofillPreferenceController.java
@@ -62,7 +62,7 @@
         final String flattenComponent = Settings.Secure.getString(mContext.getContentResolver(),
                 DefaultAutofillPicker.SETTING);
         if (!TextUtils.isEmpty(flattenComponent)) {
-            DefaultAppInfo appInfo = new DefaultAppInfo(mPackageManager,
+            DefaultAppInfo appInfo = new DefaultAppInfo(mContext, mPackageManager,
                     mUserId, ComponentName.unflattenFromString(flattenComponent));
             return appInfo;
         }
diff --git a/src/com/android/settings/applications/defaultapps/DefaultBrowserPicker.java b/src/com/android/settings/applications/defaultapps/DefaultBrowserPicker.java
index e965052..fb9c3bf 100644
--- a/src/com/android/settings/applications/defaultapps/DefaultBrowserPicker.java
+++ b/src/com/android/settings/applications/defaultapps/DefaultBrowserPicker.java
@@ -16,6 +16,7 @@
 
 package com.android.settings.applications.defaultapps;
 
+import android.content.Context;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 
@@ -47,7 +48,7 @@
     @Override
     protected List<DefaultAppInfo> getCandidates() {
         final List<DefaultAppInfo> candidates = new ArrayList<>();
-
+        final Context context = getContext();
         // Resolve that intent and check that the handleAllWebDataURI boolean is set
         final List<ResolveInfo> list = mPm.queryIntentActivitiesAsUser(
                 DefaultBrowserPreferenceController.BROWSE_PROBE, PackageManager.MATCH_ALL, mUserId);
@@ -59,7 +60,7 @@
                 continue;
             }
             try {
-                candidates.add(new DefaultAppInfo(mPm,
+                candidates.add(new DefaultAppInfo(context, mPm,
                         mPm.getApplicationInfoAsUser(info.activityInfo.packageName, 0, mUserId)));
             } catch (PackageManager.NameNotFoundException e) {
                 // Skip unknown packages.
diff --git a/src/com/android/settings/applications/defaultapps/DefaultBrowserPreferenceController.java b/src/com/android/settings/applications/defaultapps/DefaultBrowserPreferenceController.java
index a0bf0ca..6d603c5 100644
--- a/src/com/android/settings/applications/defaultapps/DefaultBrowserPreferenceController.java
+++ b/src/com/android/settings/applications/defaultapps/DefaultBrowserPreferenceController.java
@@ -67,7 +67,7 @@
         try {
             final String packageName = mPackageManager.getDefaultBrowserPackageNameAsUser(mUserId);
             Log.d(TAG, "Get default browser package: " + packageName);
-            return new DefaultAppInfo(mPackageManager,
+            return new DefaultAppInfo(mContext, mPackageManager,
                     mPackageManager.getPackageManager().getApplicationInfo(packageName, 0));
         } catch (PackageManager.NameNotFoundException e) {
             return null;
diff --git a/src/com/android/settings/applications/defaultapps/DefaultEmergencyPicker.java b/src/com/android/settings/applications/defaultapps/DefaultEmergencyPicker.java
index 1d707df..8f8c64e 100644
--- a/src/com/android/settings/applications/defaultapps/DefaultEmergencyPicker.java
+++ b/src/com/android/settings/applications/defaultapps/DefaultEmergencyPicker.java
@@ -17,6 +17,7 @@
 package com.android.settings.applications.defaultapps;
 
 import android.content.ContentResolver;
+import android.content.Context;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
@@ -44,12 +45,13 @@
         final List<ResolveInfo> infos = mPm.getPackageManager().queryIntentActivities(
                 DefaultEmergencyPreferenceController.QUERY_INTENT, 0);
         PackageInfo bestMatch = null;
+        final Context context = getContext();
         for (ResolveInfo info : infos) {
             try {
                 final PackageInfo packageInfo =
                         mPm.getPackageManager().getPackageInfo(info.activityInfo.packageName, 0);
                 final ApplicationInfo appInfo = packageInfo.applicationInfo;
-                candidates.add(new DefaultAppInfo(mPm, appInfo));
+                candidates.add(new DefaultAppInfo(context, mPm, appInfo));
                 // Get earliest installed system app.
                 if (isSystemApp(appInfo) && (bestMatch == null ||
                         bestMatch.firstInstallTime > packageInfo.firstInstallTime)) {
diff --git a/src/com/android/settings/applications/defaultapps/DefaultHomePicker.java b/src/com/android/settings/applications/defaultapps/DefaultHomePicker.java
index dca7ad1..75f5292 100644
--- a/src/com/android/settings/applications/defaultapps/DefaultHomePicker.java
+++ b/src/com/android/settings/applications/defaultapps/DefaultHomePicker.java
@@ -53,6 +53,7 @@
         final boolean mustSupportManagedProfile = hasManagedProfile();
         final List<DefaultAppInfo> candidates = new ArrayList<>();
         final List<ResolveInfo> homeActivities = new ArrayList<>();
+        final Context context = getContext();
         mPm.getHomeActivities(homeActivities);
 
         for (ResolveInfo resolveInfo : homeActivities) {
@@ -71,7 +72,7 @@
                 summary = null;
             }
             final DefaultAppInfo candidate =
-                    new DefaultAppInfo(mPm, mUserId, activityName, summary, enabled);
+                    new DefaultAppInfo(context, mPm, mUserId, activityName, summary, enabled);
             candidates.add(candidate);
         }
         return candidates;
diff --git a/src/com/android/settings/applications/defaultapps/DefaultHomePreferenceController.java b/src/com/android/settings/applications/defaultapps/DefaultHomePreferenceController.java
index 1b229e8..bd8b5d1 100644
--- a/src/com/android/settings/applications/defaultapps/DefaultHomePreferenceController.java
+++ b/src/com/android/settings/applications/defaultapps/DefaultHomePreferenceController.java
@@ -61,11 +61,12 @@
         final ArrayList<ResolveInfo> homeActivities = new ArrayList<>();
         final ComponentName currentDefaultHome = mPackageManager.getHomeActivities(homeActivities);
         if (currentDefaultHome != null) {
-            return new DefaultAppInfo(mPackageManager, mUserId, currentDefaultHome);
+            return new DefaultAppInfo(mContext, mPackageManager, mUserId, currentDefaultHome);
         }
         final ActivityInfo onlyAppInfo = getOnlyAppInfo();
         if (onlyAppInfo != null) {
-            return new DefaultAppInfo(mPackageManager, mUserId, onlyAppInfo.getComponentName());
+            return new DefaultAppInfo(mContext, mPackageManager, mUserId,
+                    onlyAppInfo.getComponentName());
         }
         return null;
     }
diff --git a/src/com/android/settings/applications/defaultapps/DefaultPhonePicker.java b/src/com/android/settings/applications/defaultapps/DefaultPhonePicker.java
index fc643c8..9f6cc4d 100644
--- a/src/com/android/settings/applications/defaultapps/DefaultPhonePicker.java
+++ b/src/com/android/settings/applications/defaultapps/DefaultPhonePicker.java
@@ -48,9 +48,10 @@
         final List<DefaultAppInfo> candidates = new ArrayList<>();
         final List<String> dialerPackages =
                 DefaultDialerManager.getInstalledDialerApplications(getContext(), mUserId);
+        final Context context = getContext();
         for (String packageName : dialerPackages) {
             try {
-                candidates.add(new DefaultAppInfo(mPm,
+                candidates.add(new DefaultAppInfo(context, mPm,
                         mPm.getApplicationInfoAsUser(packageName, 0, mUserId)));
             } catch (PackageManager.NameNotFoundException e) {
                 // Skip unknown packages.
diff --git a/src/com/android/settings/applications/defaultapps/DefaultPhonePreferenceController.java b/src/com/android/settings/applications/defaultapps/DefaultPhonePreferenceController.java
index 712badb..92c9386 100644
--- a/src/com/android/settings/applications/defaultapps/DefaultPhonePreferenceController.java
+++ b/src/com/android/settings/applications/defaultapps/DefaultPhonePreferenceController.java
@@ -57,7 +57,7 @@
     @Override
     protected DefaultAppInfo getDefaultAppInfo() {
         try {
-            return new DefaultAppInfo(mPackageManager,
+            return new DefaultAppInfo(mContext, mPackageManager,
                     mPackageManager.getPackageManager().getApplicationInfo(
                             DefaultDialerManager.getDefaultDialerApplication(mContext, mUserId),
                             0));
diff --git a/src/com/android/settings/applications/defaultapps/DefaultSmsPicker.java b/src/com/android/settings/applications/defaultapps/DefaultSmsPicker.java
index 966cd43..57159b3 100644
--- a/src/com/android/settings/applications/defaultapps/DefaultSmsPicker.java
+++ b/src/com/android/settings/applications/defaultapps/DefaultSmsPicker.java
@@ -41,13 +41,14 @@
 
     @Override
     protected List<DefaultAppInfo> getCandidates() {
+        final Context context = getContext();
         final Collection<SmsApplication.SmsApplicationData> smsApplications =
-                SmsApplication.getApplicationCollection(getContext());
+                SmsApplication.getApplicationCollection(context);
         final List<DefaultAppInfo> candidates = new ArrayList<>(smsApplications.size());
 
         for (SmsApplication.SmsApplicationData smsApplicationData : smsApplications) {
             try {
-                candidates.add(new DefaultAppInfo(mPm,
+                candidates.add(new DefaultAppInfo(context, mPm,
                         mPm.getApplicationInfoAsUser(smsApplicationData.mPackageName, 0, mUserId)));
             } catch (PackageManager.NameNotFoundException e) {
                 // Skip unknown packages.
diff --git a/src/com/android/settings/applications/defaultapps/DefaultSmsPreferenceController.java b/src/com/android/settings/applications/defaultapps/DefaultSmsPreferenceController.java
index 63075b9..c3b7ac4 100644
--- a/src/com/android/settings/applications/defaultapps/DefaultSmsPreferenceController.java
+++ b/src/com/android/settings/applications/defaultapps/DefaultSmsPreferenceController.java
@@ -47,7 +47,7 @@
     protected DefaultAppInfo getDefaultAppInfo() {
         final ComponentName app = SmsApplication.getDefaultSmsApplication(mContext, true);
         if (app != null) {
-            return new DefaultAppInfo(mPackageManager, mUserId, app);
+            return new DefaultAppInfo(mContext, mPackageManager, mUserId, app);
         }
         return null;
     }
diff --git a/src/com/android/settings/development/WebViewAppPreferenceControllerV2.java b/src/com/android/settings/development/WebViewAppPreferenceControllerV2.java
index 87ddb81..d061281 100644
--- a/src/com/android/settings/development/WebViewAppPreferenceControllerV2.java
+++ b/src/com/android/settings/development/WebViewAppPreferenceControllerV2.java
@@ -85,7 +85,7 @@
     @VisibleForTesting
     DefaultAppInfo getDefaultAppInfo() {
         final PackageInfo currentPackage = mWebViewUpdateServiceWrapper.getCurrentWebViewPackage();
-        return new DefaultAppInfo(mPackageManager,
+        return new DefaultAppInfo(mContext, mPackageManager,
                 currentPackage == null ? null : currentPackage.applicationInfo);
     }
 
diff --git a/src/com/android/settings/webview/WebViewAppPicker.java b/src/com/android/settings/webview/WebViewAppPicker.java
index 362ca1f..536cd8b 100644
--- a/src/com/android/settings/webview/WebViewAppPicker.java
+++ b/src/com/android/settings/webview/WebViewAppPicker.java
@@ -60,12 +60,13 @@
     @Override
     protected List<DefaultAppInfo> getCandidates() {
         final List<DefaultAppInfo> packageInfoList = new ArrayList<DefaultAppInfo>();
-        List<ApplicationInfo> pkgs =
-                getWebViewUpdateServiceWrapper().getValidWebViewApplicationInfos(getContext());
+        final Context context = getContext();
+        final WebViewUpdateServiceWrapper webViewUpdateService = getWebViewUpdateServiceWrapper();
+        final List<ApplicationInfo> pkgs =
+                webViewUpdateService.getValidWebViewApplicationInfos(context);
         for (ApplicationInfo ai : pkgs) {
-            packageInfoList.add(createDefaultAppInfo(mPm, ai,
-                    getDisabledReason(getWebViewUpdateServiceWrapper(),
-                            getContext(), ai.packageName)));
+            packageInfoList.add(createDefaultAppInfo(context, mPm, ai,
+                    getDisabledReason(webViewUpdateService, context, ai.packageName)));
         }
         return packageInfoList;
     }
@@ -112,9 +113,9 @@
     }
 
     private static class WebViewAppInfo extends DefaultAppInfo {
-        public WebViewAppInfo(PackageManagerWrapper pm, PackageItemInfo packageItemInfo,
-                String summary, boolean enabled) {
-            super(pm, packageItemInfo, summary, enabled);
+        public WebViewAppInfo(Context context, PackageManagerWrapper pm,
+                PackageItemInfo packageItemInfo, String summary, boolean enabled) {
+            super(context, pm, packageItemInfo, summary, enabled);
         }
 
         @Override
@@ -131,9 +132,9 @@
 
 
     @VisibleForTesting
-    DefaultAppInfo createDefaultAppInfo(PackageManagerWrapper pm, PackageItemInfo packageItemInfo,
-            String disabledReason) {
-        return new WebViewAppInfo(pm, packageItemInfo, disabledReason,
+    DefaultAppInfo createDefaultAppInfo(Context context, PackageManagerWrapper pm,
+            PackageItemInfo packageItemInfo, String disabledReason) {
+        return new WebViewAppInfo(context, pm, packageItemInfo, disabledReason,
                 TextUtils.isEmpty(disabledReason) /* enabled */);
     }
 
diff --git a/src/com/android/settings/webview/WebViewAppPreferenceController.java b/src/com/android/settings/webview/WebViewAppPreferenceController.java
index 96db801..9410af7 100644
--- a/src/com/android/settings/webview/WebViewAppPreferenceController.java
+++ b/src/com/android/settings/webview/WebViewAppPreferenceController.java
@@ -46,7 +46,7 @@
     @Override
     public DefaultAppInfo getDefaultAppInfo() {
         PackageInfo currentPackage = mWebViewUpdateServiceWrapper.getCurrentWebViewPackage();
-        return new DefaultAppInfo(mPackageManager,
+        return new DefaultAppInfo(mContext, mPackageManager,
                 currentPackage == null ? null : currentPackage.applicationInfo);
     }
 
diff --git a/tests/robotests/src/com/android/settings/applications/defaultapps/DefaultAppInfoTest.java b/tests/robotests/src/com/android/settings/applications/defaultapps/DefaultAppInfoTest.java
index 0ae9615..d4cd6da 100644
--- a/tests/robotests/src/com/android/settings/applications/defaultapps/DefaultAppInfoTest.java
+++ b/tests/robotests/src/com/android/settings/applications/defaultapps/DefaultAppInfoTest.java
@@ -21,11 +21,13 @@
 import static org.mockito.Mockito.when;
 
 import android.content.ComponentName;
+import android.content.Context;
 import android.content.pm.PackageItemInfo;
 import android.content.pm.PackageManager;
+import android.graphics.drawable.Drawable;
 
-import com.android.settings.testutils.SettingsRobolectricTestRunner;
 import com.android.settings.TestConfig;
+import com.android.settings.testutils.SettingsRobolectricTestRunner;
 import com.android.settingslib.wrapper.PackageManagerWrapper;
 
 import org.junit.Before;
@@ -33,6 +35,7 @@
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
+import org.robolectric.RuntimeEnvironment;
 import org.robolectric.annotation.Config;
 
 @RunWith(SettingsRobolectricTestRunner.class)
@@ -48,31 +51,33 @@
     @Mock
     private PackageManagerWrapper mPackageManagerWrapper;
 
+    private Context mContext;
     private DefaultAppInfo mInfo;
 
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
+        mContext = RuntimeEnvironment.application;
         when(mPackageManagerWrapper.getPackageManager()).thenReturn(mPackageManager);
     }
 
     @Test
     public void initInfoWithActivityInfo_shouldLoadInfo() {
         mPackageItemInfo.packageName = "test";
-        mInfo = new DefaultAppInfo(mPackageManagerWrapper, mPackageItemInfo);
+        mInfo = new DefaultAppInfo(mContext, mPackageManagerWrapper, mPackageItemInfo);
         mInfo.loadLabel();
-        mInfo.loadIcon();
+        Drawable icon = mInfo.loadIcon();
 
         assertThat(mInfo.getKey()).isEqualTo(mPackageItemInfo.packageName);
+        assertThat(icon).isNotNull();
         verify(mPackageItemInfo).loadLabel(mPackageManager);
-        verify(mPackageItemInfo).loadIcon(mPackageManager);
     }
 
     @Test
     public void initInfoWithComponent_shouldLoadInfo() {
         when(mComponentName.getPackageName()).thenReturn("com.android.settings");
 
-        mInfo = new DefaultAppInfo(mPackageManagerWrapper, 0 /* uid */, mComponentName);
+        mInfo = new DefaultAppInfo(mContext, mPackageManagerWrapper, 0 /* uid */, mComponentName);
         mInfo.getKey();
 
         verify(mComponentName).flattenToString();
diff --git a/tests/robotests/src/com/android/settings/webview/WebViewAppPickerTest.java b/tests/robotests/src/com/android/settings/webview/WebViewAppPickerTest.java
index 73d001a..470b69c 100644
--- a/tests/robotests/src/com/android/settings/webview/WebViewAppPickerTest.java
+++ b/tests/robotests/src/com/android/settings/webview/WebViewAppPickerTest.java
@@ -16,38 +16,6 @@
 
 package com.android.settings.webview;
 
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageInfo;
-import android.content.pm.PackageItemInfo;
-import android.content.pm.PackageManager;
-import android.content.pm.UserInfo;
-import android.os.UserManager;
-
-import com.android.settings.testutils.SettingsRobolectricTestRunner;
-import com.android.settings.TestConfig;
-import com.android.settings.applications.defaultapps.DefaultAppInfo;
-import com.android.settings.core.instrumentation.MetricsFeatureProvider;
-import com.android.settings.testutils.FakeFeatureFactory;
-import com.android.settings.widget.RadioButtonPreference;
-import com.android.settings.wrapper.UserPackageWrapper;
-import com.android.settingslib.wrapper.PackageManagerWrapper;
-
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Answers;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.robolectric.RuntimeEnvironment;
-import org.robolectric.annotation.Config;
-import org.robolectric.util.ReflectionHelpers;
-
-import java.util.Arrays;
-
 import static android.provider.Settings.ACTION_WEBVIEW_SETTINGS;
 import static com.google.common.truth.Truth.assertThat;
 import static org.mockito.Matchers.any;
@@ -62,22 +30,47 @@
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageItemInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.UserInfo;
+import android.os.UserManager;
+
+import com.android.settings.TestConfig;
+import com.android.settings.applications.defaultapps.DefaultAppInfo;
+import com.android.settings.core.instrumentation.MetricsFeatureProvider;
+import com.android.settings.testutils.FakeFeatureFactory;
+import com.android.settings.testutils.SettingsRobolectricTestRunner;
+import com.android.settings.widget.RadioButtonPreference;
+import com.android.settings.wrapper.UserPackageWrapper;
+import com.android.settingslib.wrapper.PackageManagerWrapper;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Answers;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+import org.robolectric.util.ReflectionHelpers;
+
+import java.util.Arrays;
+
 @RunWith(SettingsRobolectricTestRunner.class)
 @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
 public class WebViewAppPickerTest {
     private Context mContext = RuntimeEnvironment.application;
 
-    private static UserInfo sFirstUser;
-    private static UserInfo sSecondUser;
+    private UserInfo mFirstUser;
+    private UserInfo mSecondUser;
 
     private final static String DEFAULT_PACKAGE_NAME = "DEFAULT_PACKAGE_NAME";
 
-    @BeforeClass
-    public static void beforeClass() {
-        sFirstUser = new UserInfo(0, "FIRST_USER", 0);
-        sSecondUser = new UserInfo(0, "SECOND_USER", 0);
-    }
-
     @Mock(answer = Answers.RETURNS_DEEP_STUBS)
     private Activity mActivity;
     @Mock
@@ -99,7 +92,8 @@
         MockitoAnnotations.initMocks(this);
         FakeFeatureFactory.setupForTest(mActivity);
         when(mActivity.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
-
+        mFirstUser = new UserInfo(0, "FIRST_USER", 0);
+        mSecondUser = new UserInfo(0, "SECOND_USER", 0);
         mPicker = new WebViewAppPicker();
         mPicker = spy(mPicker);
         doNothing().when(mPicker).updateCandidates();
@@ -174,7 +168,7 @@
     @Test
     public void testDisabledPackageShownAsDisabled() {
         String disabledReason = "disabled";
-        DefaultAppInfo webviewAppInfo = mPicker.createDefaultAppInfo(mPackageManager,
+        DefaultAppInfo webviewAppInfo = mPicker.createDefaultAppInfo(mActivity, mPackageManager,
                 createApplicationInfo(DEFAULT_PACKAGE_NAME), disabledReason);
 
         RadioButtonPreference mockPreference = mock(RadioButtonPreference.class);
@@ -189,7 +183,7 @@
     @Test
     public void testEnabledPackageShownAsEnabled() {
         String disabledReason = "";
-        DefaultAppInfo webviewAppInfo = mPicker.createDefaultAppInfo(mPackageManager,
+        DefaultAppInfo webviewAppInfo = mPicker.createDefaultAppInfo(mActivity, mPackageManager,
                 createApplicationInfo(DEFAULT_PACKAGE_NAME), disabledReason);
 
         RadioButtonPreference mockPreference = mock(RadioButtonPreference.class);
@@ -204,7 +198,7 @@
     @Test
     public void testDisabledPackageShowsDisabledReasonSummary() {
         String disabledReason = "disabled";
-        DefaultAppInfo webviewAppInfo = mPicker.createDefaultAppInfo(mPackageManager,
+        DefaultAppInfo webviewAppInfo = mPicker.createDefaultAppInfo(mActivity, mPackageManager,
                 createApplicationInfo(DEFAULT_PACKAGE_NAME), disabledReason);
 
         RadioButtonPreference mockPreference = mock(RadioButtonPreference.class);
@@ -220,7 +214,7 @@
     @Test
     public void testEnabledPackageShowsEmptySummary() {
         String disabledReason = null;
-        DefaultAppInfo webviewAppInfo = mPicker.createDefaultAppInfo(mPackageManager,
+        DefaultAppInfo webviewAppInfo = mPicker.createDefaultAppInfo(mActivity, mPackageManager,
                 createApplicationInfo(DEFAULT_PACKAGE_NAME), disabledReason);
 
         RadioButtonPreference mockPreference = mock(RadioButtonPreference.class);
@@ -268,14 +262,14 @@
         UserPackageWrapper packageForFirstUser = mock(UserPackageWrapper.class);
         when(packageForFirstUser.isEnabledPackage()).thenReturn(false);
         when(packageForFirstUser.isInstalledPackage()).thenReturn(true);
-        when(packageForFirstUser.getUserInfo()).thenReturn(sFirstUser);
+        when(packageForFirstUser.getUserInfo()).thenReturn(mFirstUser);
 
         WebViewUpdateServiceWrapper wvusWrapper = mock(WebViewUpdateServiceWrapper.class);
         when(wvusWrapper.getPackageInfosAllUsers(any(), eq(DEFAULT_PACKAGE_NAME)))
                 .thenReturn(Arrays.asList(packageForFirstUser));
 
         final String EXPECTED_DISABLED_REASON = String.format(
-                "(disabled for user %s)", sFirstUser.name);
+                "(disabled for user %s)", mFirstUser.name);
         assertThat(mPicker.getDisabledReason(wvusWrapper, mContext,
                 DEFAULT_PACKAGE_NAME)).isEqualTo(EXPECTED_DISABLED_REASON);
     }
@@ -285,14 +279,14 @@
         UserPackageWrapper packageForFirstUser = mock(UserPackageWrapper.class);
         when(packageForFirstUser.isEnabledPackage()).thenReturn(true);
         when(packageForFirstUser.isInstalledPackage()).thenReturn(false);
-        when(packageForFirstUser.getUserInfo()).thenReturn(sFirstUser);
+        when(packageForFirstUser.getUserInfo()).thenReturn(mFirstUser);
 
         WebViewUpdateServiceWrapper wvusWrapper = mock(WebViewUpdateServiceWrapper.class);
         when(wvusWrapper.getPackageInfosAllUsers(any(), eq(DEFAULT_PACKAGE_NAME)))
                 .thenReturn(Arrays.asList(packageForFirstUser));
 
         final String EXPECTED_DISABLED_REASON = String.format(
-                "(uninstalled for user %s)", sFirstUser.name);
+                "(uninstalled for user %s)", mFirstUser.name);
         assertThat(mPicker.getDisabledReason(wvusWrapper, mContext,
                 DEFAULT_PACKAGE_NAME)).isEqualTo(EXPECTED_DISABLED_REASON);
     }
@@ -302,19 +296,19 @@
         UserPackageWrapper packageForFirstUser = mock(UserPackageWrapper.class);
         when(packageForFirstUser.isEnabledPackage()).thenReturn(false);
         when(packageForFirstUser.isInstalledPackage()).thenReturn(true);
-        when(packageForFirstUser.getUserInfo()).thenReturn(sFirstUser);
+        when(packageForFirstUser.getUserInfo()).thenReturn(mFirstUser);
 
         UserPackageWrapper packageForSecondUser = mock(UserPackageWrapper.class);
         when(packageForSecondUser.isEnabledPackage()).thenReturn(true);
         when(packageForSecondUser.isInstalledPackage()).thenReturn(false);
-        when(packageForSecondUser.getUserInfo()).thenReturn(sSecondUser);
+        when(packageForSecondUser.getUserInfo()).thenReturn(mSecondUser);
 
         WebViewUpdateServiceWrapper wvusWrapper = mock(WebViewUpdateServiceWrapper.class);
         when(wvusWrapper.getPackageInfosAllUsers(any(), eq(DEFAULT_PACKAGE_NAME)))
                 .thenReturn(Arrays.asList(packageForFirstUser, packageForSecondUser));
 
         final String EXPECTED_DISABLED_REASON = String.format(
-                "(disabled for user %s)", sFirstUser.name);
+                "(disabled for user %s)", mFirstUser.name);
         assertThat(mPicker.getDisabledReason(
                 wvusWrapper, mContext, DEFAULT_PACKAGE_NAME)).isEqualTo(EXPECTED_DISABLED_REASON);
     }
@@ -328,19 +322,19 @@
         UserPackageWrapper packageForFirstUser = mock(UserPackageWrapper.class);
         when(packageForFirstUser.isEnabledPackage()).thenReturn(false);
         when(packageForFirstUser.isInstalledPackage()).thenReturn(false);
-        when(packageForFirstUser.getUserInfo()).thenReturn(sFirstUser);
+        when(packageForFirstUser.getUserInfo()).thenReturn(mFirstUser);
 
         UserPackageWrapper packageForSecondUser = mock(UserPackageWrapper.class);
         when(packageForSecondUser.isEnabledPackage()).thenReturn(true);
         when(packageForSecondUser.isInstalledPackage()).thenReturn(true);
-        when(packageForSecondUser.getUserInfo()).thenReturn(sSecondUser);
+        when(packageForSecondUser.getUserInfo()).thenReturn(mSecondUser);
 
         WebViewUpdateServiceWrapper wvusWrapper = mock(WebViewUpdateServiceWrapper.class);
         when(wvusWrapper.getPackageInfosAllUsers(any(), eq(DEFAULT_PACKAGE_NAME)))
                 .thenReturn(Arrays.asList(packageForFirstUser, packageForSecondUser));
 
         final String EXPECTED_DISABLED_REASON = String.format(
-                "(uninstalled for user %s)", sFirstUser.name);
+                "(uninstalled for user %s)", mFirstUser.name);
         assertThat(mPicker.getDisabledReason(wvusWrapper, mContext,
                 DEFAULT_PACKAGE_NAME)).isEqualTo(EXPECTED_DISABLED_REASON);
     }
@@ -354,7 +348,7 @@
         PackageItemInfo mockPackageItemInfo = mock(PackageItemInfo.class);
         mockPackageItemInfo.packageName = DEFAULT_PACKAGE_NAME;
         when(mockPackageItemInfo.loadLabel(any())).thenReturn("myPackage");
-        DefaultAppInfo webviewAppInfo = mPicker.createDefaultAppInfo(mPackageManager,
+        DefaultAppInfo webviewAppInfo = mPicker.createDefaultAppInfo(mActivity, mPackageManager,
                 mockPackageItemInfo, "" /* disabledReason */);
 
         PackageInfo packageInfo = new PackageInfo();
