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

Commit c3d4b9ac authored by Hugh Chen's avatar Hugh Chen
Browse files

Fix cast volume control bar not work

Use hashcode as a requestCode id, since the
same requestCode will cause the intent be cached.

Bug: 163095633
Test: make -j42 RunSettingsRoboTests
Change-Id: I2c120f18e24a66aeff5565e952fa4064149ec540
Merged-In: I2c120f18e24a66aeff5565e952fa4064149ec540
(cherry picked from commit 7f3efd43)
parent f537a702
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -91,7 +91,6 @@ public class RemoteMediaSlice implements CustomSliceable {
                R.drawable.ic_volume_remote);
        // To create an empty icon to indent the row
        final IconCompat emptyIcon = createEmptyIcon();
        int requestCode = 0;
        for (RoutingSessionInfo info : infos) {
            final int maxVolume = info.getVolumeMax();
            if (maxVolume <= 0) {
@@ -104,7 +103,7 @@ public class RemoteMediaSlice implements CustomSliceable {
            listBuilder.addInputRange(new InputRangeBuilder()
                    .setTitleItem(icon, ListBuilder.ICON_IMAGE)
                    .setTitle(castVolume)
                    .setInputAction(getSliderInputAction(requestCode++, info.getId()))
                    .setInputAction(getSliderInputAction(info.getId().hashCode(), info.getId()))
                    .setPrimaryAction(getSoundSettingAction(castVolume, icon, info.getId()))
                    .setMax(maxVolume)
                    .setValue(info.getVolume()));