diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java index 3d192e5c185f5..40ef6eb999db4 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java @@ -161,7 +161,7 @@ public class TileQueryHelper { addTile(spec, appLabel, state, false); continue; } - if (info.serviceInfo.icon == 0) { + if (info.serviceInfo.icon == 0 && info.serviceInfo.applicationInfo.icon == 0) { continue; } Drawable icon = info.serviceInfo.loadIcon(pm); diff --git a/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java b/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java index 46e7277e36d4e..d3f5d2667ebff 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/external/CustomTile.java @@ -84,11 +84,13 @@ public class CustomTile extends QSTile implements TileChangeListen PackageManager pm = mContext.getPackageManager(); ServiceInfo info = pm.getServiceInfo(mComponent, PackageManager.MATCH_ENCRYPTION_AWARE_AND_UNAWARE); + int icon = info.icon != 0 ? info.icon + : info.applicationInfo.icon; // Update the icon if its not set or is the default icon. boolean updateIcon = mTile.getIcon() == null || iconEquals(mTile.getIcon(), mDefaultIcon); - mDefaultIcon = info.icon != 0 ? android.graphics.drawable.Icon - .createWithResource(mComponent.getPackageName(), info.icon) : null; + mDefaultIcon = icon != 0 ? android.graphics.drawable.Icon + .createWithResource(mComponent.getPackageName(), icon) : null; if (updateIcon) { mTile.setIcon(mDefaultIcon); }