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

Commit 47f579e8 authored by Vladimir Komsiyski's avatar Vladimir Komsiyski
Browse files

Fix a NPE when trying to get a camera access controller.

Bug: n/a
Test: presubmit
Flag: EXEMPT bugfix
Change-Id: I1df01d0b2e47dfc9d8ee749af5cd6e9c7dd2f876
parent 7713d255
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -272,7 +272,8 @@ public class VirtualDeviceManagerService extends SystemService {
        for (int i = 0; i < virtualDevicesSnapshot.size(); i++) {
            final CameraAccessController cameraAccessController =
                    virtualDevicesSnapshot.get(i).getCameraAccessController();
            if (cameraAccessController.getUserId() == userId) {
            if (cameraAccessController != null
                    && cameraAccessController.getUserId() == userId) {
                return cameraAccessController;
            }
        }        Context userContext = getContext().createContextAsUser(userHandle, 0);