Merge "Switching to PersistableBundle in carrier config API." into mnc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
c69cd0bf75
@@ -28562,7 +28562,7 @@ package android.service.carrier {
|
|||||||
public abstract class CarrierConfigService extends android.app.Service {
|
public abstract class CarrierConfigService extends android.app.Service {
|
||||||
ctor public CarrierConfigService();
|
ctor public CarrierConfigService();
|
||||||
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.Bundle 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.CarrierConfigService";
|
field public static final java.lang.String SERVICE_INTERFACE = "android.service.carrier.CarrierConfigService";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30550,8 +30550,8 @@ package android.telecom {
|
|||||||
package android.telephony {
|
package android.telephony {
|
||||||
|
|
||||||
public class CarrierConfigManager {
|
public class CarrierConfigManager {
|
||||||
method public android.os.Bundle getConfig();
|
method public android.os.PersistableBundle getConfig();
|
||||||
method public android.os.Bundle getConfigForSubId(int);
|
method public android.os.PersistableBundle getConfigForSubId(int);
|
||||||
method public void reloadCarrierConfigForSubId(int);
|
method public void reloadCarrierConfigForSubId(int);
|
||||||
field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
|
field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
|
||||||
field public static final java.lang.String BOOL_ADDITIONAL_CALL_SETTING = "bool_additional_call_setting";
|
field public static final java.lang.String BOOL_ADDITIONAL_CALL_SETTING = "bool_additional_call_setting";
|
||||||
|
|||||||
@@ -30587,7 +30587,7 @@ package android.service.carrier {
|
|||||||
public abstract class CarrierConfigService extends android.app.Service {
|
public abstract class CarrierConfigService extends android.app.Service {
|
||||||
ctor public CarrierConfigService();
|
ctor public CarrierConfigService();
|
||||||
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.Bundle 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.CarrierConfigService";
|
field public static final java.lang.String SERVICE_INTERFACE = "android.service.carrier.CarrierConfigService";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32727,9 +32727,9 @@ package android.telecom {
|
|||||||
package android.telephony {
|
package android.telephony {
|
||||||
|
|
||||||
public class CarrierConfigManager {
|
public class CarrierConfigManager {
|
||||||
method public android.os.Bundle getConfig();
|
method public android.os.PersistableBundle getConfig();
|
||||||
method public android.os.Bundle getConfigForSubId(int);
|
method public android.os.PersistableBundle getConfigForSubId(int);
|
||||||
method public static android.os.Bundle getDefaultConfig();
|
method public static android.os.PersistableBundle getDefaultConfig();
|
||||||
method public void reloadCarrierConfigForSubId(int);
|
method public void reloadCarrierConfigForSubId(int);
|
||||||
method public void updateConfigForPhoneId(int, java.lang.String);
|
method public void updateConfigForPhoneId(int, java.lang.String);
|
||||||
field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
|
field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ package android.service.carrier;
|
|||||||
|
|
||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
|
import android.os.PersistableBundle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A service that sets carrier configuration for telephony services.
|
* A service that sets carrier configuration for telephony services.
|
||||||
@@ -68,16 +68,16 @@ public abstract class CarrierConfigService extends Service {
|
|||||||
* </p>
|
* </p>
|
||||||
* <p>
|
* <p>
|
||||||
* Implementations should use the keys defined in {@link android.telephony.CarrierConfigManager
|
* Implementations should use the keys defined in {@link android.telephony.CarrierConfigManager
|
||||||
* CarrierConfigManager}. Any configuration values not set in the returned {@link Bundle} may be
|
* CarrierConfigManager}. Any configuration values not set in the returned {@link
|
||||||
* overridden by the system's default configuration service.
|
* PersistableBundle} may be overridden by the system's default configuration service.
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param id contains details about the current carrier that can be used do decide what
|
* @param id contains details about the current carrier that can be used do decide what
|
||||||
* configuration values to return.
|
* configuration values to return.
|
||||||
* @return a {@link Bundle} object containing the configuration or null if default values should
|
* @return a {@link PersistableBundle} object containing the configuration or null if default
|
||||||
* be used.
|
* values should be used.
|
||||||
*/
|
*/
|
||||||
public abstract Bundle onLoadConfig(CarrierIdentifier id);
|
public abstract PersistableBundle onLoadConfig(CarrierIdentifier id);
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@Override
|
@Override
|
||||||
@@ -97,7 +97,7 @@ public abstract class CarrierConfigService extends Service {
|
|||||||
private class ICarrierConfigServiceWrapper extends ICarrierConfigService.Stub {
|
private class ICarrierConfigServiceWrapper extends ICarrierConfigService.Stub {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Bundle getCarrierConfig(CarrierIdentifier id) {
|
public PersistableBundle getCarrierConfig(CarrierIdentifier id) {
|
||||||
return CarrierConfigService.this.onLoadConfig(id);
|
return CarrierConfigService.this.onLoadConfig(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
package android.service.carrier;
|
package android.service.carrier;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.PersistableBundle;
|
||||||
import android.service.carrier.CarrierIdentifier;
|
import android.service.carrier.CarrierIdentifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,5 +28,5 @@ import android.service.carrier.CarrierIdentifier;
|
|||||||
interface ICarrierConfigService {
|
interface ICarrierConfigService {
|
||||||
|
|
||||||
/** @see android.service.carrier.CarrierConfigService#onLoadConfig */
|
/** @see android.service.carrier.CarrierConfigService#onLoadConfig */
|
||||||
Bundle getCarrierConfig(in CarrierIdentifier id);
|
PersistableBundle getCarrierConfig(in CarrierIdentifier id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import com.android.internal.telephony.ICarrierConfigLoader;
|
|||||||
|
|
||||||
import android.annotation.SystemApi;
|
import android.annotation.SystemApi;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.PersistableBundle;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.ServiceManager;
|
import android.os.ServiceManager;
|
||||||
|
|
||||||
@@ -232,10 +232,10 @@ public class CarrierConfigManager {
|
|||||||
private final static String TAG = "CarrierConfigManager";
|
private final static String TAG = "CarrierConfigManager";
|
||||||
|
|
||||||
/** The default value for every variable. */
|
/** The default value for every variable. */
|
||||||
private final static Bundle sDefaults;
|
private final static PersistableBundle sDefaults;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
sDefaults = new Bundle();
|
sDefaults = new PersistableBundle();
|
||||||
sDefaults.putBoolean(BOOL_ADDITIONAL_CALL_SETTING, true);
|
sDefaults.putBoolean(BOOL_ADDITIONAL_CALL_SETTING, true);
|
||||||
sDefaults.putBoolean(BOOL_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG, false);
|
sDefaults.putBoolean(BOOL_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG, false);
|
||||||
sDefaults.putBoolean(BOOL_ALLOW_LOCAL_DTMF_TONES, true);
|
sDefaults.putBoolean(BOOL_ALLOW_LOCAL_DTMF_TONES, true);
|
||||||
@@ -276,10 +276,10 @@ public class CarrierConfigManager {
|
|||||||
* values.
|
* values.
|
||||||
*
|
*
|
||||||
* @param subId the subscription ID, normally obtained from {@link SubscriptionManager}.
|
* @param subId the subscription ID, normally obtained from {@link SubscriptionManager}.
|
||||||
* @return A {@link Bundle} containing the config for the given subId, or default values for an
|
* @return A {@link PersistableBundle} containing the config for the given subId, or default
|
||||||
* invalid subId.
|
* values for an invalid subId.
|
||||||
*/
|
*/
|
||||||
public Bundle getConfigForSubId(int subId) {
|
public PersistableBundle getConfigForSubId(int subId) {
|
||||||
try {
|
try {
|
||||||
return getICarrierConfigLoader().getConfigForSubId(subId);
|
return getICarrierConfigLoader().getConfigForSubId(subId);
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
@@ -297,7 +297,7 @@ public class CarrierConfigManager {
|
|||||||
*
|
*
|
||||||
* @see #getConfigForSubId
|
* @see #getConfigForSubId
|
||||||
*/
|
*/
|
||||||
public Bundle getConfig() {
|
public PersistableBundle getConfig() {
|
||||||
return getConfigForSubId(SubscriptionManager.getDefaultSubId());
|
return getConfigForSubId(SubscriptionManager.getDefaultSubId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,8 +349,8 @@ public class CarrierConfigManager {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@SystemApi
|
@SystemApi
|
||||||
public static Bundle getDefaultConfig() {
|
public static PersistableBundle getDefaultConfig() {
|
||||||
return new Bundle(sDefaults);
|
return new PersistableBundle(sDefaults);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
|
|||||||
@@ -16,14 +16,14 @@
|
|||||||
|
|
||||||
package com.android.internal.telephony;
|
package com.android.internal.telephony;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.PersistableBundle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface used to interact with the CarrierConfigLoader
|
* Interface used to interact with the CarrierConfigLoader
|
||||||
*/
|
*/
|
||||||
interface ICarrierConfigLoader {
|
interface ICarrierConfigLoader {
|
||||||
|
|
||||||
Bundle getConfigForSubId(int subId);
|
PersistableBundle getConfigForSubId(int subId);
|
||||||
|
|
||||||
void reloadCarrierConfigForSubId(int subId);
|
void reloadCarrierConfigForSubId(int subId);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user