Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF)  DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp
index 37a82e9..e4010be 100644
--- a/media/libmedia/mediaplayer.cpp
+++ b/media/libmedia/mediaplayer.cpp
@@ -46,7 +46,7 @@
 
 MediaPlayer::MediaPlayer()
 {
-    LOGV("constructor");
+    ALOGV("constructor");
     mListener = NULL;
     mCookie = NULL;
     mDuration = -1;
@@ -67,7 +67,7 @@
 
 MediaPlayer::~MediaPlayer()
 {
-    LOGV("destructor");
+    ALOGV("destructor");
     AudioSystem::releaseAudioSessionId(mAudioSessionId);
     disconnect();
     IPCThreadState::self()->flushCommands();
@@ -75,7 +75,7 @@
 
 void MediaPlayer::disconnect()
 {
-    LOGV("disconnect");
+    ALOGV("disconnect");
     sp<IMediaPlayer> p;
     {
         Mutex::Autolock _l(mLock);
@@ -101,7 +101,7 @@
 
 status_t MediaPlayer::setListener(const sp<MediaPlayerListener>& listener)
 {
-    LOGV("setListener");
+    ALOGV("setListener");
     Mutex::Autolock _l(mLock);
     mListener = listener;
     return NO_ERROR;
@@ -142,7 +142,7 @@
 status_t MediaPlayer::setDataSource(
         const char *url, const KeyedVector<String8, String8> *headers)
 {
-    LOGV("setDataSource(%s)", url);
+    ALOGV("setDataSource(%s)", url);
     status_t err = BAD_VALUE;
     if (url != NULL) {
         const sp<IMediaPlayerService>& service(getMediaPlayerService());
@@ -159,7 +159,7 @@
 
 status_t MediaPlayer::setDataSource(int fd, int64_t offset, int64_t length)
 {
-    LOGV("setDataSource(%d, %lld, %lld)", fd, offset, length);
+    ALOGV("setDataSource(%d, %lld, %lld)", fd, offset, length);
     status_t err = UNKNOWN_ERROR;
     const sp<IMediaPlayerService>& service(getMediaPlayerService());
     if (service != 0) {
@@ -174,7 +174,7 @@
 
 status_t MediaPlayer::setDataSource(const sp<IStreamSource> &source)
 {
-    LOGV("setDataSource");
+    ALOGV("setDataSource");
     status_t err = UNKNOWN_ERROR;
     const sp<IMediaPlayerService>& service(getMediaPlayerService());
     if (service != 0) {
@@ -194,7 +194,7 @@
             (mCurrentState != MEDIA_PLAYER_STATE_ERROR) &&
             ((mCurrentState & MEDIA_PLAYER_IDLE) != MEDIA_PLAYER_IDLE);
     if ((mPlayer != NULL) && hasBeenInitialized) {
-         LOGV("invoke %d", request.dataSize());
+         ALOGV("invoke %d", request.dataSize());
          return  mPlayer->invoke(request, reply);
     }
     LOGE("invoke failed: wrong state %X", mCurrentState);
@@ -236,7 +236,7 @@
 
 status_t MediaPlayer::setVideoSurface(const sp<Surface>& surface)
 {
-    LOGV("setVideoSurface");
+    ALOGV("setVideoSurface");
     Mutex::Autolock _l(mLock);
     if (mPlayer == 0) return NO_INIT;
 
@@ -283,7 +283,7 @@
 status_t MediaPlayer::setVideoSurfaceTexture(
         const sp<ISurfaceTexture>& surfaceTexture)
 {
-    LOGV("setVideoSurfaceTexture");
+    ALOGV("setVideoSurfaceTexture");
     Mutex::Autolock _l(mLock);
     if (mPlayer == 0) return NO_INIT;
 
@@ -348,7 +348,7 @@
 // code.
 status_t MediaPlayer::prepare()
 {
-    LOGV("prepare");
+    ALOGV("prepare");
     Mutex::Autolock _l(mLock);
     mLockThreadId = getThreadId();
     if (mPrepareSync) {
@@ -366,21 +366,21 @@
         mSignal.wait(mLock);  // wait for prepare done
         mPrepareSync = false;
     }
-    LOGV("prepare complete - status=%d", mPrepareStatus);
+    ALOGV("prepare complete - status=%d", mPrepareStatus);
     mLockThreadId = 0;
     return mPrepareStatus;
 }
 
 status_t MediaPlayer::prepareAsync()
 {
-    LOGV("prepareAsync");
+    ALOGV("prepareAsync");
     Mutex::Autolock _l(mLock);
     return prepareAsync_l();
 }
 
 status_t MediaPlayer::start()
 {
-    LOGV("start");
+    ALOGV("start");
     Mutex::Autolock _l(mLock);
     if (mCurrentState & MEDIA_PLAYER_STARTED)
         return NO_ERROR;
@@ -395,7 +395,7 @@
             mCurrentState = MEDIA_PLAYER_STATE_ERROR;
         } else {
             if (mCurrentState == MEDIA_PLAYER_PLAYBACK_COMPLETE) {
-                LOGV("playback completed immediately following start()");
+                ALOGV("playback completed immediately following start()");
             }
         }
         return ret;
@@ -406,7 +406,7 @@
 
 status_t MediaPlayer::stop()
 {
-    LOGV("stop");
+    ALOGV("stop");
     Mutex::Autolock _l(mLock);
     if (mCurrentState & MEDIA_PLAYER_STOPPED) return NO_ERROR;
     if ( (mPlayer != 0) && ( mCurrentState & ( MEDIA_PLAYER_STARTED | MEDIA_PLAYER_PREPARED |
@@ -425,7 +425,7 @@
 
 status_t MediaPlayer::pause()
 {
-    LOGV("pause");
+    ALOGV("pause");
     Mutex::Autolock _l(mLock);
     if (mCurrentState & (MEDIA_PLAYER_PAUSED|MEDIA_PLAYER_PLAYBACK_COMPLETE))
         return NO_ERROR;
@@ -448,20 +448,20 @@
     if (mPlayer != 0) {
         bool temp = false;
         mPlayer->isPlaying(&temp);
-        LOGV("isPlaying: %d", temp);
+        ALOGV("isPlaying: %d", temp);
         if ((mCurrentState & MEDIA_PLAYER_STARTED) && ! temp) {
             LOGE("internal/external state mismatch corrected");
             mCurrentState = MEDIA_PLAYER_PAUSED;
         }
         return temp;
     }
-    LOGV("isPlaying: no active player");
+    ALOGV("isPlaying: no active player");
     return false;
 }
 
 status_t MediaPlayer::getVideoWidth(int *w)
 {
-    LOGV("getVideoWidth");
+    ALOGV("getVideoWidth");
     Mutex::Autolock _l(mLock);
     if (mPlayer == 0) return INVALID_OPERATION;
     *w = mVideoWidth;
@@ -470,7 +470,7 @@
 
 status_t MediaPlayer::getVideoHeight(int *h)
 {
-    LOGV("getVideoHeight");
+    ALOGV("getVideoHeight");
     Mutex::Autolock _l(mLock);
     if (mPlayer == 0) return INVALID_OPERATION;
     *h = mVideoHeight;
@@ -479,11 +479,11 @@
 
 status_t MediaPlayer::getCurrentPosition(int *msec)
 {
-    LOGV("getCurrentPosition");
+    ALOGV("getCurrentPosition");
     Mutex::Autolock _l(mLock);
     if (mPlayer != 0) {
         if (mCurrentPosition >= 0) {
-            LOGV("Using cached seek position: %d", mCurrentPosition);
+            ALOGV("Using cached seek position: %d", mCurrentPosition);
             *msec = mCurrentPosition;
             return NO_ERROR;
         }
@@ -494,7 +494,7 @@
 
 status_t MediaPlayer::getDuration_l(int *msec)
 {
-    LOGV("getDuration");
+    ALOGV("getDuration");
     bool isValidState = (mCurrentState & (MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_STARTED | MEDIA_PLAYER_PAUSED | MEDIA_PLAYER_STOPPED | MEDIA_PLAYER_PLAYBACK_COMPLETE));
     if (mPlayer != 0 && isValidState) {
         status_t ret = NO_ERROR;
@@ -516,7 +516,7 @@
 
 status_t MediaPlayer::seekTo_l(int msec)
 {
-    LOGV("seekTo %d", msec);
+    ALOGV("seekTo %d", msec);
     if ((mPlayer != 0) && ( mCurrentState & ( MEDIA_PLAYER_STARTED | MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_PAUSED |  MEDIA_PLAYER_PLAYBACK_COMPLETE) ) ) {
         if ( msec < 0 ) {
             LOGW("Attempt to seek to invalid position: %d", msec);
@@ -533,7 +533,7 @@
             return mPlayer->seekTo(msec);
         }
         else {
-            LOGV("Seek in progress - queue up seekTo[%d]", msec);
+            ALOGV("Seek in progress - queue up seekTo[%d]", msec);
             return NO_ERROR;
         }
     }
@@ -575,14 +575,14 @@
 
 status_t MediaPlayer::reset()
 {
-    LOGV("reset");
+    ALOGV("reset");
     Mutex::Autolock _l(mLock);
     return reset_l();
 }
 
 status_t MediaPlayer::setAudioStreamType(int type)
 {
-    LOGV("MediaPlayer::setAudioStreamType");
+    ALOGV("MediaPlayer::setAudioStreamType");
     Mutex::Autolock _l(mLock);
     if (mStreamType == type) return NO_ERROR;
     if (mCurrentState & ( MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_STARTED |
@@ -598,7 +598,7 @@
 
 status_t MediaPlayer::setLooping(int loop)
 {
-    LOGV("MediaPlayer::setLooping");
+    ALOGV("MediaPlayer::setLooping");
     Mutex::Autolock _l(mLock);
     mLoop = (loop != 0);
     if (mPlayer != 0) {
@@ -608,18 +608,18 @@
 }
 
 bool MediaPlayer::isLooping() {
-    LOGV("isLooping");
+    ALOGV("isLooping");
     Mutex::Autolock _l(mLock);
     if (mPlayer != 0) {
         return mLoop;
     }
-    LOGV("isLooping: no active player");
+    ALOGV("isLooping: no active player");
     return false;
 }
 
 status_t MediaPlayer::setVolume(float leftVolume, float rightVolume)
 {
-    LOGV("MediaPlayer::setVolume(%f, %f)", leftVolume, rightVolume);
+    ALOGV("MediaPlayer::setVolume(%f, %f)", leftVolume, rightVolume);
     Mutex::Autolock _l(mLock);
     mLeftVolume = leftVolume;
     mRightVolume = rightVolume;
@@ -631,7 +631,7 @@
 
 status_t MediaPlayer::setAudioSessionId(int sessionId)
 {
-    LOGV("MediaPlayer::setAudioSessionId(%d)", sessionId);
+    ALOGV("MediaPlayer::setAudioSessionId(%d)", sessionId);
     Mutex::Autolock _l(mLock);
     if (!(mCurrentState & MEDIA_PLAYER_IDLE)) {
         LOGE("setAudioSessionId called in state %d", mCurrentState);
@@ -656,7 +656,7 @@
 
 status_t MediaPlayer::setAuxEffectSendLevel(float level)
 {
-    LOGV("MediaPlayer::setAuxEffectSendLevel(%f)", level);
+    ALOGV("MediaPlayer::setAuxEffectSendLevel(%f)", level);
     Mutex::Autolock _l(mLock);
     mSendLevel = level;
     if (mPlayer != 0) {
@@ -667,7 +667,7 @@
 
 status_t MediaPlayer::attachAuxEffect(int effectId)
 {
-    LOGV("MediaPlayer::attachAuxEffect(%d)", effectId);
+    ALOGV("MediaPlayer::attachAuxEffect(%d)", effectId);
     Mutex::Autolock _l(mLock);
     if (mPlayer == 0 ||
         (mCurrentState & MEDIA_PLAYER_IDLE) ||
@@ -681,29 +681,29 @@
 
 status_t MediaPlayer::setParameter(int key, const Parcel& request)
 {
-    LOGV("MediaPlayer::setParameter(%d)", key);
+    ALOGV("MediaPlayer::setParameter(%d)", key);
     Mutex::Autolock _l(mLock);
     if (mPlayer != NULL) {
         return  mPlayer->setParameter(key, request);
     }
-    LOGV("setParameter: no active player");
+    ALOGV("setParameter: no active player");
     return INVALID_OPERATION;
 }
 
 status_t MediaPlayer::getParameter(int key, Parcel *reply)
 {
-    LOGV("MediaPlayer::getParameter(%d)", key);
+    ALOGV("MediaPlayer::getParameter(%d)", key);
     Mutex::Autolock _l(mLock);
     if (mPlayer != NULL) {
          return  mPlayer->getParameter(key, reply);
     }
-    LOGV("getParameter: no active player");
+    ALOGV("getParameter: no active player");
     return INVALID_OPERATION;
 }
 
 void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj)
 {
-    LOGV("message received msg=%d, ext1=%d, ext2=%d", msg, ext1, ext2);
+    ALOGV("message received msg=%d, ext1=%d, ext2=%d", msg, ext1, ext2);
     bool send = true;
     bool locked = false;
 
@@ -722,7 +722,7 @@
 
     // Allows calls from JNI in idle state to notify errors
     if (!(msg == MEDIA_ERROR && mCurrentState == MEDIA_PLAYER_IDLE) && mPlayer == 0) {
-        LOGV("notify(%d, %d, %d) callback on disconnected mediaplayer", msg, ext1, ext2);
+        ALOGV("notify(%d, %d, %d) callback on disconnected mediaplayer", msg, ext1, ext2);
         if (locked) mLock.unlock();   // release the lock when done.
         return;
     }
@@ -731,17 +731,17 @@
     case MEDIA_NOP: // interface test message
         break;
     case MEDIA_PREPARED:
-        LOGV("prepared");
+        ALOGV("prepared");
         mCurrentState = MEDIA_PLAYER_PREPARED;
         if (mPrepareSync) {
-            LOGV("signal application thread");
+            ALOGV("signal application thread");
             mPrepareSync = false;
             mPrepareStatus = NO_ERROR;
             mSignal.signal();
         }
         break;
     case MEDIA_PLAYBACK_COMPLETE:
-        LOGV("playback complete");
+        ALOGV("playback complete");
         if (mCurrentState == MEDIA_PLAYER_IDLE) {
             LOGE("playback complete in idle state");
         }
@@ -757,7 +757,7 @@
         mCurrentState = MEDIA_PLAYER_STATE_ERROR;
         if (mPrepareSync)
         {
-            LOGV("signal application thread");
+            ALOGV("signal application thread");
             mPrepareSync = false;
             mPrepareStatus = ext1;
             mSignal.signal();
@@ -772,30 +772,30 @@
         }
         break;
     case MEDIA_SEEK_COMPLETE:
-        LOGV("Received seek complete");
+        ALOGV("Received seek complete");
         if (mSeekPosition != mCurrentPosition) {
-            LOGV("Executing queued seekTo(%d)", mSeekPosition);
+            ALOGV("Executing queued seekTo(%d)", mSeekPosition);
             mSeekPosition = -1;
             seekTo_l(mCurrentPosition);
         }
         else {
-            LOGV("All seeks complete - return to regularly scheduled program");
+            ALOGV("All seeks complete - return to regularly scheduled program");
             mCurrentPosition = mSeekPosition = -1;
         }
         break;
     case MEDIA_BUFFERING_UPDATE:
-        LOGV("buffering %d", ext1);
+        ALOGV("buffering %d", ext1);
         break;
     case MEDIA_SET_VIDEO_SIZE:
-        LOGV("New video size %d x %d", ext1, ext2);
+        ALOGV("New video size %d x %d", ext1, ext2);
         mVideoWidth = ext1;
         mVideoHeight = ext2;
         break;
     case MEDIA_TIMED_TEXT:
-        LOGV("Received timed text message");
+        ALOGV("Received timed text message");
         break;
     default:
-        LOGV("unrecognized message: (%d, %d, %d)", msg, ext1, ext2);
+        ALOGV("unrecognized message: (%d, %d, %d)", msg, ext1, ext2);
         break;
     }
 
@@ -805,15 +805,15 @@
     // this prevents re-entrant calls into client code
     if ((listener != 0) && send) {
         Mutex::Autolock _l(mNotifyLock);
-        LOGV("callback application");
+        ALOGV("callback application");
         listener->notify(msg, ext1, ext2, obj);
-        LOGV("back from callback");
+        ALOGV("back from callback");
     }
 }
 
 /*static*/ sp<IMemory> MediaPlayer::decode(const char* url, uint32_t *pSampleRate, int* pNumChannels, int* pFormat)
 {
-    LOGV("decode(%s)", url);
+    ALOGV("decode(%s)", url);
     sp<IMemory> p;
     const sp<IMediaPlayerService>& service = getMediaPlayerService();
     if (service != 0) {
@@ -827,13 +827,13 @@
 
 void MediaPlayer::died()
 {
-    LOGV("died");
+    ALOGV("died");
     notify(MEDIA_ERROR, MEDIA_ERROR_SERVER_DIED, 0);
 }
 
 /*static*/ sp<IMemory> MediaPlayer::decode(int fd, int64_t offset, int64_t length, uint32_t *pSampleRate, int* pNumChannels, int* pFormat)
 {
-    LOGV("decode(%d, %lld, %lld)", fd, offset, length);
+    ALOGV("decode(%d, %lld, %lld)", fd, offset, length);
     sp<IMemory> p;
     const sp<IMediaPlayerService>& service = getMediaPlayerService();
     if (service != 0) {