Fix failed tests since presubmit is ignored in ag/15802168 am: 27efa546cf
am: a168e2e0fc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15809054 Change-Id: I8396a058b78d2c37ebf223e26884860061a08b84
This commit is contained in:
@@ -113,7 +113,9 @@ public class BatteryDiffEntry {
|
||||
/** Gets the app icon {@link Drawable} for this entry. */
|
||||
public Drawable getAppIcon() {
|
||||
loadLabelAndIcon();
|
||||
return mAppIcon.getConstantState().newDrawable();
|
||||
return mAppIcon != null && mAppIcon.getConstantState() != null
|
||||
? mAppIcon.getConstantState().newDrawable()
|
||||
: null;
|
||||
}
|
||||
|
||||
/** Gets the app icon id for this entry. */
|
||||
|
Reference in New Issue
Block a user