Loading packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseAdapter.java +0 −2 Original line number Diff line number Diff line Loading @@ -234,8 +234,6 @@ public abstract class MediaOutputBaseAdapter extends (ViewGroup.MarginLayoutParams) mItemLayout.getLayoutParams(); params.rightMargin = showEndTouchArea ? mController.getItemMarginEndSelectable() : mController.getItemMarginEndDefault(); mTitleIcon.setBackgroundTintList( ColorStateList.valueOf(mController.getColorItemContent())); } void setTwoLineLayout(MediaDevice device, boolean bFocused, boolean showSeekBar, Loading packages/SystemUI/src/com/android/systemui/media/dialog/MediaSwitchingController.java +0 −11 Original line number Diff line number Diff line Loading @@ -37,9 +37,6 @@ import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.graphics.Bitmap; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.Icon; import android.media.AudioManager; Loading Loading @@ -535,17 +532,9 @@ public class MediaSwitchingController // Use default Bluetooth device icon to handle getIcon() is null case. drawable = mContext.getDrawable(com.android.internal.R.drawable.ic_bt_headphones_a2dp); } if (!(drawable instanceof BitmapDrawable)) { setColorFilter(drawable, isActiveItem(device)); } return BluetoothUtils.createIconWithDrawable(drawable); } void setColorFilter(Drawable drawable, boolean isActive) { drawable.setColorFilter(new PorterDuffColorFilter(mColorItemContent, PorterDuff.Mode.SRC_IN)); } boolean isActiveItem(MediaDevice device) { boolean isConnected = mLocalMediaManager.getCurrentConnectedDevice().getId().equals( device.getId()); Loading packages/SystemUI/tests/src/com/android/systemui/media/dialog/MediaSwitchingControllerTest.java +0 −8 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.graphics.PorterDuffColorFilter; import android.graphics.drawable.Drawable; import android.graphics.drawable.Icon; import android.media.AudioDeviceAttributes; Loading Loading @@ -1285,13 +1284,6 @@ public class MediaSwitchingControllerTest extends SysuiTestCase { .isInstanceOf(IconCompat.class); } @Test public void setColorFilter_setColorFilterToDrawable() { mMediaSwitchingController.setColorFilter(mDrawable, true); verify(mDrawable).setColorFilter(any(PorterDuffColorFilter.class)); } @Test public void resetGroupMediaDevices_clearGroupDevices() { final MediaDevice selectedMediaDevice1 = mock(MediaDevice.class); Loading Loading
packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseAdapter.java +0 −2 Original line number Diff line number Diff line Loading @@ -234,8 +234,6 @@ public abstract class MediaOutputBaseAdapter extends (ViewGroup.MarginLayoutParams) mItemLayout.getLayoutParams(); params.rightMargin = showEndTouchArea ? mController.getItemMarginEndSelectable() : mController.getItemMarginEndDefault(); mTitleIcon.setBackgroundTintList( ColorStateList.valueOf(mController.getColorItemContent())); } void setTwoLineLayout(MediaDevice device, boolean bFocused, boolean showSeekBar, Loading
packages/SystemUI/src/com/android/systemui/media/dialog/MediaSwitchingController.java +0 −11 Original line number Diff line number Diff line Loading @@ -37,9 +37,6 @@ import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.graphics.Bitmap; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.Icon; import android.media.AudioManager; Loading Loading @@ -535,17 +532,9 @@ public class MediaSwitchingController // Use default Bluetooth device icon to handle getIcon() is null case. drawable = mContext.getDrawable(com.android.internal.R.drawable.ic_bt_headphones_a2dp); } if (!(drawable instanceof BitmapDrawable)) { setColorFilter(drawable, isActiveItem(device)); } return BluetoothUtils.createIconWithDrawable(drawable); } void setColorFilter(Drawable drawable, boolean isActive) { drawable.setColorFilter(new PorterDuffColorFilter(mColorItemContent, PorterDuff.Mode.SRC_IN)); } boolean isActiveItem(MediaDevice device) { boolean isConnected = mLocalMediaManager.getCurrentConnectedDevice().getId().equals( device.getId()); Loading
packages/SystemUI/tests/src/com/android/systemui/media/dialog/MediaSwitchingControllerTest.java +0 −8 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.graphics.PorterDuffColorFilter; import android.graphics.drawable.Drawable; import android.graphics.drawable.Icon; import android.media.AudioDeviceAttributes; Loading Loading @@ -1285,13 +1284,6 @@ public class MediaSwitchingControllerTest extends SysuiTestCase { .isInstanceOf(IconCompat.class); } @Test public void setColorFilter_setColorFilterToDrawable() { mMediaSwitchingController.setColorFilter(mDrawable, true); verify(mDrawable).setColorFilter(any(PorterDuffColorFilter.class)); } @Test public void resetGroupMediaDevices_clearGroupDevices() { final MediaDevice selectedMediaDevice1 = mock(MediaDevice.class); Loading