diff options
author | Victoria Lease <violets@google.com> | 2013-02-01 15:15:54 -0800 |
---|---|---|
committer | Victoria Lease <violets@google.com> | 2013-02-01 16:00:20 -0800 |
commit | 03cdd3d275499df3ef1059905899dcc5aaf2ab01 (patch) | |
tree | 92b7d65eb267d61d621696a431fa83277139e691 /packages/FusedLocation/AndroidManifest.xml | |
parent | f48a2d30c5d5f7c167310ff9ca1cd2310121be7c (diff) | |
download | frameworks_base-03cdd3d275499df3ef1059905899dcc5aaf2ab01.zip frameworks_base-03cdd3d275499df3ef1059905899dcc5aaf2ab01.tar.gz frameworks_base-03cdd3d275499df3ef1059905899dcc5aaf2ab01.tar.bz2 |
dual-mode switching single/multiuser ServiceWatcher
This changelist revises LocationManager's previous multiuser system.
Location provider services that are not multiuser-aware continue to
run as before: ServiceWatcher binds to location provider services as
the current active user. When the device switches from one user to
another, ServiceWatcher unbinds from the old user's location provider
service and binds to the new user's instance.
Now, location provider services that are multiuser-aware or
user-agnostic can declare "serviceIsMultiuser" metadata in their
AndroidManifest.xml to prevent ServiceWatcher from performing this
switching. These services will run as singleton services and will be
expected to handle user switches on their own.
With this feature in, I was able to switch FusedLocationProvider to
run in multiuser mode, sharing the system_server process instead of
running in its own process. The NetworkLocationProvider is unchanged,
still running in singleuser mode, cheerfully oblivious to the
possibility that there might be any user on the device besides the
one it services.
Bug: 8028045
Change-Id: I1a5bd032918419bab6edb46c62ff8c6811170654
Diffstat (limited to 'packages/FusedLocation/AndroidManifest.xml')
-rw-r--r-- | packages/FusedLocation/AndroidManifest.xml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/FusedLocation/AndroidManifest.xml b/packages/FusedLocation/AndroidManifest.xml index 779428e..6a4d4bf 100644 --- a/packages/FusedLocation/AndroidManifest.xml +++ b/packages/FusedLocation/AndroidManifest.xml @@ -18,14 +18,17 @@ --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.location.fused" - coreApp="true"> + coreApp="true" + android:sharedUserId="android.uid.system"> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.INSTALL_LOCATION_PROVIDER" /> + <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" /> <application - android:label="@string/app_label"> + android:label="@string/app_label" + android:process="system"> <uses-library android:name="com.android.location.provider" /> @@ -39,6 +42,7 @@ <action android:name="com.android.location.service.FusedLocationProvider" /> </intent-filter> <meta-data android:name="serviceVersion" android:value="0" /> + <meta-data android:name="serviceIsMultiuser" android:value="true" /> </service> </application> </manifest> |