OSDN Git Service

Add external services, a way to run isolated processes as a different package.
authorRobert Sesek <rsesek@google.com>
Wed, 9 Dec 2015 21:22:45 +0000 (16:22 -0500)
committerRobert Sesek <rsesek@google.com>
Tue, 12 Jan 2016 18:00:42 +0000 (13:00 -0500)
commitb9a8666eb5504f022343fef9087135b7d937ddf8
tree3240b9cadbca5fd02f37a0f4d07ba0b2bcd70996
parent6ec7ed2f96e5b88b7274320d2231a6057b804202
Add external services, a way to run isolated processes as a different package.

This adds android:externalService boolean attribute to <service>. If that
attribute is true, then bindService() may be called with
BIND_EXTERNAL_SERVICE to create the new service process under the calling
package's name and uid. The service will execute the code from the package in
which it is declared, but will appear to run as the calling application.

External services may only be used if android:exported="false" and
android:isolatedProcess="true".

Bug: 22084679
Bug: 21643067
Change-Id: I3c3a5f0ef58738316c5efeab9044e43e09220d01
core/java/android/content/Context.java
core/java/android/content/pm/PackageParser.java
core/java/android/content/pm/ServiceInfo.java
core/res/res/values/attrs_manifest.xml
core/res/res/values/public.xml
services/core/java/com/android/server/am/ActiveServices.java