Add the DynamicAndroid Service

Define the DynamicAndroid with AIDL.
  Add a java implementation.
  Start a service instance in the system server.
  Add a permission test.

Bug: 122015653
Test: Build & Test on a pixel phone with following command \
  ./frameworks/base/services/tests/runtests.py -e class com.android.server.DynamicAndroidTest

Merged-In: I2e54b6b71fac4a4c5a9c9c25ce6bdac74cddcfb7
Change-Id: I2e54b6b71fac4a4c5a9c9c25ce6bdac74cddcfb7
This commit is contained in:
Howard Chen
2019-01-07 14:10:44 +08:00
parent 8b194fe9d8
commit f17f42b0df
11 changed files with 492 additions and 0 deletions

View File

@@ -758,6 +758,7 @@ public final class SystemServer {
private void startOtherServices() {
final Context context = mSystemContext;
VibratorService vibrator = null;
DynamicAndroidService dynamicAndroid = null;
IStorageManager storageManager = null;
NetworkManagementService networkManagement = null;
IpSecService ipSecService = null;
@@ -867,6 +868,11 @@ public final class SystemServer {
ServiceManager.addService("vibrator", vibrator);
traceEnd();
traceBeginAndSlog("StartDynamicAndroidService");
dynamicAndroid = new DynamicAndroidService(context);
ServiceManager.addService("dynamic_android", dynamicAndroid);
traceEnd();
if (!isWatch) {
traceBeginAndSlog("StartConsumerIrService");
consumerIr = new ConsumerIrService(context);