location: Add support for location providers outside of the system process.

Also added new permissions android.permission.INSTALL_LOCATION_PROVIDER
and android.permission.INSTALL_LOCATION_COLLECTOR to the public API.

Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index caa1318..aa8fd74 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -214,6 +214,18 @@
         android:label="@string/permlab_accessLocationExtraCommands"
         android:description="@string/permdesc_accessLocationExtraCommands" />
 
+    <!-- Allows an application to install a location provider into the Location Manager -->
+    <permission android:name="android.permission.INSTALL_LOCATION_PROVIDER"
+        android:protectionLevel="signatureOrSystem"
+        android:label="@string/permlab_installLocationProvider"
+        android:description="@string/permdesc_installLocationProvider" />
+
+    <!-- Allows an application to install a location collector into the Location Manager -->
+    <permission android:name="android.permission.INSTALL_LOCATION_COLLECTOR"
+        android:protectionLevel="signatureOrSystem"
+        android:label="@string/permlab_installLocationCollector"
+        android:description="@string/permdesc_installLocationCollector" />
+
     <!-- ======================================= -->
     <!-- Permissions for accessing networks -->
     <!-- ======================================= -->
@@ -921,7 +933,7 @@
     <permission android:name="android.permission.CONTROL_LOCATION_UPDATES"
         android:label="@string/permlab_locationUpdates"
         android:description="@string/permdesc_locationUpdates"
-        android:protectionLevel="signature" />
+        android:protectionLevel="signatureOrSystem" />
 
     <!-- Allows read/write access to the "properties" table in the checkin
          database, to change values that get uploaded. -->
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index c35676c..6e2da4b 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -753,6 +753,19 @@
         or other location sources.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permlab_installLocationProvider">permission to install a location provider</string>
+    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permdesc_installLocationProvider">Create mock location sources for testing.
+        Malicious applications can use this to override the location and/or status returned by real
+        location sources such as GPS or Network providers.</string>
+
+    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permlab_installLocationCollector">permission to install a location collector</string>
+    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permdesc_installLocationCollector">Create mock location sources for testing.
+        Malicious applications can use this to monitor and report your location to an external source.</string>
+
+    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_accessFineLocation">fine (GPS) location</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permdesc_accessFineLocation">Access fine location sources such as the