merge from open-source master
Change-Id: I08f1feae65b1dfc3f740d78654c267f2e3ae5e85
This commit is contained in:
@ -72,21 +72,24 @@ protected:
|
|||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
|
||||||
#define DECLARE_META_INTERFACE(INTERFACE) \
|
#define DECLARE_META_INTERFACE(INTERFACE) \
|
||||||
static const String16 descriptor; \
|
static const android::String16 descriptor; \
|
||||||
static sp<I##INTERFACE> asInterface(const sp<IBinder>& obj); \
|
static android::sp<I##INTERFACE> asInterface( \
|
||||||
virtual const String16& getInterfaceDescriptor() const; \
|
const android::sp<android::IBinder>& obj); \
|
||||||
|
virtual const android::String16& getInterfaceDescriptor() const; \
|
||||||
I##INTERFACE(); \
|
I##INTERFACE(); \
|
||||||
virtual ~I##INTERFACE(); \
|
virtual ~I##INTERFACE(); \
|
||||||
|
|
||||||
|
|
||||||
#define IMPLEMENT_META_INTERFACE(INTERFACE, NAME) \
|
#define IMPLEMENT_META_INTERFACE(INTERFACE, NAME) \
|
||||||
const String16 I##INTERFACE::descriptor(NAME); \
|
const android::String16 I##INTERFACE::descriptor(NAME); \
|
||||||
const String16& I##INTERFACE::getInterfaceDescriptor() const { \
|
const android::String16& \
|
||||||
|
I##INTERFACE::getInterfaceDescriptor() const { \
|
||||||
return I##INTERFACE::descriptor; \
|
return I##INTERFACE::descriptor; \
|
||||||
} \
|
} \
|
||||||
sp<I##INTERFACE> I##INTERFACE::asInterface(const sp<IBinder>& obj) \
|
android::sp<I##INTERFACE> I##INTERFACE::asInterface( \
|
||||||
|
const android::sp<android::IBinder>& obj) \
|
||||||
{ \
|
{ \
|
||||||
sp<I##INTERFACE> intr; \
|
android::sp<I##INTERFACE> intr; \
|
||||||
if (obj != NULL) { \
|
if (obj != NULL) { \
|
||||||
intr = static_cast<I##INTERFACE*>( \
|
intr = static_cast<I##INTERFACE*>( \
|
||||||
obj->queryLocalInterface( \
|
obj->queryLocalInterface( \
|
||||||
|
@ -109,13 +109,13 @@ public class PhoneFactory {
|
|||||||
|
|
||||||
int phoneType = getPhoneType(networkMode);
|
int phoneType = getPhoneType(networkMode);
|
||||||
if (phoneType == Phone.PHONE_TYPE_GSM) {
|
if (phoneType == Phone.PHONE_TYPE_GSM) {
|
||||||
|
Log.i(LOG_TAG, "Creating GSMPhone");
|
||||||
sProxyPhone = new PhoneProxy(new GSMPhone(context,
|
sProxyPhone = new PhoneProxy(new GSMPhone(context,
|
||||||
sCommandsInterface, sPhoneNotifier));
|
sCommandsInterface, sPhoneNotifier));
|
||||||
Log.i(LOG_TAG, "Creating GSMPhone");
|
|
||||||
} else if (phoneType == Phone.PHONE_TYPE_CDMA) {
|
} else if (phoneType == Phone.PHONE_TYPE_CDMA) {
|
||||||
|
Log.i(LOG_TAG, "Creating CDMAPhone");
|
||||||
sProxyPhone = new PhoneProxy(new CDMAPhone(context,
|
sProxyPhone = new PhoneProxy(new CDMAPhone(context,
|
||||||
sCommandsInterface, sPhoneNotifier));
|
sCommandsInterface, sPhoneNotifier));
|
||||||
Log.i(LOG_TAG, "Creating CDMAPhone");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sMadeDefaults = true;
|
sMadeDefaults = true;
|
||||||
|
Reference in New Issue
Block a user