summaryrefslogtreecommitdiffstats
path: root/core/java/android/service/carrier
diff options
context:
space:
mode:
authorZach Johnson <zachoverflow@google.com>2015-06-19 18:12:27 -0700
committerZach Johnson <zachoverflow@google.com>2015-06-23 14:31:13 -0700
commit08a244cee8ff946233b0719540573c36249dc505 (patch)
tree4d5d781816350dad32da79665e2484ec68a17085 /core/java/android/service/carrier
parentad5f292b037a61b9975b1b8d10a1b4202ac533cf (diff)
downloadframeworks_base-08a244cee8ff946233b0719540573c36249dc505.zip
frameworks_base-08a244cee8ff946233b0719540573c36249dc505.tar.gz
frameworks_base-08a244cee8ff946233b0719540573c36249dc505.tar.bz2
Update CarrierService long lived binding API
Should take a metadata approach instead of a separate intent. b/21080696 Change-Id: Ib6e2ec0d3258e419aa14ae9e598a8147505feb84
Diffstat (limited to 'core/java/android/service/carrier')
-rw-r--r--core/java/android/service/carrier/CarrierService.java20
1 files changed, 7 insertions, 13 deletions
diff --git a/core/java/android/service/carrier/CarrierService.java b/core/java/android/service/carrier/CarrierService.java
index 225e70d..455e1b2 100644
--- a/core/java/android/service/carrier/CarrierService.java
+++ b/core/java/android/service/carrier/CarrierService.java
@@ -29,8 +29,8 @@ import com.android.internal.telephony.ITelephonyRegistry;
* <p>
* To extend this class, you must declare the service in your manifest file to require the
* {@link android.Manifest.permission#BIND_CARRIER_SERVICES} permission and include an intent
- * filter with the {@link #CONFIG_SERVICE_INTERFACE} action if the service exposes carrier config
- * and the {@link #BIND_SERVICE_INTERFACE} action if the service should have a long-lived binding.
+ * filter with the {@link #CARRIER_SERVICE_INTERFACE}. If the service should have a long-lived
+ * binding, set android.service.carrier.LONG_LIVED_BINDING to true in the service's metadata.
* For example:
* </p>
*
@@ -39,16 +39,16 @@ import com.android.internal.telephony.ITelephonyRegistry;
* android:label="@string/service_name"
* android:permission="android.permission.BIND_CARRIER_SERVICES">
* <intent-filter>
- * <action android:name="android.service.carrier.ConfigService" />
- * <action android:name="android.service.carrier.BindService" />
+ * <action android:name="android.service.carrier.CarrierService" />
* </intent-filter>
+ * <meta-data android:name="android.service.carrier.LONG_LIVED_BINDING"
+ * android:value="true" />
* </service>
* }</pre>
*/
public abstract class CarrierService extends Service {
- public static final String CONFIG_SERVICE_INTERFACE = "android.service.carrier.ConfigService";
- public static final String BIND_SERVICE_INTERFACE = "android.service.carrier.BindService";
+ public static final String CARRIER_SERVICE_INTERFACE = "android.service.carrier.CarrierService";
private static ITelephonyRegistry sRegistry;
@@ -127,13 +127,7 @@ public abstract class CarrierService extends Service {
@Override
@CallSuper
public IBinder onBind(Intent intent) {
- switch (intent.getAction()) {
- case CONFIG_SERVICE_INTERFACE:
- case BIND_SERVICE_INTERFACE:
- return mStubWrapper;
- default:
- return null;
- }
+ return mStubWrapper;
}
/**