diff options
author | Randall Rushing <randall.rushing@gmail.com> | 2016-04-05 11:24:26 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-04-24 08:18:41 -0700 |
commit | 9184afbf013ccc19fc4078726e734fec2cb50fa2 (patch) | |
tree | d1f7b541fd1a17fb9c4c6ffa67871dad86513634 | |
parent | 7f360061d172d54d1ab6cf7d2f1cf111ed41a421 (diff) | |
download | packages_apps_Settings-9184afbf013ccc19fc4078726e734fec2cb50fa2.zip packages_apps_Settings-9184afbf013ccc19fc4078726e734fec2cb50fa2.tar.gz packages_apps_Settings-9184afbf013ccc19fc4078726e734fec2cb50fa2.tar.bz2 |
Themes: Add tint mode so custom icons can show in power usage detail
adding to this original commit: http://review.cyanogenmod.org/#/c/136136/
Change-Id: Id38035d8eaa4c3bd004fe747a5df3899646e5cdc
Signed-off-by: Bryan Owens <djbryan3540@gmail.com>
-rw-r--r-- | src/com/android/settings/fuelgauge/PowerUsageDetail.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/settings/fuelgauge/PowerUsageDetail.java b/src/com/android/settings/fuelgauge/PowerUsageDetail.java index 26102c0..135b70e 100644 --- a/src/com/android/settings/fuelgauge/PowerUsageDetail.java +++ b/src/com/android/settings/fuelgauge/PowerUsageDetail.java @@ -29,6 +29,7 @@ import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.graphics.drawable.Drawable; +import android.graphics.PorterDuff; import android.net.Uri; import android.os.BatteryStats; import android.os.Bundle; @@ -479,7 +480,9 @@ public class PowerUsageDetail extends PowerUsageBase implements Button.OnClickLi if (appIcon == null) { appIcon = getActivity().getPackageManager().getDefaultActivityIcon(); } - + if (appIcon != null) { + appIcon.setTintMode(PorterDuff.Mode.SRC_ATOP); + } if (pkg == null && mPackages != null) { pkg = mPackages[0]; } |