[CDM Perm Sync] Fix a NPE for Perm Sync toggle am: 8c51d9c71d

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

Change-Id: I8cdf0fb8b740ffd32fac9c01aa0d4dfa51904b14
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/src/com/android/settings/bluetooth/BluetoothDetailsDataSyncController.java b/src/com/android/settings/bluetooth/BluetoothDetailsDataSyncController.java
index e74a0b4..0d74f3c 100644
--- a/src/com/android/settings/bluetooth/BluetoothDetailsDataSyncController.java
+++ b/src/com/android/settings/bluetooth/BluetoothDetailsDataSyncController.java
@@ -65,6 +65,7 @@
         mCompanionDeviceManager = context.getSystemService(CompanionDeviceManager.class);
 
         mCompanionDeviceManager.getAllAssociations().stream().filter(
+                a -> a.getDeviceMacAddress() != null).filter(
                 a -> Objects.equal(mCachedDevice.getAddress(),
                         a.getDeviceMacAddress().toString().toUpperCase())).max(
                 Comparator.comparingLong(AssociationInfo::getTimeApprovedMs)).ifPresent(