* commit 'b8b242de613dcd8f254274a142e719d24e7bc7cc': Update intents for CarrierService
This commit is contained in:
@@ -28620,7 +28620,8 @@ package android.service.carrier {
|
|||||||
ctor public CarrierService();
|
ctor public CarrierService();
|
||||||
method public final android.os.IBinder onBind(android.content.Intent);
|
method public final android.os.IBinder onBind(android.content.Intent);
|
||||||
method public abstract android.os.PersistableBundle onLoadConfig(android.service.carrier.CarrierIdentifier);
|
method public abstract android.os.PersistableBundle onLoadConfig(android.service.carrier.CarrierIdentifier);
|
||||||
field public static final java.lang.String SERVICE_INTERFACE = "android.service.carrier.CarrierService";
|
field public static final java.lang.String BIND_SERVICE_INTERFACE = "android.service.carrier.BindService";
|
||||||
|
field public static final java.lang.String CONFIG_SERVICE_INTERFACE = "android.service.carrier.ConfigService";
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class MessagePdu implements android.os.Parcelable {
|
public final class MessagePdu implements android.os.Parcelable {
|
||||||
|
|||||||
@@ -30646,7 +30646,8 @@ package android.service.carrier {
|
|||||||
ctor public CarrierService();
|
ctor public CarrierService();
|
||||||
method public final android.os.IBinder onBind(android.content.Intent);
|
method public final android.os.IBinder onBind(android.content.Intent);
|
||||||
method public abstract android.os.PersistableBundle onLoadConfig(android.service.carrier.CarrierIdentifier);
|
method public abstract android.os.PersistableBundle onLoadConfig(android.service.carrier.CarrierIdentifier);
|
||||||
field public static final java.lang.String SERVICE_INTERFACE = "android.service.carrier.CarrierService";
|
field public static final java.lang.String BIND_SERVICE_INTERFACE = "android.service.carrier.BindService";
|
||||||
|
field public static final java.lang.String CONFIG_SERVICE_INTERFACE = "android.service.carrier.ConfigService";
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class MessagePdu implements android.os.Parcelable {
|
public final class MessagePdu implements android.os.Parcelable {
|
||||||
|
|||||||
@@ -24,7 +24,9 @@ import android.os.PersistableBundle;
|
|||||||
* <p>
|
* <p>
|
||||||
* To extend this class, you must declare the service in your manifest file to require the
|
* 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
|
* {@link android.Manifest.permission#BIND_CARRIER_SERVICES} permission and include an intent
|
||||||
* filter with the {@link #SERVICE_INTERFACE} action. For example:
|
* 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.
|
||||||
|
* For example:
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <pre>{@code
|
* <pre>{@code
|
||||||
@@ -32,14 +34,16 @@ import android.os.PersistableBundle;
|
|||||||
* android:label="@string/service_name"
|
* android:label="@string/service_name"
|
||||||
* android:permission="android.permission.BIND_CARRIER_SERVICES">
|
* android:permission="android.permission.BIND_CARRIER_SERVICES">
|
||||||
* <intent-filter>
|
* <intent-filter>
|
||||||
* <action android:name="android.service.carrier.CarrierService" />
|
* <action android:name="android.service.carrier.ConfigService" />
|
||||||
|
* <action android:name="android.service.carrier.BindService" />
|
||||||
* </intent-filter>
|
* </intent-filter>
|
||||||
* </service>
|
* </service>
|
||||||
* }</pre>
|
* }</pre>
|
||||||
*/
|
*/
|
||||||
public abstract class CarrierService extends Service {
|
public abstract class CarrierService extends Service {
|
||||||
|
|
||||||
public static final String SERVICE_INTERFACE = "android.service.carrier.CarrierService";
|
public static final String CONFIG_SERVICE_INTERFACE = "android.service.carrier.ConfigService";
|
||||||
|
public static final String BIND_SERVICE_INTERFACE = "android.service.carrier.BindService";
|
||||||
|
|
||||||
private final ICarrierService.Stub mStubWrapper;
|
private final ICarrierService.Stub mStubWrapper;
|
||||||
|
|
||||||
@@ -82,7 +86,8 @@ public abstract class CarrierService extends Service {
|
|||||||
/** @hide */
|
/** @hide */
|
||||||
@Override
|
@Override
|
||||||
public final IBinder onBind(Intent intent) {
|
public final IBinder onBind(Intent intent) {
|
||||||
if (!SERVICE_INTERFACE.equals(intent.getAction())) {
|
if (!CONFIG_SERVICE_INTERFACE.equals(intent.getAction())
|
||||||
|
|| !BIND_SERVICE_INTERFACE.equals(intent.getAction())) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return mStubWrapper;
|
return mStubWrapper;
|
||||||
|
|||||||
Reference in New Issue
Block a user