Merge "DO NOT MERGE Revert "Convert ICarrierService to oneway."" into oc-mr1-dev
am: 7bd96d32a1
Change-Id: I0566980aa480c50fa785465b08a40ba40d6c7520
This commit is contained in:
@@ -17,13 +17,10 @@ package android.service.carrier;
|
|||||||
import android.annotation.CallSuper;
|
import android.annotation.CallSuper;
|
||||||
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;
|
import android.os.PersistableBundle;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.os.ResultReceiver;
|
|
||||||
import android.os.ServiceManager;
|
import android.os.ServiceManager;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import com.android.internal.telephony.ITelephonyRegistry;
|
import com.android.internal.telephony.ITelephonyRegistry;
|
||||||
|
|
||||||
@@ -51,8 +48,6 @@ import com.android.internal.telephony.ITelephonyRegistry;
|
|||||||
*/
|
*/
|
||||||
public abstract class CarrierService extends Service {
|
public abstract class CarrierService extends Service {
|
||||||
|
|
||||||
private static final String LOG_TAG = "CarrierService";
|
|
||||||
|
|
||||||
public static final String CARRIER_SERVICE_INTERFACE = "android.service.carrier.CarrierService";
|
public static final String CARRIER_SERVICE_INTERFACE = "android.service.carrier.CarrierService";
|
||||||
|
|
||||||
private static ITelephonyRegistry sRegistry;
|
private static ITelephonyRegistry sRegistry;
|
||||||
@@ -138,26 +133,11 @@ public abstract class CarrierService extends Service {
|
|||||||
/**
|
/**
|
||||||
* A wrapper around ICarrierService that forwards calls to implementations of
|
* A wrapper around ICarrierService that forwards calls to implementations of
|
||||||
* {@link CarrierService}.
|
* {@link CarrierService}.
|
||||||
* @hide
|
|
||||||
*/
|
*/
|
||||||
public class ICarrierServiceWrapper extends ICarrierService.Stub {
|
private class ICarrierServiceWrapper extends ICarrierService.Stub {
|
||||||
/** @hide */
|
|
||||||
public static final int RESULT_OK = 0;
|
|
||||||
/** @hide */
|
|
||||||
public static final int RESULT_ERROR = 1;
|
|
||||||
/** @hide */
|
|
||||||
public static final String KEY_CONFIG_BUNDLE = "config_bundle";
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getCarrierConfig(CarrierIdentifier id, ResultReceiver result) {
|
public PersistableBundle getCarrierConfig(CarrierIdentifier id) {
|
||||||
try {
|
return CarrierService.this.onLoadConfig(id);
|
||||||
Bundle data = new Bundle();
|
|
||||||
data.putParcelable(KEY_CONFIG_BUNDLE, CarrierService.this.onLoadConfig(id));
|
|
||||||
result.send(RESULT_OK, data);
|
|
||||||
} catch (Exception e) {
|
|
||||||
Log.e(LOG_TAG, "Error in onLoadConfig: " + e.getMessage(), e);
|
|
||||||
result.send(RESULT_ERROR, null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
package android.service.carrier;
|
package android.service.carrier;
|
||||||
|
|
||||||
import android.os.PersistableBundle;
|
import android.os.PersistableBundle;
|
||||||
import android.os.ResultReceiver;
|
|
||||||
import android.service.carrier.CarrierIdentifier;
|
import android.service.carrier.CarrierIdentifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -29,5 +28,5 @@ import android.service.carrier.CarrierIdentifier;
|
|||||||
interface ICarrierService {
|
interface ICarrierService {
|
||||||
|
|
||||||
/** @see android.service.carrier.CarrierService#onLoadConfig */
|
/** @see android.service.carrier.CarrierService#onLoadConfig */
|
||||||
oneway void getCarrierConfig(in CarrierIdentifier id, in ResultReceiver result);
|
PersistableBundle getCarrierConfig(in CarrierIdentifier id);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user