summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dianne Hackborn <hackbod@google.com> 2017-05-03 01:46:25 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2017-05-03 01:46:29 +0000
commit6ff7df502b0d584d3cc1c7adc99eb1c1719d6059 (patch)
tree70f1106bab80be24a536d12f6eb798b8ad0ec2da
parent40d0f8678347a40e750a8349e923a1dd2545c4e4 (diff)
parent157a3f9877b5df86c9ffb9b2be39f8718d416379 (diff)
Merge "More work on issue #36891897: Need to ensure foreground..." into oc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/ForegroundServicesDialog.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/ForegroundServicesDialog.java b/packages/SystemUI/src/com/android/systemui/ForegroundServicesDialog.java
index 086e5e52e037..49e780cfa9e6 100644
--- a/packages/SystemUI/src/com/android/systemui/ForegroundServicesDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/ForegroundServicesDialog.java
@@ -26,6 +26,7 @@ import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Settings;
+import android.util.IconDrawableFactory;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@@ -159,11 +160,13 @@ public final class ForegroundServicesDialog extends AlertActivity implements
static private class PackageItemAdapter extends ArrayAdapter<ApplicationInfo> {
final PackageManager mPm;
final LayoutInflater mInflater;
+ final IconDrawableFactory mIconDrawableFactory;
public PackageItemAdapter(Context context) {
super(context, R.layout.foreground_service_item);
mPm = context.getPackageManager();
mInflater = LayoutInflater.from(context);
+ mIconDrawableFactory = IconDrawableFactory.newInstance(context, true);
}
public void setPackages(String[] packages) {
@@ -193,7 +196,7 @@ public final class ForegroundServicesDialog extends AlertActivity implements
}
ImageView icon = view.findViewById(R.id.app_icon);
- icon.setImageDrawable(getItem(position).loadIcon(mPm));
+ icon.setImageDrawable(mIconDrawableFactory.getBadgedIcon(getItem(position)));
TextView label = view.findViewById(R.id.app_name);
label.setText(getItem(position).loadLabel(mPm));