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:
@@ -20,7 +20,7 @@ import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.PersistableBundle;
|
||||
import android.provider.Settings;
|
||||
import android.provider.Settings.Global;
|
||||
@@ -81,8 +81,8 @@ public class DndCondition extends Condition {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon() {
|
||||
return Icon.createWithResource(mManager.getContext(), R.drawable.ic_zen);
|
||||
public Drawable getIcon() {
|
||||
return mManager.getContext().getDrawable(R.drawable.ic_zen);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user