Update Settings due to API changes.

bug:17390424

Change-Id: I25dfa40cc5109260d48dbe5f33274b162912d059
diff --git a/src/com/android/settings/DeviceAdminSettings.java b/src/com/android/settings/DeviceAdminSettings.java
index 1ea9859..a70984d 100644
--- a/src/com/android/settings/DeviceAdminSettings.java
+++ b/src/com/android/settings/DeviceAdminSettings.java
@@ -20,7 +20,6 @@
 import org.xmlpull.v1.XmlPullParserException;
 
 import android.app.Activity;
-import android.app.Dialog;
 import android.app.AlertDialog;
 import android.app.ListFragment;
 import android.app.admin.DeviceAdminInfo;
@@ -305,8 +304,8 @@
             final Activity activity = getActivity();
             ViewHolder vh = (ViewHolder) view.getTag();
             Drawable activityIcon = item.loadIcon(activity.getPackageManager());
-            Drawable badgedIcon = mUm.getBadgedDrawableForUser(activityIcon,
-                    new UserHandle(getUserId(item)));
+            Drawable badgedIcon = activity.getPackageManager().getUserBadgedDrawableForDensity(
+                    activityIcon, new UserHandle(getUserId(item)), null, 0);
             vh.icon.setImageDrawable(badgedIcon);
             vh.name.setText(item.loadLabel(activity.getPackageManager()));
             vh.checkbox.setChecked(isActiveAdmin(item));
diff --git a/src/com/android/settings/accounts/AuthenticatorHelper.java b/src/com/android/settings/accounts/AuthenticatorHelper.java
index 7ea2f12..c9c6ac4 100644
--- a/src/com/android/settings/accounts/AuthenticatorHelper.java
+++ b/src/com/android/settings/accounts/AuthenticatorHelper.java
@@ -104,8 +104,8 @@
                 AuthenticatorDescription desc = mTypeToAuthDescription.get(accountType);
                 Context authContext = context.createPackageContextAsUser(desc.packageName, 0,
                         mUserHandle);
-                icon = mUm.getBadgedDrawableForUser(
-                        authContext.getResources().getDrawable(desc.iconId), mUserHandle);
+                icon = mContext.getPackageManager().getUserBadgedDrawableForDensity(
+                        authContext.getResources().getDrawable(desc.iconId), mUserHandle, null, 0);
                 synchronized (mAccTypeIconCache) {
                     mAccTypeIconCache.put(accountType, icon);
                 }
diff --git a/src/com/android/settings/accounts/ChooseAccountActivity.java b/src/com/android/settings/accounts/ChooseAccountActivity.java
index 7c0dbdb..27edca1 100644
--- a/src/com/android/settings/accounts/ChooseAccountActivity.java
+++ b/src/com/android/settings/accounts/ChooseAccountActivity.java
@@ -18,7 +18,6 @@
 
 import android.accounts.AccountManager;
 import android.accounts.AuthenticatorDescription;
-import android.app.ActivityManagerNative;
 import android.content.ContentResolver;
 import android.content.Context;
 import android.content.Intent;
@@ -216,8 +215,8 @@
             try {
                 AuthenticatorDescription desc = mTypeToAuthDescription.get(accountType);
                 Context authContext = createPackageContextAsUser(desc.packageName, 0, mUserHandle);
-                icon = mUm.getBadgedDrawableForUser(
-                        authContext.getResources().getDrawable(desc.iconId), mUserHandle);
+                icon = getPackageManager().getUserBadgedDrawableForDensity(
+                        authContext.getResources().getDrawable(desc.iconId), mUserHandle, null, 0);
             } catch (PackageManager.NameNotFoundException e) {
                 // TODO: place holder icon for missing account icons?
                 Log.w(TAG, "No icon name for account type " + accountType);
diff --git a/src/com/android/settings/location/RecentLocationApps.java b/src/com/android/settings/location/RecentLocationApps.java
index e28f96b..6a40d66 100644
--- a/src/com/android/settings/location/RecentLocationApps.java
+++ b/src/com/android/settings/location/RecentLocationApps.java
@@ -212,7 +212,8 @@
 
             final UserHandle userHandle = new UserHandle(userId);
             Drawable appIcon = mPackageManager.getApplicationIcon(appInfo);
-            Drawable icon = um.getBadgedDrawableForUser(appIcon, userHandle);
+            Drawable icon = mPackageManager.getUserBadgedDrawableForDensity(appIcon, userHandle,
+                    null, 0);
             CharSequence appLabel = mPackageManager.getApplicationLabel(appInfo);
             CharSequence badgedAppLabel = um.getBadgedLabelForUser(appLabel.toString(), userHandle);
             preference = createRecentLocationEntry(icon,