Remove sub-text from the lines of AP list in Wi-Fi Slice
- Remove sub-text from the lines of AP list - Add colors to the AP names to indicate the connection status of each AP Fixes: 120685004 Bug: 120786304 Test: make RunSettingsRoboTests -j Change-Id: I7b879248528a293d14d959994bb054275f0d69a1
This commit is contained in:
@@ -142,20 +142,6 @@ public class NotificationChannelSlice implements CustomSliceable {
|
||||
mNotificationBackend = new NotificationBackend();
|
||||
}
|
||||
|
||||
private static Bitmap drawableToBitmap(Drawable drawable) {
|
||||
if (drawable instanceof BitmapDrawable) {
|
||||
return ((BitmapDrawable) drawable).getBitmap();
|
||||
}
|
||||
|
||||
final Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(),
|
||||
drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
|
||||
final Canvas canvas = new Canvas(bitmap);
|
||||
drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
|
||||
drawable.draw(canvas);
|
||||
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Slice getSlice() {
|
||||
final ListBuilder listBuilder =
|
||||
@@ -257,7 +243,7 @@ public class NotificationChannelSlice implements CustomSliceable {
|
||||
return null;
|
||||
}
|
||||
|
||||
return IconCompat.createWithBitmap(drawableToBitmap(drawable));
|
||||
return IconCompat.createWithBitmap(Utils.drawableToBitmap(drawable));
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
Reference in New Issue
Block a user