Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 527ecccc authored by Svetoslav's avatar Svetoslav Committed by Android (Google) Code Review
Browse files

Merge "Update Settings due to API changes." into lmp-dev

parents f7cdbc3a 39f82a7c
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import org.xmlpull.v1.XmlPullParser;
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 @@ public class DeviceAdminSettings extends ListFragment {
            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));
+2 −2
Original line number Diff line number Diff line
@@ -104,8 +104,8 @@ final public class AuthenticatorHelper extends BroadcastReceiver {
                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);
                }
+2 −3
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.settings.accounts;

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 @@ public class ChooseAccountActivity extends PreferenceActivity {
            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);
+2 −1
Original line number Diff line number Diff line
@@ -212,7 +212,8 @@ public class RecentLocationApps {

            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,