From 1c3a291ffbd726c9c2166cd8fb4e3cf6bd2d4471 Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Fri, 14 Jul 2017 10:03:56 -0400 Subject: [PATCH] Remove automatic rule icons Test: code inspection Change-Id: I7e585f485d3ba9318bf533e07e9fa7f1e1874d51 Fixes: 63623747 --- .../notification/ZenModeSettings.java | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/src/com/android/settings/notification/ZenModeSettings.java b/src/com/android/settings/notification/ZenModeSettings.java index 854857ada45..a23eff97518 100644 --- a/src/com/android/settings/notification/ZenModeSettings.java +++ b/src/com/android/settings/notification/ZenModeSettings.java @@ -306,11 +306,8 @@ public class ZenModeSettings extends ZenModeSettingsBase { try { ApplicationInfo info = mPm.getApplicationInfo(rule.getOwner().getPackageName(), 0); - LoadIconTask task = new LoadIconTask(this); - task.execute(info); setSummary(computeRuleSummary(rule, isSystemRule, info.loadLabel(mPm))); } catch (PackageManager.NameNotFoundException e) { - setIcon(R.drawable.ic_label); appExists = false; return; } @@ -347,29 +344,6 @@ public class ZenModeSettings extends ZenModeSettingsBase { }; } - private class LoadIconTask extends AsyncTask { - private final WeakReference prefReference; - - public LoadIconTask(Preference pref) { - prefReference = new WeakReference<>(pref); - } - - @Override - protected Drawable doInBackground(ApplicationInfo... params) { - return params[0].loadIcon(mPm); - } - - @Override - protected void onPostExecute(Drawable icon) { - if (icon != null) { - final Preference pref = prefReference.get(); - if (pref != null) { - pref.setIcon(icon); - } - } - } - } - public static class SummaryBuilder { private Context mContext;