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

Commit ecac0fe5 authored by Etienne Ruffieux's avatar Etienne Ruffieux Committed by Automerger Merge Worker
Browse files

Merge "BluetoothDevice#getUuids() returns null again when no Uuids" into...

Merge "BluetoothDevice#getUuids() returns null again when no Uuids" into tm-dev am: a55665d3 am: 1ac38629

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/18824509



Change-Id: I5fc026358aeb9331e71a7bc067151efccfcae118
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents c418d10d 1ac38629
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2691,7 +2691,7 @@ public class AdapterService extends Service {

            ParcelUuid[] parcels = service.getRemoteUuids(device);
            if (parcels == null) {
                parcels = new ParcelUuid[0];
                return null;
            }
            return Arrays.asList(parcels);
        }
+2 −3
Original line number Diff line number Diff line
@@ -53,7 +53,6 @@ import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.TimeoutException;
@@ -2228,8 +2227,8 @@ public final class BluetoothDevice implements Parcelable, Attributable {
                        new SynchronousResultReceiver();
                service.getRemoteUuids(this, mAttributionSource, recv);
                List<ParcelUuid> parcels = recv.awaitResultNoInterrupt(getSyncTimeout())
                        .getValue(new ArrayList<>());
                return parcels.toArray(new ParcelUuid[parcels.size()]);
                        .getValue(null);
                return parcels != null ? parcels.toArray(new ParcelUuid[parcels.size()]) : null;
            } catch (RemoteException | TimeoutException e) {
                Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable()));
            }