Use custom drawable for Battery saver condition icon.
- Updated condition interface to use Drawable instead of Icon for icons. - Converted all conditions to return drawable instead of Icon. - Created a BatterySaverDrawable to draw a static battery saver icon. Change-Id: Ie964f3439009c7658603a8ff352a05e964a0a795 Fixes: 76168403 Test: robotests
This commit is contained in:
@@ -19,7 +19,7 @@ package com.android.settings.dashboard.conditional;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.UserInfo;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
|
||||
@@ -60,9 +60,8 @@ public class WorkModeCondition extends Condition {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon() {
|
||||
return Icon.createWithResource(mManager.getContext(),
|
||||
R.drawable.ic_signal_workmode_enable);
|
||||
public Drawable getIcon() {
|
||||
return mManager.getContext().getDrawable(R.drawable.ic_signal_workmode_enable);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user