Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f600ab43 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of [19565636, 19600072, 19570391, 19675492] into tm-d1-release.

Change-Id: I05bfc498ef31b9de90e378bd9269fc51e55acbe7
parents 15898033 e1617c48
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -1598,7 +1598,13 @@ public class RemoteViews implements Parcelable, Filter {

        public BitmapCache(Parcel source) {
            mBitmaps = source.createTypedArrayList(Bitmap.CREATOR);
            mBitmapHashes = source.readSparseIntArray();
            mBitmapHashes = new SparseIntArray();
            for (int i = 0; i < mBitmaps.size(); i++) {
                Bitmap b = mBitmaps.get(i);
                if (b != null) {
                    mBitmapHashes.put(b.hashCode(), i);
                }
            }
        }

        public int getBitmapId(Bitmap b) {
@@ -1614,7 +1620,7 @@ public class RemoteViews implements Parcelable, Filter {
                        b = b.asShared();
                    }
                    mBitmaps.add(b);
                    mBitmapHashes.put(mBitmaps.size() - 1, hash);
                    mBitmapHashes.put(hash, mBitmaps.size() - 1);
                    mBitmapMemory = -1;
                    return (mBitmaps.size() - 1);
                }
@@ -1631,7 +1637,6 @@ public class RemoteViews implements Parcelable, Filter {

        public void writeBitmapsToParcel(Parcel dest, int flags) {
            dest.writeTypedList(mBitmaps, flags);
            dest.writeSparseIntArray(mBitmapHashes);
        }

        public int getBitmapMemory() {
+3 −0
Original line number Diff line number Diff line
@@ -2034,6 +2034,9 @@
         on grouped devices. -->
    <bool name="config_volumeAdjustmentForRemoteGroupSessions">true</bool>

    <!-- Flag indicating current media Output Switcher version. -->
    <integer name="config_mediaOutputSwitchDialogVersion">1</integer>

    <!-- Flag indicating that an outbound call must have a call capable phone account
         that has declared it can process the call's handle. -->
    <bool name="config_requireCallCapableAccountForHandle">false</bool>
+2 −0
Original line number Diff line number Diff line
@@ -4684,6 +4684,8 @@

  <java-symbol type="bool" name="config_volumeAdjustmentForRemoteGroupSessions" />

  <java-symbol type="integer" name="config_mediaOutputSwitchDialogVersion" />

  <!-- List of shared library packages that should be loaded by the classloader after the
       code and resources provided by applications. -->
  <java-symbol type="array" name="config_sharedLibrariesLoadedAfterApp" />
+1 −0
Original line number Diff line number Diff line
@@ -269,6 +269,7 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter {
        }

        private void onGroupActionTriggered(boolean isChecked, MediaDevice device) {
            disableSeekBar();
            if (isChecked && isDeviceIncluded(mController.getSelectableMediaDevice(), device)) {
                mController.addDeviceToPlayMedia(device);
            } else if (!isChecked && isDeviceIncluded(mController.getDeselectableMediaDevice(),
+8 −1
Original line number Diff line number Diff line
@@ -273,6 +273,8 @@ public abstract class MediaOutputBaseAdapter extends
        void initSeekbar(MediaDevice device, boolean isCurrentSeekbarInvisible) {
            if (!mController.isVolumeControlEnabled(device)) {
                disableSeekBar();
            } else {
                enableSeekBar();
            }
            mSeekBar.setMaxVolume(device.getMaxVolume());
            final int currentVolume = device.getCurrentVolume();
@@ -417,11 +419,16 @@ public abstract class MediaOutputBaseAdapter extends
            return drawable;
        }

        private void disableSeekBar() {
        protected void disableSeekBar() {
            mSeekBar.setEnabled(false);
            mSeekBar.setOnTouchListener((v, event) -> true);
        }

        private void enableSeekBar() {
            mSeekBar.setEnabled(true);
            mSeekBar.setOnTouchListener((v, event) -> false);
        }

        protected void setUpDeviceIcon(MediaDevice device) {
            ThreadUtils.postOnBackgroundThread(() -> {
                Icon icon = mController.getDeviceIconCompat(device).toIcon(mContext);
Loading