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

Commit 69db8049 authored by Eugene Susla's avatar Eugene Susla Committed by Android (Google) Code Review
Browse files

Merge "Nullcheck device profile when re-granting on package change"

parents 2e0de3dc d170c5c7
Loading
Loading
Loading
Loading
+16 −14
Original line number Diff line number Diff line
@@ -872,6 +872,7 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
    }

    private void grantDeviceProfile(Association association) {
        if (association.getDeviceProfile() != null) {
            mRoleManager.addRoleHolderAsUser(
                    association.getDeviceProfile(),
                    association.getPackageName(),
@@ -887,6 +888,7 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
                        }
                    });
        }
    }

    void onDeviceDisconnected(String address) {
        mCurrentlyConnectedDevices.remove(address);