Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d29eafdb authored by The Android Open Source Project's avatar The Android Open Source Project Committed by Android Git Automerger
Browse files

am f021d12f: merge from open-source master

Merge commit 'f021d12f' into kraken

* commit 'f021d12f':
  Allow META* macros outside of the framework
  Fix printing order of phone objects creation
parents e1d851d3 f021d12f
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -72,21 +72,24 @@ protected:
// ----------------------------------------------------------------------

#define DECLARE_META_INTERFACE(INTERFACE)                               \
    static const String16 descriptor;                                   \
    static sp<I##INTERFACE> asInterface(const sp<IBinder>& obj);        \
    virtual const String16& getInterfaceDescriptor() const;             \
    static const android::String16 descriptor;                          \
    static android::sp<I##INTERFACE> asInterface(                       \
            const android::sp<android::IBinder>& obj);                  \
    virtual const android::String16& getInterfaceDescriptor() const;    \
    I##INTERFACE();                                                     \
    virtual ~I##INTERFACE();                                            \


#define IMPLEMENT_META_INTERFACE(INTERFACE, NAME)                       \
    const String16 I##INTERFACE::descriptor(NAME);                      \
    const String16& I##INTERFACE::getInterfaceDescriptor() const {      \
    const android::String16 I##INTERFACE::descriptor(NAME);             \
    const android::String16&                                            \
            I##INTERFACE::getInterfaceDescriptor() const {              \
        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) {                                              \
            intr = static_cast<I##INTERFACE*>(                          \
                obj->queryLocalInterface(                               \
+2 −2
Original line number Diff line number Diff line
@@ -109,13 +109,13 @@ public class PhoneFactory {

                int phoneType = getPhoneType(networkMode);
                if (phoneType == Phone.PHONE_TYPE_GSM) {
                    Log.i(LOG_TAG, "Creating GSMPhone");
                    sProxyPhone = new PhoneProxy(new GSMPhone(context,
                            sCommandsInterface, sPhoneNotifier));
                    Log.i(LOG_TAG, "Creating GSMPhone");
                } else if (phoneType == Phone.PHONE_TYPE_CDMA) {
                    Log.i(LOG_TAG, "Creating CDMAPhone");
                    sProxyPhone = new PhoneProxy(new CDMAPhone(context,
                            sCommandsInterface, sPhoneNotifier));
                    Log.i(LOG_TAG, "Creating CDMAPhone");
                }

                sMadeDefaults = true;