Merge "Switching to PersistableBundle in carrier config API." into mnc-dev

This commit is contained in:
Jonathan Basseri
2015-05-13 17:46:29 +00:00
committed by Android (Google) Code Review
6 changed files with 28 additions and 28 deletions

View File

@@ -28562,7 +28562,7 @@ package android.service.carrier {
public abstract class CarrierConfigService extends android.app.Service {
ctor public CarrierConfigService();
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";
}
@@ -30550,8 +30550,8 @@ package android.telecom {
package android.telephony {
public class CarrierConfigManager {
method public android.os.Bundle getConfig();
method public android.os.Bundle getConfigForSubId(int);
method public android.os.PersistableBundle getConfig();
method public android.os.PersistableBundle getConfigForSubId(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 BOOL_ADDITIONAL_CALL_SETTING = "bool_additional_call_setting";

View File

@@ -30587,7 +30587,7 @@ package android.service.carrier {
public abstract class CarrierConfigService extends android.app.Service {
ctor public CarrierConfigService();
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";
}
@@ -32727,9 +32727,9 @@ package android.telecom {
package android.telephony {
public class CarrierConfigManager {
method public android.os.Bundle getConfig();
method public android.os.Bundle getConfigForSubId(int);
method public static android.os.Bundle getDefaultConfig();
method public android.os.PersistableBundle getConfig();
method public android.os.PersistableBundle getConfigForSubId(int);
method public static android.os.PersistableBundle getDefaultConfig();
method public void reloadCarrierConfigForSubId(int);
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";

View File

@@ -16,8 +16,8 @@ package android.service.carrier;
import android.app.Service;
import android.content.Intent;
import android.os.Bundle;
import android.os.IBinder;
import android.os.PersistableBundle;
/**
* A service that sets carrier configuration for telephony services.
@@ -68,16 +68,16 @@ public abstract class CarrierConfigService extends Service {
* </p>
* <p>
* Implementations should use the keys defined in {@link android.telephony.CarrierConfigManager
* CarrierConfigManager}. Any configuration values not set in the returned {@link Bundle} may be
* overridden by the system's default configuration service.
* CarrierConfigManager}. Any configuration values not set in the returned {@link
* PersistableBundle} may be overridden by the system's default configuration service.
* </p>
*
* @param id contains details about the current carrier that can be used do decide what
* configuration values to return.
* @return a {@link Bundle} object containing the configuration or null if default values should
* be used.
* @return a {@link PersistableBundle} object containing the configuration or null if default
* values should be used.
*/
public abstract Bundle onLoadConfig(CarrierIdentifier id);
public abstract PersistableBundle onLoadConfig(CarrierIdentifier id);
/** @hide */
@Override
@@ -97,7 +97,7 @@ public abstract class CarrierConfigService extends Service {
private class ICarrierConfigServiceWrapper extends ICarrierConfigService.Stub {
@Override
public Bundle getCarrierConfig(CarrierIdentifier id) {
public PersistableBundle getCarrierConfig(CarrierIdentifier id) {
return CarrierConfigService.this.onLoadConfig(id);
}
}

View File

@@ -16,7 +16,7 @@
package android.service.carrier;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.service.carrier.CarrierIdentifier;
/**
@@ -28,5 +28,5 @@ import android.service.carrier.CarrierIdentifier;
interface ICarrierConfigService {
/** @see android.service.carrier.CarrierConfigService#onLoadConfig */
Bundle getCarrierConfig(in CarrierIdentifier id);
}
PersistableBundle getCarrierConfig(in CarrierIdentifier id);
}

View File

@@ -20,7 +20,7 @@ import com.android.internal.telephony.ICarrierConfigLoader;
import android.annotation.SystemApi;
import android.content.Context;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -232,10 +232,10 @@ public class CarrierConfigManager {
private final static String TAG = "CarrierConfigManager";
/** The default value for every variable. */
private final static Bundle sDefaults;
private final static PersistableBundle sDefaults;
static {
sDefaults = new Bundle();
sDefaults = new PersistableBundle();
sDefaults.putBoolean(BOOL_ADDITIONAL_CALL_SETTING, true);
sDefaults.putBoolean(BOOL_ALLOW_EMERGENCY_NUMBERS_IN_CALL_LOG, false);
sDefaults.putBoolean(BOOL_ALLOW_LOCAL_DTMF_TONES, true);
@@ -276,10 +276,10 @@ public class CarrierConfigManager {
* values.
*
* @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
* invalid subId.
* @return A {@link PersistableBundle} containing the config for the given subId, or default
* values for an invalid subId.
*/
public Bundle getConfigForSubId(int subId) {
public PersistableBundle getConfigForSubId(int subId) {
try {
return getICarrierConfigLoader().getConfigForSubId(subId);
} catch (RemoteException ex) {
@@ -297,7 +297,7 @@ public class CarrierConfigManager {
*
* @see #getConfigForSubId
*/
public Bundle getConfig() {
public PersistableBundle getConfig() {
return getConfigForSubId(SubscriptionManager.getDefaultSubId());
}
@@ -349,8 +349,8 @@ public class CarrierConfigManager {
* @hide
*/
@SystemApi
public static Bundle getDefaultConfig() {
return new Bundle(sDefaults);
public static PersistableBundle getDefaultConfig() {
return new PersistableBundle(sDefaults);
}
/** @hide */

View File

@@ -16,14 +16,14 @@
package com.android.internal.telephony;
import android.os.Bundle;
import android.os.PersistableBundle;
/**
* Interface used to interact with the CarrierConfigLoader
*/
interface ICarrierConfigLoader {
Bundle getConfigForSubId(int subId);
PersistableBundle getConfigForSubId(int subId);
void reloadCarrierConfigForSubId(int subId);