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
diff --git a/services/java/com/android/server/location/LocationProviderProxy.java b/services/java/com/android/server/location/LocationProviderProxy.java
index cec77a8..7faf72c 100644
--- a/services/java/com/android/server/location/LocationProviderProxy.java
+++ b/services/java/com/android/server/location/LocationProviderProxy.java
@@ -54,9 +54,9 @@
     private WorkSource mWorksource = new WorkSource();
 
     public static LocationProviderProxy createAndBind(Context context, String name, String action,
-            List<String> initialPackageNames, Handler handler, int userId) {
+            List<String> initialPackageNames, Handler handler) {
         LocationProviderProxy proxy = new LocationProviderProxy(context, name, action,
-                initialPackageNames, handler, userId);
+                initialPackageNames, handler);
         if (proxy.bind()) {
             return proxy;
         } else {
@@ -65,11 +65,11 @@
     }
 
     private LocationProviderProxy(Context context, String name, String action,
-            List<String> initialPackageNames, Handler handler, int userId) {
+            List<String> initialPackageNames, Handler handler) {
         mContext = context;
         mName = name;
         mServiceWatcher = new ServiceWatcher(mContext, TAG, action, initialPackageNames,
-                mNewServiceWork, handler, userId);
+                mNewServiceWork, handler);
     }
 
     private boolean bind () {
@@ -211,11 +211,6 @@
     }
 
     @Override
-    public void switchUser(int userId) {
-        mServiceWatcher.switchUser(userId);
-    }
-
-    @Override
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         pw.append("REMOTE SERVICE");
         pw.append(" name=").append(mName);