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,6 +19,7 @@ import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.Icon;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.provider.Settings;
|
||||
@@ -58,8 +59,8 @@ public class AirplaneModeCondition extends Condition {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon() {
|
||||
return Icon.createWithResource(mManager.getContext(), R.drawable.ic_airplane);
|
||||
public Drawable getIcon() {
|
||||
return mManager.getContext().getDrawable(R.drawable.ic_airplane);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user