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

Commit 6bac803b authored by Marco Nelissen's avatar Marco Nelissen Committed by android-build-merger
Browse files

Get service by value instead of reference am: 61a6d26a am: 93f5bcab am:...

Get service by value instead of reference am: 61a6d26a am: 93f5bcab am: d11972f8 am: c0cefa9f am: 73079eec
am: 5984d6cb

* commit '5984d6cb':
  Get service by value instead of reference
parents 7786bd93 5984d6cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ public:
    const char* extractMetadata(int keyCode);

private:
    static const sp<IMediaPlayerService>& getService();
    static const sp<IMediaPlayerService> getService();

    class DeathNotifier: public IBinder::DeathRecipient
    {
+2 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ Mutex MediaMetadataRetriever::sServiceLock;
sp<IMediaPlayerService> MediaMetadataRetriever::sService;
sp<MediaMetadataRetriever::DeathNotifier> MediaMetadataRetriever::sDeathNotifier;

const sp<IMediaPlayerService>& MediaMetadataRetriever::getService()
const sp<IMediaPlayerService> MediaMetadataRetriever::getService()
{
    Mutex::Autolock lock(sServiceLock);
    if (sService == 0) {
@@ -62,7 +62,7 @@ const sp<IMediaPlayerService>& MediaMetadataRetriever::getService()
MediaMetadataRetriever::MediaMetadataRetriever()
{
    ALOGV("constructor");
    const sp<IMediaPlayerService>& service(getService());
    const sp<IMediaPlayerService> service(getService());
    if (service == 0) {
        ALOGE("failed to obtain MediaMetadataRetrieverService");
        return;