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

Commit bf4a7956 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Display "pair new" only when local output device is available." into...

Merge "Display "pair new" only when local output device is available." into rvc-qpr-dev am: eacabd56

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12493712

Change-Id: I1ef85337bfd34f3a78e1d1191d9fd6307d2f6f14
parents 2dfac98e eacabd56
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -106,10 +106,15 @@ public class MediaOutputSlice implements CustomSliceable {
            final MediaDevice connectedDevice = worker.getCurrentConnectedMediaDevice();
            if (devices.size() == 1) {
                // Zero state
                for (MediaDevice device : devices) {
                final MediaDevice device = devices.iterator().next();
                addRow(device, device, listBuilder);
                }
                // Add "pair new" only when local output device exists
                final int type = device.getDeviceType();
                if (type == MediaDevice.MediaDeviceType.TYPE_PHONE_DEVICE
                        || type == MediaDevice.MediaDeviceType.TYPE_3POINT5_MM_AUDIO_DEVICE
                        || type == MediaDevice.MediaDeviceType.TYPE_USB_C_AUDIO_DEVICE) {
                    listBuilder.addRow(getPairNewRow());
                }
            } else {
                final boolean isTouched = worker.getIsTouched();
                // Fix the last top device when user press device to transfer.