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

Commit ca197eed authored by Kihong Seong's avatar Kihong Seong
Browse files

Rename flag identity_address_null_if_unknown to make it a bug fix flag

Change the flag name and metadata to a bug fix flag and update all
usages.

Bug: 317120534
Bug: 295907764
Test: m com.android.btservices
Change-Id: Ia3dc40d934d5ec3a07129ac85a7d338098e068c0
parent edc5f95b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -113,7 +113,7 @@ public class BluetoothObexTransport implements ObexTransport {
            return null;
            return null;
        }
        }
        String identityAddress =
        String identityAddress =
                Flags.identityAddressNullIfUnknown()
                Flags.identityAddressNullIfNotKnown()
                        ? Utils.getBrEdrAddress(mSocket.getRemoteDevice())
                        ? Utils.getBrEdrAddress(mSocket.getRemoteDevice())
                        : mSocket.getRemoteDevice().getIdentityAddress();
                        : mSocket.getRemoteDevice().getIdentityAddress();
        return mSocket.getConnectionType() == BluetoothSocket.TYPE_RFCOMM
        return mSocket.getConnectionType() == BluetoothSocket.TYPE_RFCOMM
+1 −1
Original line number Original line Diff line number Diff line
@@ -169,7 +169,7 @@ public class A2dpNativeInterface {
        if (device == null) {
        if (device == null) {
            return Utils.getBytesFromAddress("00:00:00:00:00:00");
            return Utils.getBytesFromAddress("00:00:00:00:00:00");
        }
        }
        if (Flags.identityAddressNullIfUnknown()) {
        if (Flags.identityAddressNullIfNotKnown()) {
            return Utils.getByteBrEdrAddress(device);
            return Utils.getByteBrEdrAddress(device);
        } else {
        } else {
            return mAdapterService.getByteIdentityAddress(device);
            return mAdapterService.getByteIdentityAddress(device);
+1 −1
Original line number Original line Diff line number Diff line
@@ -81,7 +81,7 @@ public class A2dpSinkNativeInterface {
    }
    }


    private byte[] getByteAddress(BluetoothDevice device) {
    private byte[] getByteAddress(BluetoothDevice device) {
        if (Flags.identityAddressNullIfUnknown()) {
        if (Flags.identityAddressNullIfNotKnown()) {
            return Utils.getByteBrEdrAddress(device);
            return Utils.getByteBrEdrAddress(device);
        } else {
        } else {
            return mAdapterService.getByteIdentityAddress(device);
            return mAdapterService.getByteIdentityAddress(device);
+3 −3
Original line number Original line Diff line number Diff line
@@ -96,7 +96,7 @@ public class AvrcpNativeInterface {


    void setBipClientStatus(BluetoothDevice device, boolean connected) {
    void setBipClientStatus(BluetoothDevice device, boolean connected) {
        String identityAddress =
        String identityAddress =
                Flags.identityAddressNullIfUnknown()
                Flags.identityAddressNullIfNotKnown()
                        ? Utils.getBrEdrAddress(device)
                        ? Utils.getBrEdrAddress(device)
                        : mAdapterService.getIdentityAddress(device.getAddress());
                        : mAdapterService.getIdentityAddress(device.getAddress());
        setBipClientStatusNative(identityAddress, connected);
        setBipClientStatusNative(identityAddress, connected);
@@ -236,7 +236,7 @@ public class AvrcpNativeInterface {


    boolean disconnectDevice(BluetoothDevice device) {
    boolean disconnectDevice(BluetoothDevice device) {
        String identityAddress =
        String identityAddress =
                Flags.identityAddressNullIfUnknown()
                Flags.identityAddressNullIfNotKnown()
                        ? Utils.getBrEdrAddress(device)
                        ? Utils.getBrEdrAddress(device)
                        : mAdapterService.getIdentityAddress(device.getAddress());
                        : mAdapterService.getIdentityAddress(device.getAddress());
        d("disconnectDevice: identityAddress=" + identityAddress);
        d("disconnectDevice: identityAddress=" + identityAddress);
@@ -277,7 +277,7 @@ public class AvrcpNativeInterface {
    void sendVolumeChanged(BluetoothDevice device, int volume) {
    void sendVolumeChanged(BluetoothDevice device, int volume) {
        d("sendVolumeChanged: volume=" + volume);
        d("sendVolumeChanged: volume=" + volume);
        String identityAddress =
        String identityAddress =
                Flags.identityAddressNullIfUnknown()
                Flags.identityAddressNullIfNotKnown()
                        ? Utils.getBrEdrAddress(device)
                        ? Utils.getBrEdrAddress(device)
                        : mAdapterService.getIdentityAddress(device.getAddress());
                        : mAdapterService.getIdentityAddress(device.getAddress());
        sendVolumeChangedNative(identityAddress, volume);
        sendVolumeChangedNative(identityAddress, volume);
+3 −3
Original line number Original line Diff line number Diff line
@@ -617,7 +617,7 @@ class AdapterProperties {
    void cleanupPrevBondRecordsFor(BluetoothDevice device) {
    void cleanupPrevBondRecordsFor(BluetoothDevice device) {
        String address = device.getAddress();
        String address = device.getAddress();
        String identityAddress =
        String identityAddress =
                Flags.identityAddressNullIfUnknown()
                Flags.identityAddressNullIfNotKnown()
                        ? Utils.getBrEdrAddress(device, mService)
                        ? Utils.getBrEdrAddress(device, mService)
                        : mService.getIdentityAddress(address);
                        : mService.getIdentityAddress(address);
        int deviceType = mRemoteDevices.getDeviceProperties(device).getDeviceType();
        int deviceType = mRemoteDevices.getDeviceProperties(device).getDeviceType();
@@ -633,7 +633,7 @@ class AdapterProperties {
        for (BluetoothDevice existingDevice : mBondedDevices) {
        for (BluetoothDevice existingDevice : mBondedDevices) {
            String existingAddress = existingDevice.getAddress();
            String existingAddress = existingDevice.getAddress();
            String existingIdentityAddress =
            String existingIdentityAddress =
                    Flags.identityAddressNullIfUnknown()
                    Flags.identityAddressNullIfNotKnown()
                            ? Utils.getBrEdrAddress(existingDevice, mService)
                            ? Utils.getBrEdrAddress(existingDevice, mService)
                            : mService.getIdentityAddress(existingAddress);
                            : mService.getIdentityAddress(existingAddress);
            int existingDeviceType =
            int existingDeviceType =
@@ -1185,7 +1185,7 @@ class AdapterProperties {
        for (BluetoothDevice device : mBondedDevices) {
        for (BluetoothDevice device : mBondedDevices) {
            String address = device.getAddress();
            String address = device.getAddress();
            String brEdrAddress =
            String brEdrAddress =
                    Flags.identityAddressNullIfUnknown()
                    Flags.identityAddressNullIfNotKnown()
                            ? Utils.getBrEdrAddress(device)
                            ? Utils.getBrEdrAddress(device)
                            : mService.getIdentityAddress(address);
                            : mService.getIdentityAddress(address);
            if (brEdrAddress.equals(address)) {
            if (brEdrAddress.equals(address)) {
Loading