diff options
Diffstat (limited to 'services')
26 files changed, 198 insertions, 198 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 51ae921..697bcdf 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -100,14 +100,14 @@ static const uint32_t kMaxThreadSleepTimeShift = 2; static bool recordingAllowed() { if (getpid() == IPCThreadState::self()->getCallingPid()) return true; bool ok = checkCallingPermission(String16("android.permission.RECORD_AUDIO")); - if (!ok) LOGE("Request requires android.permission.RECORD_AUDIO"); + if (!ok) ALOGE("Request requires android.permission.RECORD_AUDIO"); return ok; } static bool settingsAllowed() { if (getpid() == IPCThreadState::self()->getCallingPid()) return true; bool ok = checkCallingPermission(String16("android.permission.MODIFY_AUDIO_SETTINGS")); - if (!ok) LOGE("Request requires android.permission.MODIFY_AUDIO_SETTINGS"); + if (!ok) ALOGE("Request requires android.permission.MODIFY_AUDIO_SETTINGS"); return ok; } @@ -134,7 +134,7 @@ static int load_audio_interface(const char *if_name, const hw_module_t **mod, goto out; rc = audio_hw_device_open(*mod, dev); - LOGE_IF(rc, "couldn't open audio hw device in %s.%s (%s)", + ALOGE_IF(rc, "couldn't open audio hw device in %s.%s (%s)", AUDIO_HARDWARE_MODULE_ID, if_name, strerror(-rc)); if (rc) goto out; @@ -194,7 +194,7 @@ void AudioFlinger::onFirstRef() mHardwareStatus = AUDIO_HW_INIT; if (!mPrimaryHardwareDev || mAudioHwDevs.size() == 0) { - LOGE("Primary audio interface not found"); + ALOGE("Primary audio interface not found"); return; } @@ -395,7 +395,7 @@ sp<IAudioTrack> AudioFlinger::createTrack( int lSessionId; if (streamType >= AUDIO_STREAM_CNT) { - LOGE("invalid stream type"); + ALOGE("invalid stream type"); lStatus = BAD_VALUE; goto Exit; } @@ -405,7 +405,7 @@ sp<IAudioTrack> AudioFlinger::createTrack( PlaybackThread *thread = checkPlaybackThread_l(output); PlaybackThread *effectThread = NULL; if (thread == NULL) { - LOGE("unknown output thread"); + ALOGE("unknown output thread"); lStatus = BAD_VALUE; goto Exit; } @@ -1465,7 +1465,7 @@ status_t AudioFlinger::PlaybackThread::readyToRun() if (status == NO_ERROR) { ALOGI("AudioFlinger's thread %p ready to run", this); } else { - LOGE("No working audio driver found."); + ALOGE("No working audio driver found."); } return status; } @@ -1493,7 +1493,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTra if (mType == DIRECT) { if ((format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_PCM) { if (sampleRate != mSampleRate || format != mFormat || channelMask != mChannelMask) { - LOGE("createTrack_l() Bad parameter: sampleRate %d format %d, channelMask 0x%08x \"" + ALOGE("createTrack_l() Bad parameter: sampleRate %d format %d, channelMask 0x%08x \"" "for output %p with format %d", sampleRate, format, channelMask, mOutput, mFormat); lStatus = BAD_VALUE; @@ -1503,7 +1503,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTra } else { // Resampler implementation limits input sampling rate to 2 x output sampling rate. if (sampleRate > mSampleRate*2) { - LOGE("Sample rate out of range: %d mSampleRate %d", sampleRate, mSampleRate); + ALOGE("Sample rate out of range: %d mSampleRate %d", sampleRate, mSampleRate); lStatus = BAD_VALUE; goto Exit; } @@ -1511,7 +1511,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTra lStatus = initCheck(); if (lStatus != NO_ERROR) { - LOGE("Audio driver not initialized."); + ALOGE("Audio driver not initialized."); goto Exit; } @@ -1839,7 +1839,7 @@ AudioFlinger::MixerThread::MixerThread(const sp<AudioFlinger>& audioFlinger, Aud // FIXME - Current mixer implementation only supports stereo output if (mChannelCount == 1) { - LOGE("Invalid audio hardware channel count"); + ALOGE("Invalid audio hardware channel count"); } } @@ -3245,7 +3245,7 @@ AudioFlinger::ThreadBase::TrackBase::TrackBase( mBufferEnd = (uint8_t *)mBuffer + bufferSize; } } else { - LOGE("not enough memory for AudioTrack size=%u", size); + ALOGE("not enough memory for AudioTrack size=%u", size); client->heap()->dump("AudioTrack"); return; } @@ -3339,7 +3339,7 @@ void* AudioFlinger::ThreadBase::TrackBase::getBuffer(uint32_t offset, uint32_t f // Check validity of returned pointer in case the track control block would have been corrupted. if (bufferStart < mBuffer || bufferStart > bufferEnd || bufferEnd > mBufferEnd || ((unsigned long)bufferStart & (unsigned long)(cblk->frameSize - 1))) { - LOGE("TrackBase::getBuffer buffer out of range:\n start: %p, end %p , mBuffer %p mBufferEnd %p\n \ + ALOGE("TrackBase::getBuffer buffer out of range:\n start: %p, end %p , mBuffer %p mBufferEnd %p\n \ server %d, serverBase %d, user %d, userBase %d", bufferStart, bufferEnd, mBuffer, mBufferEnd, cblk->server, cblk->serverBase, cblk->user, cblk->userBase); @@ -3375,7 +3375,7 @@ AudioFlinger::PlaybackThread::Track::Track( } ALOGV("Track constructor name %d, calling thread %d", mName, IPCThreadState::self()->getCallingPid()); if (mName < 0) { - LOGE("no more track names available"); + ALOGE("no more track names available"); } mVolume[0] = 1.0f; mVolume[1] = 1.0f; @@ -4387,7 +4387,7 @@ bool AudioFlinger::RecordThread::threadLoop() mRsmpInIndex = 0; } if (mBytesRead < 0) { - LOGE("Error reading audio input"); + ALOGE("Error reading audio input"); if (mActiveTrack->mState == TrackBase::ACTIVE) { // Force input into standby so that it tries to // recover at next read attempt @@ -4477,7 +4477,7 @@ sp<AudioFlinger::RecordThread::RecordTrack> AudioFlinger::RecordThread::createR lStatus = initCheck(); if (lStatus != NO_ERROR) { - LOGE("Audio driver not initialized."); + ALOGE("Audio driver not initialized."); goto Exit; } @@ -4633,7 +4633,7 @@ status_t AudioFlinger::RecordThread::getNextBuffer(AudioBufferProvider::Buffer* if (framesReady == 0) { mBytesRead = mInput->stream->read(mInput->stream, mRsmpInBuffer, mInputBytes); if (mBytesRead < 0) { - LOGE("RecordThread::getNextBuffer() Error reading audio input"); + ALOGE("RecordThread::getNextBuffer() Error reading audio input"); if (mActiveTrack->mState == TrackBase::ACTIVE) { // Force input into standby so that it tries to // recover at next read attempt @@ -5552,7 +5552,7 @@ sp<IEffect> AudioFlinger::createEffect(pid_t pid, if (thread == NULL) { thread = checkPlaybackThread_l(io); if (thread == NULL) { - LOGE("createEffect() unknown output thread"); + ALOGE("createEffect() unknown output thread"); lStatus = BAD_VALUE; goto Exit; } @@ -6835,7 +6835,7 @@ AudioFlinger::EffectHandle::EffectHandle(const sp<EffectModule>& effect, mBuffer = (uint8_t *)mCblk + bufOffset; } } else { - LOGE("not enough memory for Effect size=%u", EFFECT_PARAM_BUFFER_SIZE + sizeof(effect_param_cblk_t)); + ALOGE("not enough memory for Effect size=%u", EFFECT_PARAM_BUFFER_SIZE + sizeof(effect_param_cblk_t)); return; } } diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp index 739e993..9dda256 100644 --- a/services/audioflinger/AudioMixer.cpp +++ b/services/audioflinger/AudioMixer.cpp @@ -1099,7 +1099,7 @@ void AudioMixer::process__OneTrack16BitsStereoNoResampling(state_t* state) // been enabled for mixing. if (in == NULL || ((unsigned long)in & 3)) { memset(out, 0, numFrames*MAX_NUM_CHANNELS*sizeof(int16_t)); - LOGE_IF(((unsigned long)in & 3), "process stereo track: input buffer alignment pb: buffer %p track %d, channels %d, needs %08x", + ALOGE_IF(((unsigned long)in & 3), "process stereo track: input buffer alignment pb: buffer %p track %d, channels %d, needs %08x", in, i, t.channelCount, t.needs); return; } diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp index 97755d9..6be669b 100644 --- a/services/audioflinger/AudioPolicyService.cpp +++ b/services/audioflinger/AudioPolicyService.cpp @@ -53,7 +53,7 @@ static const int kDumpLockSleep = 20000; static bool checkPermission() { if (getpid() == IPCThreadState::self()->getCallingPid()) return true; bool ok = checkCallingPermission(String16("android.permission.MODIFY_AUDIO_SETTINGS")); - if (!ok) LOGE("Request requires android.permission.MODIFY_AUDIO_SETTINGS"); + if (!ok) ALOGE("Request requires android.permission.MODIFY_AUDIO_SETTINGS"); return ok; } @@ -84,18 +84,18 @@ AudioPolicyService::AudioPolicyService() return; rc = audio_policy_dev_open(module, &mpAudioPolicyDev); - LOGE_IF(rc, "couldn't open audio policy device (%s)", strerror(-rc)); + ALOGE_IF(rc, "couldn't open audio policy device (%s)", strerror(-rc)); if (rc) return; rc = mpAudioPolicyDev->create_audio_policy(mpAudioPolicyDev, &aps_ops, this, &mpAudioPolicy); - LOGE_IF(rc, "couldn't create audio policy (%s)", strerror(-rc)); + ALOGE_IF(rc, "couldn't create audio policy (%s)", strerror(-rc)); if (rc) return; rc = mpAudioPolicy->init_check(mpAudioPolicy); - LOGE_IF(rc, "couldn't init_check the audio policy (%s)", strerror(-rc)); + ALOGE_IF(rc, "couldn't init_check the audio policy (%s)", strerror(-rc)); if (rc) return; @@ -1028,9 +1028,9 @@ int AudioPolicyService::startTone(audio_policy_tone_t tone, audio_stream_type_t stream) { if (tone != AUDIO_POLICY_TONE_IN_CALL_NOTIFICATION) - LOGE("startTone: illegal tone requested (%d)", tone); + ALOGE("startTone: illegal tone requested (%d)", tone); if (stream != AUDIO_STREAM_VOICE_CALL) - LOGE("startTone: illegal stream (%d) requested for tone %d", stream, + ALOGE("startTone: illegal stream (%d) requested for tone %d", stream, tone); mTonePlaybackThread->startToneCommand(ToneGenerator::TONE_SUP_CALL_WAITING, AUDIO_STREAM_VOICE_CALL); diff --git a/services/audioflinger/AudioResampler.cpp b/services/audioflinger/AudioResampler.cpp index 41770dc..ee5bf66 100644 --- a/services/audioflinger/AudioResampler.cpp +++ b/services/audioflinger/AudioResampler.cpp @@ -121,7 +121,7 @@ AudioResampler::AudioResampler(int bitDepth, int inChannelCount, mPhaseFraction(0) { // sanity check on format if ((bitDepth != 16) ||(inChannelCount < 1) || (inChannelCount > 2)) { - LOGE("Unsupported sample format, %d bits, %d channels", bitDepth, + ALOGE("Unsupported sample format, %d bits, %d channels", bitDepth, inChannelCount); // LOG_ASSERT(0); } @@ -190,7 +190,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount, size_t outputSampleCount = outFrameCount * 2; size_t inFrameCount = (outFrameCount*mInSampleRate)/mSampleRate; - // LOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d\n", + // ALOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d\n", // outFrameCount, inputIndex, phaseFraction, phaseIncrement); while (outputIndex < outputSampleCount) { @@ -203,7 +203,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount, goto resampleStereo16_exit; } - // LOGE("New buffer fetched: %d frames\n", mBuffer.frameCount); + // ALOGE("New buffer fetched: %d frames\n", mBuffer.frameCount); if (mBuffer.frameCount > inputIndex) break; inputIndex -= mBuffer.frameCount; @@ -217,7 +217,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount, // handle boundary case while (inputIndex == 0) { - // LOGE("boundary case\n"); + // ALOGE("boundary case\n"); out[outputIndex++] += vl * Interp(mX0L, in[0], phaseFraction); out[outputIndex++] += vr * Interp(mX0R, in[1], phaseFraction); Advance(&inputIndex, &phaseFraction, phaseIncrement); @@ -226,7 +226,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount, } // process input samples - // LOGE("general case\n"); + // ALOGE("general case\n"); #ifdef ASM_ARM_RESAMP1 // asm optimisation for ResamplerOrder1 if (inputIndex + 2 < mBuffer.frameCount) { @@ -248,13 +248,13 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount, Advance(&inputIndex, &phaseFraction, phaseIncrement); } - // LOGE("loop done - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex); + // ALOGE("loop done - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex); // if done with buffer, save samples if (inputIndex >= mBuffer.frameCount) { inputIndex -= mBuffer.frameCount; - // LOGE("buffer done, new input index %d", inputIndex); + // ALOGE("buffer done, new input index %d", inputIndex); mX0L = mBuffer.i16[mBuffer.frameCount*2-2]; mX0R = mBuffer.i16[mBuffer.frameCount*2-1]; @@ -265,7 +265,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount, } } - // LOGE("output buffer full - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex); + // ALOGE("output buffer full - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex); resampleStereo16_exit: // save state @@ -286,7 +286,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount, size_t outputSampleCount = outFrameCount * 2; size_t inFrameCount = (outFrameCount*mInSampleRate)/mSampleRate; - // LOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d\n", + // ALOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d\n", // outFrameCount, inputIndex, phaseFraction, phaseIncrement); while (outputIndex < outputSampleCount) { // buffer is empty, fetch a new one @@ -298,7 +298,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount, mPhaseFraction = phaseFraction; goto resampleMono16_exit; } - // LOGE("New buffer fetched: %d frames\n", mBuffer.frameCount); + // ALOGE("New buffer fetched: %d frames\n", mBuffer.frameCount); if (mBuffer.frameCount > inputIndex) break; inputIndex -= mBuffer.frameCount; @@ -310,7 +310,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount, // handle boundary case while (inputIndex == 0) { - // LOGE("boundary case\n"); + // ALOGE("boundary case\n"); int32_t sample = Interp(mX0L, in[0], phaseFraction); out[outputIndex++] += vl * sample; out[outputIndex++] += vr * sample; @@ -320,7 +320,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount, } // process input samples - // LOGE("general case\n"); + // ALOGE("general case\n"); #ifdef ASM_ARM_RESAMP1 // asm optimisation for ResamplerOrder1 if (inputIndex + 2 < mBuffer.frameCount) { @@ -343,13 +343,13 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount, } - // LOGE("loop done - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex); + // ALOGE("loop done - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex); // if done with buffer, save samples if (inputIndex >= mBuffer.frameCount) { inputIndex -= mBuffer.frameCount; - // LOGE("buffer done, new input index %d", inputIndex); + // ALOGE("buffer done, new input index %d", inputIndex); mX0L = mBuffer.i16[mBuffer.frameCount-1]; provider->releaseBuffer(&mBuffer); @@ -359,7 +359,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount, } } - // LOGE("output buffer full - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex); + // ALOGE("output buffer full - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex); resampleMono16_exit: // save state diff --git a/services/camera/libcameraservice/CameraHardwareInterface.h b/services/camera/libcameraservice/CameraHardwareInterface.h index 44b9de8..34087b5 100644 --- a/services/camera/libcameraservice/CameraHardwareInterface.h +++ b/services/camera/libcameraservice/CameraHardwareInterface.h @@ -92,7 +92,7 @@ public: if(mDevice) { int rc = mDevice->common.close(&mDevice->common); if (rc != OK) - LOGE("Could not close camera %s: %d", mName.string(), rc); + ALOGE("Could not close camera %s: %d", mName.string(), rc); } } @@ -102,7 +102,7 @@ public: int rc = module->methods->open(module, mName.string(), (hw_device_t **)&mDevice); if (rc != OK) { - LOGE("Could not open camera %s: %d", mName.string(), rc); + ALOGE("Could not open camera %s: %d", mName.string(), rc); return rc; } initHalPreviewWindow(); @@ -460,7 +460,7 @@ private: static_cast<CameraHardwareInterface *>(user); sp<CameraHeapMemory> mem(static_cast<CameraHeapMemory *>(data->handle)); if (index >= mem->mNumBufs) { - LOGE("%s: invalid buffer index %d, max allowed is %d", __FUNCTION__, + ALOGE("%s: invalid buffer index %d, max allowed is %d", __FUNCTION__, index, mem->mNumBufs); return; } @@ -479,7 +479,7 @@ private: // MemoryHeapBase. sp<CameraHeapMemory> mem(static_cast<CameraHeapMemory *>(data->handle)); if (index >= mem->mNumBufs) { - LOGE("%s: invalid buffer index %d, max allowed is %d", __FUNCTION__, + ALOGE("%s: invalid buffer index %d, max allowed is %d", __FUNCTION__, index, mem->mNumBufs); return; } diff --git a/services/camera/libcameraservice/CameraHardwareStub.cpp b/services/camera/libcameraservice/CameraHardwareStub.cpp index f922630..cdfb2f5 100644 --- a/services/camera/libcameraservice/CameraHardwareStub.cpp +++ b/services/camera/libcameraservice/CameraHardwareStub.cpp @@ -57,7 +57,7 @@ void CameraHardwareStub::initDefaultParameters() p.setPictureFormat(CameraParameters::PIXEL_FORMAT_JPEG); if (setParameters(p) != NO_ERROR) { - LOGE("Failed to set default parameters?!"); + ALOGE("Failed to set default parameters?!"); } } @@ -340,20 +340,20 @@ status_t CameraHardwareStub::setParameters(const CameraParameters& params) if (strcmp(params.getPreviewFormat(), CameraParameters::PIXEL_FORMAT_YUV420SP) != 0) { - LOGE("Only yuv420sp preview is supported"); + ALOGE("Only yuv420sp preview is supported"); return -1; } if (strcmp(params.getPictureFormat(), CameraParameters::PIXEL_FORMAT_JPEG) != 0) { - LOGE("Only jpeg still pictures are supported"); + ALOGE("Only jpeg still pictures are supported"); return -1; } int w, h; params.getPictureSize(&w, &h); if (w != kCannedJpegWidth && h != kCannedJpegHeight) { - LOGE("Still picture size must be size of canned JPEG (%dx%d)", + ALOGE("Still picture size must be size of canned JPEG (%dx%d)", kCannedJpegWidth, kCannedJpegHeight); return -1; } diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp index 56f568e..918f31e 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -83,13 +83,13 @@ void CameraService::onFirstRef() if (hw_get_module(CAMERA_HARDWARE_MODULE_ID, (const hw_module_t **)&mModule) < 0) { - LOGE("Could not load camera HAL module"); + ALOGE("Could not load camera HAL module"); mNumberOfCameras = 0; } else { mNumberOfCameras = mModule->get_number_of_cameras(); if (mNumberOfCameras > MAX_CAMERAS) { - LOGE("Number of cameras(%d) > MAX_CAMERAS(%d).", + ALOGE("Number of cameras(%d) > MAX_CAMERAS(%d).", mNumberOfCameras, MAX_CAMERAS); mNumberOfCameras = MAX_CAMERAS; } @@ -102,7 +102,7 @@ void CameraService::onFirstRef() CameraService::~CameraService() { for (int i = 0; i < mNumberOfCameras; i++) { if (mBusy[i]) { - LOGE("camera %d is still in use in destructor!", i); + ALOGE("camera %d is still in use in destructor!", i); } } @@ -138,13 +138,13 @@ sp<ICamera> CameraService::connect( LOG1("CameraService::connect E (pid %d, id %d)", callingPid, cameraId); if (!mModule) { - LOGE("Camera HAL module not loaded"); + ALOGE("Camera HAL module not loaded"); return NULL; } sp<Client> client; if (cameraId < 0 || cameraId >= mNumberOfCameras) { - LOGE("CameraService::connect X (pid %d) rejected (invalid cameraId %d).", + ALOGE("CameraService::connect X (pid %d) rejected (invalid cameraId %d).", callingPid, cameraId); return NULL; } @@ -182,7 +182,7 @@ sp<ICamera> CameraService::connect( struct camera_info info; if (mModule->get_camera_info(cameraId, &info) != OK) { - LOGE("Invalid camera id %d", cameraId); + ALOGE("Invalid camera id %d", cameraId); return NULL; } @@ -253,7 +253,7 @@ status_t CameraService::onTransact( if (!checkCallingPermission( String16("android.permission.CAMERA"))) { const int uid = getCallingUid(); - LOGE("Permission Denial: " + ALOGE("Permission Denial: " "can't use the camera pid=%d, uid=%d", pid, uid); return PERMISSION_DENIED; } @@ -288,7 +288,7 @@ MediaPlayer* CameraService::newMediaPlayer(const char *file) { mp->setAudioStreamType(AUDIO_STREAM_ENFORCED_AUDIBLE); mp->prepare(); } else { - LOGE("Failed to load CameraService sounds: %s", file); + ALOGE("Failed to load CameraService sounds: %s", file); return NULL; } return mp; @@ -389,7 +389,7 @@ status_t CameraService::Client::checkPidAndHardware() const { status_t result = checkPid(); if (result != NO_ERROR) return result; if (mHardware == 0) { - LOGE("attempt to use a camera after disconnect() (pid %d)", getCallingPid()); + ALOGE("attempt to use a camera after disconnect() (pid %d)", getCallingPid()); return INVALID_OPERATION; } return NO_ERROR; @@ -419,7 +419,7 @@ status_t CameraService::Client::unlock() { status_t result = checkPid(); if (result == NO_ERROR) { if (mHardware->recordingEnabled()) { - LOGE("Not allowed to unlock camera during recording."); + ALOGE("Not allowed to unlock camera during recording."); return INVALID_OPERATION; } mClientPid = 0; @@ -526,7 +526,7 @@ status_t CameraService::Client::setPreviewWindow(const sp<IBinder>& binder, if (window != 0) { result = native_window_api_connect(window.get(), NATIVE_WINDOW_API_CAMERA); if (result != NO_ERROR) { - LOGE("native_window_api_connect failed: %s (%d)", strerror(-result), + ALOGE("native_window_api_connect failed: %s (%d)", strerror(-result), result); return result; } @@ -624,7 +624,7 @@ status_t CameraService::Client::startCameraMode(camera_mode mode) { return startPreviewMode(); case CAMERA_RECORDING_MODE: if (mSurface == 0 && mPreviewWindow == 0) { - LOGE("mSurface or mPreviewWindow must be set before startRecordingMode."); + ALOGE("mSurface or mPreviewWindow must be set before startRecordingMode."); return INVALID_OPERATION; } return startRecordingMode(); @@ -676,7 +676,7 @@ status_t CameraService::Client::startRecordingMode() { mCameraService->playSound(SOUND_RECORDING); result = mHardware->startRecording(); if (result != NO_ERROR) { - LOGE("mHardware->startRecording() failed with status %d", result); + ALOGE("mHardware->startRecording() failed with status %d", result); } return result; } @@ -770,7 +770,7 @@ status_t CameraService::Client::takePicture(int msgType) { if ((msgType & CAMERA_MSG_RAW_IMAGE) && (msgType & CAMERA_MSG_RAW_IMAGE_NOTIFY)) { - LOGE("CAMERA_MSG_RAW_IMAGE and CAMERA_MSG_RAW_IMAGE_NOTIFY" + ALOGE("CAMERA_MSG_RAW_IMAGE and CAMERA_MSG_RAW_IMAGE_NOTIFY" " cannot be both enabled"); return BAD_VALUE; } @@ -831,7 +831,7 @@ status_t CameraService::Client::enableShutterSound(bool enable) { // Disabling shutter sound is not allowed. Deny if the current // process is not mediaserver. if (getCallingPid() != getpid()) { - LOGE("Failed to disable shutter sound. Permission denied (pid %d)", getCallingPid()); + ALOGE("Failed to disable shutter sound. Permission denied (pid %d)", getCallingPid()); return PERMISSION_DENIED; } } @@ -926,12 +926,12 @@ sp<CameraService::Client> CameraService::Client::getClientFromCookie(void* user) // The checks below are not necessary and are for debugging only. if (client->mCameraService.get() != gCameraService) { - LOGE("mismatch service!"); + ALOGE("mismatch service!"); return NULL; } if (client->mHardware == 0) { - LOGE("mHardware == 0: callback after disconnect()?"); + ALOGE("mHardware == 0: callback after disconnect()?"); return NULL; } @@ -989,7 +989,7 @@ void CameraService::Client::dataCallback(int32_t msgType, if (!client->lockIfMessageWanted(msgType)) return; if (dataPtr == 0 && metadata == NULL) { - LOGE("Null data returned in data callback"); + ALOGE("Null data returned in data callback"); client->handleGenericNotify(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0); return; } @@ -1022,7 +1022,7 @@ void CameraService::Client::dataCallbackTimestamp(nsecs_t timestamp, if (!client->lockIfMessageWanted(msgType)) return; if (dataPtr == 0) { - LOGE("Null data returned in data with timestamp callback"); + ALOGE("Null data returned in data with timestamp callback"); client->handleGenericNotify(CAMERA_MSG_ERROR, UNKNOWN_ERROR, 0); return; } @@ -1177,7 +1177,7 @@ void CameraService::Client::copyFrameAndPostCopiedFrame( mPreviewBuffer = new MemoryHeapBase(size, 0, NULL); } if (mPreviewBuffer == 0) { - LOGE("failed to allocate space for preview buffer"); + ALOGE("failed to allocate space for preview buffer"); mLock.unlock(); return; } @@ -1187,7 +1187,7 @@ void CameraService::Client::copyFrameAndPostCopiedFrame( sp<MemoryBase> frame = new MemoryBase(previewBuffer, 0, size); if (frame == 0) { - LOGE("failed to allocate space for frame callback"); + ALOGE("failed to allocate space for frame callback"); mLock.unlock(); return; } @@ -1213,7 +1213,7 @@ int CameraService::Client::getOrientation(int degrees, bool mirror) { return HAL_TRANSFORM_FLIP_V | HAL_TRANSFORM_ROT_90; } } - LOGE("Invalid setDisplayOrientation degrees=%d", degrees); + ALOGE("Invalid setDisplayOrientation degrees=%d", degrees); return -1; } diff --git a/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp b/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp index 69f60ca..1055538 100644 --- a/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp +++ b/services/camera/tests/CameraServiceTest/CameraServiceTest.cpp @@ -217,7 +217,7 @@ bool MCameraClient::test(OP op, int v1, int v2) { void MCameraClient::assertTest(OP op, int v1, int v2) { if (!test(op, v1, v2)) { - LOGE("assertTest failed: op=%d, v1=%d, v2=%d", op, v1, v2); + ALOGE("assertTest failed: op=%d, v1=%d, v2=%d", op, v1, v2); ASSERT(0); } } diff --git a/services/input/EventHub.cpp b/services/input/EventHub.cpp index 4c28a16..6db750e 100644 --- a/services/input/EventHub.cpp +++ b/services/input/EventHub.cpp @@ -657,7 +657,7 @@ size_t EventHub::getEvents(int timeoutMillis, RawEvent* buffer, size_t bufferSiz ALOGW("could not get event (errno=%d)", errno); } } else if ((readSize % sizeof(struct input_event)) != 0) { - LOGE("could not get event (wrong size: %d)", readSize); + ALOGE("could not get event (wrong size: %d)", readSize); } else { int32_t deviceId = device->id == mBuiltInKeyboardId ? 0 : device->id; @@ -810,7 +810,7 @@ void EventHub::wake() { void EventHub::scanDevicesLocked() { status_t res = scanDirLocked(DEVICE_PATH); if(res < 0) { - LOGE("scan dir failed for %s\n", DEVICE_PATH); + ALOGE("scan dir failed for %s\n", DEVICE_PATH); } } @@ -847,7 +847,7 @@ status_t EventHub::openDeviceLocked(const char *devicePath) { int fd = open(devicePath, O_RDWR); if(fd < 0) { - LOGE("could not open %s, %s\n", devicePath, strerror(errno)); + ALOGE("could not open %s, %s\n", devicePath, strerror(errno)); return -1; } @@ -874,7 +874,7 @@ status_t EventHub::openDeviceLocked(const char *devicePath) { // Get device driver version. int driverVersion; if(ioctl(fd, EVIOCGVERSION, &driverVersion)) { - LOGE("could not get driver version for %s, %s\n", devicePath, strerror(errno)); + ALOGE("could not get driver version for %s, %s\n", devicePath, strerror(errno)); close(fd); return -1; } @@ -882,7 +882,7 @@ status_t EventHub::openDeviceLocked(const char *devicePath) { // Get device identifier. struct input_id inputId; if(ioctl(fd, EVIOCGID, &inputId)) { - LOGE("could not get device input id for %s, %s\n", devicePath, strerror(errno)); + ALOGE("could not get device input id for %s, %s\n", devicePath, strerror(errno)); close(fd); return -1; } @@ -909,7 +909,7 @@ status_t EventHub::openDeviceLocked(const char *devicePath) { // Make file descriptor non-blocking for use with poll(). if (fcntl(fd, F_SETFL, O_NONBLOCK)) { - LOGE("Error %d making device file descriptor non-blocking.", errno); + ALOGE("Error %d making device file descriptor non-blocking.", errno); close(fd); return -1; } @@ -1072,7 +1072,7 @@ status_t EventHub::openDeviceLocked(const char *devicePath) { eventItem.events = EPOLLIN; eventItem.data.u32 = deviceId; if (epoll_ctl(mEpollFd, EPOLL_CTL_ADD, fd, &eventItem)) { - LOGE("Could not add device fd to epoll instance. errno=%d", errno); + ALOGE("Could not add device fd to epoll instance. errno=%d", errno); delete device; return -1; } @@ -1103,7 +1103,7 @@ void EventHub::loadConfigurationLocked(Device* device) { status_t status = PropertyMap::load(device->configurationFile, &device->configuration); if (status) { - LOGE("Error loading input device configuration file for device '%s'. " + ALOGE("Error loading input device configuration file for device '%s'. " "Using default configuration.", device->identifier.name.string()); } diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp index 19c01a1..46a5cc6 100644 --- a/services/input/InputDispatcher.cpp +++ b/services/input/InputDispatcher.cpp @@ -121,7 +121,7 @@ static bool isValidKeyAction(int32_t action) { static bool validateKeyEvent(int32_t action) { if (! isValidKeyAction(action)) { - LOGE("Key event has invalid action code 0x%x", action); + ALOGE("Key event has invalid action code 0x%x", action); return false; } return true; @@ -152,11 +152,11 @@ static bool isValidMotionAction(int32_t action, size_t pointerCount) { static bool validateMotionEvent(int32_t action, size_t pointerCount, const PointerProperties* pointerProperties) { if (! isValidMotionAction(action, pointerCount)) { - LOGE("Motion event has invalid action code 0x%x", action); + ALOGE("Motion event has invalid action code 0x%x", action); return false; } if (pointerCount < 1 || pointerCount > MAX_POINTERS) { - LOGE("Motion event has invalid pointer count %d; value must be between 1 and %d.", + ALOGE("Motion event has invalid pointer count %d; value must be between 1 and %d.", pointerCount, MAX_POINTERS); return false; } @@ -164,12 +164,12 @@ static bool validateMotionEvent(int32_t action, size_t pointerCount, for (size_t i = 0; i < pointerCount; i++) { int32_t id = pointerProperties[i].id; if (id < 0 || id > MAX_POINTER_ID) { - LOGE("Motion event has invalid pointer id %d; value must be between 0 and %d", + ALOGE("Motion event has invalid pointer id %d; value must be between 0 and %d", id, MAX_POINTER_ID); return false; } if (pointerIdBits.hasBit(id)) { - LOGE("Motion event has duplicate pointer id %d", id); + ALOGE("Motion event has duplicate pointer id %d", id); return false; } pointerIdBits.markBit(id); @@ -2168,7 +2168,7 @@ void InputDispatcher::startDispatchCycleLocked(nsecs_t currentTime, keyEntry->eventTime); if (status) { - LOGE("channel '%s' ~ Could not publish key event, " + ALOGE("channel '%s' ~ Could not publish key event, " "status=%d", connection->getInputChannelName(), status); abortBrokenDispatchCycleLocked(currentTime, connection, true /*notify*/); return; @@ -2231,7 +2231,7 @@ void InputDispatcher::startDispatchCycleLocked(nsecs_t currentTime, usingCoords); if (status) { - LOGE("channel '%s' ~ Could not publish motion event, " + ALOGE("channel '%s' ~ Could not publish motion event, " "status=%d", connection->getInputChannelName(), status); abortBrokenDispatchCycleLocked(currentTime, connection, true /*notify*/); return; @@ -2263,7 +2263,7 @@ void InputDispatcher::startDispatchCycleLocked(nsecs_t currentTime, break; } if (status != OK) { - LOGE("channel '%s' ~ Could not append motion sample " + ALOGE("channel '%s' ~ Could not append motion sample " "for a reason other than out of memory, status=%d", connection->getInputChannelName(), status); abortBrokenDispatchCycleLocked(currentTime, connection, true /*notify*/); @@ -2286,7 +2286,7 @@ void InputDispatcher::startDispatchCycleLocked(nsecs_t currentTime, // Send the dispatch signal. status = connection->inputPublisher.sendDispatchSignal(); if (status) { - LOGE("channel '%s' ~ Could not send dispatch signal, status=%d", + ALOGE("channel '%s' ~ Could not send dispatch signal, status=%d", connection->getInputChannelName(), status); abortBrokenDispatchCycleLocked(currentTime, connection, true /*notify*/); return; @@ -2321,7 +2321,7 @@ void InputDispatcher::finishDispatchCycleLocked(nsecs_t currentTime, // while waiting for the next dispatch cycle to begin. status_t status = connection->inputPublisher.reset(); if (status) { - LOGE("channel '%s' ~ Could not reset publisher, status=%d", + ALOGE("channel '%s' ~ Could not reset publisher, status=%d", connection->getInputChannelName(), status); abortBrokenDispatchCycleLocked(currentTime, connection, true /*notify*/); return; @@ -2408,7 +2408,7 @@ int InputDispatcher::handleReceiveCallback(int receiveFd, int events, void* data ssize_t connectionIndex = d->mConnectionsByReceiveFd.indexOfKey(receiveFd); if (connectionIndex < 0) { - LOGE("Received spurious receive callback for unknown input channel. " + ALOGE("Received spurious receive callback for unknown input channel. " "fd=%d, events=0x%x", receiveFd, events); return 0; // remove the callback } @@ -2431,7 +2431,7 @@ int InputDispatcher::handleReceiveCallback(int receiveFd, int events, void* data return 1; } - LOGE("channel '%s' ~ Failed to receive finished signal. status=%d", + ALOGE("channel '%s' ~ Failed to receive finished signal. status=%d", connection->getInputChannelName(), status); notify = true; } else { @@ -3651,7 +3651,7 @@ status_t InputDispatcher::registerInputChannel(const sp<InputChannel>& inputChan sp<Connection> connection = new Connection(inputChannel, inputWindowHandle, monitor); status_t status = connection->initialize(); if (status) { - LOGE("Failed to initialize input publisher for input channel '%s', status=%d", + ALOGE("Failed to initialize input publisher for input channel '%s', status=%d", inputChannel->getName().string(), status); return status; } @@ -3770,7 +3770,7 @@ void InputDispatcher::onDispatchCycleFinishedLocked( void InputDispatcher::onDispatchCycleBrokenLocked( nsecs_t currentTime, const sp<Connection>& connection) { - LOGE("channel '%s' ~ Channel is unrecoverably broken and will be disposed!", + ALOGE("channel '%s' ~ Channel is unrecoverably broken and will be disposed!", connection->getInputChannelName()); CommandEntry* commandEntry = postCommandLocked( diff --git a/services/input/InputManager.cpp b/services/input/InputManager.cpp index 29c5884..6a6547b 100644 --- a/services/input/InputManager.cpp +++ b/services/input/InputManager.cpp @@ -53,13 +53,13 @@ void InputManager::initialize() { status_t InputManager::start() { status_t result = mDispatcherThread->run("InputDispatcher", PRIORITY_URGENT_DISPLAY); if (result) { - LOGE("Could not start InputDispatcher thread due to error %d.", result); + ALOGE("Could not start InputDispatcher thread due to error %d.", result); return result; } result = mReaderThread->run("InputReader", PRIORITY_URGENT_DISPLAY); if (result) { - LOGE("Could not start InputReader thread due to error %d.", result); + ALOGE("Could not start InputReader thread due to error %d.", result); mDispatcherThread->requestExit(); return result; diff --git a/services/input/SpriteController.cpp b/services/input/SpriteController.cpp index 0ae2ab8..b15d4c8 100644 --- a/services/input/SpriteController.cpp +++ b/services/input/SpriteController.cpp @@ -160,7 +160,7 @@ void SpriteController::doUpdateSprites() { status_t status = update.state.surfaceControl->setSize(desiredWidth, desiredHeight); if (status) { - LOGE("Error %d resizing sprite surface from %dx%d to %dx%d", + ALOGE("Error %d resizing sprite surface from %dx%d to %dx%d", status, update.state.surfaceWidth, update.state.surfaceHeight, desiredWidth, desiredHeight); } else { @@ -172,7 +172,7 @@ void SpriteController::doUpdateSprites() { if (update.state.surfaceVisible) { status = update.state.surfaceControl->hide(); if (status) { - LOGE("Error %d hiding sprite surface after resize.", status); + ALOGE("Error %d hiding sprite surface after resize.", status); } else { update.state.surfaceVisible = false; } @@ -200,7 +200,7 @@ void SpriteController::doUpdateSprites() { Surface::SurfaceInfo surfaceInfo; status_t status = surface->lock(&surfaceInfo); if (status) { - LOGE("Error %d locking sprite surface before drawing.", status); + ALOGE("Error %d locking sprite surface before drawing.", status); } else { SkBitmap surfaceBitmap; ssize_t bpr = surfaceInfo.s * bytesPerPixel(surfaceInfo.format); @@ -228,7 +228,7 @@ void SpriteController::doUpdateSprites() { status = surface->unlockAndPost(); if (status) { - LOGE("Error %d unlocking and posting sprite surface after drawing.", status); + ALOGE("Error %d unlocking and posting sprite surface after drawing.", status); } else { update.state.surfaceDrawn = true; update.surfaceChanged = surfaceChanged = true; @@ -260,7 +260,7 @@ void SpriteController::doUpdateSprites() { && (becomingVisible || (update.state.dirty & DIRTY_ALPHA))) { status = update.state.surfaceControl->setAlpha(update.state.alpha); if (status) { - LOGE("Error %d setting sprite surface alpha.", status); + ALOGE("Error %d setting sprite surface alpha.", status); } } @@ -271,7 +271,7 @@ void SpriteController::doUpdateSprites() { update.state.positionX - update.state.icon.hotSpotX, update.state.positionY - update.state.icon.hotSpotY); if (status) { - LOGE("Error %d setting sprite surface position.", status); + ALOGE("Error %d setting sprite surface position.", status); } } @@ -284,7 +284,7 @@ void SpriteController::doUpdateSprites() { update.state.transformationMatrix.dsdy, update.state.transformationMatrix.dtdy); if (status) { - LOGE("Error %d setting sprite surface transformation matrix.", status); + ALOGE("Error %d setting sprite surface transformation matrix.", status); } } @@ -293,14 +293,14 @@ void SpriteController::doUpdateSprites() { && (becomingVisible || (update.state.dirty & DIRTY_LAYER))) { status = update.state.surfaceControl->setLayer(surfaceLayer); if (status) { - LOGE("Error %d setting sprite surface layer.", status); + ALOGE("Error %d setting sprite surface layer.", status); } } if (becomingVisible) { status = update.state.surfaceControl->show(surfaceLayer); if (status) { - LOGE("Error %d showing sprite surface.", status); + ALOGE("Error %d showing sprite surface.", status); } else { update.state.surfaceVisible = true; update.surfaceChanged = surfaceChanged = true; @@ -308,7 +308,7 @@ void SpriteController::doUpdateSprites() { } else if (becomingHidden) { status = update.state.surfaceControl->hide(); if (status) { - LOGE("Error %d hiding sprite surface.", status); + ALOGE("Error %d hiding sprite surface.", status); } else { update.state.surfaceVisible = false; update.surfaceChanged = surfaceChanged = true; @@ -372,7 +372,7 @@ sp<SurfaceControl> SpriteController::obtainSurface(int32_t width, int32_t height String8("Sprite"), 0, width, height, PIXEL_FORMAT_RGBA_8888); if (surfaceControl == NULL || !surfaceControl->isValid() || !surfaceControl->getSurface()->isValid()) { - LOGE("Error creating sprite surface."); + ALOGE("Error creating sprite surface."); return NULL; } return surfaceControl; diff --git a/services/jni/com_android_server_AlarmManagerService.cpp b/services/jni/com_android_server_AlarmManagerService.cpp index 5f189a2..c2f6151 100644 --- a/services/jni/com_android_server_AlarmManagerService.cpp +++ b/services/jni/com_android_server_AlarmManagerService.cpp @@ -46,7 +46,7 @@ static jint android_server_AlarmManagerService_setKernelTimezone(JNIEnv* env, jo int result = settimeofday(NULL, &tz); if (result < 0) { - LOGE("Unable to set kernel timezone to %d: %s\n", minswest, strerror(errno)); + ALOGE("Unable to set kernel timezone to %d: %s\n", minswest, strerror(errno)); return -1; } else { ALOGD("Kernel timezone updated to %d minutes west of GMT\n", minswest); @@ -74,7 +74,7 @@ static void android_server_AlarmManagerService_set(JNIEnv* env, jobject obj, jin int result = ioctl(fd, ANDROID_ALARM_SET(type), &ts); if (result < 0) { - LOGE("Unable to set alarm to %lld.%09lld: %s\n", seconds, nanoseconds, strerror(errno)); + ALOGE("Unable to set alarm to %lld.%09lld: %s\n", seconds, nanoseconds, strerror(errno)); } } @@ -89,7 +89,7 @@ static jint android_server_AlarmManagerService_waitForAlarm(JNIEnv* env, jobject if (result < 0) { - LOGE("Unable to wait on alarm: %s\n", strerror(errno)); + ALOGE("Unable to wait on alarm: %s\n", strerror(errno)); return 0; } diff --git a/services/jni/com_android_server_BatteryService.cpp b/services/jni/com_android_server_BatteryService.cpp index 6082fc7..1cadc4e 100644 --- a/services/jni/com_android_server_BatteryService.cpp +++ b/services/jni/com_android_server_BatteryService.cpp @@ -137,7 +137,7 @@ static int readFromFile(const char* path, char* buf, size_t size) return -1; int fd = open(path, O_RDONLY, 0); if (fd == -1) { - LOGE("Could not open '%s'", path); + ALOGE("Could not open '%s'", path); return -1; } @@ -232,7 +232,7 @@ int register_android_server_BatteryService(JNIEnv* env) DIR* dir = opendir(POWER_SUPPLY_PATH); if (dir == NULL) { - LOGE("Could not open %s\n", POWER_SUPPLY_PATH); + ALOGE("Could not open %s\n", POWER_SUPPLY_PATH); return -1; } while ((entry = readdir(dir))) { @@ -304,28 +304,28 @@ int register_android_server_BatteryService(JNIEnv* env) closedir(dir); if (!gPaths.acOnlinePath) - LOGE("acOnlinePath not found"); + ALOGE("acOnlinePath not found"); if (!gPaths.usbOnlinePath) - LOGE("usbOnlinePath not found"); + ALOGE("usbOnlinePath not found"); if (!gPaths.batteryStatusPath) - LOGE("batteryStatusPath not found"); + ALOGE("batteryStatusPath not found"); if (!gPaths.batteryHealthPath) - LOGE("batteryHealthPath not found"); + ALOGE("batteryHealthPath not found"); if (!gPaths.batteryPresentPath) - LOGE("batteryPresentPath not found"); + ALOGE("batteryPresentPath not found"); if (!gPaths.batteryCapacityPath) - LOGE("batteryCapacityPath not found"); + ALOGE("batteryCapacityPath not found"); if (!gPaths.batteryVoltagePath) - LOGE("batteryVoltagePath not found"); + ALOGE("batteryVoltagePath not found"); if (!gPaths.batteryTemperaturePath) - LOGE("batteryTemperaturePath not found"); + ALOGE("batteryTemperaturePath not found"); if (!gPaths.batteryTechnologyPath) - LOGE("batteryTechnologyPath not found"); + ALOGE("batteryTechnologyPath not found"); jclass clazz = env->FindClass("com/android/server/BatteryService"); if (clazz == NULL) { - LOGE("Can't find com/android/server/BatteryService"); + ALOGE("Can't find com/android/server/BatteryService"); return -1; } @@ -352,7 +352,7 @@ int register_android_server_BatteryService(JNIEnv* env) clazz = env->FindClass("android/os/BatteryManager"); if (clazz == NULL) { - LOGE("Can't find android/os/BatteryManager"); + ALOGE("Can't find android/os/BatteryManager"); return -1; } diff --git a/services/jni/com_android_server_InputManager.cpp b/services/jni/com_android_server_InputManager.cpp index 5116785..e163826 100644 --- a/services/jni/com_android_server_InputManager.cpp +++ b/services/jni/com_android_server_InputManager.cpp @@ -312,7 +312,7 @@ void NativeInputManager::dump(String8& dump) { bool NativeInputManager::checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName) { if (env->ExceptionCheck()) { - LOGE("An exception was thrown by callback '%s'.", methodName); + ALOGE("An exception was thrown by callback '%s'.", methodName); LOGE_EX(env); env->ExceptionClear(); return true; @@ -736,7 +736,7 @@ bool NativeInputManager::filterInputEvent(const InputEvent* inputEvent, uint32_t } if (!inputEventObj) { - LOGE("Failed to obtain input event object for filterInputEvent."); + ALOGE("Failed to obtain input event object for filterInputEvent."); return true; // dispatch the event normally } @@ -774,7 +774,7 @@ void NativeInputManager::interceptKeyBeforeQueueing(const KeyEvent* keyEvent, android_view_KeyEvent_recycle(env, keyEventObj); env->DeleteLocalRef(keyEventObj); } else { - LOGE("Failed to obtain key event object for interceptKeyBeforeQueueing."); + ALOGE("Failed to obtain key event object for interceptKeyBeforeQueueing."); wmActions = 0; } @@ -879,7 +879,7 @@ nsecs_t NativeInputManager::interceptKeyBeforeDispatching( } } } else { - LOGE("Failed to obtain key event object for interceptKeyBeforeDispatching."); + ALOGE("Failed to obtain key event object for interceptKeyBeforeDispatching."); } env->DeleteLocalRef(inputWindowHandleObj); } @@ -917,7 +917,7 @@ bool NativeInputManager::dispatchUnhandledKey(const sp<InputWindowHandle>& input env->DeleteLocalRef(fallbackKeyEventObj); } } else { - LOGE("Failed to obtain key event object for dispatchUnhandledKey."); + ALOGE("Failed to obtain key event object for dispatchUnhandledKey."); } env->DeleteLocalRef(inputWindowHandleObj); } @@ -958,7 +958,7 @@ static sp<NativeInputManager> gNativeInputManager; static bool checkInputManagerUnitialized(JNIEnv* env) { if (gNativeInputManager == NULL) { - LOGE("Input manager not initialized."); + ALOGE("Input manager not initialized."); jniThrowRuntimeException(env, "Input manager not initialized."); return true; } @@ -971,7 +971,7 @@ static void android_server_InputManager_nativeInit(JNIEnv* env, jclass clazz, sp<Looper> looper = android_os_MessageQueue_getLooper(env, messageQueueObj); gNativeInputManager = new NativeInputManager(contextObj, callbacksObj, looper); } else { - LOGE("Input manager already initialized."); + ALOGE("Input manager already initialized."); jniThrowRuntimeException(env, "Input manager already initialized."); } } diff --git a/services/jni/com_android_server_PowerManagerService.cpp b/services/jni/com_android_server_PowerManagerService.cpp index a389c11..5005864 100644 --- a/services/jni/com_android_server_PowerManagerService.cpp +++ b/services/jni/com_android_server_PowerManagerService.cpp @@ -56,7 +56,7 @@ static const nsecs_t MIN_TIME_BETWEEN_USERACTIVITIES = 500 * 1000000L; // 500ms static bool checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName) { if (env->ExceptionCheck()) { - LOGE("An exception was thrown by callback '%s'.", methodName); + ALOGE("An exception was thrown by callback '%s'.", methodName); LOGE_EX(env); env->ExceptionClear(); return true; diff --git a/services/jni/com_android_server_UsbDeviceManager.cpp b/services/jni/com_android_server_UsbDeviceManager.cpp index 40f0dbd..0cd94b9 100644 --- a/services/jni/com_android_server_UsbDeviceManager.cpp +++ b/services/jni/com_android_server_UsbDeviceManager.cpp @@ -42,7 +42,7 @@ static struct parcel_file_descriptor_offsets_t static void checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName) { if (env->ExceptionCheck()) { - LOGE("An exception was thrown by callback '%s'.", methodName); + ALOGE("An exception was thrown by callback '%s'.", methodName); LOGE_EX(env); env->ExceptionClear(); } @@ -66,7 +66,7 @@ static jobjectArray android_server_UsbDeviceManager_getAccessoryStrings(JNIEnv * { int fd = open(DRIVER_NAME, O_RDWR); if (fd < 0) { - LOGE("could not open %s", DRIVER_NAME); + ALOGE("could not open %s", DRIVER_NAME); return NULL; } jclass stringClass = env->FindClass("java/lang/String"); @@ -88,7 +88,7 @@ static jobject android_server_UsbDeviceManager_openAccessory(JNIEnv *env, jobjec { int fd = open(DRIVER_NAME, O_RDWR); if (fd < 0) { - LOGE("could not open %s", DRIVER_NAME); + ALOGE("could not open %s", DRIVER_NAME); return NULL; } jobject fileDescriptor = jniCreateFileDescriptor(env, fd); @@ -103,7 +103,7 @@ static jboolean android_server_UsbDeviceManager_isStartRequested(JNIEnv *env, jo { int fd = open(DRIVER_NAME, O_RDWR); if (fd < 0) { - LOGE("could not open %s", DRIVER_NAME); + ALOGE("could not open %s", DRIVER_NAME); return false; } int result = ioctl(fd, ACCESSORY_IS_START_REQUESTED); @@ -125,7 +125,7 @@ int register_android_server_UsbDeviceManager(JNIEnv *env) { jclass clazz = env->FindClass("com/android/server/usb/UsbDeviceManager"); if (clazz == NULL) { - LOGE("Can't find com/android/server/usb/UsbDeviceManager"); + ALOGE("Can't find com/android/server/usb/UsbDeviceManager"); return -1; } diff --git a/services/jni/com_android_server_UsbHostManager.cpp b/services/jni/com_android_server_UsbHostManager.cpp index f1abf56..d0a6cdf 100644 --- a/services/jni/com_android_server_UsbHostManager.cpp +++ b/services/jni/com_android_server_UsbHostManager.cpp @@ -45,7 +45,7 @@ static jmethodID method_usbDeviceRemoved; static void checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName) { if (env->ExceptionCheck()) { - LOGE("An exception was thrown by callback '%s'.", methodName); + ALOGE("An exception was thrown by callback '%s'.", methodName); LOGE_EX(env); env->ExceptionClear(); } @@ -57,7 +57,7 @@ static int usb_device_added(const char *devname, void* client_data) { struct usb_device *device = usb_device_open(devname); if (!device) { - LOGE("usb_device_open failed\n"); + ALOGE("usb_device_open failed\n"); return 0; } @@ -135,7 +135,7 @@ static void android_server_UsbHostManager_monitorUsbHostBus(JNIEnv *env, jobject { struct usb_host_context* context = usb_host_init(); if (!context) { - LOGE("usb_host_init failed"); + ALOGE("usb_host_init failed"); return; } // this will never return so it is safe to pass thiz directly @@ -175,17 +175,17 @@ int register_android_server_UsbHostManager(JNIEnv *env) { jclass clazz = env->FindClass("com/android/server/usb/UsbHostManager"); if (clazz == NULL) { - LOGE("Can't find com/android/server/usb/UsbHostManager"); + ALOGE("Can't find com/android/server/usb/UsbHostManager"); return -1; } method_usbDeviceAdded = env->GetMethodID(clazz, "usbDeviceAdded", "(Ljava/lang/String;IIIII[I[I)V"); if (method_usbDeviceAdded == NULL) { - LOGE("Can't find usbDeviceAdded"); + ALOGE("Can't find usbDeviceAdded"); return -1; } method_usbDeviceRemoved = env->GetMethodID(clazz, "usbDeviceRemoved", "(Ljava/lang/String;)V"); if (method_usbDeviceRemoved == NULL) { - LOGE("Can't find usbDeviceRemoved"); + ALOGE("Can't find usbDeviceRemoved"); return -1; } diff --git a/services/jni/com_android_server_connectivity_Vpn.cpp b/services/jni/com_android_server_connectivity_Vpn.cpp index d9b8a14..ab8c959 100644 --- a/services/jni/com_android_server_connectivity_Vpn.cpp +++ b/services/jni/com_android_server_connectivity_Vpn.cpp @@ -63,21 +63,21 @@ static int create_interface(int mtu) // Allocate interface. ifr4.ifr_flags = IFF_TUN | IFF_NO_PI; if (ioctl(tun, TUNSETIFF, &ifr4)) { - LOGE("Cannot allocate TUN: %s", strerror(errno)); + ALOGE("Cannot allocate TUN: %s", strerror(errno)); goto error; } // Activate interface. ifr4.ifr_flags = IFF_UP; if (ioctl(inet4, SIOCSIFFLAGS, &ifr4)) { - LOGE("Cannot activate %s: %s", ifr4.ifr_name, strerror(errno)); + ALOGE("Cannot activate %s: %s", ifr4.ifr_name, strerror(errno)); goto error; } // Set MTU if it is specified. ifr4.ifr_mtu = mtu; if (mtu > 0 && ioctl(inet4, SIOCSIFMTU, &ifr4)) { - LOGE("Cannot set MTU on %s: %s", ifr4.ifr_name, strerror(errno)); + ALOGE("Cannot set MTU on %s: %s", ifr4.ifr_name, strerror(errno)); goto error; } @@ -92,7 +92,7 @@ static int get_interface_name(char *name, int tun) { ifreq ifr4; if (ioctl(tun, TUNGETIFF, &ifr4)) { - LOGE("Cannot get interface name: %s", strerror(errno)); + ALOGE("Cannot get interface name: %s", strerror(errno)); return SYSTEM_ERROR; } strncpy(name, ifr4.ifr_name, IFNAMSIZ); @@ -104,7 +104,7 @@ static int get_interface_index(const char *name) ifreq ifr4; strncpy(ifr4.ifr_name, name, IFNAMSIZ); if (ioctl(inet4, SIOGIFINDEX, &ifr4)) { - LOGE("Cannot get index of %s: %s", name, strerror(errno)); + ALOGE("Cannot get index of %s: %s", name, strerror(errno)); return SYSTEM_ERROR; } return ifr4.ifr_ifindex; @@ -176,11 +176,11 @@ static int set_addresses(const char *name, const char *addresses) } if (count == BAD_ARGUMENT) { - LOGE("Invalid address: %s/%d", address, prefix); + ALOGE("Invalid address: %s/%d", address, prefix); } else if (count == SYSTEM_ERROR) { - LOGE("Cannot add address: %s/%d: %s", address, prefix, strerror(errno)); + ALOGE("Cannot add address: %s/%d: %s", address, prefix, strerror(errno)); } else if (*addresses) { - LOGE("Invalid address: %s", addresses); + ALOGE("Invalid address: %s", addresses); count = BAD_ARGUMENT; } @@ -265,12 +265,12 @@ static int set_routes(const char *name, const char *routes) } if (count == BAD_ARGUMENT) { - LOGE("Invalid route: %s/%d", address, prefix); + ALOGE("Invalid route: %s/%d", address, prefix); } else if (count == SYSTEM_ERROR) { - LOGE("Cannot add route: %s/%d: %s", + ALOGE("Cannot add route: %s/%d: %s", address, prefix, strerror(errno)); } else if (*routes) { - LOGE("Invalid route: %s", routes); + ALOGE("Invalid route: %s", routes); count = BAD_ARGUMENT; } @@ -284,7 +284,7 @@ static int reset_interface(const char *name) ifr4.ifr_flags = 0; if (ioctl(inet4, SIOCSIFFLAGS, &ifr4) && errno != ENODEV) { - LOGE("Cannot reset %s: %s", name, strerror(errno)); + ALOGE("Cannot reset %s: %s", name, strerror(errno)); return SYSTEM_ERROR; } return 0; @@ -297,7 +297,7 @@ static int check_interface(const char *name) ifr4.ifr_flags = 0; if (ioctl(inet4, SIOCGIFFLAGS, &ifr4) && errno != ENODEV) { - LOGE("Cannot check %s: %s", name, strerror(errno)); + ALOGE("Cannot check %s: %s", name, strerror(errno)); } return ifr4.ifr_flags; } @@ -305,7 +305,7 @@ static int check_interface(const char *name) static int bind_to_interface(int socket, const char *name) { if (setsockopt(socket, SOL_SOCKET, SO_BINDTODEVICE, name, strlen(name))) { - LOGE("Cannot bind socket to %s: %s", name, strerror(errno)); + ALOGE("Cannot bind socket to %s: %s", name, strerror(errno)); return SYSTEM_ERROR; } return 0; diff --git a/services/jni/com_android_server_location_GpsLocationProvider.cpp b/services/jni/com_android_server_location_GpsLocationProvider.cpp index 2e5b5d6..50bd46e 100755 --- a/services/jni/com_android_server_location_GpsLocationProvider.cpp +++ b/services/jni/com_android_server_location_GpsLocationProvider.cpp @@ -62,7 +62,7 @@ namespace android { static void checkAndClearExceptionFromCallback(JNIEnv* env, const char* methodName) { if (env->ExceptionCheck()) { - LOGE("An exception was thrown by callback '%s'.", methodName); + ALOGE("An exception was thrown by callback '%s'.", methodName); LOGE_EX(env); env->ExceptionClear(); } @@ -196,7 +196,7 @@ static void gps_ni_notify_callback(GpsNiNotification *notification) notification->requestor_id_encoding, notification->text_encoding, extras); } else { - LOGE("out of memory in gps_ni_notify_callback\n"); + ALOGE("out of memory in gps_ni_notify_callback\n"); } if (requestor_id) @@ -376,7 +376,7 @@ static void android_location_GpsLocationProvider_agps_set_reference_location_cel AGpsRefLocation location; if (!sAGpsRilInterface) { - LOGE("no AGPS RIL interface in agps_set_reference_location_cellid"); + ALOGE("no AGPS RIL interface in agps_set_reference_location_cellid"); return; } @@ -390,7 +390,7 @@ static void android_location_GpsLocationProvider_agps_set_reference_location_cel location.u.cellID.cid = cid; break; default: - LOGE("Neither a GSM nor a UMTS cellid (%s:%d).",__FUNCTION__,__LINE__); + ALOGE("Neither a GSM nor a UMTS cellid (%s:%d).",__FUNCTION__,__LINE__); return; break; } @@ -403,7 +403,7 @@ static void android_location_GpsLocationProvider_agps_send_ni_message(JNIEnv* en size_t sz; if (!sAGpsRilInterface) { - LOGE("no AGPS RIL interface in send_ni_message"); + ALOGE("no AGPS RIL interface in send_ni_message"); return; } if (size < 0) @@ -418,7 +418,7 @@ static void android_location_GpsLocationProvider_agps_set_id(JNIEnv *env, jobject obj, jint type, jstring setid_string) { if (!sAGpsRilInterface) { - LOGE("no AGPS RIL interface in agps_set_id"); + ALOGE("no AGPS RIL interface in agps_set_id"); return; } @@ -463,7 +463,7 @@ static void android_location_GpsLocationProvider_inject_xtra_data(JNIEnv* env, j jbyteArray data, jint length) { if (!sGpsXtraInterface) { - LOGE("no XTRA interface in inject_xtra_data"); + ALOGE("no XTRA interface in inject_xtra_data"); return; } @@ -475,7 +475,7 @@ static void android_location_GpsLocationProvider_inject_xtra_data(JNIEnv* env, j static void android_location_GpsLocationProvider_agps_data_conn_open(JNIEnv* env, jobject obj, jstring apn) { if (!sAGpsInterface) { - LOGE("no AGPS interface in agps_data_conn_open"); + ALOGE("no AGPS interface in agps_data_conn_open"); return; } if (apn == NULL) { @@ -490,7 +490,7 @@ static void android_location_GpsLocationProvider_agps_data_conn_open(JNIEnv* env static void android_location_GpsLocationProvider_agps_data_conn_closed(JNIEnv* env, jobject obj) { if (!sAGpsInterface) { - LOGE("no AGPS interface in agps_data_conn_open"); + ALOGE("no AGPS interface in agps_data_conn_open"); return; } sAGpsInterface->data_conn_closed(); @@ -499,7 +499,7 @@ static void android_location_GpsLocationProvider_agps_data_conn_closed(JNIEnv* e static void android_location_GpsLocationProvider_agps_data_conn_failed(JNIEnv* env, jobject obj) { if (!sAGpsInterface) { - LOGE("no AGPS interface in agps_data_conn_open"); + ALOGE("no AGPS interface in agps_data_conn_open"); return; } sAGpsInterface->data_conn_failed(); @@ -509,7 +509,7 @@ static void android_location_GpsLocationProvider_set_agps_server(JNIEnv* env, jo jint type, jstring hostname, jint port) { if (!sAGpsInterface) { - LOGE("no AGPS interface in agps_data_conn_open"); + ALOGE("no AGPS interface in agps_data_conn_open"); return; } const char *c_hostname = env->GetStringUTFChars(hostname, NULL); @@ -521,7 +521,7 @@ static void android_location_GpsLocationProvider_send_ni_response(JNIEnv* env, j jint notifId, jint response) { if (!sGpsNiInterface) { - LOGE("no NI interface in send_ni_response"); + ALOGE("no NI interface in send_ni_response"); return; } diff --git a/services/jni/onload.cpp b/services/jni/onload.cpp index 4178039..286ae91 100644 --- a/services/jni/onload.cpp +++ b/services/jni/onload.cpp @@ -43,7 +43,7 @@ extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved) jint result = -1; if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) { - LOGE("GetEnv failed!"); + ALOGE("GetEnv failed!"); return result; } LOG_ASSERT(env, "Could not retrieve the env!"); diff --git a/services/sensorservice/SensorDevice.cpp b/services/sensorservice/SensorDevice.cpp index 8f23506..2244a86 100644 --- a/services/sensorservice/SensorDevice.cpp +++ b/services/sensorservice/SensorDevice.cpp @@ -105,13 +105,13 @@ SensorDevice::SensorDevice() status_t err = hw_get_module(SENSORS_HARDWARE_MODULE_ID, (hw_module_t const**)&mSensorModule); - LOGE_IF(err, "couldn't load %s module (%s)", + ALOGE_IF(err, "couldn't load %s module (%s)", SENSORS_HARDWARE_MODULE_ID, strerror(-err)); if (mSensorModule) { err = sensors_open(&mSensorModule->common, &mSensorDevice); - LOGE_IF(err, "couldn't open device for module %s (%s)", + ALOGE_IF(err, "couldn't open device for module %s (%s)", SENSORS_HARDWARE_MODULE_ID, strerror(-err)); if (mSensorDevice) { @@ -219,7 +219,7 @@ status_t SensorDevice::activate(void* ident, int handle, int enabled) err = mSensorDevice->activate(mSensorDevice, handle, enabled); if (enabled) { - LOGE_IF(err, "Error activating sensor %d (%s)", handle, strerror(-err)); + ALOGE_IF(err, "Error activating sensor %d (%s)", handle, strerror(-err)); if (err == 0) { BatteryService::getInstance().enableSensor(handle); } @@ -256,7 +256,7 @@ status_t SensorDevice::Info::setDelayForIdent(void* ident, int64_t ns) { ssize_t index = rates.indexOfKey(ident); if (index < 0) { - LOGE("Info::setDelayForIdent(ident=%p, ns=%lld) failed (%s)", + ALOGE("Info::setDelayForIdent(ident=%p, ns=%lld) failed (%s)", ident, ns, strerror(-index)); return BAD_INDEX; } diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp index 40f3fb19..8659025 100644 --- a/services/sensorservice/SensorService.cpp +++ b/services/sensorservice/SensorService.cpp @@ -234,7 +234,7 @@ bool SensorService::threadLoop() do { count = device.poll(buffer, numEventMax); if (count<0) { - LOGE("sensor poll failed (%s)", strerror(-count)); + ALOGE("sensor poll failed (%s)", strerror(-count)); break; } @@ -369,13 +369,13 @@ void SensorService::cleanupConnection(SensorEventConnection* c) if (c->hasSensor(handle)) { ALOGD_IF(DEBUG_CONNECTIONS, "%i: disabling handle=0x%08x", i, handle); SensorInterface* sensor = mSensorMap.valueFor( handle ); - LOGE_IF(!sensor, "mSensorMap[handle=0x%08x] is null!", handle); + ALOGE_IF(!sensor, "mSensorMap[handle=0x%08x] is null!", handle); if (sensor) { sensor->activate(c, false); } } SensorRecord* rec = mActiveSensors.valueAt(i); - LOGE_IF(!rec, "mActiveSensors[%d] is null (handle=0x%08x)!", i, handle); + ALOGE_IF(!rec, "mActiveSensors[%d] is null (handle=0x%08x)!", i, handle); ALOGD_IF(DEBUG_CONNECTIONS, "removing connection %p for sensor[%d].handle=0x%08x", c, i, handle); @@ -598,7 +598,7 @@ status_t SensorService::SensorEventConnection::sendEvents( return size; } - //LOGE_IF(size<0, "dropping %d events on the floor (%s)", + //ALOGE_IF(size<0, "dropping %d events on the floor (%s)", // count, strerror(-size)); return size < 0 ? status_t(size) : status_t(NO_ERROR); diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp index e3386ca..61096e5 100644 --- a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp +++ b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp @@ -53,7 +53,7 @@ void checkGLErrors() GLenum error = glGetError(); if (error == GL_NO_ERROR) break; - LOGE("GL error 0x%04x", int(error)); + ALOGE("GL error 0x%04x", int(error)); } while(true); } @@ -62,7 +62,7 @@ void checkEGLErrors(const char* token) { EGLint error = eglGetError(); if (error && error != EGL_SUCCESS) { - LOGE("%s: EGL error 0x%04x (%s)", + ALOGE("%s: EGL error 0x%04x (%s)", token, int(error), EGLUtils::strerror(error)); } } @@ -130,7 +130,7 @@ void DisplayHardware::init(uint32_t dpy) mNativeWindow = new FramebufferNativeWindow(); framebuffer_device_t const * fbDev = mNativeWindow->getDevice(); if (!fbDev) { - LOGE("Display subsystem failed to initialize. check logs. exiting..."); + ALOGE("Display subsystem failed to initialize. check logs. exiting..."); exit(0); } @@ -185,7 +185,7 @@ void DisplayHardware::init(uint32_t dpy) EGLConfig config = NULL; err = selectConfigForPixelFormat(display, attribs, format, &config); - LOGE_IF(err, "couldn't find an EGLConfig matching the screen format"); + ALOGE_IF(err, "couldn't find an EGLConfig matching the screen format"); EGLint r,g,b,a; eglGetConfigAttrib(display, config, EGL_RED_SIZE, &r); @@ -267,7 +267,7 @@ void DisplayHardware::init(uint32_t dpy) result = eglMakeCurrent(display, surface, surface, context); if (!result) { - LOGE("Couldn't create a working GLES context. check logs. exiting..."); + ALOGE("Couldn't create a working GLES context. check logs. exiting..."); exit(0); } diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp index 68a5a2c..f17bf43 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp +++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp @@ -47,7 +47,7 @@ HWComposer::HWComposer(const sp<SurfaceFlinger>& flinger) ALOGW_IF(err, "%s module not found", HWC_HARDWARE_MODULE_ID); if (err == 0) { err = hwc_open(mModule, &mHwc); - LOGE_IF(err, "%s device failed to initialize (%s)", + ALOGE_IF(err, "%s device failed to initialize (%s)", HWC_HARDWARE_COMPOSER, strerror(-err)); if (err == 0) { if (mHwc->registerProcs) { diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index ac40469..98277b4 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -157,7 +157,7 @@ sp<IGraphicBufferAlloc> SurfaceFlinger::createGraphicBufferAlloc() const GraphicPlane& SurfaceFlinger::graphicPlane(int dpy) const { - LOGE_IF(uint32_t(dpy) >= DISPLAY_COUNT, "Invalid DisplayID %d", dpy); + ALOGE_IF(uint32_t(dpy) >= DISPLAY_COUNT, "Invalid DisplayID %d", dpy); const GraphicPlane& plane(mGraphicPlanes[dpy]); return plane; } @@ -227,10 +227,10 @@ status_t SurfaceFlinger::readyToRun() // create the shared control-block mServerHeap = new MemoryHeapBase(4096, MemoryHeapBase::READ_ONLY, "SurfaceFlinger read-only heap"); - LOGE_IF(mServerHeap==0, "can't create shared memory dealer"); + ALOGE_IF(mServerHeap==0, "can't create shared memory dealer"); mServerCblk = static_cast<surface_flinger_cblk_t*>(mServerHeap->getBase()); - LOGE_IF(mServerCblk==0, "can't get to shared control block's address"); + ALOGE_IF(mServerCblk==0, "can't get to shared control block's address"); new(mServerCblk) surface_flinger_cblk_t; @@ -870,7 +870,7 @@ void SurfaceFlinger::setupHardwareComposer(Region& dirtyInOut) const Vector< sp<LayerBase> >& layers(mVisibleLayersSortedByZ); size_t count = layers.size(); - LOGE_IF(hwc.getNumLayers() != count, + ALOGE_IF(hwc.getNumLayers() != count, "HAL number of layers (%d) doesn't match surfaceflinger (%d)", hwc.getNumLayers(), count); @@ -889,7 +889,7 @@ void SurfaceFlinger::setupHardwareComposer(Region& dirtyInOut) } const size_t fbLayerCount = hwc.getLayerCount(HWC_FRAMEBUFFER); status_t err = hwc.prepare(); - LOGE_IF(err, "HWComposer::prepare failed (%s)", strerror(-err)); + ALOGE_IF(err, "HWComposer::prepare failed (%s)", strerror(-err)); if (err == NO_ERROR) { // what's happening here is tricky. @@ -1281,7 +1281,7 @@ sp<ISurface> SurfaceFlinger::createSurface( sp<ISurface> surfaceHandle; if (int32_t(w|h) < 0) { - LOGE("createSurface() failed, w or h is negative (w=%d, h=%d)", + ALOGE("createSurface() failed, w or h is negative (w=%d, h=%d)", int(w), int(h)); return surfaceHandle; } @@ -1353,7 +1353,7 @@ sp<Layer> SurfaceFlinger::createNormalSurface( sp<Layer> layer = new Layer(this, display, client); status_t err = layer->setBuffers(w, h, format, flags); if (LIKELY(err != NO_ERROR)) { - LOGE("createNormalSurfaceLocked() failed (%s)", strerror(-err)); + ALOGE("createNormalSurfaceLocked() failed (%s)", strerror(-err)); layer.clear(); } return layer; @@ -1411,10 +1411,10 @@ status_t SurfaceFlinger::destroySurface(const wp<LayerBaseClient>& layer) // removed already, which means it is in the purgatory, // and need to be removed from there. ssize_t idx = mLayerPurgatory.remove(l); - LOGE_IF(idx < 0, + ALOGE_IF(idx < 0, "layer=%p is not in the purgatory list", l.get()); } - LOGE_IF(err<0 && err != NAME_NOT_FOUND, + ALOGE_IF(err<0 && err != NAME_NOT_FOUND, "error removing layer=%p (%s)", l.get(), strerror(-err)); } return err; @@ -1640,7 +1640,7 @@ status_t SurfaceFlinger::onTransact( const int uid = ipc->getCallingUid(); if ((uid != AID_GRAPHICS) && !PermissionCache::checkPermission(sAccessSurfaceFlinger, pid, uid)) { - LOGE("Permission Denial: " + ALOGE("Permission Denial: " "can't access SurfaceFlinger pid=%d, uid=%d", pid, uid); return PERMISSION_DENIED; } @@ -1654,7 +1654,7 @@ status_t SurfaceFlinger::onTransact( const int uid = ipc->getCallingUid(); if ((uid != AID_GRAPHICS) && !PermissionCache::checkPermission(sReadFramebuffer, pid, uid)) { - LOGE("Permission Denial: " + ALOGE("Permission Denial: " "can't read framebuffer pid=%d, uid=%d", pid, uid); return PERMISSION_DENIED; } @@ -1669,7 +1669,7 @@ status_t SurfaceFlinger::onTransact( IPCThreadState* ipc = IPCThreadState::self(); const int pid = ipc->getCallingPid(); const int uid = ipc->getCallingUid(); - LOGE("Permission Denial: " + ALOGE("Permission Denial: " "can't access SurfaceFlinger pid=%d, uid=%d", pid, uid); return PERMISSION_DENIED; } @@ -2486,7 +2486,7 @@ sp<LayerBaseClient> Client::getLayerUser(int32_t i) const wp<LayerBaseClient> layer(mLayers.valueFor(i)); if (layer != 0) { lbc = layer.promote(); - LOGE_IF(lbc==0, "getLayerUser(name=%d) is dead", int(i)); + ALOGE_IF(lbc==0, "getLayerUser(name=%d) is dead", int(i)); } return lbc; } @@ -2504,7 +2504,7 @@ status_t Client::onTransact( // we're called from a different process, do the real check if (!PermissionCache::checkCallingPermission(sAccessSurfaceFlinger)) { - LOGE("Permission Denial: " + ALOGE("Permission Denial: " "can't openGlobalTransaction pid=%d, uid=%d", pid, uid); return PERMISSION_DENIED; } @@ -2576,7 +2576,7 @@ sp<GraphicBuffer> GraphicBufferAlloc::createGraphicBuffer(uint32_t w, uint32_t h if (err == NO_MEMORY) { GraphicBuffer::dumpAllocationsToSystemLog(); } - LOGE("GraphicBufferAlloc::createGraphicBuffer(w=%d, h=%d) " + ALOGE("GraphicBufferAlloc::createGraphicBuffer(w=%d, h=%d) " "failed (%s), handle=%p", w, h, strerror(-err), graphicBuffer->handle); return 0; |