Add cameraserver process
Add UID and permissions for cameraserver process. Bug: 24511454 Change-Id: Iccbda4b42e5584a1f56f9afe5e15a16f40dd2922
This commit is contained in:
@@ -149,6 +149,12 @@ public class Process {
|
||||
*/
|
||||
public static final int AUDIOSERVER_UID = 1041;
|
||||
|
||||
/**
|
||||
* Defines the UID/GID for the cameraserver process
|
||||
* @hide
|
||||
*/
|
||||
public static final int CAMERASERVER_UID = 1046;
|
||||
|
||||
/**
|
||||
* Defines the start of a range of UIDs (and GIDs), going from this
|
||||
* number to {@link #LAST_APPLICATION_UID} that are reserved for assigning
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -136,6 +136,12 @@
|
||||
<assign-permission name="android.permission.UPDATE_DEVICE_STATS" uid="audioserver" />
|
||||
<assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="audioserver" />
|
||||
|
||||
<assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="cameraserver" />
|
||||
<assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="cameraserver" />
|
||||
<assign-permission name="android.permission.WAKE_LOCK" uid="cameraserver" />
|
||||
<assign-permission name="android.permission.UPDATE_DEVICE_STATS" uid="cameraserver" />
|
||||
<assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="cameraserver" />
|
||||
|
||||
<assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="graphics" />
|
||||
|
||||
<!-- This is a list of all the libraries available for application
|
||||
|
||||
@@ -1179,6 +1179,9 @@ public class AppOpsService extends IAppOpsService.Stub {
|
||||
} else if ("audioserver".equals(packageName)) {
|
||||
pkgUid = Process.AUDIOSERVER_UID;
|
||||
isPrivileged = false;
|
||||
} else if ("cameraserver".equals(packageName)) {
|
||||
pkgUid = Process.CAMERASERVER_UID;
|
||||
isPrivileged = false;
|
||||
}
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
|
||||
Reference in New Issue
Block a user