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

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

Handle null identity address in BluetoothOppReceiver

Change functions to use a Util method to accommodate the behavior
correction where identity address can be null

Bug: 317120534
Bug: 295907764
Test: m com.android.btservices
Change-Id: I40349c52a171fd5250e669f189f94a1c78681531
parent c4e4b18e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothDevicePicker;
import android.bluetooth.BluetoothProfile;
import android.bluetooth.BluetoothProtoEnums;
import android.bluetooth.BluetoothUtils;
import android.content.BroadcastReceiver;
import android.content.ContentValues;
import android.content.Context;
@@ -79,7 +80,10 @@ public class BluetoothOppReceiver extends BroadcastReceiver {
            Log.d(
                    TAG,
                    "Received BT device selected intent, bt device: "
                            + remoteDevice.getIdentityAddress());
                            + BluetoothUtils.toAnonymizedAddress(
                                    Flags.identityAddressNullIfUnknown()
                                            ? Utils.getBrEdrAddress(remoteDevice)
                                            : remoteDevice.getIdentityAddress()));

            // Insert transfer session record to database
            mOppManager.startTransfer(remoteDevice);