Loading packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -71,6 +71,7 @@ import com.android.systemui.qs.SideLabelTileLayout; import com.android.systemui.qs.logging.QSLogger; import com.android.systemui.qs.logging.QSLogger; import java.io.PrintWriter; import java.io.PrintWriter; import java.util.Objects; /** /** * Base quick-settings tile, extend this to create a new tile. * Base quick-settings tile, extend this to create a new tile. Loading Loading @@ -668,6 +669,18 @@ public abstract class QSTileImpl<TState extends State> implements QSTile, Lifecy public String toString() { public String toString() { return "DrawableIcon"; return "DrawableIcon"; } } @Override public boolean equals(@Nullable Object other) { // No need to compare equality of the mInvisibleDrawable as that's generated from // mDrawable's constant state. return other instanceof DrawableIcon && ((DrawableIcon) other).mDrawable == mDrawable; } @Override public int hashCode() { return Objects.hash(mDrawable); } } } public static class DrawableIconWithRes extends DrawableIcon { public static class DrawableIconWithRes extends DrawableIcon { Loading Loading
packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileImpl.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -71,6 +71,7 @@ import com.android.systemui.qs.SideLabelTileLayout; import com.android.systemui.qs.logging.QSLogger; import com.android.systemui.qs.logging.QSLogger; import java.io.PrintWriter; import java.io.PrintWriter; import java.util.Objects; /** /** * Base quick-settings tile, extend this to create a new tile. * Base quick-settings tile, extend this to create a new tile. Loading Loading @@ -668,6 +669,18 @@ public abstract class QSTileImpl<TState extends State> implements QSTile, Lifecy public String toString() { public String toString() { return "DrawableIcon"; return "DrawableIcon"; } } @Override public boolean equals(@Nullable Object other) { // No need to compare equality of the mInvisibleDrawable as that's generated from // mDrawable's constant state. return other instanceof DrawableIcon && ((DrawableIcon) other).mDrawable == mDrawable; } @Override public int hashCode() { return Objects.hash(mDrawable); } } } public static class DrawableIconWithRes extends DrawableIcon { public static class DrawableIconWithRes extends DrawableIcon { Loading