Add Settings icons needed for theme overlaying.

- Refactor battery icons to remove private attributes to allow them to
be overlayed
- Add drawable icon in settings for back arrow
- Update a few GM2 icons

Bug: 128354921
Test: make; open Settings
Change-Id: I84151a4e7d787381b6c51f02bb45ce5f15fa37a2
This commit is contained in:
Amin Shaikh
2019-04-04 07:48:16 -04:00
parent 44427259e8
commit 7b7d6888a2
14 changed files with 79 additions and 116 deletions

View File

@@ -16,11 +16,14 @@
package com.android.settings.fuelgauge.batterytip.tips;
import android.annotation.Nullable;
import android.content.Context;
import android.content.res.ColorStateList;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.SparseIntArray;
import androidx.annotation.ColorInt;
import androidx.annotation.IdRes;
import androidx.annotation.IntDef;
import androidx.annotation.VisibleForTesting;
@@ -151,6 +154,15 @@ public abstract class BatteryTip implements Comparable<BatteryTip>, Parcelable {
preference.setTitle(getTitle(context));
preference.setSummary(getSummary(context));
preference.setIcon(getIconId());
ColorStateList tint = getIconTint();
if (tint != null) {
preference.getIcon().setTintList(tint);
}
}
/** Returns the {@link ColorStateList} for tinting {@link #getIconId()} or null if none. */
protected @Nullable ColorStateList getIconTint() {
return null;
}
public boolean shouldShowDialog() {