diff options
| author | 2025-01-06 09:50:21 -0800 | |
|---|---|---|
| committer | 2025-01-06 09:50:21 -0800 | |
| commit | d29f423d654895f4cbfcfb87af30106249f9bb1c (patch) | |
| tree | b4b1d01ba1f63826423089475ab2b91449c7bd58 | |
| parent | 0a6de0a0d05391395ef104334d68db11e17208f6 (diff) | |
| parent | c335b5ba8a07c3eaf27266454c76b763ec866cf0 (diff) | |
Merge "[Output Switcher] Remove unnecessary calls that apply icon color tint." into main
3 files changed, 0 insertions, 21 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseAdapter.java b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseAdapter.java index af37eea102ca..1a2238cfbc9e 100644 --- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseAdapter.java +++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseAdapter.java @@ -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, diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaSwitchingController.java b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaSwitchingController.java index 1dbb31708fe1..15afd22a27d8 100644 --- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaSwitchingController.java +++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaSwitchingController.java @@ -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; @@ -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()); diff --git a/packages/SystemUI/tests/src/com/android/systemui/media/dialog/MediaSwitchingControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/media/dialog/MediaSwitchingControllerTest.java index 7ba797c03a0d..86063acbf2e1 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/media/dialog/MediaSwitchingControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/media/dialog/MediaSwitchingControllerTest.java @@ -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; @@ -1286,13 +1285,6 @@ public class MediaSwitchingControllerTest extends SysuiTestCase {      }      @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);          final MediaDevice selectedMediaDevice2 = mock(MediaDevice.class);  |