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

Commit 168e1642 authored by Robert Shih's avatar Robert Shih
Browse files

resolve merge conflicts of 77da9683 to nyc-dev-plus-aosp

Change-Id: I123956fe0f90e7fc7712cf5a99b29add94d15564
parents 776229a3 77da9683
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -558,6 +558,12 @@ void MediaPlayerService::removeClient(const wp<Client>& client)
    mClients.remove(client);
}

bool MediaPlayerService::hasClient(wp<Client> client)
{
    Mutex::Autolock lock(mLock);
    return mClients.indexOf(client) != NAME_NOT_FOUND;
}

MediaPlayerService::Client::Client(
        const sp<MediaPlayerService>& service, pid_t pid,
        int32_t connId, const sp<IMediaPlayerClient>& client,
@@ -1086,6 +1092,10 @@ status_t MediaPlayerService::Client::setNextPlayer(const sp<IMediaPlayer>& playe
    ALOGV("setNextPlayer");
    Mutex::Autolock l(mLock);
    sp<Client> c = static_cast<Client*>(player.get());
    if (!mService->hasClient(c)) {
      return BAD_VALUE;
    }

    mNextClient = c;

    if (c != NULL) {
+1 −0
Original line number Diff line number Diff line
@@ -226,6 +226,7 @@ public:
    virtual status_t            dump(int fd, const Vector<String16>& args);

            void                removeClient(const wp<Client>& client);
            bool                hasClient(wp<Client> client);

    enum {
        MEDIASERVER_PROCESS_DEATH = 0,