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

Commit 3e4e4c4f authored by Madhava Srinivasan's avatar Madhava Srinivasan Committed by android-build-merger
Browse files

Merge "Restricting AndroidTV Remote Service UUIDs' access" am: 553c489a

am: b43feb89

Change-Id: Iff0c19a5e8837b91ea67f16f990bb7250dcc6e9e
parents ce0b70ec b43feb89
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -105,6 +105,9 @@ public class GattService extends ProfileService {
            UUID.fromString("00002A4D-0000-1000-8000-00805F9B34FB")
    };

    private static final UUID ANDROID_TV_REMOTE_SERVICE_UUID =
            UUID.fromString("AB5E0001-5A21-4F05-BC7D-AF01F617B664");

    private static final UUID[] FIDO_UUIDS = {
            UUID.fromString("0000FFFD-0000-1000-8000-00805F9B34FB") // U2F
    };
@@ -2969,7 +2972,7 @@ public class GattService extends ProfileService {
    }

    private boolean isRestrictedSrvcUuid(final UUID srvcUuid) {
        return isFidoUUID(srvcUuid);
        return isFidoUUID(srvcUuid) || isAndroidTvRemoteSrvcUUID(srvcUuid);
    }

    private boolean isHidUuid(final UUID uuid) {
@@ -2981,6 +2984,10 @@ public class GattService extends ProfileService {
        return false;
    }

    private boolean isAndroidTvRemoteSrvcUUID(final UUID uuid) {
        return ANDROID_TV_REMOTE_SERVICE_UUID.equals(uuid);
    }

    private boolean isFidoUUID(final UUID uuid) {
        for (UUID fidoUuid : FIDO_UUIDS) {
            if (fidoUuid.equals(uuid)) {