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

Commit ca89793f authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix a NPE when trying to get a camera access controller." into main

parents 4a5653fe 47f579e8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -271,7 +271,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);