Loading services/core/java/com/android/server/camera/CameraServiceProxy.java +6 −2 Original line number Diff line number Diff line Loading @@ -1020,6 +1020,10 @@ public class CameraServiceProxy extends SystemService } } private boolean isAutomotive() { return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE); } private Set<Integer> getEnabledUserHandles(int currentUserHandle) { int[] userProfiles = mUserManager.getEnabledProfileIds(currentUserHandle); Set<Integer> handles = new ArraySet<>(userProfiles.length); Loading @@ -1030,8 +1034,8 @@ public class CameraServiceProxy extends SystemService if (Flags.cameraHsumPermission()) { // If the device is running in headless system user mode then allow // User 0 to access camera. if (UserManager.isHeadlessSystemUserMode()) { // User 0 to access camera only for automotive form factor. if (UserManager.isHeadlessSystemUserMode() && isAutomotive()) { handles.add(UserHandle.USER_SYSTEM); } } Loading Loading
services/core/java/com/android/server/camera/CameraServiceProxy.java +6 −2 Original line number Diff line number Diff line Loading @@ -1020,6 +1020,10 @@ public class CameraServiceProxy extends SystemService } } private boolean isAutomotive() { return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE); } private Set<Integer> getEnabledUserHandles(int currentUserHandle) { int[] userProfiles = mUserManager.getEnabledProfileIds(currentUserHandle); Set<Integer> handles = new ArraySet<>(userProfiles.length); Loading @@ -1030,8 +1034,8 @@ public class CameraServiceProxy extends SystemService if (Flags.cameraHsumPermission()) { // If the device is running in headless system user mode then allow // User 0 to access camera. if (UserManager.isHeadlessSystemUserMode()) { // User 0 to access camera only for automotive form factor. if (UserManager.isHeadlessSystemUserMode() && isAutomotive()) { handles.add(UserHandle.USER_SYSTEM); } } Loading