OSDN Git Service

Create unified BIND_CARRIER_SERVICES permission
authorZach Johnson <zachoverflow@google.com>
Wed, 13 May 2015 23:25:12 +0000 (16:25 -0700)
committerZach Johnson <zachoverflow@google.com>
Thu, 14 May 2015 22:10:39 +0000 (15:10 -0700)
Replace BIND_CARRIER_MESSAGING_SERVICE and
BIND_CARRIER_CONFIG_SERVICE since we don't really
need one permission for each carrier service type.

Deprecate BIND_CARRIER_MESSAGING_SERVICE since it
already shipped, but remove BIND_CARRIER_CONFIG_SERVICE
since it hasn't.

b/21165906

Change-Id: I716f3f1c98a228afcfee84cf4a48911f0736ce8c

api/current.txt
api/system-current.txt
core/java/android/service/carrier/CarrierConfigService.java
core/java/android/service/carrier/CarrierMessagingService.java
core/res/AndroidManifest.xml
core/res/res/values/strings.xml

index fbb6554..710dc93 100644 (file)
@@ -20,8 +20,8 @@ package android {
     field public static final java.lang.String BATTERY_STATS = "android.permission.BATTERY_STATS";
     field public static final java.lang.String BIND_ACCESSIBILITY_SERVICE = "android.permission.BIND_ACCESSIBILITY_SERVICE";
     field public static final java.lang.String BIND_APPWIDGET = "android.permission.BIND_APPWIDGET";
-    field public static final java.lang.String BIND_CARRIER_CONFIG_SERVICE = "android.permission.BIND_CARRIER_CONFIG_SERVICE";
-    field public static final java.lang.String BIND_CARRIER_MESSAGING_SERVICE = "android.permission.BIND_CARRIER_MESSAGING_SERVICE";
+    field public static final deprecated java.lang.String BIND_CARRIER_MESSAGING_SERVICE = "android.permission.BIND_CARRIER_MESSAGING_SERVICE";
+    field public static final java.lang.String BIND_CARRIER_SERVICES = "android.permission.BIND_CARRIER_SERVICES";
     field public static final java.lang.String BIND_CHOOSER_TARGET_SERVICE = "android.permission.BIND_CHOOSER_TARGET_SERVICE";
     field public static final java.lang.String BIND_DEVICE_ADMIN = "android.permission.BIND_DEVICE_ADMIN";
     field public static final java.lang.String BIND_DREAM_SERVICE = "android.permission.BIND_DREAM_SERVICE";
index 07fb2d7..2c4675d 100644 (file)
@@ -28,8 +28,8 @@ package android {
     field public static final java.lang.String BATTERY_STATS = "android.permission.BATTERY_STATS";
     field public static final java.lang.String BIND_ACCESSIBILITY_SERVICE = "android.permission.BIND_ACCESSIBILITY_SERVICE";
     field public static final java.lang.String BIND_APPWIDGET = "android.permission.BIND_APPWIDGET";
-    field public static final java.lang.String BIND_CARRIER_CONFIG_SERVICE = "android.permission.BIND_CARRIER_CONFIG_SERVICE";
-    field public static final java.lang.String BIND_CARRIER_MESSAGING_SERVICE = "android.permission.BIND_CARRIER_MESSAGING_SERVICE";
+    field public static final deprecated java.lang.String BIND_CARRIER_MESSAGING_SERVICE = "android.permission.BIND_CARRIER_MESSAGING_SERVICE";
+    field public static final java.lang.String BIND_CARRIER_SERVICES = "android.permission.BIND_CARRIER_SERVICES";
     field public static final java.lang.String BIND_CHOOSER_TARGET_SERVICE = "android.permission.BIND_CHOOSER_TARGET_SERVICE";
     field public static final java.lang.String BIND_CONDITION_PROVIDER_SERVICE = "android.permission.BIND_CONDITION_PROVIDER_SERVICE";
     field public static final deprecated java.lang.String BIND_CONNECTION_SERVICE = "android.permission.BIND_CONNECTION_SERVICE";
index bc42b6b..bf33ad5 100644 (file)
@@ -23,14 +23,14 @@ import android.os.PersistableBundle;
  * A service that sets carrier configuration for telephony services.
  * <p>
  * To extend this class, you must declare the service in your manifest file to require the
- * {@link android.Manifest.permission#BIND_CARRIER_CONFIG_SERVICE} permission and include an intent
+ * {@link android.Manifest.permission#BIND_CARRIER_SERVICES} permission and include an intent
  * filter with the {@link #SERVICE_INTERFACE} action. For example:
  * </p>
  *
  * <pre>{@code
  * <service android:name=".MyCarrierConfigService"
  *       android:label="@string/service_name"
- *       android:permission="android.permission.BIND_CARRIER_CONFIG_SERVICE">
+ *       android:permission="android.permission.BIND_CARRIER_SERVICES">
  *  <intent-filter>
  *      <action android:name="android.service.carrier.CarrierConfigService" />
  *  </intent-filter>
index d7bf10c..f5396a3 100644 (file)
@@ -31,12 +31,12 @@ import java.util.List;
  * A service that receives calls from the system when new SMS and MMS are
  * sent or received.
  * <p>To extend this class, you must declare the service in your manifest file with
- * the {@link android.Manifest.permission#BIND_CARRIER_MESSAGING_SERVICE} permission
+ * the {@link android.Manifest.permission#BIND_CARRIER_SERVICES} permission
  * and include an intent filter with the {@link #SERVICE_INTERFACE} action. For example:</p>
  * <pre>
  * &lt;service android:name=".MyMessagingService"
  *          android:label="&#64;string/service_name"
- *          android:permission="android.permission.BIND_CARRIER_MESSAGING_SERVICE">
+ *          android:permission="android.permission.BIND_CARRIER_SERVICES">
  *     &lt;intent-filter>
  *         &lt;action android:name="android.service.carrier.CarrierMessagingService" />
  *     &lt;/intent-filter>
index 4c034b3..79532e4 100644 (file)
     <permission android:name="android.permission.REMOVE_DRM_CERTIFICATES"
         android:protectionLevel="signature|system" />
 
-    <!-- Must be required by a {@link android.service.carrier.CarrierMessagingService}.
-         Any service that filters for this intent must be a carrier privileged app. -->
+    <!-- @deprecated Use {@link android.Manifest.permission#BIND_CARRIER_SERVICES} instead -->
     <permission android:name="android.permission.BIND_CARRIER_MESSAGING_SERVICE"
         android:protectionLevel="signature|system" />
 
                 android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
                 android:protectionLevel="signature" />
 
-    <!-- The system process that pulls carrier configuration from carrier apps will
-         have this permission. Carrier apps that provide
-         {@link android.service.carrier.CarrierConfigService} should require this
-         permission for clients binding to their service. -->
-    <permission android:name="android.permission.BIND_CARRIER_CONFIG_SERVICE"
-        android:label="@string/permlab_bindCarrierConfigService"
-        android:description="@string/permdesc_bindCarrierConfigService"
+    <!-- The system process that is allowed to bind to services in carrier apps will
+         have this permission. Carrier apps should use this permission to protect
+         their services that only the system is allowed to bind to. -->
+    <permission android:name="android.permission.BIND_CARRIER_SERVICES"
+        android:label="@string/permlab_bindCarrierServices"
+        android:description="@string/permdesc_bindCarrierServices"
         android:protectionLevel="signature|system" />
 
     <!-- Allows an application to query whether DO_NOT_ASK_CREDENTIALS_ON_BOOT
index 1c0122d..0e6b2df 100644 (file)
     <string name="permdesc_bindCarrierMessagingService">Allows the holder to bind to the top-level interface of a carrier messaging service. Should never be needed for normal apps.</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_bindCarrierConfigService">bind to a carrier config service</string>
+    <string name="permlab_bindCarrierServices">bind to carrier services</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_bindCarrierConfigService">Allows the holder to bind to a carrier config service. Should never be needed for normal apps.</string>
+    <string name="permdesc_bindCarrierServices">Allows the holder to bind to carrier services. Should never be needed for normal apps.</string>
 
     <!-- Policy administration -->