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

Commit 207e1854 authored by Andreas Huber's avatar Andreas Huber
Browse files

Remove legacy code and APIs in wifi display related code.

Change-Id: Ia010e7a00534f9356b3247369d0ffd65591d91aa
parent 086f958a
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -64,12 +64,6 @@ public:
    virtual sp<IRemoteDisplay> listenForRemoteDisplay(const sp<IRemoteDisplayClient>& client,
            const String8& iface) = 0;

    // If iface == NULL, disable remote display, otherwise
    // iface should be of the form "x.x.x.x:y", i.e. ip address
    // of the local interface to bind to and the port number
    // to listen on.
    virtual status_t enableRemoteDisplay(const char *iface) = 0;

    // codecs and audio devices usage tracking for the battery app
    enum BatteryDataBits {
        // tracking audio codec
+0 −25
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ enum {
    GET_OMX,
    MAKE_CRYPTO,
    MAKE_HDCP,
    ENABLE_REMOTE_DISPLAY,
    ADD_BATTERY_DATA,
    PULL_BATTERY_DATA,
    LISTEN_FOR_REMOTE_DISPLAY,
@@ -134,21 +133,6 @@ public:
        return interface_cast<IHDCP>(reply.readStrongBinder());
    }

    virtual status_t enableRemoteDisplay(const char *iface) {
        Parcel data, reply;
        data.writeInterfaceToken(IMediaPlayerService::getInterfaceDescriptor());

        if (iface != NULL) {
            data.writeInt32(1);
            data.writeCString(iface);
        } else {
            data.writeInt32(0);
        }

        remote()->transact(ENABLE_REMOTE_DISPLAY, data, &reply);
        return reply.readInt32();
    }

    virtual void addBatteryData(uint32_t params) {
        Parcel data, reply;
        data.writeInterfaceToken(IMediaPlayerService::getInterfaceDescriptor());
@@ -252,15 +236,6 @@ status_t BnMediaPlayerService::onTransact(
            reply->writeStrongBinder(hdcp->asBinder());
            return NO_ERROR;
        } break;
        case ENABLE_REMOTE_DISPLAY: {
            CHECK_INTERFACE(IMediaPlayerService, data, reply);
            const char *iface = NULL;
            if (data.readInt32()) {
                iface = data.readCString();
            }
            reply->writeInt32(enableRemoteDisplay(iface));
            return NO_ERROR;
        } break;
        case ADD_BATTERY_DATA: {
            CHECK_INTERFACE(IMediaPlayerService, data, reply);
            uint32_t params = data.readInt32();
+0 −25
Original line number Diff line number Diff line
@@ -295,31 +295,6 @@ sp<IRemoteDisplay> MediaPlayerService::listenForRemoteDisplay(
    return new RemoteDisplay(client, iface.string());
}

// TODO: delete this method
status_t MediaPlayerService::enableRemoteDisplay(const char *iface) {
    if (!checkPermission("android.permission.CONTROL_WIFI_DISPLAY")) {
        return PERMISSION_DENIED;
    }

    Mutex::Autolock autoLock(mLock);

    if (iface != NULL) {
        if (mRemoteDisplay != NULL) {
            return INVALID_OPERATION;
        }

        mRemoteDisplay = new RemoteDisplay(NULL /* client */, iface);
        return OK;
    }

    if (mRemoteDisplay != NULL) {
        mRemoteDisplay->dispose();
        mRemoteDisplay.clear();
    }

    return OK;
}

status_t MediaPlayerService::AudioCache::dump(int fd, const Vector<String16>& args) const
{
    const size_t SIZE = 256;
+0 −4
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@ class IOMX;
class IRemoteDisplay;
class IRemoteDisplayClient;
class MediaRecorderClient;
struct RemoteDisplay;

#define CALLBACK_ANTAGONIZER 0
#if CALLBACK_ANTAGONIZER
@@ -254,8 +253,6 @@ public:

    virtual sp<IRemoteDisplay> listenForRemoteDisplay(const sp<IRemoteDisplayClient>& client,
            const String8& iface);
    virtual status_t            enableRemoteDisplay(const char *iface);

    virtual status_t            dump(int fd, const Vector<String16>& args);

            void                removeClient(wp<Client> client);
@@ -431,7 +428,6 @@ private:
                int32_t                     mNextConnId;
                sp<IOMX>                    mOMX;
                sp<ICrypto>                 mCrypto;
                sp<RemoteDisplay>           mRemoteDisplay;
};

// ----------------------------------------------------------------------------
+0 −1
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@ LOCAL_SRC_FILES:= \
        source/MediaPuller.cpp          \
        source/PlaybackSession.cpp      \
        source/RepeaterSource.cpp       \
        source/Serializer.cpp           \
        source/TSPacketizer.cpp         \
        source/WifiDisplaySource.cpp    \

Loading