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

Commit dc2e0e22 authored by Guojing Yuan's avatar Guojing Yuan
Browse files

[CDM] Catch IllegalArgumentException when association is not found

Fix: 338005013

Test: manual
Change-Id: Ib83b85602cb44f7d82dcbf8966a8e3f842e8ceec
parent 4e139f09
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -120,8 +120,12 @@ public class BluetoothDetailsDataSyncController extends BluetoothDetailsControll

        boolean visible = false;
        boolean checked = false;
        PermissionSyncRequest request = mCompanionDeviceManager.getPermissionSyncRequest(
                mAssociationId);
        PermissionSyncRequest request = null;
        try {
            request = mCompanionDeviceManager.getPermissionSyncRequest(mAssociationId);
        } catch (IllegalArgumentException e) {
            // no-op, keep request null.
        }
        if (request != null) {
            visible = true;
            if (request.isUserConsented()) {