summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chien-Yu Chen <cychen@google.com> 2016-01-11 10:56:21 -0800
committer Chien-Yu Chen <cychen@google.com> 2016-01-11 10:56:21 -0800
commit75cade0a5fd5ec432870de9977f81091ab389423 (patch)
treee2d6d89bbac2e913e3e895863084fac6510f1ee6
parent225257abec534ac25275c4101ae1633f062b04b5 (diff)
Add cameraserver process
Add UID and permissions for cameraserver process. Bug: 24511454 Change-Id: Iccbda4b42e5584a1f56f9afe5e15a16f40dd2922
-rw-r--r--core/java/android/os/Process.java6
-rw-r--r--data/etc/platform.xml10
-rw-r--r--services/core/java/com/android/server/AppOpsService.java3
3 files changed, 17 insertions, 2 deletions
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index eca2c3b0579d..1552a3c58344 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -150,6 +150,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
* to applications.
diff --git a/data/etc/platform.xml b/data/etc/platform.xml
index 999d47bea696..d412d7c5aa33 100644
--- a/data/etc/platform.xml
+++ b/data/etc/platform.xml
@@ -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
diff --git a/services/core/java/com/android/server/AppOpsService.java b/services/core/java/com/android/server/AppOpsService.java
index 353b40475e5b..de99d05dde73 100644
--- a/services/core/java/com/android/server/AppOpsService.java
+++ b/services/core/java/com/android/server/AppOpsService.java
@@ -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) {