summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2012-01-06 19:20:56 +0000
committerJean-Baptiste Queru <jbq@google.com>2012-01-19 14:45:03 -0800
commitc6aacce37191e1cc79cfeba13b39899f59c68c3b (patch)
treedf4401aaa38914e03d5eadc82507e7c6fdcc573e
parenta51f0e707f1f3142358aa919ea60ad2842803139 (diff)
downloadframeworks_base-c6aacce37191e1cc79cfeba13b39899f59c68c3b.zip
frameworks_base-c6aacce37191e1cc79cfeba13b39899f59c68c3b.tar.gz
frameworks_base-c6aacce37191e1cc79cfeba13b39899f59c68c3b.tar.bz2
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)
Change-Id: I1de629b4632a4b3187ca1a28d6416daccd35f924
-rw-r--r--cmds/app_process/app_main.cpp2
-rw-r--r--cmds/bootanimation/BootAnimation.cpp4
-rw-r--r--cmds/dumpstate/dumpstate.c6
-rw-r--r--cmds/dumpsys/dumpsys.cpp2
-rw-r--r--cmds/installd/commands.c94
-rw-r--r--cmds/installd/installd.c30
-rw-r--r--cmds/installd/utils.c44
-rw-r--r--cmds/ip-up-vpn/ip-up-vpn.c16
-rw-r--r--cmds/keystore/keystore.cpp10
-rw-r--r--cmds/screenshot/screenshot.c12
-rw-r--r--cmds/servicemanager/binder.c12
-rw-r--r--cmds/servicemanager/service_manager.c12
-rw-r--r--cmds/stagefright/sf2.cpp2
-rw-r--r--core/jni/AndroidRuntime.cpp12
-rw-r--r--core/jni/android/graphics/Canvas.cpp2
-rw-r--r--core/jni/android/graphics/Graphics.cpp2
-rw-r--r--core/jni/android/graphics/SurfaceTexture.cpp8
-rw-r--r--core/jni/android/opengl/util.cpp2
-rw-r--r--core/jni/android_app_NativeActivity.cpp8
-rw-r--r--core/jni/android_app_backup_FullBackup.cpp4
-rwxr-xr-xcore/jni/android_bluetooth_BluetoothAudioGateway.cpp32
-rw-r--r--core/jni/android_bluetooth_HeadsetBase.cpp28
-rw-r--r--core/jni/android_bluetooth_common.cpp14
-rw-r--r--core/jni/android_bluetooth_common.h6
-rw-r--r--core/jni/android_database_CursorWindow.cpp4
-rw-r--r--core/jni/android_database_SQLiteCompiledSql.cpp4
-rw-r--r--core/jni/android_database_SQLiteDatabase.cpp52
-rw-r--r--core/jni/android_database_SQLiteDebug.cpp8
-rw-r--r--core/jni/android_database_SQLiteProgram.cpp4
-rw-r--r--core/jni/android_database_SQLiteQuery.cpp10
-rw-r--r--core/jni/android_database_SQLiteStatement.cpp12
-rw-r--r--core/jni/android_debug_JNITest.cpp2
-rw-r--r--core/jni/android_emoji_EmojiFactory.cpp8
-rw-r--r--core/jni/android_hardware_Camera.cpp20
-rw-r--r--core/jni/android_hardware_UsbDeviceConnection.cpp20
-rw-r--r--core/jni/android_hardware_UsbRequest.cpp16
-rw-r--r--core/jni/android_media_AudioRecord.cpp40
-rw-r--r--core/jni/android_media_AudioTrack.cpp44
-rw-r--r--core/jni/android_media_JetPlayer.cpp40
-rw-r--r--core/jni/android_media_ToneGenerator.cpp8
-rw-r--r--core/jni/android_net_LocalSocketImpl.cpp2
-rw-r--r--core/jni/android_net_TrafficStats.cpp6
-rw-r--r--core/jni/android_nfc_NdefMessage.cpp8
-rw-r--r--core/jni/android_nfc_NdefRecord.cpp4
-rw-r--r--core/jni/android_os_StatFs.cpp6
-rw-r--r--core/jni/android_os_UEventObserver.cpp2
-rw-r--r--core/jni/android_server_BluetoothA2dpService.cpp10
-rw-r--r--core/jni/android_server_BluetoothEventLoop.cpp52
-rw-r--r--core/jni/android_server_BluetoothService.cpp54
-rw-r--r--core/jni/android_server_NetworkManagementSocketTagger.cpp4
-rw-r--r--core/jni/android_server_Watchdog.cpp4
-rw-r--r--core/jni/android_util_Binder.cpp10
-rw-r--r--core/jni/android_util_EventLog.cpp6
-rw-r--r--core/jni/android_util_FileObserver.cpp6
-rw-r--r--core/jni/android_util_Log.cpp2
-rw-r--r--core/jni/android_util_Process.cpp4
-rw-r--r--core/jni/android_view_GLES20Canvas.cpp4
-rw-r--r--core/jni/android_view_InputChannel.cpp6
-rw-r--r--core/jni/android_view_InputQueue.cpp8
-rw-r--r--core/jni/android_view_KeyEvent.cpp2
-rw-r--r--core/jni/android_view_MotionEvent.cpp2
-rw-r--r--drm/common/ReadWriteUtils.cpp4
-rw-r--r--drm/jni/android_drm_DrmManagerClient.cpp2
-rw-r--r--drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp22
-rw-r--r--graphics/jni/android_renderscript_RenderScript.cpp6
-rw-r--r--libs/binder/BpBinder.cpp2
-rw-r--r--libs/binder/CursorWindow.cpp6
-rw-r--r--libs/binder/IMemory.cpp8
-rw-r--r--libs/binder/MemoryDealer.cpp2
-rw-r--r--libs/binder/MemoryHeapBase.cpp6
-rw-r--r--libs/binder/MemoryHeapPmem.cpp12
-rw-r--r--libs/binder/Parcel.cpp12
-rw-r--r--libs/binder/ProcessState.cpp12
-rw-r--r--libs/camera/Camera.cpp4
-rw-r--r--libs/camera/CameraParameters.cpp8
-rw-r--r--libs/cpustats/ThreadCpuUsage.cpp12
-rw-r--r--libs/gui/ISurfaceComposer.cpp8
-rw-r--r--libs/gui/SensorEventQueue.cpp6
-rw-r--r--libs/gui/SensorManager.cpp2
-rw-r--r--libs/gui/Surface.cpp6
-rw-r--r--libs/gui/SurfaceTexture.cpp8
-rw-r--r--libs/gui/SurfaceTextureClient.cpp30
-rw-r--r--libs/hwui/FontRenderer.cpp12
-rw-r--r--libs/hwui/GradientCache.cpp2
-rw-r--r--libs/hwui/OpenGLRenderer.cpp6
-rw-r--r--libs/hwui/Program.cpp6
-rw-r--r--libs/hwui/ShapeCache.h2
-rw-r--r--libs/hwui/TextureCache.cpp2
-rw-r--r--libs/rs/driver/rsdAllocation.cpp6
-rw-r--r--libs/rs/driver/rsdBcc.cpp34
-rw-r--r--libs/rs/driver/rsdCore.cpp14
-rw-r--r--libs/rs/driver/rsdGL.cpp28
-rw-r--r--libs/rs/driver/rsdMeshObj.cpp2
-rw-r--r--libs/rs/driver/rsdProgramStore.cpp6
-rw-r--r--libs/rs/driver/rsdRuntimeMath.cpp2
-rw-r--r--libs/rs/driver/rsdRuntimeStubs.cpp2
-rw-r--r--libs/rs/driver/rsdShader.cpp12
-rw-r--r--libs/rs/driver/rsdShaderCache.cpp12
-rw-r--r--libs/rs/rsAdapter.cpp2
-rw-r--r--libs/rs/rsAllocation.cpp30
-rw-r--r--libs/rs/rsAnimation.cpp2
-rw-r--r--libs/rs/rsContext.cpp26
-rw-r--r--libs/rs/rsContext.h4
-rw-r--r--libs/rs/rsElement.cpp2
-rw-r--r--libs/rs/rsFBOCache.cpp6
-rw-r--r--libs/rs/rsFifoSocket.cpp16
-rw-r--r--libs/rs/rsFileA3D.cpp20
-rw-r--r--libs/rs/rsFont.cpp28
-rw-r--r--libs/rs/rsLocklessFifo.cpp4
-rw-r--r--libs/rs/rsMesh.cpp8
-rw-r--r--libs/rs/rsMutex.cpp6
-rw-r--r--libs/rs/rsObjectBase.cpp6
-rw-r--r--libs/rs/rsProgram.cpp10
-rw-r--r--libs/rs/rsProgramFragment.cpp8
-rw-r--r--libs/rs/rsScript.cpp16
-rw-r--r--libs/rs/rsScriptC.cpp24
-rw-r--r--libs/rs/rsScriptC_Lib.cpp8
-rw-r--r--libs/rs/rsScriptC_LibGL.cpp12
-rw-r--r--libs/rs/rsSignal.cpp16
-rw-r--r--libs/rs/rsThreadIO.cpp38
-rw-r--r--libs/rs/rsType.cpp2
-rw-r--r--libs/rs/rsUtils.h2
-rw-r--r--libs/rs/rsg_generator.c6
-rw-r--r--libs/ui/FramebufferNativeWindow.cpp8
-rw-r--r--libs/ui/GraphicBuffer.cpp2
-rw-r--r--libs/ui/GraphicBufferAllocator.cpp2
-rw-r--r--libs/ui/GraphicBufferMapper.cpp2
-rw-r--r--libs/ui/InputTransport.cpp52
-rw-r--r--libs/ui/KeyCharacterMap.cpp48
-rw-r--r--libs/ui/KeyLayoutMap.cpp36
-rw-r--r--libs/ui/Keyboard.cpp6
-rw-r--r--libs/ui/Region.cpp12
-rw-r--r--libs/ui/VirtualKeyMap.cpp12
-rw-r--r--libs/utils/Asset.cpp8
-rw-r--r--libs/utils/AssetManager.cpp2
-rw-r--r--libs/utils/BackupHelpers.cpp14
-rw-r--r--libs/utils/BlobCache.cpp16
-rw-r--r--libs/utils/FileMap.cpp8
-rw-r--r--libs/utils/Looper.cpp10
-rw-r--r--libs/utils/PropertyMap.cpp14
-rw-r--r--libs/utils/RefBase.cpp10
-rw-r--r--libs/utils/ResourceTypes.cpp10
-rw-r--r--libs/utils/StreamingZipInflater.cpp6
-rw-r--r--libs/utils/Threads.cpp2
-rw-r--r--libs/utils/Tokenizer.cpp6
-rw-r--r--libs/utils/ZipFileRO.cpp16
-rw-r--r--libs/utils/ZipUtils.cpp8
-rw-r--r--media/jni/android_media_MediaMetadataRetriever.cpp12
-rw-r--r--media/jni/android_media_MediaPlayer.cpp28
-rw-r--r--media/jni/android_media_MediaRecorder.cpp8
-rw-r--r--media/jni/android_media_MediaScanner.cpp8
-rw-r--r--media/jni/android_media_Utils.cpp2
-rw-r--r--media/jni/android_mtp_MtpDatabase.cpp74
-rw-r--r--media/jni/android_mtp_MtpDevice.cpp82
-rw-r--r--media/jni/android_mtp_MtpServer.cpp32
-rw-r--r--media/jni/audioeffect/android_media_AudioEffect.cpp48
-rw-r--r--media/jni/audioeffect/android_media_Visualizer.cpp18
-rwxr-xr-xmedia/jni/mediaeditor/VideoEditorMain.cpp20
-rw-r--r--media/jni/soundpool/SoundPool.cpp8
-rw-r--r--media/jni/soundpool/android_media_SoundPool.cpp8
-rwxr-xr-xmedia/libeffects/preprocessing/PreProcessing.cpp6
-rw-r--r--media/libmedia/AudioEffect.cpp6
-rw-r--r--media/libmedia/AudioRecord.cpp18
-rw-r--r--media/libmedia/AudioSystem.cpp2
-rw-r--r--media/libmedia/AudioTrack.cpp30
-rw-r--r--media/libmedia/IAudioFlinger.cpp6
-rw-r--r--media/libmedia/IMediaDeathNotifier.cpp2
-rw-r--r--media/libmedia/JetPlayer.cpp20
-rw-r--r--media/libmedia/MediaProfiles.cpp26
-rw-r--r--media/libmedia/MediaScannerClient.cpp6
-rw-r--r--media/libmedia/Metadata.cpp4
-rw-r--r--media/libmedia/ToneGenerator.cpp14
-rw-r--r--media/libmedia/Visualizer.cpp4
-rw-r--r--media/libmedia/mediametadataretriever.cpp20
-rw-r--r--media/libmedia/mediaplayer.cpp36
-rw-r--r--media/libmedia/mediarecorder.cpp130
-rw-r--r--media/libmediaplayerservice/MediaPlayerService.cpp40
-rw-r--r--media/libmediaplayerservice/MediaRecorderClient.cpp44
-rw-r--r--media/libmediaplayerservice/MetadataRetrieverClient.cpp26
-rw-r--r--media/libmediaplayerservice/MidiFile.cpp28
-rw-r--r--media/libmediaplayerservice/MidiMetadataRetriever.cpp6
-rw-r--r--media/libmediaplayerservice/StagefrightRecorder.cpp74
-rw-r--r--media/libmediaplayerservice/TestPlayerStub.cpp6
-rw-r--r--media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp2
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.cpp4
-rw-r--r--media/libmediaplayerservice/nuplayer/StreamingSource.cpp4
-rw-r--r--media/libstagefright/AACWriter.cpp4
-rw-r--r--media/libstagefright/ACodec.cpp24
-rw-r--r--media/libstagefright/AMRExtractor.cpp4
-rw-r--r--media/libstagefright/AVIExtractor.cpp2
-rw-r--r--media/libstagefright/AwesomePlayer.cpp6
-rwxr-xr-xmedia/libstagefright/CameraSource.cpp22
-rw-r--r--media/libstagefright/CameraSourceTimeLapse.cpp2
-rw-r--r--media/libstagefright/FLACExtractor.cpp28
-rw-r--r--media/libstagefright/FileSource.cpp2
-rw-r--r--media/libstagefright/HTTPBase.cpp6
-rw-r--r--media/libstagefright/MP3Extractor.cpp2
-rw-r--r--media/libstagefright/MPEG4Extractor.cpp8
-rwxr-xr-xmedia/libstagefright/MPEG4Writer.cpp44
-rw-r--r--media/libstagefright/MediaBuffer.cpp2
-rw-r--r--media/libstagefright/NuCachedSource2.cpp6
-rwxr-xr-xmedia/libstagefright/OMXCodec.cpp58
-rw-r--r--media/libstagefright/OggExtractor.cpp2
-rw-r--r--media/libstagefright/SampleIterator.cpp8
-rw-r--r--media/libstagefright/SampleTable.cpp2
-rw-r--r--media/libstagefright/StagefrightMediaScanner.cpp2
-rw-r--r--media/libstagefright/StagefrightMetadataRetriever.cpp6
-rw-r--r--media/libstagefright/SurfaceMediaSource.cpp32
-rw-r--r--media/libstagefright/WVMExtractor.cpp4
-rw-r--r--media/libstagefright/codecs/aacdec/SoftAAC.cpp2
-rw-r--r--media/libstagefright/codecs/aacenc/AACEncoder.cpp14
-rw-r--r--media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp2
-rw-r--r--media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp2
-rw-r--r--media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp10
-rw-r--r--media/libstagefright/codecs/avc/enc/AVCEncoder.cpp14
-rw-r--r--media/libstagefright/codecs/g711/dec/SoftG711.cpp2
-rw-r--r--media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp4
-rw-r--r--media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp28
-rw-r--r--media/libstagefright/codecs/mp3dec/SoftMP3.cpp4
-rw-r--r--media/libstagefright/codecs/on2/dec/SoftVPX.cpp4
-rw-r--r--media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp4
-rw-r--r--media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp2
-rw-r--r--media/libstagefright/foundation/AMessage.cpp4
-rw-r--r--media/libstagefright/httplive/LiveDataSource.cpp4
-rw-r--r--media/libstagefright/httplive/LiveSession.cpp26
-rw-r--r--media/libstagefright/httplive/M3UParser.cpp2
-rw-r--r--media/libstagefright/id3/ID3.cpp2
-rw-r--r--media/libstagefright/matroska/MatroskaExtractor.cpp2
-rw-r--r--media/libstagefright/mpeg2ts/ATSParser.cpp2
-rw-r--r--media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp2
-rw-r--r--media/libstagefright/omx/OMXMaster.cpp4
-rw-r--r--media/libstagefright/omx/OMXNodeInstance.cpp34
-rw-r--r--media/libstagefright/omx/SoftOMXPlugin.cpp2
-rw-r--r--media/libstagefright/omx/tests/OMXHarness.cpp2
-rw-r--r--media/libstagefright/rtsp/ARTPSession.cpp8
-rw-r--r--media/libstagefright/rtsp/ARTSPConnection.cpp20
-rw-r--r--media/libstagefright/rtsp/MyHandler.h12
-rw-r--r--media/libstagefright/rtsp/UDPPusher.cpp2
-rw-r--r--media/libstagefright/rtsp/rtp_test.cpp2
-rw-r--r--media/libstagefright/tests/DummyRecorder.cpp2
-rw-r--r--media/libstagefright/tests/SurfaceMediaSource_test.cpp6
-rw-r--r--media/libstagefright/timedtext/TimedTextPlayer.cpp2
-rw-r--r--media/libstagefright/yuv/YUVImage.cpp8
-rw-r--r--media/mtp/MtpDataPacket.cpp2
-rw-r--r--media/mtp/MtpDevice.cpp24
-rw-r--r--media/mtp/MtpPacket.cpp8
-rw-r--r--media/mtp/MtpProperty.cpp12
-rw-r--r--media/mtp/MtpServer.cpp32
-rw-r--r--media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp2
-rw-r--r--native/android/looper.cpp4
-rw-r--r--native/android/storage_manager.cpp4
-rw-r--r--opengl/libagl/egl.cpp8
-rw-r--r--opengl/libagl/mipmap.cpp2
-rw-r--r--opengl/libs/EGL/Loader.cpp4
-rw-r--r--opengl/libs/EGL/egl.cpp4
-rw-r--r--opengl/libs/EGL/eglApi.cpp8
-rw-r--r--opengl/libs/EGL/egl_cache.cpp28
-rw-r--r--opengl/libs/EGL/egl_object.cpp2
-rw-r--r--opengl/libs/EGL/egl_object.h2
-rw-r--r--opengl/libs/EGL/egl_tls.cpp2
-rw-r--r--opengl/libs/GLES2_dbg/src/dbgcontext.cpp4
-rw-r--r--opengl/libs/GLES_CM/gl.cpp2
-rw-r--r--opengl/tests/gl2_jni/jni/gl_code.cpp6
-rw-r--r--opengl/tests/gl_perf/fill_common.cpp6
-rw-r--r--opengl/tests/gl_perfapp/jni/gl_code.cpp2
-rw-r--r--opengl/tests/gldual/jni/gl_code.cpp6
-rw-r--r--services/audioflinger/AudioFlinger.cpp38
-rw-r--r--services/audioflinger/AudioMixer.cpp2
-rw-r--r--services/audioflinger/AudioPolicyService.cpp12
-rw-r--r--services/audioflinger/AudioResampler.cpp30
-rw-r--r--services/camera/libcameraservice/CameraHardwareInterface.h8
-rw-r--r--services/camera/libcameraservice/CameraHardwareStub.cpp8
-rw-r--r--services/camera/libcameraservice/CameraService.cpp44
-rw-r--r--services/camera/tests/CameraServiceTest/CameraServiceTest.cpp2
-rw-r--r--services/input/EventHub.cpp16
-rw-r--r--services/input/InputDispatcher.cpp28
-rw-r--r--services/input/InputManager.cpp4
-rw-r--r--services/input/SpriteController.cpp22
-rw-r--r--services/jni/com_android_server_AlarmManagerService.cpp6
-rw-r--r--services/jni/com_android_server_BatteryService.cpp26
-rw-r--r--services/jni/com_android_server_InputManager.cpp14
-rw-r--r--services/jni/com_android_server_PowerManagerService.cpp2
-rw-r--r--services/jni/com_android_server_UsbDeviceManager.cpp10
-rw-r--r--services/jni/com_android_server_UsbHostManager.cpp12
-rw-r--r--services/jni/com_android_server_connectivity_Vpn.cpp28
-rwxr-xr-xservices/jni/com_android_server_location_GpsLocationProvider.cpp24
-rw-r--r--services/jni/onload.cpp2
-rw-r--r--services/sensorservice/SensorDevice.cpp8
-rw-r--r--services/sensorservice/SensorService.cpp8
-rw-r--r--services/surfaceflinger/DisplayHardware/DisplayHardware.cpp10
-rw-r--r--services/surfaceflinger/DisplayHardware/HWComposer.cpp2
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp30
-rw-r--r--tools/aapt/ZipFile.cpp4
-rw-r--r--voip/jni/rtp/AudioGroup.cpp32
-rw-r--r--voip/jni/rtp/RtpStream.cpp2
295 files changed, 1916 insertions, 1916 deletions
diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp
index 12d1669..6fe358c 100644
--- a/cmds/app_process/app_main.cpp
+++ b/cmds/app_process/app_main.cpp
@@ -72,7 +72,7 @@ public:
char* slashClassName = toSlashClassName(mClassName);
mClass = env->FindClass(slashClassName);
if (mClass == NULL) {
- LOGE("ERROR: could not find class '%s'\n", mClassName);
+ ALOGE("ERROR: could not find class '%s'\n", mClassName);
}
free(slashClassName);
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index f250367..0d5b4ca 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -69,7 +69,7 @@ BootAnimation::~BootAnimation() {
void BootAnimation::onFirstRef() {
status_t err = mSession->linkToComposerDeath(this);
- LOGE_IF(err, "linkToComposerDeath failed (%s) ", strerror(-err));
+ ALOGE_IF(err, "linkToComposerDeath failed (%s) ", strerror(-err));
if (err == NO_ERROR) {
run("BootAnimation", PRIORITY_DISPLAY);
}
@@ -374,7 +374,7 @@ bool BootAnimation::movie()
size_t numEntries = zip.getNumEntries();
ZipEntryRO desc = zip.findEntryByName("desc.txt");
FileMap* descMap = zip.createEntryFileMap(desc);
- LOGE_IF(!descMap, "descMap is null");
+ ALOGE_IF(!descMap, "descMap is null");
if (!descMap) {
return false;
}
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c
index a07a408..afa4f4d 100644
--- a/cmds/dumpstate/dumpstate.c
+++ b/cmds/dumpstate/dumpstate.c
@@ -317,15 +317,15 @@ int main(int argc, char *argv[]) {
/* switch to non-root user and group */
gid_t groups[] = { AID_LOG, AID_SDCARD_RW, AID_MOUNT, AID_INET };
if (setgroups(sizeof(groups)/sizeof(groups[0]), groups) != 0) {
- LOGE("Unable to setgroups, aborting: %s\n", strerror(errno));
+ ALOGE("Unable to setgroups, aborting: %s\n", strerror(errno));
return -1;
}
if (setgid(AID_SHELL) != 0) {
- LOGE("Unable to setgid, aborting: %s\n", strerror(errno));
+ ALOGE("Unable to setgid, aborting: %s\n", strerror(errno));
return -1;
}
if (setuid(AID_SHELL) != 0) {
- LOGE("Unable to setuid, aborting: %s\n", strerror(errno));
+ ALOGE("Unable to setuid, aborting: %s\n", strerror(errno));
return -1;
}
}
diff --git a/cmds/dumpsys/dumpsys.cpp b/cmds/dumpsys/dumpsys.cpp
index fdc5d5d..7dad6b6 100644
--- a/cmds/dumpsys/dumpsys.cpp
+++ b/cmds/dumpsys/dumpsys.cpp
@@ -31,7 +31,7 @@ int main(int argc, char* const argv[])
sp<IServiceManager> sm = defaultServiceManager();
fflush(stdout);
if (sm == NULL) {
- LOGE("Unable to get default service manager!");
+ ALOGE("Unable to get default service manager!");
aerr << "dumpsys: Unable to get default service manager!" << endl;
return 20;
}
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index 4d80296..dd92bbe 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -30,47 +30,47 @@ int install(const char *pkgname, uid_t uid, gid_t gid)
char libdir[PKG_PATH_MAX];
if ((uid < AID_SYSTEM) || (gid < AID_SYSTEM)) {
- LOGE("invalid uid/gid: %d %d\n", uid, gid);
+ ALOGE("invalid uid/gid: %d %d\n", uid, gid);
return -1;
}
if (create_pkg_path(pkgdir, pkgname, PKG_DIR_POSTFIX, 0)) {
- LOGE("cannot create package path\n");
+ ALOGE("cannot create package path\n");
return -1;
}
if (create_pkg_path(libdir, pkgname, PKG_LIB_POSTFIX, 0)) {
- LOGE("cannot create package lib path\n");
+ ALOGE("cannot create package lib path\n");
return -1;
}
if (mkdir(pkgdir, 0751) < 0) {
- LOGE("cannot create dir '%s': %s\n", pkgdir, strerror(errno));
+ ALOGE("cannot create dir '%s': %s\n", pkgdir, strerror(errno));
return -errno;
}
if (chmod(pkgdir, 0751) < 0) {
- LOGE("cannot chmod dir '%s': %s\n", pkgdir, strerror(errno));
+ ALOGE("cannot chmod dir '%s': %s\n", pkgdir, strerror(errno));
unlink(pkgdir);
return -errno;
}
if (chown(pkgdir, uid, gid) < 0) {
- LOGE("cannot chown dir '%s': %s\n", pkgdir, strerror(errno));
+ ALOGE("cannot chown dir '%s': %s\n", pkgdir, strerror(errno));
unlink(pkgdir);
return -errno;
}
if (mkdir(libdir, 0755) < 0) {
- LOGE("cannot create dir '%s': %s\n", libdir, strerror(errno));
+ ALOGE("cannot create dir '%s': %s\n", libdir, strerror(errno));
unlink(pkgdir);
return -errno;
}
if (chmod(libdir, 0755) < 0) {
- LOGE("cannot chmod dir '%s': %s\n", libdir, strerror(errno));
+ ALOGE("cannot chmod dir '%s': %s\n", libdir, strerror(errno));
unlink(libdir);
unlink(pkgdir);
return -errno;
}
if (chown(libdir, AID_SYSTEM, AID_SYSTEM) < 0) {
- LOGE("cannot chown dir '%s': %s\n", libdir, strerror(errno));
+ ALOGE("cannot chown dir '%s': %s\n", libdir, strerror(errno));
unlink(libdir);
unlink(pkgdir);
return -errno;
@@ -100,7 +100,7 @@ int renamepkg(const char *oldpkgname, const char *newpkgname)
return -1;
if (rename(oldpkgdir, newpkgdir) < 0) {
- LOGE("cannot rename dir '%s' to '%s': %s\n", oldpkgdir, newpkgdir, strerror(errno));
+ ALOGE("cannot rename dir '%s' to '%s': %s\n", oldpkgdir, newpkgdir, strerror(errno));
return -errno;
}
return 0;
@@ -127,11 +127,11 @@ int make_user_data(const char *pkgname, uid_t uid, uid_t persona)
return -1;
}
if (mkdir(pkgdir, 0751) < 0) {
- LOGE("cannot create dir '%s': %s\n", pkgdir, strerror(errno));
+ ALOGE("cannot create dir '%s': %s\n", pkgdir, strerror(errno));
return -errno;
}
if (chown(pkgdir, uid, uid) < 0) {
- LOGE("cannot chown dir '%s': %s\n", pkgdir, strerror(errno));
+ ALOGE("cannot chown dir '%s': %s\n", pkgdir, strerror(errno));
unlink(pkgdir);
return -errno;
}
@@ -165,7 +165,7 @@ static int64_t disk_free()
if (statfs(android_data_dir.path, &sfs) == 0) {
return sfs.f_bavail * sfs.f_bsize;
} else {
- LOGE("Couldn't statfs %s: %s\n", android_data_dir.path, strerror(errno));
+ ALOGE("Couldn't statfs %s: %s\n", android_data_dir.path, strerror(errno));
return -1;
}
}
@@ -193,13 +193,13 @@ int free_cache(int64_t free_size)
if (avail >= free_size) return 0;
if (create_persona_path(datadir, 0)) {
- LOGE("couldn't get directory for persona 0");
+ ALOGE("couldn't get directory for persona 0");
return -1;
}
d = opendir(datadir);
if (d == NULL) {
- LOGE("cannot open %s: %s\n", datadir, strerror(errno));
+ ALOGE("cannot open %s: %s\n", datadir, strerror(errno));
return -1;
}
dfd = dirfd(d);
@@ -245,7 +245,7 @@ int move_dex(const char *src, const char *dst)
ALOGV("move %s -> %s\n", src_dex, dst_dex);
if (rename(src_dex, dst_dex) < 0) {
- LOGE("Couldn't move %s: %s\n", src_dex, strerror(errno));
+ ALOGE("Couldn't move %s: %s\n", src_dex, strerror(errno));
return -1;
} else {
return 0;
@@ -261,7 +261,7 @@ int rm_dex(const char *path)
ALOGV("unlink %s\n", dex_path);
if (unlink(dex_path) < 0) {
- LOGE("Couldn't unlink %s: %s\n", dex_path, strerror(errno));
+ ALOGE("Couldn't unlink %s: %s\n", dex_path, strerror(errno));
return -1;
} else {
return 0;
@@ -281,12 +281,12 @@ int protect(char *pkgname, gid_t gid)
if (stat(pkgpath, &s) < 0) return -1;
if (chown(pkgpath, s.st_uid, gid) < 0) {
- LOGE("failed to chgrp '%s': %s\n", pkgpath, strerror(errno));
+ ALOGE("failed to chgrp '%s': %s\n", pkgpath, strerror(errno));
return -1;
}
if (chmod(pkgpath, S_IRUSR|S_IWUSR|S_IRGRP) < 0) {
- LOGE("failed to chmod '%s': %s\n", pkgpath, strerror(errno));
+ ALOGE("failed to chmod '%s': %s\n", pkgpath, strerror(errno));
return -1;
}
@@ -443,7 +443,7 @@ static void run_dexopt(int zip_fd, int odex_fd, const char* input_file_name,
execl(DEX_OPT_BIN, DEX_OPT_BIN, "--zip", zip_num, odex_num, input_file_name,
dexopt_flags, (char*) NULL);
- LOGE("execl(%s) failed: %s\n", DEX_OPT_BIN, strerror(errno));
+ ALOGE("execl(%s) failed: %s\n", DEX_OPT_BIN, strerror(errno));
}
static int wait_dexopt(pid_t pid, const char* apk_path)
@@ -515,24 +515,24 @@ int dexopt(const char *apk_path, uid_t uid, int is_public)
zip_fd = open(apk_path, O_RDONLY, 0);
if (zip_fd < 0) {
- LOGE("dexopt cannot open '%s' for input\n", apk_path);
+ ALOGE("dexopt cannot open '%s' for input\n", apk_path);
return -1;
}
unlink(dex_path);
odex_fd = open(dex_path, O_RDWR | O_CREAT | O_EXCL, 0644);
if (odex_fd < 0) {
- LOGE("dexopt cannot open '%s' for output\n", dex_path);
+ ALOGE("dexopt cannot open '%s' for output\n", dex_path);
goto fail;
}
if (fchown(odex_fd, AID_SYSTEM, uid) < 0) {
- LOGE("dexopt cannot chown '%s'\n", dex_path);
+ ALOGE("dexopt cannot chown '%s'\n", dex_path);
goto fail;
}
if (fchmod(odex_fd,
S_IRUSR|S_IWUSR|S_IRGRP |
(is_public ? S_IROTH : 0)) < 0) {
- LOGE("dexopt cannot chmod '%s'\n", dex_path);
+ ALOGE("dexopt cannot chmod '%s'\n", dex_path);
goto fail;
}
@@ -543,15 +543,15 @@ int dexopt(const char *apk_path, uid_t uid, int is_public)
if (pid == 0) {
/* child -- drop privileges before continuing */
if (setgid(uid) != 0) {
- LOGE("setgid(%d) failed during dexopt\n", uid);
+ ALOGE("setgid(%d) failed during dexopt\n", uid);
exit(64);
}
if (setuid(uid) != 0) {
- LOGE("setuid(%d) during dexopt\n", uid);
+ ALOGE("setuid(%d) during dexopt\n", uid);
exit(65);
}
if (flock(odex_fd, LOCK_EX | LOCK_NB) != 0) {
- LOGE("flock(%s) failed: %s\n", dex_path, strerror(errno));
+ ALOGE("flock(%s) failed: %s\n", dex_path, strerror(errno));
exit(66);
}
@@ -560,7 +560,7 @@ int dexopt(const char *apk_path, uid_t uid, int is_public)
} else {
res = wait_dexopt(pid, apk_path);
if (res != 0) {
- LOGE("dexopt failed on '%s' res = %d\n", dex_path, res);
+ ALOGE("dexopt failed on '%s' res = %d\n", dex_path, res);
goto fail;
}
}
@@ -626,7 +626,7 @@ int movefileordir(char* srcpath, char* dstpath, int dstbasepos,
ALOGV("Renaming %s to %s (uid %d)\n", srcpath, dstpath, dstuid);
if (rename(srcpath, dstpath) >= 0) {
if (chown(dstpath, dstuid, dstgid) < 0) {
- LOGE("cannot chown %s: %s\n", dstpath, strerror(errno));
+ ALOGE("cannot chown %s: %s\n", dstpath, strerror(errno));
unlink(dstpath);
return 1;
}
@@ -852,30 +852,30 @@ int linklib(const char* dataDir, const char* asecLibDir)
const size_t libdirLen = strlen(dataDir) + strlen(PKG_LIB_POSTFIX);
if (libdirLen >= PKG_PATH_MAX) {
- LOGE("library dir len too large");
+ ALOGE("library dir len too large");
return -1;
}
if (snprintf(libdir, sizeof(libdir), "%s%s", dataDir, PKG_LIB_POSTFIX) != (ssize_t)libdirLen) {
- LOGE("library dir not written successfully: %s\n", strerror(errno));
+ ALOGE("library dir not written successfully: %s\n", strerror(errno));
return -1;
}
if (stat(dataDir, &s) < 0) return -1;
if (chown(dataDir, 0, 0) < 0) {
- LOGE("failed to chown '%s': %s\n", dataDir, strerror(errno));
+ ALOGE("failed to chown '%s': %s\n", dataDir, strerror(errno));
return -1;
}
if (chmod(dataDir, 0700) < 0) {
- LOGE("failed to chmod '%s': %s\n", dataDir, strerror(errno));
+ ALOGE("failed to chmod '%s': %s\n", dataDir, strerror(errno));
rc = -1;
goto out;
}
if (lstat(libdir, &libStat) < 0) {
- LOGE("couldn't stat lib dir: %s\n", strerror(errno));
+ ALOGE("couldn't stat lib dir: %s\n", strerror(errno));
rc = -1;
goto out;
}
@@ -893,13 +893,13 @@ int linklib(const char* dataDir, const char* asecLibDir)
}
if (symlink(asecLibDir, libdir) < 0) {
- LOGE("couldn't symlink directory '%s' -> '%s': %s\n", libdir, asecLibDir, strerror(errno));
+ ALOGE("couldn't symlink directory '%s' -> '%s': %s\n", libdir, asecLibDir, strerror(errno));
rc = -errno;
goto out;
}
if (lchown(libdir, AID_SYSTEM, AID_SYSTEM) < 0) {
- LOGE("cannot chown dir '%s': %s\n", libdir, strerror(errno));
+ ALOGE("cannot chown dir '%s': %s\n", libdir, strerror(errno));
unlink(libdir);
rc = -errno;
goto out;
@@ -907,12 +907,12 @@ int linklib(const char* dataDir, const char* asecLibDir)
out:
if (chmod(dataDir, s.st_mode) < 0) {
- LOGE("failed to chmod '%s': %s\n", dataDir, strerror(errno));
+ ALOGE("failed to chmod '%s': %s\n", dataDir, strerror(errno));
return -errno;
}
if (chown(dataDir, s.st_uid, s.st_gid) < 0) {
- LOGE("failed to chown '%s' : %s\n", dataDir, strerror(errno));
+ ALOGE("failed to chown '%s' : %s\n", dataDir, strerror(errno));
return -errno;
}
@@ -931,28 +931,28 @@ int unlinklib(const char* dataDir)
}
if (snprintf(libdir, sizeof(libdir), "%s%s", dataDir, PKG_LIB_POSTFIX) != (ssize_t)libdirLen) {
- LOGE("library dir not written successfully: %s\n", strerror(errno));
+ ALOGE("library dir not written successfully: %s\n", strerror(errno));
return -1;
}
if (stat(dataDir, &s) < 0) {
- LOGE("couldn't state data dir");
+ ALOGE("couldn't state data dir");
return -1;
}
if (chown(dataDir, 0, 0) < 0) {
- LOGE("failed to chown '%s': %s\n", dataDir, strerror(errno));
+ ALOGE("failed to chown '%s': %s\n", dataDir, strerror(errno));
return -1;
}
if (chmod(dataDir, 0700) < 0) {
- LOGE("failed to chmod '%s': %s\n", dataDir, strerror(errno));
+ ALOGE("failed to chmod '%s': %s\n", dataDir, strerror(errno));
rc = -1;
goto out;
}
if (lstat(libdir, &libStat) < 0) {
- LOGE("couldn't stat lib dir: %s\n", strerror(errno));
+ ALOGE("couldn't stat lib dir: %s\n", strerror(errno));
rc = -1;
goto out;
}
@@ -970,13 +970,13 @@ int unlinklib(const char* dataDir)
}
if (mkdir(libdir, 0755) < 0) {
- LOGE("cannot create dir '%s': %s\n", libdir, strerror(errno));
+ ALOGE("cannot create dir '%s': %s\n", libdir, strerror(errno));
rc = -errno;
goto out;
}
if (chown(libdir, AID_SYSTEM, AID_SYSTEM) < 0) {
- LOGE("cannot chown dir '%s': %s\n", libdir, strerror(errno));
+ ALOGE("cannot chown dir '%s': %s\n", libdir, strerror(errno));
unlink(libdir);
rc = -errno;
goto out;
@@ -984,12 +984,12 @@ int unlinklib(const char* dataDir)
out:
if (chmod(dataDir, s.st_mode) < 0) {
- LOGE("failed to chmod '%s': %s\n", dataDir, strerror(errno));
+ ALOGE("failed to chmod '%s': %s\n", dataDir, strerror(errno));
return -1;
}
if (chown(dataDir, s.st_uid, s.st_gid) < 0) {
- LOGE("failed to chown '%s' : %s\n", dataDir, strerror(errno));
+ ALOGE("failed to chown '%s' : %s\n", dataDir, strerror(errno));
return -1;
}
diff --git a/cmds/installd/installd.c b/cmds/installd/installd.c
index 159bccb..569b491 100644
--- a/cmds/installd/installd.c
+++ b/cmds/installd/installd.c
@@ -157,11 +157,11 @@ static int readx(int s, void *_buf, int count)
r = read(s, buf + n, count - n);
if (r < 0) {
if (errno == EINTR) continue;
- LOGE("read error: %s\n", strerror(errno));
+ ALOGE("read error: %s\n", strerror(errno));
return -1;
}
if (r == 0) {
- LOGE("eof\n");
+ ALOGE("eof\n");
return -1; /* EOF */
}
n += r;
@@ -178,7 +178,7 @@ static int writex(int s, const void *_buf, int count)
r = write(s, buf + n, count - n);
if (r < 0) {
if (errno == EINTR) continue;
- LOGE("write error: %s\n", strerror(errno));
+ ALOGE("write error: %s\n", strerror(errno));
return -1;
}
n += r;
@@ -213,7 +213,7 @@ static int execute(int s, char cmd[BUFFER_MAX])
n++;
arg[n] = cmd;
if (n == TOKEN_MAX) {
- LOGE("too many arguments\n");
+ ALOGE("too many arguments\n");
goto done;
}
}
@@ -223,7 +223,7 @@ static int execute(int s, char cmd[BUFFER_MAX])
for (i = 0; i < sizeof(cmds) / sizeof(cmds[0]); i++) {
if (!strcmp(cmds[i].name,arg[0])) {
if (n != cmds[i].numargs) {
- LOGE("%s requires %d arguments (%d given)\n",
+ ALOGE("%s requires %d arguments (%d given)\n",
cmds[i].name, cmds[i].numargs, n);
} else {
ret = cmds[i].func(arg + 1, reply);
@@ -231,7 +231,7 @@ static int execute(int s, char cmd[BUFFER_MAX])
goto done;
}
}
- LOGE("unsupported command '%s'\n", arg[0]);
+ ALOGE("unsupported command '%s'\n", arg[0]);
done:
if (reply[0]) {
@@ -290,7 +290,7 @@ int initialize_globals() {
android_system_dirs.dirs = calloc(android_system_dirs.count, sizeof(dir_rec_t));
if (android_system_dirs.dirs == NULL) {
- LOGE("Couldn't allocate array for dirs; aborting\n");
+ ALOGE("Couldn't allocate array for dirs; aborting\n");
return -1;
}
@@ -351,22 +351,22 @@ int main(const int argc, const char *argv[]) {
int lsocket, s, count;
if (initialize_globals() < 0) {
- LOGE("Could not initialize globals; exiting.\n");
+ ALOGE("Could not initialize globals; exiting.\n");
exit(1);
}
if (initialize_directories() < 0) {
- LOGE("Could not create directories; exiting.\n");
+ ALOGE("Could not create directories; exiting.\n");
exit(1);
}
lsocket = android_get_control_socket(SOCKET_PATH);
if (lsocket < 0) {
- LOGE("Failed to get socket from environment: %s\n", strerror(errno));
+ ALOGE("Failed to get socket from environment: %s\n", strerror(errno));
exit(1);
}
if (listen(lsocket, 5)) {
- LOGE("Listen on socket failed: %s\n", strerror(errno));
+ ALOGE("Listen on socket failed: %s\n", strerror(errno));
exit(1);
}
fcntl(lsocket, F_SETFD, FD_CLOEXEC);
@@ -375,7 +375,7 @@ int main(const int argc, const char *argv[]) {
alen = sizeof(addr);
s = accept(lsocket, &addr, &alen);
if (s < 0) {
- LOGE("Accept failed: %s\n", strerror(errno));
+ ALOGE("Accept failed: %s\n", strerror(errno));
continue;
}
fcntl(s, F_SETFD, FD_CLOEXEC);
@@ -384,15 +384,15 @@ int main(const int argc, const char *argv[]) {
for (;;) {
unsigned short count;
if (readx(s, &count, sizeof(count))) {
- LOGE("failed to read size\n");
+ ALOGE("failed to read size\n");
break;
}
if ((count < 1) || (count >= BUFFER_MAX)) {
- LOGE("invalid size %d\n", count);
+ ALOGE("invalid size %d\n", count);
break;
}
if (readx(s, buf, count)) {
- LOGE("failed to read command\n");
+ ALOGE("failed to read command\n");
break;
}
buf[count] = 0;
diff --git a/cmds/installd/utils.c b/cmds/installd/utils.c
index 940626e..52ec9e8 100644
--- a/cmds/installd/utils.c
+++ b/cmds/installd/utils.c
@@ -42,7 +42,7 @@ int create_pkg_path_in_dir(char path[PKG_PATH_MAX],
if (append_and_increment(&dst, dir->path, &dst_size) < 0
|| append_and_increment(&dst, pkgname, &dst_size) < 0
|| append_and_increment(&dst, postfix, &dst_size) < 0) {
- LOGE("Error building APK path");
+ ALOGE("Error building APK path");
return -1;
}
@@ -76,7 +76,7 @@ int create_pkg_path(char path[PKG_PATH_MAX],
if (append_and_increment(&dst, android_data_dir.path, &dst_size) < 0
|| append_and_increment(&dst, persona_prefix, &dst_size) < 0) {
- LOGE("Error building prefix for APK path");
+ ALOGE("Error building prefix for APK path");
return -1;
}
@@ -117,18 +117,18 @@ int create_persona_path(char path[PKG_PATH_MAX],
if (append_and_increment(&dst, android_data_dir.path, &dst_size) < 0
|| append_and_increment(&dst, persona_prefix, &dst_size) < 0) {
- LOGE("Error building prefix for user path");
+ ALOGE("Error building prefix for user path");
return -1;
}
if (persona != 0) {
if (dst_size < uid_len + 1) {
- LOGE("Error building user path");
+ ALOGE("Error building user path");
return -1;
}
int ret = snprintf(dst, dst_size, "%d/", persona);
if (ret < 0 || (size_t) ret != uid_len) {
- LOGE("Error appending persona id to path");
+ ALOGE("Error appending persona id to path");
return -1;
}
}
@@ -163,7 +163,7 @@ int is_valid_package_name(const char* pkgname) {
} else if (*x == '.') {
if ((x == pkgname) || (x[1] == '.') || (x[1] == 0)) {
/* periods must not be first, last, or doubled */
- LOGE("invalid package name '%s'\n", pkgname);
+ ALOGE("invalid package name '%s'\n", pkgname);
return -1;
}
} else if (*x == '-') {
@@ -172,7 +172,7 @@ int is_valid_package_name(const char* pkgname) {
alpha = 1;
} else {
/* anything not A-Z, a-z, 0-9, _, or . is invalid */
- LOGE("invalid package name '%s'\n", pkgname);
+ ALOGE("invalid package name '%s'\n", pkgname);
return -1;
}
@@ -184,7 +184,7 @@ int is_valid_package_name(const char* pkgname) {
x++;
while (*x) {
if (!isalnum(*x)) {
- LOGE("invalid package name '%s' should include only numbers after -\n", pkgname);
+ ALOGE("invalid package name '%s' should include only numbers after -\n", pkgname);
return -1;
}
x++;
@@ -222,13 +222,13 @@ static int _delete_dir_contents(DIR *d, const char *ignore)
subfd = openat(dfd, name, O_RDONLY | O_DIRECTORY);
if (subfd < 0) {
- LOGE("Couldn't openat %s: %s\n", name, strerror(errno));
+ ALOGE("Couldn't openat %s: %s\n", name, strerror(errno));
result = -1;
continue;
}
subdir = fdopendir(subfd);
if (subdir == NULL) {
- LOGE("Couldn't fdopendir %s: %s\n", name, strerror(errno));
+ ALOGE("Couldn't fdopendir %s: %s\n", name, strerror(errno));
close(subfd);
result = -1;
continue;
@@ -238,12 +238,12 @@ static int _delete_dir_contents(DIR *d, const char *ignore)
}
closedir(subdir);
if (unlinkat(dfd, name, AT_REMOVEDIR) < 0) {
- LOGE("Couldn't unlinkat %s: %s\n", name, strerror(errno));
+ ALOGE("Couldn't unlinkat %s: %s\n", name, strerror(errno));
result = -1;
}
} else {
if (unlinkat(dfd, name, 0) < 0) {
- LOGE("Couldn't unlinkat %s: %s\n", name, strerror(errno));
+ ALOGE("Couldn't unlinkat %s: %s\n", name, strerror(errno));
result = -1;
}
}
@@ -261,14 +261,14 @@ int delete_dir_contents(const char *pathname,
d = opendir(pathname);
if (d == NULL) {
- LOGE("Couldn't opendir %s: %s\n", pathname, strerror(errno));
+ ALOGE("Couldn't opendir %s: %s\n", pathname, strerror(errno));
return -errno;
}
res = _delete_dir_contents(d, ignore);
closedir(d);
if (also_delete_dir) {
if (rmdir(pathname)) {
- LOGE("Couldn't rmdir %s: %s\n", pathname, strerror(errno));
+ ALOGE("Couldn't rmdir %s: %s\n", pathname, strerror(errno));
res = -1;
}
}
@@ -282,12 +282,12 @@ int delete_dir_contents_fd(int dfd, const char *name)
fd = openat(dfd, name, O_RDONLY | O_DIRECTORY);
if (fd < 0) {
- LOGE("Couldn't openat %s: %s\n", name, strerror(errno));
+ ALOGE("Couldn't openat %s: %s\n", name, strerror(errno));
return -1;
}
d = fdopendir(fd);
if (d == NULL) {
- LOGE("Couldn't fdopendir %s: %s\n", name, strerror(errno));
+ ALOGE("Couldn't fdopendir %s: %s\n", name, strerror(errno));
close(fd);
return -1;
}
@@ -307,7 +307,7 @@ int validate_system_app_path(const char* path) {
const size_t dir_len = android_system_dirs.dirs[i].len;
if (!strncmp(path, android_system_dirs.dirs[i].path, dir_len)) {
if (path[dir_len] == '.' || strchr(path + dir_len, '/') != NULL) {
- LOGE("invalid system apk path '%s' (trickery)\n", path);
+ ALOGE("invalid system apk path '%s' (trickery)\n", path);
return -1;
}
return 0;
@@ -377,7 +377,7 @@ int get_path_from_string(dir_rec_t* rec, const char* path) {
if (append_and_increment(&dst, path, &dst_size) < 0
|| append_and_increment(&dst, "/", &dst_size)) {
- LOGE("Error canonicalizing path");
+ ALOGE("Error canonicalizing path");
return -1;
}
@@ -395,7 +395,7 @@ int copy_and_append(dir_rec_t* dst, const dir_rec_t* src, const char* suffix) {
if (dst->path == NULL
|| snprintf(dst->path, dstSize, "%s%s", src->path, suffix)
!= (ssize_t) dst->len) {
- LOGE("Could not allocate memory to hold appended path; aborting\n");
+ ALOGE("Could not allocate memory to hold appended path; aborting\n");
return -1;
}
@@ -422,7 +422,7 @@ int validate_apk_path(const char *path)
dir_len = android_asec_dir.len;
allowsubdir = 1;
} else {
- LOGE("invalid apk path '%s' (bad prefix)\n", path);
+ ALOGE("invalid apk path '%s' (bad prefix)\n", path);
return -1;
}
@@ -435,7 +435,7 @@ int validate_apk_path(const char *path)
++subdir;
if (!allowsubdir
|| (path_len > (size_t) (subdir - path) && (strchr(subdir, '/') != NULL))) {
- LOGE("invalid apk path '%s' (subdir?)\n", path);
+ ALOGE("invalid apk path '%s' (subdir?)\n", path);
return -1;
}
}
@@ -446,7 +446,7 @@ int validate_apk_path(const char *path)
*/
if (path[dir_len] == '.'
|| (subdir != NULL && ((*subdir == '.') || (strchr(subdir, '/') != NULL)))) {
- LOGE("invalid apk path '%s' (trickery)\n", path);
+ ALOGE("invalid apk path '%s' (trickery)\n", path);
return -1;
}
diff --git a/cmds/ip-up-vpn/ip-up-vpn.c b/cmds/ip-up-vpn/ip-up-vpn.c
index 0e6286f..9fcc950 100644
--- a/cmds/ip-up-vpn/ip-up-vpn.c
+++ b/cmds/ip-up-vpn/ip-up-vpn.c
@@ -67,7 +67,7 @@ int main(int argc, char **argv)
{
FILE *state = fopen(DIR ".tmp", "wb");
if (!state) {
- LOGE("Cannot create state: %s", strerror(errno));
+ ALOGE("Cannot create state: %s", strerror(errno));
return 1;
}
@@ -97,7 +97,7 @@ int main(int argc, char **argv)
while (!ioctl(s, SIOCDELRT, &rt));
}
if (errno != ESRCH) {
- LOGE("Cannot remove host route: %s", strerror(errno));
+ ALOGE("Cannot remove host route: %s", strerror(errno));
return 1;
}
@@ -105,7 +105,7 @@ int main(int argc, char **argv)
rt.rt_flags |= RTF_GATEWAY;
if (!set_address(&rt.rt_gateway, argv[1]) ||
(ioctl(s, SIOCADDRT, &rt) && errno != EEXIST)) {
- LOGE("Cannot create host route: %s", strerror(errno));
+ ALOGE("Cannot create host route: %s", strerror(errno));
return 1;
}
@@ -113,21 +113,21 @@ int main(int argc, char **argv)
ifr.ifr_flags = IFF_UP;
strncpy(ifr.ifr_name, interface, IFNAMSIZ);
if (ioctl(s, SIOCSIFFLAGS, &ifr)) {
- LOGE("Cannot bring up %s: %s", interface, strerror(errno));
+ ALOGE("Cannot bring up %s: %s", interface, strerror(errno));
return 1;
}
/* Set the address. */
if (!set_address(&ifr.ifr_addr, address) ||
ioctl(s, SIOCSIFADDR, &ifr)) {
- LOGE("Cannot set address: %s", strerror(errno));
+ ALOGE("Cannot set address: %s", strerror(errno));
return 1;
}
/* Set the netmask. */
if (set_address(&ifr.ifr_netmask, env("INTERNAL_NETMASK4"))) {
if (ioctl(s, SIOCSIFNETMASK, &ifr)) {
- LOGE("Cannot set netmask: %s", strerror(errno));
+ ALOGE("Cannot set netmask: %s", strerror(errno));
return 1;
}
}
@@ -140,13 +140,13 @@ int main(int argc, char **argv)
fprintf(state, "%s\n", env("INTERNAL_DNS4_LIST"));
fprintf(state, "%s\n", env("DEFAULT_DOMAIN"));
} else {
- LOGE("Cannot parse parameters");
+ ALOGE("Cannot parse parameters");
return 1;
}
fclose(state);
if (chmod(DIR ".tmp", 0444) || rename(DIR ".tmp", DIR "state")) {
- LOGE("Cannot write state: %s", strerror(errno));
+ ALOGE("Cannot write state: %s", strerror(errno));
return 1;
}
return 0;
diff --git a/cmds/keystore/keystore.cpp b/cmds/keystore/keystore.cpp
index 6ca31a6..05f77e5 100644
--- a/cmds/keystore/keystore.cpp
+++ b/cmds/keystore/keystore.cpp
@@ -133,7 +133,7 @@ public:
const char* randomDevice = "/dev/urandom";
mRandom = ::open(randomDevice, O_RDONLY);
if (mRandom == -1) {
- LOGE("open: %s: %s", randomDevice, strerror(errno));
+ ALOGE("open: %s: %s", randomDevice, strerror(errno));
return false;
}
return true;
@@ -754,11 +754,11 @@ static ResponseCode process(KeyStore* keyStore, int sock, uid_t uid, int8_t code
int main(int argc, char* argv[]) {
int controlSocket = android_get_control_socket("keystore");
if (argc < 2) {
- LOGE("A directory must be specified!");
+ ALOGE("A directory must be specified!");
return 1;
}
if (chdir(argv[1]) == -1) {
- LOGE("chdir: %s: %s", argv[1], strerror(errno));
+ ALOGE("chdir: %s: %s", argv[1], strerror(errno));
return 1;
}
@@ -767,7 +767,7 @@ int main(int argc, char* argv[]) {
return 1;
}
if (listen(controlSocket, 3) == -1) {
- LOGE("listen: %s", strerror(errno));
+ ALOGE("listen: %s", strerror(errno));
return 1;
}
@@ -805,6 +805,6 @@ int main(int argc, char* argv[]) {
}
close(sock);
}
- LOGE("accept: %s", strerror(errno));
+ ALOGE("accept: %s", strerror(errno));
return 1;
}
diff --git a/cmds/screenshot/screenshot.c b/cmds/screenshot/screenshot.c
index 048636c..cca80c3 100644
--- a/cmds/screenshot/screenshot.c
+++ b/cmds/screenshot/screenshot.c
@@ -26,20 +26,20 @@ void take_screenshot(FILE *fb_in, FILE *fb_out) {
fb = fileno(fb_in);
if(fb < 0) {
- LOGE("failed to open framebuffer\n");
+ ALOGE("failed to open framebuffer\n");
return;
}
fb_in = fdopen(fb, "r");
if(ioctl(fb, FBIOGET_VSCREENINFO, &vinfo) < 0) {
- LOGE("failed to get framebuffer info\n");
+ ALOGE("failed to get framebuffer info\n");
return;
}
fcntl(fb, F_SETFD, FD_CLOEXEC);
png = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
if (png == NULL) {
- LOGE("failed png_create_write_struct\n");
+ ALOGE("failed png_create_write_struct\n");
fclose(fb_in);
return;
}
@@ -47,13 +47,13 @@ void take_screenshot(FILE *fb_in, FILE *fb_out) {
png_init_io(png, fb_out);
info = png_create_info_struct(png);
if (info == NULL) {
- LOGE("failed png_create_info_struct\n");
+ ALOGE("failed png_create_info_struct\n");
png_destroy_write_struct(&png, NULL);
fclose(fb_in);
return;
}
if (setjmp(png_jmpbuf(png))) {
- LOGE("failed png setjmp\n");
+ ALOGE("failed png setjmp\n");
png_destroy_write_struct(&png, NULL);
fclose(fb_in);
return;
@@ -68,7 +68,7 @@ void take_screenshot(FILE *fb_in, FILE *fb_out) {
rowlen=vinfo.xres * bytespp;
if (rowlen > sizeof(imgbuf)) {
- LOGE("crazy rowlen: %d\n", rowlen);
+ ALOGE("crazy rowlen: %d\n", rowlen);
png_destroy_write_struct(&png, NULL);
fclose(fb_in);
return;
diff --git a/cmds/servicemanager/binder.c b/cmds/servicemanager/binder.c
index b03b620..918d4d4 100644
--- a/cmds/servicemanager/binder.c
+++ b/cmds/servicemanager/binder.c
@@ -219,7 +219,7 @@ int binder_parse(struct binder_state *bs, struct binder_io *bio,
case BR_TRANSACTION: {
struct binder_txn *txn = (void *) ptr;
if ((end - ptr) * sizeof(uint32_t) < sizeof(struct binder_txn)) {
- LOGE("parse: txn too small!\n");
+ ALOGE("parse: txn too small!\n");
return -1;
}
binder_dump_txn(txn);
@@ -240,7 +240,7 @@ int binder_parse(struct binder_state *bs, struct binder_io *bio,
case BR_REPLY: {
struct binder_txn *txn = (void*) ptr;
if ((end - ptr) * sizeof(uint32_t) < sizeof(struct binder_txn)) {
- LOGE("parse: reply too small!\n");
+ ALOGE("parse: reply too small!\n");
return -1;
}
binder_dump_txn(txn);
@@ -266,7 +266,7 @@ int binder_parse(struct binder_state *bs, struct binder_io *bio,
r = -1;
break;
default:
- LOGE("parse: OOPS %d\n", cmd);
+ ALOGE("parse: OOPS %d\n", cmd);
return -1;
}
}
@@ -375,17 +375,17 @@ void binder_loop(struct binder_state *bs, binder_handler func)
res = ioctl(bs->fd, BINDER_WRITE_READ, &bwr);
if (res < 0) {
- LOGE("binder_loop: ioctl failed (%s)\n", strerror(errno));
+ ALOGE("binder_loop: ioctl failed (%s)\n", strerror(errno));
break;
}
res = binder_parse(bs, 0, readbuf, bwr.read_consumed, func);
if (res == 0) {
- LOGE("binder_loop: unexpected reply?!\n");
+ ALOGE("binder_loop: unexpected reply?!\n");
break;
}
if (res < 0) {
- LOGE("binder_loop: io error %d %s\n", res, strerror(errno));
+ ALOGE("binder_loop: io error %d %s\n", res, strerror(errno));
break;
}
}
diff --git a/cmds/servicemanager/service_manager.c b/cmds/servicemanager/service_manager.c
index 6ad114a..42d8977 100644
--- a/cmds/servicemanager/service_manager.c
+++ b/cmds/servicemanager/service_manager.c
@@ -12,7 +12,7 @@
#if 0
#define ALOGI(x...) fprintf(stderr, "svcmgr: " x)
-#define LOGE(x...) fprintf(stderr, "svcmgr: " x)
+#define ALOGE(x...) fprintf(stderr, "svcmgr: " x)
#else
#define LOG_TAG "ServiceManager"
#include <cutils/log.h>
@@ -152,7 +152,7 @@ int do_add_service(struct binder_state *bs,
return -1;
if (!svc_can_register(uid, s)) {
- LOGE("add_service('%s',%p) uid=%d - PERMISSION DENIED\n",
+ ALOGE("add_service('%s',%p) uid=%d - PERMISSION DENIED\n",
str8(s), ptr, uid);
return -1;
}
@@ -160,7 +160,7 @@ int do_add_service(struct binder_state *bs,
si = find_svc(s, len);
if (si) {
if (si->ptr) {
- LOGE("add_service('%s',%p) uid=%d - ALREADY REGISTERED, OVERRIDE\n",
+ ALOGE("add_service('%s',%p) uid=%d - ALREADY REGISTERED, OVERRIDE\n",
str8(s), ptr, uid);
svcinfo_death(bs, si);
}
@@ -168,7 +168,7 @@ int do_add_service(struct binder_state *bs,
} else {
si = malloc(sizeof(*si) + (len + 1) * sizeof(uint16_t));
if (!si) {
- LOGE("add_service('%s',%p) uid=%d - OUT OF MEMORY\n",
+ ALOGE("add_service('%s',%p) uid=%d - OUT OF MEMORY\n",
str8(s), ptr, uid);
return -1;
}
@@ -246,7 +246,7 @@ int svcmgr_handler(struct binder_state *bs,
return -1;
}
default:
- LOGE("unknown code %d\n", txn->code);
+ ALOGE("unknown code %d\n", txn->code);
return -1;
}
@@ -262,7 +262,7 @@ int main(int argc, char **argv)
bs = binder_open(128*1024);
if (binder_become_context_manager(bs)) {
- LOGE("cannot become context manager (%s)\n", strerror(errno));
+ ALOGE("cannot become context manager (%s)\n", strerror(errno));
return -1;
}
diff --git a/cmds/stagefright/sf2.cpp b/cmds/stagefright/sf2.cpp
index 7551d31..ae80f88 100644
--- a/cmds/stagefright/sf2.cpp
+++ b/cmds/stagefright/sf2.cpp
@@ -454,7 +454,7 @@ private:
if (sizeNeeded > sizeLeft) {
if (outBuffer->size() == 0) {
- LOGE("Unable to fit even a single input buffer of size %d.",
+ ALOGE("Unable to fit even a single input buffer of size %d.",
sizeNeeded);
}
CHECK_GT(outBuffer->size(), 0u);
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index f52df1f..1c0d7cf 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -295,7 +295,7 @@ status_t AndroidRuntime::callMain(const char* className,
methodId = env->GetStaticMethodID(clazz, "main", "([Ljava/lang/String;)V");
if (methodId == NULL) {
- LOGE("ERROR: could not find method %s.main(String[])\n", className);
+ ALOGE("ERROR: could not find method %s.main(String[])\n", className);
return UNKNOWN_ERROR;
}
@@ -766,7 +766,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
* JNI calls.
*/
if (JNI_CreateJavaVM(pJavaVM, pEnv, &initArgs) < 0) {
- LOGE("JNI_CreateJavaVM failed\n");
+ ALOGE("JNI_CreateJavaVM failed\n");
goto bail;
}
@@ -838,7 +838,7 @@ void AndroidRuntime::start(const char* className, const char* options)
* Register android functions.
*/
if (startReg(env) < 0) {
- LOGE("Unable to register all android natives\n");
+ ALOGE("Unable to register all android natives\n");
return;
}
@@ -869,13 +869,13 @@ void AndroidRuntime::start(const char* className, const char* options)
char* slashClassName = toSlashClassName(className);
jclass startClass = env->FindClass(slashClassName);
if (startClass == NULL) {
- LOGE("JavaVM unable to locate class '%s'\n", slashClassName);
+ ALOGE("JavaVM unable to locate class '%s'\n", slashClassName);
/* keep going */
} else {
jmethodID startMeth = env->GetStaticMethodID(startClass, "main",
"([Ljava/lang/String;)V");
if (startMeth == NULL) {
- LOGE("JavaVM unable to find main() in '%s'\n", className);
+ ALOGE("JavaVM unable to find main() in '%s'\n", className);
/* keep going */
} else {
env->CallStaticVoidMethod(startClass, startMeth, strArray);
@@ -961,7 +961,7 @@ static int javaDetachThread(void)
result = vm->DetachCurrentThread();
if (result != JNI_OK)
- LOGE("ERROR: thread detach failed\n");
+ ALOGE("ERROR: thread detach failed\n");
return result;
}
diff --git a/core/jni/android/graphics/Canvas.cpp b/core/jni/android/graphics/Canvas.cpp
index 1362fc8..40ac708 100644
--- a/core/jni/android/graphics/Canvas.cpp
+++ b/core/jni/android/graphics/Canvas.cpp
@@ -770,7 +770,7 @@ public:
value = TextLayoutCache::getInstance().getValue(paint, textArray, start, count,
contextCount, flags);
if (value == NULL) {
- LOGE("Cannot get TextLayoutCache value");
+ ALOGE("Cannot get TextLayoutCache value");
return ;
}
#else
diff --git a/core/jni/android/graphics/Graphics.cpp b/core/jni/android/graphics/Graphics.cpp
index 64bd207..47ffd94 100644
--- a/core/jni/android/graphics/Graphics.cpp
+++ b/core/jni/android/graphics/Graphics.cpp
@@ -40,7 +40,7 @@ void doThrowIOE(JNIEnv* env, const char* msg) {
bool GraphicsJNI::hasException(JNIEnv *env) {
if (env->ExceptionCheck() != 0) {
- LOGE("*** Uncaught exception returned from Java call!\n");
+ ALOGE("*** Uncaught exception returned from Java call!\n");
env->ExceptionDescribe();
return true;
}
diff --git a/core/jni/android/graphics/SurfaceTexture.cpp b/core/jni/android/graphics/SurfaceTexture.cpp
index 9e697b4..3d350ed 100644
--- a/core/jni/android/graphics/SurfaceTexture.cpp
+++ b/core/jni/android/graphics/SurfaceTexture.cpp
@@ -112,7 +112,7 @@ JNIEnv* JNISurfaceTextureContext::getJNIEnv(bool* needsDetach) {
JavaVM* vm = AndroidRuntime::getJavaVM();
int result = vm->AttachCurrentThread(&env, (void*) &args);
if (result != JNI_OK) {
- LOGE("thread attach failed: %#x", result);
+ ALOGE("thread attach failed: %#x", result);
return NULL;
}
*needsDetach = true;
@@ -124,7 +124,7 @@ void JNISurfaceTextureContext::detachJNI() {
JavaVM* vm = AndroidRuntime::getJavaVM();
int result = vm->DetachCurrentThread();
if (result != JNI_OK) {
- LOGE("thread detach failed: %#x", result);
+ ALOGE("thread detach failed: %#x", result);
}
}
@@ -164,14 +164,14 @@ static void SurfaceTexture_classInit(JNIEnv* env, jclass clazz)
fields.surfaceTexture = env->GetFieldID(clazz,
ANDROID_GRAPHICS_SURFACETEXTURE_JNI_ID, "I");
if (fields.surfaceTexture == NULL) {
- LOGE("can't find android/graphics/SurfaceTexture.%s",
+ ALOGE("can't find android/graphics/SurfaceTexture.%s",
ANDROID_GRAPHICS_SURFACETEXTURE_JNI_ID);
}
fields.postEvent = env->GetStaticMethodID(clazz, "postEventFromNative",
"(Ljava/lang/Object;)V");
if (fields.postEvent == NULL) {
- LOGE("can't find android/graphics/SurfaceTexture.postEventFromNative");
+ ALOGE("can't find android/graphics/SurfaceTexture.postEventFromNative");
}
}
diff --git a/core/jni/android/opengl/util.cpp b/core/jni/android/opengl/util.cpp
index 93717f3..929df540 100644
--- a/core/jni/android/opengl/util.cpp
+++ b/core/jni/android/opengl/util.cpp
@@ -1062,7 +1062,7 @@ int register_android_opengl_classes(JNIEnv* env)
result = AndroidRuntime::registerNativeMethods(env,
cri->classPath, cri->methods, cri->methodCount);
if (result < 0) {
- LOGE("Failed to register %s: %d", cri->classPath, result);
+ ALOGE("Failed to register %s: %d", cri->classPath, result);
break;
}
}
diff --git a/core/jni/android_app_NativeActivity.cpp b/core/jni/android_app_NativeActivity.cpp
index 7f5ba85..ac4fe5b 100644
--- a/core/jni/android_app_NativeActivity.cpp
+++ b/core/jni/android_app_NativeActivity.cpp
@@ -203,7 +203,7 @@ int32_t AInputQueue::getEvent(AInputEvent** outEvent) {
int32_t res = mConsumer.receiveDispatchSignal();
if (res != android::OK) {
- LOGE("channel '%s' ~ Failed to receive dispatch signal. status=%d",
+ ALOGE("channel '%s' ~ Failed to receive dispatch signal. status=%d",
mConsumer.getChannel()->getName().string(), res);
return -1;
}
@@ -548,7 +548,7 @@ void android_NativeActivity_hideSoftInput(
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;
@@ -585,7 +585,7 @@ static int mainWorkCallback(int fd, int events, void* data) {
checkAndClearExceptionFromCallback(code->env, "dispatchUnhandledKeyEvent");
code->env->DeleteLocalRef(inputEventObj);
} else {
- LOGE("Failed to obtain key event for dispatchUnhandledKeyEvent.");
+ ALOGE("Failed to obtain key event for dispatchUnhandledKeyEvent.");
handled = false;
}
code->nativeInputQueue->finishEvent(keyEvent, handled, true);
@@ -600,7 +600,7 @@ static int mainWorkCallback(int fd, int events, void* data) {
checkAndClearExceptionFromCallback(code->env, "preDispatchKeyEvent");
code->env->DeleteLocalRef(inputEventObj);
} else {
- LOGE("Failed to obtain key event for preDispatchKeyEvent.");
+ ALOGE("Failed to obtain key event for preDispatchKeyEvent.");
}
}
} break;
diff --git a/core/jni/android_app_backup_FullBackup.cpp b/core/jni/android_app_backup_FullBackup.cpp
index 6ef62a9..066a23e 100644
--- a/core/jni/android_app_backup_FullBackup.cpp
+++ b/core/jni/android_app_backup_FullBackup.cpp
@@ -97,12 +97,12 @@ static int backupToTar(JNIEnv* env, jobject clazz, jstring packageNameObj,
// Validate
if (!writer) {
- LOGE("No output stream provided [%s]", path.string());
+ ALOGE("No output stream provided [%s]", path.string());
return -1;
}
if (path.length() < rootpath.length()) {
- LOGE("file path [%s] shorter than root path [%s]",
+ ALOGE("file path [%s] shorter than root path [%s]",
path.string(), rootpath.string());
return -1;
}
diff --git a/core/jni/android_bluetooth_BluetoothAudioGateway.cpp b/core/jni/android_bluetooth_BluetoothAudioGateway.cpp
index 3a1a13a..3b8fb79 100755
--- a/core/jni/android_bluetooth_BluetoothAudioGateway.cpp
+++ b/core/jni/android_bluetooth_BluetoothAudioGateway.cpp
@@ -127,7 +127,7 @@ static void initializeNativeDataNative(JNIEnv* env, jobject object) {
#ifdef HAVE_BLUETOOTH
native_data_t *nat = (native_data_t *)calloc(1, sizeof(native_data_t));
if (NULL == nat) {
- LOGE("%s: out of memory!", __FUNCTION__);
+ ALOGE("%s: out of memory!", __FUNCTION__);
return;
}
@@ -166,7 +166,7 @@ static void cleanupNativeDataNative(JNIEnv* env, jobject object) {
static int set_nb(int sk, bool nb) {
int flags = fcntl(sk, F_GETFL);
if (flags < 0) {
- LOGE("Can't get socket flags with fcntl(): %s (%d)",
+ ALOGE("Can't get socket flags with fcntl(): %s (%d)",
strerror(errno), errno);
close(sk);
return -1;
@@ -175,7 +175,7 @@ static int set_nb(int sk, bool nb) {
if (nb) flags |= O_NONBLOCK;
int status = fcntl(sk, F_SETFL, flags);
if (status < 0) {
- LOGE("Can't set socket to nonblocking mode with fcntl(): %s (%d)",
+ ALOGE("Can't set socket to nonblocking mode with fcntl(): %s (%d)",
strerror(errno), errno);
close(sk);
return -1;
@@ -198,7 +198,7 @@ static int do_accept(JNIEnv* env, jobject object, int ag_fd,
int alen = sizeof(raddr);
int nsk = accept(ag_fd, (struct sockaddr *) &raddr, &alen);
if (nsk < 0) {
- LOGE("Error on accept from socket fd %d: %s (%d).",
+ ALOGE("Error on accept from socket fd %d: %s (%d).",
ag_fd,
strerror(errno),
errno);
@@ -244,7 +244,7 @@ static inline int on_accept_set_fields(JNIEnv* env, jobject object,
ag_fd,
FD_ISSET(ag_fd, &rset));
if (ag_fd >= 0 && !FD_ISSET(ag_fd, &rset)) {
- LOGE("WTF???");
+ ALOGE("WTF???");
return -1;
}
}
@@ -271,7 +271,7 @@ static jboolean waitForHandsfreeConnectNative(JNIEnv* env, jobject object,
int len = sizeof(tv);
if (getsockopt(nat->hf_ag_rfcomm_channel,
SOL_SOCKET, SO_RCVTIMEO, &tv, &len) < 0) {
- LOGE("getsockopt(%d, SOL_SOCKET, SO_RCVTIMEO): %s (%d)",
+ ALOGE("getsockopt(%d, SOL_SOCKET, SO_RCVTIMEO): %s (%d)",
nat->hf_ag_rfcomm_channel,
strerror(errno),
errno);
@@ -284,7 +284,7 @@ static jboolean waitForHandsfreeConnectNative(JNIEnv* env, jobject object,
tv.tv_usec = 1000 * (timeout_ms % 1000);
if (setsockopt(nat->hf_ag_rfcomm_channel,
SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) < 0) {
- LOGE("setsockopt(%d, SOL_SOCKET, SO_RCVTIMEO): %s (%d)",
+ ALOGE("setsockopt(%d, SOL_SOCKET, SO_RCVTIMEO): %s (%d)",
nat->hf_ag_rfcomm_channel,
strerror(errno),
errno);
@@ -322,7 +322,7 @@ static jboolean waitForHandsfreeConnectNative(JNIEnv* env, jobject object,
FD_SET(nat->hs_ag_rfcomm_sock, &rset);
}
if (cnt == 0) {
- LOGE("Neither HF nor HS listening sockets are open!");
+ ALOGE("Neither HF nor HS listening sockets are open!");
return JNI_FALSE;
}
@@ -348,7 +348,7 @@ static jboolean waitForHandsfreeConnectNative(JNIEnv* env, jobject object,
if (n <= 0) {
if (n < 0) {
- LOGE("listening select() on RFCOMM sockets: %s (%d)",
+ ALOGE("listening select() on RFCOMM sockets: %s (%d)",
strerror(errno),
errno);
}
@@ -388,13 +388,13 @@ static jboolean waitForHandsfreeConnectNative(JNIEnv* env, jobject object,
cnt++;
}
if (cnt == 0) {
- LOGE("Neither HF nor HS listening sockets are open!");
+ ALOGE("Neither HF nor HS listening sockets are open!");
return JNI_FALSE;
}
n = poll(fds, cnt, timeout_ms);
if (n <= 0) {
if (n < 0) {
- LOGE("listening poll() on RFCOMM sockets: %s (%d)",
+ ALOGE("listening poll() on RFCOMM sockets: %s (%d)",
strerror(errno),
errno);
}
@@ -475,7 +475,7 @@ static int setup_listening_socket(int dev, int channel) {
sk = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
if (sk < 0) {
- LOGE("Can't create RFCOMM socket");
+ ALOGE("Can't create RFCOMM socket");
return -1;
}
@@ -486,7 +486,7 @@ static int setup_listening_socket(int dev, int channel) {
}
if (lm && setsockopt(sk, SOL_RFCOMM, RFCOMM_LM, &lm, sizeof(lm)) < 0) {
- LOGE("Can't set RFCOMM link mode");
+ ALOGE("Can't set RFCOMM link mode");
close(sk);
return -1;
}
@@ -497,7 +497,7 @@ static int setup_listening_socket(int dev, int channel) {
laddr.rc_channel = channel;
if (bind(sk, (struct sockaddr *)&laddr, sizeof(laddr)) < 0) {
- LOGE("Can't bind RFCOMM socket");
+ ALOGE("Can't bind RFCOMM socket");
close(sk);
return -1;
}
@@ -517,14 +517,14 @@ static void tearDownListeningSocketsNative(JNIEnv *env, jobject object) {
if (nat->hf_ag_rfcomm_sock > 0) {
if (close(nat->hf_ag_rfcomm_sock) < 0) {
- LOGE("Could not close HF server socket: %s (%d)\n",
+ ALOGE("Could not close HF server socket: %s (%d)\n",
strerror(errno), errno);
}
nat->hf_ag_rfcomm_sock = -1;
}
if (nat->hs_ag_rfcomm_sock > 0) {
if (close(nat->hs_ag_rfcomm_sock) < 0) {
- LOGE("Could not close HS server socket: %s (%d)\n",
+ ALOGE("Could not close HS server socket: %s (%d)\n",
strerror(errno), errno);
}
nat->hs_ag_rfcomm_sock = -1;
diff --git a/core/jni/android_bluetooth_HeadsetBase.cpp b/core/jni/android_bluetooth_HeadsetBase.cpp
index 1f59937..a982182 100644
--- a/core/jni/android_bluetooth_HeadsetBase.cpp
+++ b/core/jni/android_bluetooth_HeadsetBase.cpp
@@ -69,12 +69,12 @@ static inline int write_error_check(int fd, const char* line, int len) {
errno = 0;
ret = write(fd, line, len);
if (ret < 0) {
- LOGE("%s: write() failed: %s (%d)", __FUNCTION__, strerror(errno),
+ ALOGE("%s: write() failed: %s (%d)", __FUNCTION__, strerror(errno),
errno);
return -1;
}
if (ret != len) {
- LOGE("%s: write() only wrote %d of %d bytes", __FUNCTION__, ret, len);
+ ALOGE("%s: write() only wrote %d of %d bytes", __FUNCTION__, ret, len);
return -1;
}
return 0;
@@ -117,7 +117,7 @@ again:
*err = errno = 0;
int ret = poll(&pfd, 1, timeout_ms);
if (ret < 0) {
- LOGE("poll() error\n");
+ ALOGE("poll() error\n");
*err = errno;
return NULL;
}
@@ -148,7 +148,7 @@ again:
goto again;
}
*err = errno;
- LOGE("read() error %s (%d)", strerror(errno), errno);
+ ALOGE("read() error %s (%d)", strerror(errno), errno);
return NULL;
}
@@ -195,7 +195,7 @@ static void initializeNativeDataNative(JNIEnv* env, jobject object,
#ifdef HAVE_BLUETOOTH
native_data_t *nat = (native_data_t *)calloc(1, sizeof(native_data_t));
if (NULL == nat) {
- LOGE("%s: out of memory!", __FUNCTION__);
+ ALOGE("%s: out of memory!", __FUNCTION__);
return;
}
@@ -235,7 +235,7 @@ static jboolean connectNative(JNIEnv *env, jobject obj)
nat->rfcomm_sock = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
if (nat->rfcomm_sock < 0) {
- LOGE("%s: Could not create RFCOMM socket: %s\n", __FUNCTION__,
+ ALOGE("%s: Could not create RFCOMM socket: %s\n", __FUNCTION__,
strerror(errno));
return JNI_FALSE;
}
@@ -248,7 +248,7 @@ static jboolean connectNative(JNIEnv *env, jobject obj)
if (lm && setsockopt(nat->rfcomm_sock, SOL_RFCOMM, RFCOMM_LM, &lm,
sizeof(lm)) < 0) {
- LOGE("%s: Can't set RFCOMM link mode", __FUNCTION__);
+ ALOGE("%s: Can't set RFCOMM link mode", __FUNCTION__);
close(nat->rfcomm_sock);
return JNI_FALSE;
}
@@ -262,7 +262,7 @@ static jboolean connectNative(JNIEnv *env, jobject obj)
if (connect(nat->rfcomm_sock, (struct sockaddr *)&addr,
sizeof(addr)) < 0) {
if (errno == EINTR) continue;
- LOGE("%s: connect() failed: %s\n", __FUNCTION__, strerror(errno));
+ ALOGE("%s: connect() failed: %s\n", __FUNCTION__, strerror(errno));
close(nat->rfcomm_sock);
nat->rfcomm_sock = -1;
return JNI_FALSE;
@@ -293,7 +293,7 @@ static jint connectAsyncNative(JNIEnv *env, jobject obj) {
nat->rfcomm_sock = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
if (nat->rfcomm_sock < 0) {
- LOGE("%s: Could not create RFCOMM socket: %s\n", __FUNCTION__,
+ ALOGE("%s: Could not create RFCOMM socket: %s\n", __FUNCTION__,
strerror(errno));
return -1;
}
@@ -306,7 +306,7 @@ static jint connectAsyncNative(JNIEnv *env, jobject obj) {
if (lm && setsockopt(nat->rfcomm_sock, SOL_RFCOMM, RFCOMM_LM, &lm,
sizeof(lm)) < 0) {
- LOGE("%s: Can't set RFCOMM link mode", __FUNCTION__);
+ ALOGE("%s: Can't set RFCOMM link mode", __FUNCTION__);
close(nat->rfcomm_sock);
return -1;
}
@@ -343,7 +343,7 @@ static jint connectAsyncNative(JNIEnv *env, jobject obj) {
}
else
{
- LOGE("async connect error: %s (%d)", strerror(errno), errno);
+ ALOGE("async connect error: %s (%d)", strerror(errno), errno);
close(nat->rfcomm_sock);
nat->rfcomm_sock = -1;
return -errno;
@@ -410,7 +410,7 @@ static jint waitForAsyncConnectNative(JNIEnv *env, jobject obj,
if (n <= 0) {
if (n < 0) {
- LOGE("select() on RFCOMM socket: %s (%d)",
+ ALOGE("select() on RFCOMM socket: %s (%d)",
strerror(errno),
errno);
return -errno;
@@ -433,7 +433,7 @@ static jint waitForAsyncConnectNative(JNIEnv *env, jobject obj,
respond... but one can't be paranoid enough.
*/
if (nr >= 0 || errno != EAGAIN) {
- LOGE("RFCOMM async connect() error: %s (%d), nr = %d\n",
+ ALOGE("RFCOMM async connect() error: %s (%d), nr = %d\n",
strerror(errno),
errno,
nr);
@@ -456,7 +456,7 @@ static jint waitForAsyncConnectNative(JNIEnv *env, jobject obj,
return 1;
}
}
- else LOGE("RFCOMM socket file descriptor %d is bad!",
+ else ALOGE("RFCOMM socket file descriptor %d is bad!",
nat->rfcomm_sock);
#endif
return -1;
diff --git a/core/jni/android_bluetooth_common.cpp b/core/jni/android_bluetooth_common.cpp
index c8dc9c2..5cdaa6c 100644
--- a/core/jni/android_bluetooth_common.cpp
+++ b/core/jni/android_bluetooth_common.cpp
@@ -101,7 +101,7 @@ jfieldID get_field(JNIEnv *env, jclass clazz, const char *member,
const char *mtype) {
jfieldID field = env->GetFieldID(clazz, member, mtype);
if (field == NULL) {
- LOGE("Can't find member %s", member);
+ ALOGE("Can't find member %s", member);
}
return field;
}
@@ -158,13 +158,13 @@ static dbus_bool_t dbus_func_args_async_valist(JNIEnv *env,
msg = dbus_message_new_method_call(BLUEZ_DBUS_BASE_IFC, path, ifc, func);
if (msg == NULL) {
- LOGE("Could not allocate D-Bus message object!");
+ ALOGE("Could not allocate D-Bus message object!");
goto done;
}
/* append arguments */
if (!dbus_message_append_args_valist(msg, first_arg_type, args)) {
- LOGE("Could not append argument to method call!");
+ ALOGE("Could not append argument to method call!");
goto done;
}
@@ -219,7 +219,7 @@ dbus_bool_t dbus_func_args_async(JNIEnv *env,
return ret;
}
-// If err is NULL, then any errors will be LOGE'd, and free'd and the reply
+// If err is NULL, then any errors will be ALOGE'd, and free'd and the reply
// will be NULL.
// If err is not NULL, then it is assumed that dbus_error_init was already
// called, and error's will be returned to the caller without logging. The
@@ -248,13 +248,13 @@ DBusMessage * dbus_func_args_timeout_valist(JNIEnv *env,
msg = dbus_message_new_method_call(BLUEZ_DBUS_BASE_IFC, path, ifc, func);
if (msg == NULL) {
- LOGE("Could not allocate D-Bus message object!");
+ ALOGE("Could not allocate D-Bus message object!");
goto done;
}
/* append arguments */
if (!dbus_message_append_args_valist(msg, first_arg_type, args)) {
- LOGE("Could not append argument to method call!");
+ ALOGE("Could not append argument to method call!");
goto done;
}
@@ -587,7 +587,7 @@ int get_property(DBusMessageIter iter, Properties *properties,
dbus_message_iter_recurse(&iter, &prop_val);
type = properties[*prop_index].type;
if (dbus_message_iter_get_arg_type(&prop_val) != type) {
- LOGE("Property type mismatch in get_property: %d, expected:%d, index:%d",
+ ALOGE("Property type mismatch in get_property: %d, expected:%d, index:%d",
dbus_message_iter_get_arg_type(&prop_val), type, *prop_index);
return -1;
}
diff --git a/core/jni/android_bluetooth_common.h b/core/jni/android_bluetooth_common.h
index 1f4da3a..daf4bb2 100644
--- a/core/jni/android_bluetooth_common.h
+++ b/core/jni/android_bluetooth_common.h
@@ -56,14 +56,14 @@ jfieldID get_field(JNIEnv *env,
const char *member,
const char *mtype);
-// LOGE and free a D-Bus error
+// ALOGE and free a D-Bus error
// Using #define so that __FUNCTION__ resolves usefully
#define LOG_AND_FREE_DBUS_ERROR_WITH_MSG(err, msg) \
- { LOGE("%s: D-Bus error in %s: %s (%s)", __FUNCTION__, \
+ { ALOGE("%s: D-Bus error in %s: %s (%s)", __FUNCTION__, \
dbus_message_get_member((msg)), (err)->name, (err)->message); \
dbus_error_free((err)); }
#define LOG_AND_FREE_DBUS_ERROR(err) \
- { LOGE("%s: D-Bus error: %s (%s)", __FUNCTION__, \
+ { ALOGE("%s: D-Bus error: %s (%s)", __FUNCTION__, \
(err)->name, (err)->message); \
dbus_error_free((err)); }
diff --git a/core/jni/android_database_CursorWindow.cpp b/core/jni/android_database_CursorWindow.cpp
index 9a87a10..f927064 100644
--- a/core/jni/android_database_CursorWindow.cpp
+++ b/core/jni/android_database_CursorWindow.cpp
@@ -71,7 +71,7 @@ static jint nativeCreate(JNIEnv* env, jclass clazz, jstring nameObj, jint cursor
CursorWindow* window;
status_t status = CursorWindow::create(name, cursorWindowSize, &window);
if (status || !window) {
- LOGE("Could not allocate CursorWindow '%s' of size %d due to error %d.",
+ ALOGE("Could not allocate CursorWindow '%s' of size %d due to error %d.",
name.string(), cursorWindowSize, status);
return 0;
}
@@ -86,7 +86,7 @@ static jint nativeCreateFromParcel(JNIEnv* env, jclass clazz, jobject parcelObj)
CursorWindow* window;
status_t status = CursorWindow::createFromParcel(parcel, &window);
if (status || !window) {
- LOGE("Could not create CursorWindow from Parcel due to error %d.", status);
+ ALOGE("Could not create CursorWindow from Parcel due to error %d.", status);
return 0;
}
diff --git a/core/jni/android_database_SQLiteCompiledSql.cpp b/core/jni/android_database_SQLiteCompiledSql.cpp
index a916ef5..857267a 100644
--- a/core/jni/android_database_SQLiteCompiledSql.cpp
+++ b/core/jni/android_database_SQLiteCompiledSql.cpp
@@ -104,7 +104,7 @@ int register_android_database_SQLiteCompiledSql(JNIEnv * env)
clazz = env->FindClass("android/database/sqlite/SQLiteCompiledSql");
if (clazz == NULL) {
- LOGE("Can't find android/database/sqlite/SQLiteCompiledSql");
+ ALOGE("Can't find android/database/sqlite/SQLiteCompiledSql");
return -1;
}
@@ -112,7 +112,7 @@ int register_android_database_SQLiteCompiledSql(JNIEnv * env)
gStatementField = env->GetFieldID(clazz, "nStatement", "I");
if (gHandleField == NULL || gStatementField == NULL) {
- LOGE("Error locating fields");
+ ALOGE("Error locating fields");
return -1;
}
diff --git a/core/jni/android_database_SQLiteDatabase.cpp b/core/jni/android_database_SQLiteDatabase.cpp
index d5a034a..28c421d 100644
--- a/core/jni/android_database_SQLiteDatabase.cpp
+++ b/core/jni/android_database_SQLiteDatabase.cpp
@@ -121,7 +121,7 @@ static void dbopen(JNIEnv* env, jobject object, jstring pathString, jint flags)
err = sqlite3_open_v2(path8, &handle, sqliteFlags, NULL);
if (err != SQLITE_OK) {
- LOGE("sqlite3_open_v2(\"%s\", &handle, %d, NULL) failed\n", path8, sqliteFlags);
+ ALOGE("sqlite3_open_v2(\"%s\", &handle, %d, NULL) failed\n", path8, sqliteFlags);
throw_sqlite3_exception(env, handle);
goto done;
}
@@ -134,7 +134,7 @@ static void dbopen(JNIEnv* env, jobject object, jstring pathString, jint flags)
// Set the default busy handler to retry for 1000ms and then return SQLITE_BUSY
err = sqlite3_busy_timeout(handle, 1000 /* ms */);
if (err != SQLITE_OK) {
- LOGE("sqlite3_busy_timeout(handle, 1000) failed for \"%s\"\n", path8);
+ ALOGE("sqlite3_busy_timeout(handle, 1000) failed for \"%s\"\n", path8);
throw_sqlite3_exception(env, handle);
goto done;
}
@@ -143,7 +143,7 @@ static void dbopen(JNIEnv* env, jobject object, jstring pathString, jint flags)
static const char* integritySql = "pragma integrity_check(1);";
err = sqlite3_prepare_v2(handle, integritySql, -1, &statement, NULL);
if (err != SQLITE_OK) {
- LOGE("sqlite_prepare_v2(handle, \"%s\") failed for \"%s\"\n", integritySql, path8);
+ ALOGE("sqlite_prepare_v2(handle, \"%s\") failed for \"%s\"\n", integritySql, path8);
throw_sqlite3_exception(env, handle);
goto done;
}
@@ -151,13 +151,13 @@ static void dbopen(JNIEnv* env, jobject object, jstring pathString, jint flags)
// first is OK or error message
err = sqlite3_step(statement);
if (err != SQLITE_ROW) {
- LOGE("integrity check failed for \"%s\"\n", integritySql, path8);
+ ALOGE("integrity check failed for \"%s\"\n", integritySql, path8);
throw_sqlite3_exception(env, handle);
goto done;
} else {
const char *text = (const char*)sqlite3_column_text(statement, 0);
if (strcmp(text, "ok") != 0) {
- LOGE("integrity check failed for \"%s\": %s\n", integritySql, path8, text);
+ ALOGE("integrity check failed for \"%s\": %s\n", integritySql, path8, text);
jniThrowException(env, "android/database/sqlite/SQLiteDatabaseCorruptException", text);
goto done;
}
@@ -184,7 +184,7 @@ done:
static char *getDatabaseName(JNIEnv* env, sqlite3 * handle, jstring databaseName, short connNum) {
char const *path = env->GetStringUTFChars(databaseName, NULL);
if (path == NULL) {
- LOGE("Failure in getDatabaseName(). VM ran out of memory?\n");
+ ALOGE("Failure in getDatabaseName(). VM ran out of memory?\n");
return NULL; // VM would have thrown OutOfMemoryError
}
char *dbNameStr = createStr(path, 4);
@@ -244,7 +244,7 @@ static void dbclose(JNIEnv* env, jobject object)
} else {
// This can happen if sub-objects aren't closed first. Make sure the caller knows.
throw_sqlite3_exception(env, handle);
- LOGE("sqlite3_close(%p) failed: %d\n", handle, result);
+ ALOGE("sqlite3_close(%p) failed: %d\n", handle, result);
}
}
}
@@ -277,7 +277,7 @@ static void native_setLocale(JNIEnv* env, jobject object, jstring localeString,
static const char *createSql ="CREATE TABLE IF NOT EXISTS " ANDROID_TABLE " (locale TEXT)";
err = sqlite3_exec(handle, createSql, NULL, NULL, NULL);
if (err != SQLITE_OK) {
- LOGE("CREATE TABLE " ANDROID_TABLE " failed\n");
+ ALOGE("CREATE TABLE " ANDROID_TABLE " failed\n");
throw_sqlite3_exception(env, handle);
goto done;
}
@@ -287,7 +287,7 @@ static void native_setLocale(JNIEnv* env, jobject object, jstring localeString,
static const char *selectSql = "SELECT locale FROM " ANDROID_TABLE " LIMIT 1";
err = sqlite3_get_table(handle, selectSql, &meta, &rowCount, &colCount, NULL);
if (err != SQLITE_OK) {
- LOGE("SELECT locale FROM " ANDROID_TABLE " failed\n");
+ ALOGE("SELECT locale FROM " ANDROID_TABLE " failed\n");
throw_sqlite3_exception(env, handle);
goto done;
}
@@ -312,21 +312,21 @@ static void native_setLocale(JNIEnv* env, jobject object, jstring localeString,
// need to update android_metadata and indexes atomically, so use a transaction...
err = sqlite3_exec(handle, "BEGIN TRANSACTION", NULL, NULL, NULL);
if (err != SQLITE_OK) {
- LOGE("BEGIN TRANSACTION failed setting locale\n");
+ ALOGE("BEGIN TRANSACTION failed setting locale\n");
throw_sqlite3_exception(env, handle);
goto done;
}
err = register_localized_collators(handle, locale8, UTF16_STORAGE);
if (err != SQLITE_OK) {
- LOGE("register_localized_collators() failed setting locale\n");
+ ALOGE("register_localized_collators() failed setting locale\n");
throw_sqlite3_exception(env, handle);
goto rollback;
}
err = sqlite3_exec(handle, "DELETE FROM " ANDROID_TABLE, NULL, NULL, NULL);
if (err != SQLITE_OK) {
- LOGE("DELETE failed setting locale\n");
+ ALOGE("DELETE failed setting locale\n");
throw_sqlite3_exception(env, handle);
goto rollback;
}
@@ -334,28 +334,28 @@ static void native_setLocale(JNIEnv* env, jobject object, jstring localeString,
static const char *sql = "INSERT INTO " ANDROID_TABLE " (locale) VALUES(?);";
err = sqlite3_prepare_v2(handle, sql, -1, &stmt, NULL);
if (err != SQLITE_OK) {
- LOGE("sqlite3_prepare_v2(\"%s\") failed\n", sql);
+ ALOGE("sqlite3_prepare_v2(\"%s\") failed\n", sql);
throw_sqlite3_exception(env, handle);
goto rollback;
}
err = sqlite3_bind_text(stmt, 1, locale8, -1, SQLITE_TRANSIENT);
if (err != SQLITE_OK) {
- LOGE("sqlite3_bind_text() failed setting locale\n");
+ ALOGE("sqlite3_bind_text() failed setting locale\n");
throw_sqlite3_exception(env, handle);
goto rollback;
}
err = sqlite3_step(stmt);
if (err != SQLITE_OK && err != SQLITE_DONE) {
- LOGE("sqlite3_step(\"%s\") failed setting locale\n", sql);
+ ALOGE("sqlite3_step(\"%s\") failed setting locale\n", sql);
throw_sqlite3_exception(env, handle);
goto rollback;
}
err = sqlite3_exec(handle, "REINDEX LOCALIZED", NULL, NULL, NULL);
if (err != SQLITE_OK) {
- LOGE("REINDEX LOCALIZED failed\n");
+ ALOGE("REINDEX LOCALIZED failed\n");
throw_sqlite3_exception(env, handle);
goto rollback;
}
@@ -363,7 +363,7 @@ static void native_setLocale(JNIEnv* env, jobject object, jstring localeString,
// all done, yay!
err = sqlite3_exec(handle, "COMMIT TRANSACTION", NULL, NULL, NULL);
if (err != SQLITE_OK) {
- LOGE("COMMIT TRANSACTION failed setting locale\n");
+ ALOGE("COMMIT TRANSACTION failed setting locale\n");
throw_sqlite3_exception(env, handle);
goto done;
}
@@ -399,7 +399,7 @@ static void native_finalize(JNIEnv* env, jobject object, jint statementId)
static void custom_function_callback(sqlite3_context * context, int argc, sqlite3_value ** argv) {
JNIEnv* env = AndroidRuntime::getJNIEnv();
if (!env) {
- LOGE("custom_function_callback cannot call into Java on this thread");
+ ALOGE("custom_function_callback cannot call into Java on this thread");
return;
}
// get global ref to CustomFunction object from our user data
@@ -412,7 +412,7 @@ static void custom_function_callback(sqlite3_context * context, int argc, sqlite
for (int i = 0; i < argc; i++) {
char* arg = (char *)sqlite3_value_text(argv[i]);
if (!arg) {
- LOGE("NULL argument in custom_function_callback. This should not happen.");
+ ALOGE("NULL argument in custom_function_callback. This should not happen.");
return;
}
jobject obj = env->NewStringUTF(arg);
@@ -427,7 +427,7 @@ static void custom_function_callback(sqlite3_context * context, int argc, sqlite
done:
if (env->ExceptionCheck()) {
- LOGE("An exception was thrown by custom sqlite3 function.");
+ ALOGE("An exception was thrown by custom sqlite3 function.");
LOGE_EX(env);
env->ExceptionClear();
}
@@ -447,7 +447,7 @@ static jint native_addCustomFunction(JNIEnv* env, jobject object,
if (err == SQLITE_OK)
return (int)ref;
else {
- LOGE("sqlite3_create_function returned %d", err);
+ ALOGE("sqlite3_create_function returned %d", err);
env->DeleteGlobalRef(ref);
throw_sqlite3_exception(env, handle);
return 0;
@@ -484,30 +484,30 @@ int register_android_database_SQLiteDatabase(JNIEnv *env)
clazz = env->FindClass("android/database/sqlite/SQLiteDatabase");
if (clazz == NULL) {
- LOGE("Can't find android/database/sqlite/SQLiteDatabase\n");
+ ALOGE("Can't find android/database/sqlite/SQLiteDatabase\n");
return -1;
}
string_class = (jclass)env->NewGlobalRef(env->FindClass("java/lang/String"));
if (string_class == NULL) {
- LOGE("Can't find java/lang/String\n");
+ ALOGE("Can't find java/lang/String\n");
return -1;
}
offset_db_handle = env->GetFieldID(clazz, "mNativeHandle", "I");
if (offset_db_handle == NULL) {
- LOGE("Can't find SQLiteDatabase.mNativeHandle\n");
+ ALOGE("Can't find SQLiteDatabase.mNativeHandle\n");
return -1;
}
clazz = env->FindClass("android/database/sqlite/SQLiteDatabase$CustomFunction");
if (clazz == NULL) {
- LOGE("Can't find android/database/sqlite/SQLiteDatabase$CustomFunction\n");
+ ALOGE("Can't find android/database/sqlite/SQLiteDatabase$CustomFunction\n");
return -1;
}
method_custom_function_callback = env->GetMethodID(clazz, "callback", "([Ljava/lang/String;)V");
if (method_custom_function_callback == NULL) {
- LOGE("Can't find method SQLiteDatabase.CustomFunction.callback\n");
+ ALOGE("Can't find method SQLiteDatabase.CustomFunction.callback\n");
return -1;
}
diff --git a/core/jni/android_database_SQLiteDebug.cpp b/core/jni/android_database_SQLiteDebug.cpp
index 873b2a1..20ff00b 100644
--- a/core/jni/android_database_SQLiteDebug.cpp
+++ b/core/jni/android_database_SQLiteDebug.cpp
@@ -201,25 +201,25 @@ int register_android_database_SQLiteDebug(JNIEnv *env)
clazz = env->FindClass("android/database/sqlite/SQLiteDebug$PagerStats");
if (clazz == NULL) {
- LOGE("Can't find android/database/sqlite/SQLiteDebug$PagerStats");
+ ALOGE("Can't find android/database/sqlite/SQLiteDebug$PagerStats");
return -1;
}
gMemoryUsedField = env->GetFieldID(clazz, "memoryUsed", "I");
if (gMemoryUsedField == NULL) {
- LOGE("Can't find memoryUsed");
+ ALOGE("Can't find memoryUsed");
return -1;
}
gLargestMemAllocField = env->GetFieldID(clazz, "largestMemAlloc", "I");
if (gLargestMemAllocField == NULL) {
- LOGE("Can't find largestMemAlloc");
+ ALOGE("Can't find largestMemAlloc");
return -1;
}
gPageCacheOverfloField = env->GetFieldID(clazz, "pageCacheOverflo", "I");
if (gPageCacheOverfloField == NULL) {
- LOGE("Can't find pageCacheOverflo");
+ ALOGE("Can't find pageCacheOverflo");
return -1;
}
diff --git a/core/jni/android_database_SQLiteProgram.cpp b/core/jni/android_database_SQLiteProgram.cpp
index c247bbd..2e34c00 100644
--- a/core/jni/android_database_SQLiteProgram.cpp
+++ b/core/jni/android_database_SQLiteProgram.cpp
@@ -176,7 +176,7 @@ int register_android_database_SQLiteProgram(JNIEnv * env)
clazz = env->FindClass("android/database/sqlite/SQLiteProgram");
if (clazz == NULL) {
- LOGE("Can't find android/database/sqlite/SQLiteProgram");
+ ALOGE("Can't find android/database/sqlite/SQLiteProgram");
return -1;
}
@@ -184,7 +184,7 @@ int register_android_database_SQLiteProgram(JNIEnv * env)
gStatementField = env->GetFieldID(clazz, "nStatement", "I");
if (gHandleField == NULL || gStatementField == NULL) {
- LOGE("Error locating fields");
+ ALOGE("Error locating fields");
return -1;
}
diff --git a/core/jni/android_database_SQLiteQuery.cpp b/core/jni/android_database_SQLiteQuery.cpp
index 8170f46..aa5c4c9 100644
--- a/core/jni/android_database_SQLiteQuery.cpp
+++ b/core/jni/android_database_SQLiteQuery.cpp
@@ -47,7 +47,7 @@ static jint nativeFillWindow(JNIEnv* env, jclass clazz, jint databasePtr,
// Bind the offset parameter, telling the program which row to start with
int err = sqlite3_bind_int(statement, offsetParam, startPos);
if (err != SQLITE_OK) {
- LOGE("Unable to bind offset position, offsetParam = %d", offsetParam);
+ ALOGE("Unable to bind offset position, offsetParam = %d", offsetParam);
throw_sqlite3_exception(env, database);
return 0;
}
@@ -63,7 +63,7 @@ static jint nativeFillWindow(JNIEnv* env, jclass clazz, jint databasePtr,
int numColumns = sqlite3_column_count(statement);
status_t status = window->setNumColumns(numColumns);
if (status) {
- LOGE("Failed to change column count from %d to %d", window->getNumColumns(), numColumns);
+ ALOGE("Failed to change column count from %d to %d", window->getNumColumns(), numColumns);
jniThrowException(env, "java/lang/IllegalStateException", "numColumns mismatch");
return 0;
}
@@ -165,7 +165,7 @@ static jint nativeFillWindow(JNIEnv* env, jclass clazz, jint databasePtr,
LOG_WINDOW("%d,%d is NULL", startPos + addedRows, i);
} else {
// Unknown data
- LOGE("Unknown column type when filling database window");
+ ALOGE("Unknown column type when filling database window");
throw_sqlite3_exception(env, "Unknown column type when filling window");
gotException = true;
break;
@@ -186,7 +186,7 @@ static jint nativeFillWindow(JNIEnv* env, jclass clazz, jint databasePtr,
// The table is locked, retry
LOG_WINDOW("Database locked, retrying");
if (retryCount > 50) {
- LOGE("Bailing on database busy retry");
+ ALOGE("Bailing on database busy retry");
throw_sqlite3_exception(env, database, "retrycount exceeded");
gotException = true;
} else {
@@ -207,7 +207,7 @@ static jint nativeFillWindow(JNIEnv* env, jclass clazz, jint databasePtr,
// Report the total number of rows on request.
if (startPos > totalRows) {
- LOGE("startPos %d > actual rows %d", startPos, totalRows);
+ ALOGE("startPos %d > actual rows %d", startPos, totalRows);
}
return countAllRows ? totalRows : 0;
}
diff --git a/core/jni/android_database_SQLiteStatement.cpp b/core/jni/android_database_SQLiteStatement.cpp
index 05ffbb1..e376258 100644
--- a/core/jni/android_database_SQLiteStatement.cpp
+++ b/core/jni/android_database_SQLiteStatement.cpp
@@ -169,7 +169,7 @@ static jobject create_ashmem_region_with_data(JNIEnv * env,
// Create ashmem area
int fd = ashmem_create_region(NULL, length);
if (fd < 0) {
- LOGE("ashmem_create_region failed: %s", strerror(errno));
+ ALOGE("ashmem_create_region failed: %s", strerror(errno));
jniThrowIOException(env, errno);
return NULL;
}
@@ -179,7 +179,7 @@ static jobject create_ashmem_region_with_data(JNIEnv * env,
void * ashmem_ptr =
mmap(NULL, length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (ashmem_ptr == MAP_FAILED) {
- LOGE("mmap failed: %s", strerror(errno));
+ ALOGE("mmap failed: %s", strerror(errno));
jniThrowIOException(env, errno);
close(fd);
return NULL;
@@ -190,7 +190,7 @@ static jobject create_ashmem_region_with_data(JNIEnv * env,
// munmap ashmem area
if (munmap(ashmem_ptr, length) < 0) {
- LOGE("munmap failed: %s", strerror(errno));
+ ALOGE("munmap failed: %s", strerror(errno));
jniThrowIOException(env, errno);
close(fd);
return NULL;
@@ -199,7 +199,7 @@ static jobject create_ashmem_region_with_data(JNIEnv * env,
// Make ashmem area read-only
if (ashmem_set_prot_region(fd, PROT_READ) < 0) {
- LOGE("ashmem_set_prot_region failed: %s", strerror(errno));
+ ALOGE("ashmem_set_prot_region failed: %s", strerror(errno));
jniThrowIOException(env, errno);
close(fd);
return NULL;
@@ -267,7 +267,7 @@ int register_android_database_SQLiteStatement(JNIEnv * env)
clazz = env->FindClass("android/database/sqlite/SQLiteStatement");
if (clazz == NULL) {
- LOGE("Can't find android/database/sqlite/SQLiteStatement");
+ ALOGE("Can't find android/database/sqlite/SQLiteStatement");
return -1;
}
@@ -275,7 +275,7 @@ int register_android_database_SQLiteStatement(JNIEnv * env)
gStatementField = env->GetFieldID(clazz, "nStatement", "I");
if (gHandleField == NULL || gStatementField == NULL) {
- LOGE("Error locating fields");
+ ALOGE("Error locating fields");
return -1;
}
diff --git a/core/jni/android_debug_JNITest.cpp b/core/jni/android_debug_JNITest.cpp
index e0f61fb..9147284 100644
--- a/core/jni/android_debug_JNITest.cpp
+++ b/core/jni/android_debug_JNITest.cpp
@@ -46,7 +46,7 @@ static jint android_debug_JNITest_part1(JNIEnv* env, jobject object,
part2id = env->GetMethodID(clazz,
"part2", "(DILjava/lang/String;)I");
if (part2id == NULL) {
- LOGE("JNI test: unable to find part2\n");
+ ALOGE("JNI test: unable to find part2\n");
return -1;
}
diff --git a/core/jni/android_emoji_EmojiFactory.cpp b/core/jni/android_emoji_EmojiFactory.cpp
index 81dae88..a658561 100644
--- a/core/jni/android_emoji_EmojiFactory.cpp
+++ b/core/jni/android_emoji_EmojiFactory.cpp
@@ -60,7 +60,7 @@ FAIL:
error_str = "unknown reason";
}
- LOGE("%s: %s", error_msg, error_str);
+ ALOGE("%s: %s", error_msg, error_str);
if (m_handle != NULL) {
dlclose(m_handle);
m_handle = NULL;
@@ -109,7 +109,7 @@ static jobject create_java_EmojiFactory(
jobject obj = env->NewObject(gEmojiFactory_class, gEmojiFactory_constructorMethodID,
static_cast<jint>(reinterpret_cast<uintptr_t>(factory)), name);
if (env->ExceptionCheck() != 0) {
- LOGE("*** Uncaught exception returned from Java call!\n");
+ ALOGE("*** Uncaught exception returned from Java call!\n");
env->ExceptionDescribe();
}
return obj;
@@ -172,14 +172,14 @@ static jobject android_emoji_EmojiFactory_getBitmapFromAndroidPua(
SkBitmap *bitmap = new SkBitmap;
if (!SkImageDecoder::DecodeMemory(bytes, size, bitmap)) {
- LOGE("SkImageDecoder::DecodeMemory() failed.");
+ ALOGE("SkImageDecoder::DecodeMemory() failed.");
return NULL;
}
jobject obj = env->NewObject(gBitmap_class, gBitmap_constructorMethodID,
static_cast<jint>(reinterpret_cast<uintptr_t>(bitmap)), NULL, false, NULL, -1);
if (env->ExceptionCheck() != 0) {
- LOGE("*** Uncaught exception returned from Java call!\n");
+ ALOGE("*** Uncaught exception returned from Java call!\n");
env->ExceptionDescribe();
}
return obj;
diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp
index 6d1fb70..8dcc14a 100644
--- a/core/jni/android_hardware_Camera.cpp
+++ b/core/jni/android_hardware_Camera.cpp
@@ -208,7 +208,7 @@ jbyteArray JNICameraContext::getCallbackBuffer(
if (obj != NULL) {
jsize bufferLength = env->GetArrayLength(obj);
if ((int)bufferLength < (int)bufferSize) {
- LOGE("Callback buffer was too small! Expected %d bytes, but got %d bytes!",
+ ALOGE("Callback buffer was too small! Expected %d bytes, but got %d bytes!",
bufferSize, bufferLength);
env->DeleteLocalRef(obj);
return NULL;
@@ -254,13 +254,13 @@ void JNICameraContext::copyAndPost(JNIEnv* env, const sp<IMemory>& dataPtr, int
}
if (obj == NULL) {
- LOGE("Couldn't allocate byte array for JPEG data");
+ ALOGE("Couldn't allocate byte array for JPEG data");
env->ExceptionClear();
} else {
env->SetByteArrayRegion(obj, 0, size, data);
}
} else {
- LOGE("image heap is NULL");
+ ALOGE("image heap is NULL");
}
}
@@ -331,7 +331,7 @@ void JNICameraContext::postMetadata(JNIEnv *env, int32_t msgType, camera_frame_m
obj = (jobjectArray) env->NewObjectArray(metadata->number_of_faces,
mFaceClass, NULL);
if (obj == NULL) {
- LOGE("Couldn't allocate face metadata array");
+ ALOGE("Couldn't allocate face metadata array");
return;
}
@@ -419,7 +419,7 @@ void JNICameraContext::addCallbackBuffer(
}
}
} else {
- LOGE("Null byte array!");
+ ALOGE("Null byte array!");
}
}
@@ -885,13 +885,13 @@ static int find_fields(JNIEnv *env, field *fields, int count)
field *f = &fields[i];
jclass clazz = env->FindClass(f->class_name);
if (clazz == NULL) {
- LOGE("Can't find %s", f->class_name);
+ ALOGE("Can't find %s", f->class_name);
return -1;
}
jfieldID field = env->GetFieldID(clazz, f->field_name, f->field_type);
if (field == NULL) {
- LOGE("Can't find %s.%s", f->class_name, f->field_name);
+ ALOGE("Can't find %s.%s", f->class_name, f->field_name);
return -1;
}
@@ -926,21 +926,21 @@ int register_android_hardware_Camera(JNIEnv *env)
fields.post_event = env->GetStaticMethodID(clazz, "postEventFromNative",
"(Ljava/lang/Object;IIILjava/lang/Object;)V");
if (fields.post_event == NULL) {
- LOGE("Can't find android/hardware/Camera.postEventFromNative");
+ ALOGE("Can't find android/hardware/Camera.postEventFromNative");
return -1;
}
clazz = env->FindClass("android/graphics/Rect");
fields.rect_constructor = env->GetMethodID(clazz, "<init>", "()V");
if (fields.rect_constructor == NULL) {
- LOGE("Can't find android/graphics/Rect.Rect()");
+ ALOGE("Can't find android/graphics/Rect.Rect()");
return -1;
}
clazz = env->FindClass("android/hardware/Camera$Face");
fields.face_constructor = env->GetMethodID(clazz, "<init>", "()V");
if (fields.face_constructor == NULL) {
- LOGE("Can't find android/hardware/Camera$Face.Face()");
+ ALOGE("Can't find android/hardware/Camera$Face.Face()");
return -1;
}
diff --git a/core/jni/android_hardware_UsbDeviceConnection.cpp b/core/jni/android_hardware_UsbDeviceConnection.cpp
index f53e2f7..923781e 100644
--- a/core/jni/android_hardware_UsbDeviceConnection.cpp
+++ b/core/jni/android_hardware_UsbDeviceConnection.cpp
@@ -53,7 +53,7 @@ android_hardware_UsbDeviceConnection_open(JNIEnv *env, jobject thiz, jstring dev
if (device) {
env->SetIntField(thiz, field_context, (int)device);
} else {
- LOGE("usb_device_open failed for %s", deviceNameStr);
+ ALOGE("usb_device_open failed for %s", deviceNameStr);
close(fd);
}
@@ -77,7 +77,7 @@ android_hardware_UsbDeviceConnection_get_fd(JNIEnv *env, jobject thiz)
{
struct usb_device* device = get_device_from_object(env, thiz);
if (!device) {
- LOGE("device is closed in native_get_fd");
+ ALOGE("device is closed in native_get_fd");
return -1;
}
return usb_device_get_fd(device);
@@ -110,7 +110,7 @@ android_hardware_UsbDeviceConnection_claim_interface(JNIEnv *env, jobject thiz,
{
struct usb_device* device = get_device_from_object(env, thiz);
if (!device) {
- LOGE("device is closed in native_claim_interface");
+ ALOGE("device is closed in native_claim_interface");
return -1;
}
@@ -128,7 +128,7 @@ android_hardware_UsbDeviceConnection_release_interface(JNIEnv *env, jobject thiz
{
struct usb_device* device = get_device_from_object(env, thiz);
if (!device) {
- LOGE("device is closed in native_release_interface");
+ ALOGE("device is closed in native_release_interface");
return -1;
}
int ret = usb_device_release_interface(device, interfaceID);
@@ -146,7 +146,7 @@ android_hardware_UsbDeviceConnection_control_request(JNIEnv *env, jobject thiz,
{
struct usb_device* device = get_device_from_object(env, thiz);
if (!device) {
- LOGE("device is closed in native_control_request");
+ ALOGE("device is closed in native_control_request");
return -1;
}
@@ -174,7 +174,7 @@ android_hardware_UsbDeviceConnection_bulk_request(JNIEnv *env, jobject thiz,
{
struct usb_device* device = get_device_from_object(env, thiz);
if (!device) {
- LOGE("device is closed in native_control_request");
+ ALOGE("device is closed in native_control_request");
return -1;
}
@@ -200,7 +200,7 @@ android_hardware_UsbDeviceConnection_request_wait(JNIEnv *env, jobject thiz)
{
struct usb_device* device = get_device_from_object(env, thiz);
if (!device) {
- LOGE("device is closed in native_request_wait");
+ ALOGE("device is closed in native_request_wait");
return NULL;
}
@@ -216,7 +216,7 @@ android_hardware_UsbDeviceConnection_get_serial(JNIEnv *env, jobject thiz)
{
struct usb_device* device = get_device_from_object(env, thiz);
if (!device) {
- LOGE("device is closed in native_request_wait");
+ ALOGE("device is closed in native_request_wait");
return NULL;
}
char* serial = usb_device_get_serial(device);
@@ -249,12 +249,12 @@ int register_android_hardware_UsbDeviceConnection(JNIEnv *env)
{
jclass clazz = env->FindClass("android/hardware/usb/UsbDeviceConnection");
if (clazz == NULL) {
- LOGE("Can't find android/hardware/usb/UsbDeviceConnection");
+ ALOGE("Can't find android/hardware/usb/UsbDeviceConnection");
return -1;
}
field_context = env->GetFieldID(clazz, "mNativeContext", "I");
if (field_context == NULL) {
- LOGE("Can't find UsbDeviceConnection.mNativeContext");
+ ALOGE("Can't find UsbDeviceConnection.mNativeContext");
return -1;
}
diff --git a/core/jni/android_hardware_UsbRequest.cpp b/core/jni/android_hardware_UsbRequest.cpp
index 6e1d443..1398968 100644
--- a/core/jni/android_hardware_UsbRequest.cpp
+++ b/core/jni/android_hardware_UsbRequest.cpp
@@ -46,7 +46,7 @@ android_hardware_UsbRequest_init(JNIEnv *env, jobject thiz, jobject java_device,
struct usb_device* device = get_device_from_object(env, java_device);
if (!device) {
- LOGE("device null in native_init");
+ ALOGE("device null in native_init");
return false;
}
@@ -82,7 +82,7 @@ android_hardware_UsbRequest_queue_array(JNIEnv *env, jobject thiz,
{
struct usb_request* request = get_request_from_object(env, thiz);
if (!request) {
- LOGE("request is closed in native_queue");
+ ALOGE("request is closed in native_queue");
return false;
}
@@ -119,7 +119,7 @@ android_hardware_UsbRequest_dequeue_array(JNIEnv *env, jobject thiz,
{
struct usb_request* request = get_request_from_object(env, thiz);
if (!request) {
- LOGE("request is closed in native_dequeue");
+ ALOGE("request is closed in native_dequeue");
return;
}
@@ -138,7 +138,7 @@ android_hardware_UsbRequest_queue_direct(JNIEnv *env, jobject thiz,
{
struct usb_request* request = get_request_from_object(env, thiz);
if (!request) {
- LOGE("request is closed in native_queue");
+ ALOGE("request is closed in native_queue");
return false;
}
@@ -168,7 +168,7 @@ android_hardware_UsbRequest_dequeue_direct(JNIEnv *env, jobject thiz)
{
struct usb_request* request = get_request_from_object(env, thiz);
if (!request) {
- LOGE("request is closed in native_dequeue");
+ ALOGE("request is closed in native_dequeue");
return;
}
// all we need to do is delete our global ref
@@ -180,7 +180,7 @@ android_hardware_UsbRequest_cancel(JNIEnv *env, jobject thiz)
{
struct usb_request* request = get_request_from_object(env, thiz);
if (!request) {
- LOGE("request is closed in native_cancel");
+ ALOGE("request is closed in native_cancel");
return false;
}
return (usb_request_cancel(request) == 0);
@@ -202,12 +202,12 @@ int register_android_hardware_UsbRequest(JNIEnv *env)
{
jclass clazz = env->FindClass("android/hardware/usb/UsbRequest");
if (clazz == NULL) {
- LOGE("Can't find android/hardware/usb/UsbRequest");
+ ALOGE("Can't find android/hardware/usb/UsbRequest");
return -1;
}
field_context = env->GetFieldID(clazz, "mNativeContext", "I");
if (field_context == NULL) {
- LOGE("Can't find UsbRequest.mNativeContext");
+ ALOGE("Can't find UsbRequest.mNativeContext");
return -1;
}
diff --git a/core/jni/android_media_AudioRecord.cpp b/core/jni/android_media_AudioRecord.cpp
index ca13c18..3052553 100644
--- a/core/jni/android_media_AudioRecord.cpp
+++ b/core/jni/android_media_AudioRecord.cpp
@@ -134,7 +134,7 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this,
// sampleRateInHertz, audioFormat, channels, buffSizeInBytes);
if (!audio_is_input_channel(channels)) {
- LOGE("Error creating AudioRecord: channel count is not 1 or 2.");
+ ALOGE("Error creating AudioRecord: channel count is not 1 or 2.");
return AUDIORECORD_ERROR_SETUP_INVALIDCHANNELMASK;
}
uint32_t nbChannels = popcount(channels);
@@ -142,7 +142,7 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this,
// compare the format against the Java constants
if ((audioFormat != javaAudioRecordFields.PCM16)
&& (audioFormat != javaAudioRecordFields.PCM8)) {
- LOGE("Error creating AudioRecord: unsupported audio format.");
+ ALOGE("Error creating AudioRecord: unsupported audio format.");
return AUDIORECORD_ERROR_SETUP_INVALIDFORMAT;
}
@@ -151,25 +151,25 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this,
AUDIO_FORMAT_PCM_16_BIT : AUDIO_FORMAT_PCM_8_BIT;
if (buffSizeInBytes == 0) {
- LOGE("Error creating AudioRecord: frameCount is 0.");
+ ALOGE("Error creating AudioRecord: frameCount is 0.");
return AUDIORECORD_ERROR_SETUP_ZEROFRAMECOUNT;
}
int frameSize = nbChannels * bytesPerSample;
size_t frameCount = buffSizeInBytes / frameSize;
if (source >= AUDIO_SOURCE_CNT) {
- LOGE("Error creating AudioRecord: unknown source.");
+ ALOGE("Error creating AudioRecord: unknown source.");
return AUDIORECORD_ERROR_SETUP_INVALIDSOURCE;
}
if (jSession == NULL) {
- LOGE("Error creating AudioRecord: invalid session ID pointer");
+ ALOGE("Error creating AudioRecord: invalid session ID pointer");
return AUDIORECORD_ERROR;
}
jint* nSession = (jint *) env->GetPrimitiveArrayCritical(jSession, NULL);
if (nSession == NULL) {
- LOGE("Error creating AudioRecord: Error retrieving session id pointer");
+ ALOGE("Error creating AudioRecord: Error retrieving session id pointer");
return AUDIORECORD_ERROR;
}
int sessionId = nSession[0];
@@ -182,7 +182,7 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this,
// create an uninitialized AudioRecord object
lpRecorder = new AudioRecord();
if(lpRecorder == NULL) {
- LOGE("Error creating AudioRecord instance.");
+ ALOGE("Error creating AudioRecord instance.");
return AUDIORECORD_ERROR_SETUP_NATIVEINITFAILED;
}
@@ -190,7 +190,7 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this,
// this data will be passed with every AudioRecord callback
jclass clazz = env->GetObjectClass(thiz);
if (clazz == NULL) {
- LOGE("Can't find %s when setting up callback.", kClassPathName);
+ ALOGE("Can't find %s when setting up callback.", kClassPathName);
goto native_track_failure;
}
lpCallbackData = new audiorecord_callback_cookie;
@@ -211,13 +211,13 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this,
sessionId);
if(lpRecorder->initCheck() != NO_ERROR) {
- LOGE("Error creating AudioRecord instance: initialization check failed.");
+ ALOGE("Error creating AudioRecord instance: initialization check failed.");
goto native_init_failure;
}
nSession = (jint *) env->GetPrimitiveArrayCritical(jSession, NULL);
if (nSession == NULL) {
- LOGE("Error creating AudioRecord: Error retrieving session id pointer");
+ ALOGE("Error creating AudioRecord: Error retrieving session id pointer");
goto native_init_failure;
}
// read the audio session ID back from AudioTrack in case a new session was created during set()
@@ -332,12 +332,12 @@ static jint android_media_AudioRecord_readInByteArray(JNIEnv *env, jobject thiz
lpRecorder =
(AudioRecord *)env->GetIntField(thiz, javaAudioRecordFields.nativeRecorderInJavaObj);
if (lpRecorder == NULL) {
- LOGE("Unable to retrieve AudioRecord object, can't record");
+ ALOGE("Unable to retrieve AudioRecord object, can't record");
return 0;
}
if (!javaAudioData) {
- LOGE("Invalid Java array to store recorded audio, can't record");
+ ALOGE("Invalid Java array to store recorded audio, can't record");
return 0;
}
@@ -349,7 +349,7 @@ static jint android_media_AudioRecord_readInByteArray(JNIEnv *env, jobject thiz
recordBuff = (jbyte *)env->GetByteArrayElements(javaAudioData, NULL);
if (recordBuff == NULL) {
- LOGE("Error retrieving destination for recorded audio data, can't record");
+ ALOGE("Error retrieving destination for recorded audio data, can't record");
return 0;
}
@@ -390,13 +390,13 @@ static jint android_media_AudioRecord_readInDirectBuffer(JNIEnv *env, jobject t
long capacity = env->GetDirectBufferCapacity(jBuffer);
if(capacity == -1) {
// buffer direct access is not supported
- LOGE("Buffer direct access is not supported, can't record");
+ ALOGE("Buffer direct access is not supported, can't record");
return 0;
}
//ALOGV("capacity = %ld", capacity);
jbyte* nativeFromJavaBuf = (jbyte*) env->GetDirectBufferAddress(jBuffer);
if(nativeFromJavaBuf==NULL) {
- LOGE("Buffer direct access is not supported, can't record");
+ ALOGE("Buffer direct access is not supported, can't record");
return 0;
}
@@ -555,7 +555,7 @@ int register_android_media_AudioRecord(JNIEnv *env)
// Get the AudioRecord class
jclass audioRecordClass = env->FindClass(kClassPathName);
if (audioRecordClass == NULL) {
- LOGE("Can't find %s", kClassPathName);
+ ALOGE("Can't find %s", kClassPathName);
return -1;
}
// Get the postEvent method
@@ -563,7 +563,7 @@ int register_android_media_AudioRecord(JNIEnv *env)
audioRecordClass,
JAVA_POSTEVENT_CALLBACK_NAME, "(Ljava/lang/Object;IIILjava/lang/Object;)V");
if (javaAudioRecordFields.postNativeEventInJava == NULL) {
- LOGE("Can't find AudioRecord.%s", JAVA_POSTEVENT_CALLBACK_NAME);
+ ALOGE("Can't find AudioRecord.%s", JAVA_POSTEVENT_CALLBACK_NAME);
return -1;
}
@@ -573,7 +573,7 @@ int register_android_media_AudioRecord(JNIEnv *env)
env->GetFieldID(audioRecordClass,
JAVA_NATIVERECORDERINJAVAOBJ_FIELD_NAME, "I");
if (javaAudioRecordFields.nativeRecorderInJavaObj == NULL) {
- LOGE("Can't find AudioRecord.%s", JAVA_NATIVERECORDERINJAVAOBJ_FIELD_NAME);
+ ALOGE("Can't find AudioRecord.%s", JAVA_NATIVERECORDERINJAVAOBJ_FIELD_NAME);
return -1;
}
// mNativeCallbackCookie
@@ -581,7 +581,7 @@ int register_android_media_AudioRecord(JNIEnv *env)
audioRecordClass,
JAVA_NATIVECALLBACKINFO_FIELD_NAME, "I");
if (javaAudioRecordFields.nativeCallbackCookie == NULL) {
- LOGE("Can't find AudioRecord.%s", JAVA_NATIVECALLBACKINFO_FIELD_NAME);
+ ALOGE("Can't find AudioRecord.%s", JAVA_NATIVECALLBACKINFO_FIELD_NAME);
return -1;
}
@@ -589,7 +589,7 @@ int register_android_media_AudioRecord(JNIEnv *env)
jclass audioFormatClass = NULL;
audioFormatClass = env->FindClass(JAVA_AUDIOFORMAT_CLASS_NAME);
if (audioFormatClass == NULL) {
- LOGE("Can't find %s", JAVA_AUDIOFORMAT_CLASS_NAME);
+ ALOGE("Can't find %s", JAVA_AUDIOFORMAT_CLASS_NAME);
return -1;
}
if ( !android_media_getIntConstantFromClass(env, audioFormatClass,
diff --git a/core/jni/android_media_AudioTrack.cpp b/core/jni/android_media_AudioTrack.cpp
index 84e7432..859878d 100644
--- a/core/jni/android_media_AudioTrack.cpp
+++ b/core/jni/android_media_AudioTrack.cpp
@@ -176,11 +176,11 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th
int afFrameCount;
if (AudioSystem::getOutputFrameCount(&afFrameCount, streamType) != NO_ERROR) {
- LOGE("Error creating AudioTrack: Could not get AudioSystem frame count.");
+ ALOGE("Error creating AudioTrack: Could not get AudioSystem frame count.");
return AUDIOTRACK_ERROR_SETUP_AUDIOSYSTEM;
}
if (AudioSystem::getOutputSamplingRate(&afSampleRate, streamType) != NO_ERROR) {
- LOGE("Error creating AudioTrack: Could not get AudioSystem sampling rate.");
+ ALOGE("Error creating AudioTrack: Could not get AudioSystem sampling rate.");
return AUDIOTRACK_ERROR_SETUP_AUDIOSYSTEM;
}
@@ -189,7 +189,7 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th
uint32_t nativeChannelMask = ((uint32_t)javaChannelMask) >> 2;
if (!audio_is_output_channel(nativeChannelMask)) {
- LOGE("Error creating AudioTrack: invalid channel mask.");
+ ALOGE("Error creating AudioTrack: invalid channel mask.");
return AUDIOTRACK_ERROR_SETUP_INVALIDCHANNELMASK;
}
@@ -214,14 +214,14 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th
} else if (streamType == javaAudioTrackFields.STREAM_DTMF) {
atStreamType = AUDIO_STREAM_DTMF;
} else {
- LOGE("Error creating AudioTrack: unknown stream type.");
+ ALOGE("Error creating AudioTrack: unknown stream type.");
return AUDIOTRACK_ERROR_SETUP_INVALIDSTREAMTYPE;
}
// check the format.
// This function was called from Java, so we compare the format against the Java constants
if ((audioFormat != javaAudioTrackFields.PCM16) && (audioFormat != javaAudioTrackFields.PCM8)) {
- LOGE("Error creating AudioTrack: unsupported audio format.");
+ ALOGE("Error creating AudioTrack: unsupported audio format.");
return AUDIOTRACK_ERROR_SETUP_INVALIDFORMAT;
}
@@ -250,7 +250,7 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th
// this data will be passed with every AudioTrack callback
jclass clazz = env->GetObjectClass(thiz);
if (clazz == NULL) {
- LOGE("Can't find %s when setting up callback.", kClassPathName);
+ ALOGE("Can't find %s when setting up callback.", kClassPathName);
delete lpJniStorage;
return AUDIOTRACK_ERROR_SETUP_NATIVEINITFAILED;
}
@@ -261,14 +261,14 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th
lpJniStorage->mStreamType = atStreamType;
if (jSession == NULL) {
- LOGE("Error creating AudioTrack: invalid session ID pointer");
+ ALOGE("Error creating AudioTrack: invalid session ID pointer");
delete lpJniStorage;
return AUDIOTRACK_ERROR;
}
jint* nSession = (jint *) env->GetPrimitiveArrayCritical(jSession, NULL);
if (nSession == NULL) {
- LOGE("Error creating AudioTrack: Error retrieving session id pointer");
+ ALOGE("Error creating AudioTrack: Error retrieving session id pointer");
delete lpJniStorage;
return AUDIOTRACK_ERROR;
}
@@ -279,7 +279,7 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th
// create the native AudioTrack object
AudioTrack* lpTrack = new AudioTrack();
if (lpTrack == NULL) {
- LOGE("Error creating uninitialized AudioTrack");
+ ALOGE("Error creating uninitialized AudioTrack");
goto native_track_failure;
}
@@ -303,7 +303,7 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th
// AudioTrack is using shared memory
if (!lpJniStorage->allocSharedMem(buffSizeInBytes)) {
- LOGE("Error creating AudioTrack in static mode: error creating mem heap base");
+ ALOGE("Error creating AudioTrack in static mode: error creating mem heap base");
goto native_init_failure;
}
@@ -322,13 +322,13 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th
}
if (lpTrack->initCheck() != NO_ERROR) {
- LOGE("Error initializing AudioTrack");
+ ALOGE("Error initializing AudioTrack");
goto native_init_failure;
}
nSession = (jint *) env->GetPrimitiveArrayCritical(jSession, NULL);
if (nSession == NULL) {
- LOGE("Error creating AudioTrack: Error retrieving session id pointer");
+ ALOGE("Error creating AudioTrack: Error retrieving session id pointer");
goto native_init_failure;
}
// read the audio session ID back from AudioTrack in case we create a new session
@@ -544,11 +544,11 @@ static jint android_media_AudioTrack_native_write(JNIEnv *env, jobject thiz,
if (javaAudioData) {
cAudioData = (jbyte *)env->GetByteArrayElements(javaAudioData, NULL);
if (cAudioData == NULL) {
- LOGE("Error retrieving source of audio data to play, can't play");
+ ALOGE("Error retrieving source of audio data to play, can't play");
return 0; // out of memory or no data to load
}
} else {
- LOGE("NULL java array of audio data to play, can't play");
+ ALOGE("NULL java array of audio data to play, can't play");
return 0;
}
@@ -785,7 +785,7 @@ static jint android_media_AudioTrack_get_output_sample_rate(JNIEnv *env, jobjec
}
if (AudioSystem::getOutputSamplingRate(&afSamplingRate, nativeStreamType) != NO_ERROR) {
- LOGE("AudioSystem::getOutputSamplingRate() for stream type %d failed in AudioTrack JNI",
+ ALOGE("AudioSystem::getOutputSamplingRate() for stream type %d failed in AudioTrack JNI",
nativeStreamType);
return DEFAULT_OUTPUT_SAMPLE_RATE;
} else {
@@ -913,7 +913,7 @@ bool android_media_getIntConstantFromClass(JNIEnv* pEnv, jclass theClass, const
*constVal = pEnv->GetStaticIntField(theClass, javaConst);
return true;
} else {
- LOGE("Can't find %s.%s", className, constName);
+ ALOGE("Can't find %s.%s", className, constName);
return false;
}
}
@@ -928,7 +928,7 @@ int register_android_media_AudioTrack(JNIEnv *env)
// Get the AudioTrack class
jclass audioTrackClass = env->FindClass(kClassPathName);
if (audioTrackClass == NULL) {
- LOGE("Can't find %s", kClassPathName);
+ ALOGE("Can't find %s", kClassPathName);
return -1;
}
@@ -937,7 +937,7 @@ int register_android_media_AudioTrack(JNIEnv *env)
audioTrackClass,
JAVA_POSTEVENT_CALLBACK_NAME, "(Ljava/lang/Object;IIILjava/lang/Object;)V");
if (javaAudioTrackFields.postNativeEventInJava == NULL) {
- LOGE("Can't find AudioTrack.%s", JAVA_POSTEVENT_CALLBACK_NAME);
+ ALOGE("Can't find AudioTrack.%s", JAVA_POSTEVENT_CALLBACK_NAME);
return -1;
}
@@ -947,7 +947,7 @@ int register_android_media_AudioTrack(JNIEnv *env)
audioTrackClass,
JAVA_NATIVETRACKINJAVAOBJ_FIELD_NAME, "I");
if (javaAudioTrackFields.nativeTrackInJavaObj == NULL) {
- LOGE("Can't find AudioTrack.%s", JAVA_NATIVETRACKINJAVAOBJ_FIELD_NAME);
+ ALOGE("Can't find AudioTrack.%s", JAVA_NATIVETRACKINJAVAOBJ_FIELD_NAME);
return -1;
}
// jniData;
@@ -955,7 +955,7 @@ int register_android_media_AudioTrack(JNIEnv *env)
audioTrackClass,
JAVA_JNIDATA_FIELD_NAME, "I");
if (javaAudioTrackFields.jniData == NULL) {
- LOGE("Can't find AudioTrack.%s", JAVA_JNIDATA_FIELD_NAME);
+ ALOGE("Can't find AudioTrack.%s", JAVA_JNIDATA_FIELD_NAME);
return -1;
}
@@ -974,7 +974,7 @@ int register_android_media_AudioTrack(JNIEnv *env)
jclass audioFormatClass = NULL;
audioFormatClass = env->FindClass(JAVA_AUDIOFORMAT_CLASS_NAME);
if (audioFormatClass == NULL) {
- LOGE("Can't find %s", JAVA_AUDIOFORMAT_CLASS_NAME);
+ ALOGE("Can't find %s", JAVA_AUDIOFORMAT_CLASS_NAME);
return -1;
}
if ( !android_media_getIntConstantFromClass(env, audioFormatClass,
@@ -991,7 +991,7 @@ int register_android_media_AudioTrack(JNIEnv *env)
jclass audioManagerClass = NULL;
audioManagerClass = env->FindClass(JAVA_AUDIOMANAGER_CLASS_NAME);
if (audioManagerClass == NULL) {
- LOGE("Can't find %s", JAVA_AUDIOMANAGER_CLASS_NAME);
+ ALOGE("Can't find %s", JAVA_AUDIOMANAGER_CLASS_NAME);
return -1;
}
if ( !android_media_getIntConstantFromClass(env, audioManagerClass,
diff --git a/core/jni/android_media_JetPlayer.cpp b/core/jni/android_media_JetPlayer.cpp
index 66421a9..85c0a9c 100644
--- a/core/jni/android_media_JetPlayer.cpp
+++ b/core/jni/android_media_JetPlayer.cpp
@@ -66,7 +66,7 @@ jetPlayerEventCallback(int what, int arg1=0, int arg2=0, void* javaTarget = NULL
env->ExceptionClear();
}
} else {
- LOGE("JET jetPlayerEventCallback(): No JNI env for JET event callback, can't post event.");
+ ALOGE("JET jetPlayerEventCallback(): No JNI env for JET event callback, can't post event.");
return;
}
}
@@ -90,7 +90,7 @@ android_media_JetPlayer_setup(JNIEnv *env, jobject thiz, jobject weak_this,
env->SetIntField(thiz, javaJetPlayerFields.nativePlayerInJavaObj, (int)lpJet);
return JNI_TRUE;
} else {
- LOGE("android_media_JetPlayer_setup(): initialization failed with EAS error code %d", (int)result);
+ ALOGE("android_media_JetPlayer_setup(): initialization failed with EAS error code %d", (int)result);
delete lpJet;
env->SetIntField(weak_this, javaJetPlayerFields.nativePlayerInJavaObj, 0);
return JNI_FALSE;
@@ -140,7 +140,7 @@ android_media_JetPlayer_loadFromFile(JNIEnv *env, jobject thiz, jstring path)
const char *pathStr = env->GetStringUTFChars(path, NULL);
if (pathStr == NULL) { // Out of memory
- LOGE("android_media_JetPlayer_openFile(): aborting, out of memory");
+ ALOGE("android_media_JetPlayer_openFile(): aborting, out of memory");
return JNI_FALSE;
}
@@ -152,7 +152,7 @@ android_media_JetPlayer_loadFromFile(JNIEnv *env, jobject thiz, jstring path)
//ALOGV("android_media_JetPlayer_openFile(): file successfully opened");
return JNI_TRUE;
} else {
- LOGE("android_media_JetPlayer_openFile(): failed to open file with EAS error %d",
+ ALOGE("android_media_JetPlayer_openFile(): failed to open file with EAS error %d",
(int)result);
return JNI_FALSE;
}
@@ -182,7 +182,7 @@ android_media_JetPlayer_loadFromFileD(JNIEnv *env, jobject thiz,
ALOGV("android_media_JetPlayer_openFileDescr(): file successfully opened");
return JNI_TRUE;
} else {
- LOGE("android_media_JetPlayer_openFileDescr(): failed to open file with EAS error %d",
+ ALOGE("android_media_JetPlayer_openFileDescr(): failed to open file with EAS error %d",
(int)result);
return JNI_FALSE;
}
@@ -204,7 +204,7 @@ android_media_JetPlayer_closeFile(JNIEnv *env, jobject thiz)
//ALOGV("android_media_JetPlayer_closeFile(): file successfully closed");
return JNI_TRUE;
} else {
- LOGE("android_media_JetPlayer_closeFile(): failed to close file");
+ ALOGE("android_media_JetPlayer_closeFile(): failed to close file");
return JNI_FALSE;
}
}
@@ -226,7 +226,7 @@ android_media_JetPlayer_play(JNIEnv *env, jobject thiz)
//ALOGV("android_media_JetPlayer_play(): play successful");
return JNI_TRUE;
} else {
- LOGE("android_media_JetPlayer_play(): failed to play with EAS error code %ld",
+ ALOGE("android_media_JetPlayer_play(): failed to play with EAS error code %ld",
result);
return JNI_FALSE;
}
@@ -253,7 +253,7 @@ android_media_JetPlayer_pause(JNIEnv *env, jobject thiz)
ALOGV("android_media_JetPlayer_pause(): paused with an empty queue");
return JNI_TRUE;
} else
- LOGE("android_media_JetPlayer_pause(): failed to pause with EAS error code %ld",
+ ALOGE("android_media_JetPlayer_pause(): failed to pause with EAS error code %ld",
result);
return JNI_FALSE;
}
@@ -279,7 +279,7 @@ android_media_JetPlayer_queueSegment(JNIEnv *env, jobject thiz,
//ALOGV("android_media_JetPlayer_queueSegment(): segment successfully queued");
return JNI_TRUE;
} else {
- LOGE("android_media_JetPlayer_queueSegment(): failed with EAS error code %ld",
+ ALOGE("android_media_JetPlayer_queueSegment(): failed with EAS error code %ld",
result);
return JNI_FALSE;
}
@@ -304,7 +304,7 @@ android_media_JetPlayer_queueSegmentMuteArray(JNIEnv *env, jobject thiz,
jboolean *muteTracks = NULL;
muteTracks = env->GetBooleanArrayElements(muteArray, NULL);
if (muteTracks == NULL) {
- LOGE("android_media_JetPlayer_queueSegment(): failed to read track mute mask.");
+ ALOGE("android_media_JetPlayer_queueSegment(): failed to read track mute mask.");
return JNI_FALSE;
}
@@ -325,7 +325,7 @@ android_media_JetPlayer_queueSegmentMuteArray(JNIEnv *env, jobject thiz,
//ALOGV("android_media_JetPlayer_queueSegmentMuteArray(): segment successfully queued");
return JNI_TRUE;
} else {
- LOGE("android_media_JetPlayer_queueSegmentMuteArray(): failed with EAS error code %ld",
+ ALOGE("android_media_JetPlayer_queueSegmentMuteArray(): failed with EAS error code %ld",
result);
return JNI_FALSE;
}
@@ -350,7 +350,7 @@ android_media_JetPlayer_setMuteFlags(JNIEnv *env, jobject thiz,
//ALOGV("android_media_JetPlayer_setMuteFlags(): mute flags successfully updated");
return JNI_TRUE;
} else {
- LOGE("android_media_JetPlayer_setMuteFlags(): failed with EAS error code %ld", result);
+ ALOGE("android_media_JetPlayer_setMuteFlags(): failed with EAS error code %ld", result);
return JNI_FALSE;
}
}
@@ -373,7 +373,7 @@ android_media_JetPlayer_setMuteArray(JNIEnv *env, jobject thiz,
jboolean *muteTracks = NULL;
muteTracks = env->GetBooleanArrayElements(muteArray, NULL);
if (muteTracks == NULL) {
- LOGE("android_media_JetPlayer_setMuteArray(): failed to read track mute mask.");
+ ALOGE("android_media_JetPlayer_setMuteArray(): failed to read track mute mask.");
return JNI_FALSE;
}
@@ -394,7 +394,7 @@ android_media_JetPlayer_setMuteArray(JNIEnv *env, jobject thiz,
//ALOGV("android_media_JetPlayer_setMuteArray(): mute flags successfully updated");
return JNI_TRUE;
} else {
- LOGE("android_media_JetPlayer_setMuteArray(): \
+ ALOGE("android_media_JetPlayer_setMuteArray(): \
failed to update mute flags with EAS error code %ld", result);
return JNI_FALSE;
}
@@ -420,7 +420,7 @@ android_media_JetPlayer_setMuteFlag(JNIEnv *env, jobject thiz,
//ALOGV("android_media_JetPlayer_setMuteFlag(): mute flag successfully updated for track %d", trackId);
return JNI_TRUE;
} else {
- LOGE("android_media_JetPlayer_setMuteFlag(): failed to update mute flag for track %d with EAS error code %ld",
+ ALOGE("android_media_JetPlayer_setMuteFlag(): failed to update mute flag for track %d with EAS error code %ld",
trackId, result);
return JNI_FALSE;
}
@@ -444,7 +444,7 @@ android_media_JetPlayer_triggerClip(JNIEnv *env, jobject thiz, jint clipId)
//ALOGV("android_media_JetPlayer_triggerClip(): triggerClip successful for clip %d", clipId);
return JNI_TRUE;
} else {
- LOGE("android_media_JetPlayer_triggerClip(): triggerClip for clip %d failed with EAS error code %ld",
+ ALOGE("android_media_JetPlayer_triggerClip(): triggerClip for clip %d failed with EAS error code %ld",
clipId, result);
return JNI_FALSE;
}
@@ -467,7 +467,7 @@ android_media_JetPlayer_clearQueue(JNIEnv *env, jobject thiz)
//ALOGV("android_media_JetPlayer_clearQueue(): clearQueue successful");
return JNI_TRUE;
} else {
- LOGE("android_media_JetPlayer_clearQueue(): clearQueue failed with EAS error code %ld",
+ ALOGE("android_media_JetPlayer_clearQueue(): clearQueue failed with EAS error code %ld",
result);
return JNI_FALSE;
}
@@ -513,7 +513,7 @@ int register_android_media_JetPlayer(JNIEnv *env)
// Get the JetPlayer java class
jetPlayerClass = env->FindClass(kClassPathName);
if (jetPlayerClass == NULL) {
- LOGE("Can't find %s", kClassPathName);
+ ALOGE("Can't find %s", kClassPathName);
return -1;
}
javaJetPlayerFields.jetClass = (jclass)env->NewGlobalRef(jetPlayerClass);
@@ -523,7 +523,7 @@ int register_android_media_JetPlayer(JNIEnv *env)
jetPlayerClass,
JAVA_NATIVEJETPLAYERINJAVAOBJ_FIELD_NAME, "I");
if (javaJetPlayerFields.nativePlayerInJavaObj == NULL) {
- LOGE("Can't find AudioTrack.%s", JAVA_NATIVEJETPLAYERINJAVAOBJ_FIELD_NAME);
+ ALOGE("Can't find AudioTrack.%s", JAVA_NATIVEJETPLAYERINJAVAOBJ_FIELD_NAME);
return -1;
}
@@ -531,7 +531,7 @@ int register_android_media_JetPlayer(JNIEnv *env)
javaJetPlayerFields.postNativeEventInJava = env->GetStaticMethodID(javaJetPlayerFields.jetClass,
JAVA_NATIVEJETPOSTEVENT_CALLBACK_NAME, "(Ljava/lang/Object;III)V");
if (javaJetPlayerFields.postNativeEventInJava == NULL) {
- LOGE("Can't find Jet.%s", JAVA_NATIVEJETPOSTEVENT_CALLBACK_NAME);
+ ALOGE("Can't find Jet.%s", JAVA_NATIVEJETPOSTEVENT_CALLBACK_NAME);
return -1;
}
diff --git a/core/jni/android_media_ToneGenerator.cpp b/core/jni/android_media_ToneGenerator.cpp
index 965afae..49be1c7 100644
--- a/core/jni/android_media_ToneGenerator.cpp
+++ b/core/jni/android_media_ToneGenerator.cpp
@@ -86,14 +86,14 @@ static void android_media_ToneGenerator_native_setup(JNIEnv *env, jobject thiz,
ALOGV("android_media_ToneGenerator_native_setup jobject: %x\n", (int)thiz);
if (lpToneGen == NULL) {
- LOGE("ToneGenerator creation failed \n");
+ ALOGE("ToneGenerator creation failed \n");
jniThrowException(env, "java/lang/OutOfMemoryError", NULL);
return;
}
ALOGV("ToneGenerator lpToneGen: %x\n", (unsigned int)lpToneGen);
if (!lpToneGen->isInited()) {
- LOGE("ToneGenerator init failed \n");
+ ALOGE("ToneGenerator init failed \n");
jniThrowRuntimeException(env, "Init failed");
return;
}
@@ -133,13 +133,13 @@ int register_android_media_ToneGenerator(JNIEnv *env) {
clazz = env->FindClass("android/media/ToneGenerator");
if (clazz == NULL) {
- LOGE("Can't find %s", "android/media/ToneGenerator");
+ ALOGE("Can't find %s", "android/media/ToneGenerator");
return -1;
}
fields.context = env->GetFieldID(clazz, "mNativeContext", "I");
if (fields.context == NULL) {
- LOGE("Can't find ToneGenerator.mNativeContext");
+ ALOGE("Can't find ToneGenerator.mNativeContext");
return -1;
}
ALOGV("register_android_media_ToneGenerator ToneGenerator fields.context: %x", (unsigned int)fields.context);
diff --git a/core/jni/android_net_LocalSocketImpl.cpp b/core/jni/android_net_LocalSocketImpl.cpp
index c8add70..1426b2c 100644
--- a/core/jni/android_net_LocalSocketImpl.cpp
+++ b/core/jni/android_net_LocalSocketImpl.cpp
@@ -957,7 +957,7 @@ int register_android_net_LocalSocketImpl(JNIEnv *env)
"android/net/LocalSocketImpl", gMethods, NELEM(gMethods));
error:
- LOGE("Error registering android.net.LocalSocketImpl");
+ ALOGE("Error registering android.net.LocalSocketImpl");
return -1;
}
diff --git a/core/jni/android_net_TrafficStats.cpp b/core/jni/android_net_TrafficStats.cpp
index 7a61432..0ab659b 100644
--- a/core/jni/android_net_TrafficStats.cpp
+++ b/core/jni/android_net_TrafficStats.cpp
@@ -47,13 +47,13 @@ static jlong readNumber(char const* filename) {
char buf[80];
int fd = open(filename, O_RDONLY);
if (fd < 0) {
- if (errno != ENOENT) LOGE("Can't open %s: %s", filename, strerror(errno));
+ if (errno != ENOENT) ALOGE("Can't open %s: %s", filename, strerror(errno));
return -1;
}
int len = read(fd, buf, sizeof(buf) - 1);
if (len < 0) {
- LOGE("Can't read %s: %s", filename, strerror(errno));
+ ALOGE("Can't read %s: %s", filename, strerror(errno));
close(fd);
return -1;
}
@@ -101,7 +101,7 @@ static jlong readTotal(char const* suffix) {
char filename[PATH_MAX] = "/sys/class/net/";
DIR *dir = opendir(filename);
if (dir == NULL) {
- LOGE("Can't list %s: %s", filename, strerror(errno));
+ ALOGE("Can't list %s: %s", filename, strerror(errno));
return -1;
}
diff --git a/core/jni/android_nfc_NdefMessage.cpp b/core/jni/android_nfc_NdefMessage.cpp
index 82476cd..e6c0554 100644
--- a/core/jni/android_nfc_NdefMessage.cpp
+++ b/core/jni/android_nfc_NdefMessage.cpp
@@ -55,7 +55,7 @@ static jint android_nfc_NdefMessage_parseNdefMessage(JNIEnv *e, jobject o,
(uint32_t)raw_msg_size, NULL, NULL, &num_of_records);
if (status) {
- LOGE("phFriNfc_NdefRecord_GetRecords(NULL) returned 0x%04x", status);
+ ALOGE("phFriNfc_NdefRecord_GetRecords(NULL) returned 0x%04x", status);
goto end;
}
TRACE("phFriNfc_NdefRecord_GetRecords(NULL) returned 0x%04x, with %d records", status, num_of_records);
@@ -74,7 +74,7 @@ static jint android_nfc_NdefMessage_parseNdefMessage(JNIEnv *e, jobject o,
(uint32_t)raw_msg_size, records, is_chunked, &num_of_records);
if (status) {
- LOGE("phFriNfc_NdefRecord_GetRecords() returned 0x%04x", status);
+ ALOGE("phFriNfc_NdefRecord_GetRecords() returned 0x%04x", status);
goto end;
}
TRACE("phFriNfc_NdefRecord_GetRecords() returned 0x%04x, with %d records", status, num_of_records);
@@ -97,7 +97,7 @@ static jint android_nfc_NdefMessage_parseNdefMessage(JNIEnv *e, jobject o,
status = phFriNfc_NdefRecord_Parse(&record, records[i]);
if (status) {
- LOGE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status);
+ ALOGE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status);
goto end;
}
TRACE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status);
@@ -111,7 +111,7 @@ static jint android_nfc_NdefMessage_parseNdefMessage(JNIEnv *e, jobject o,
(uint64_t)record.PayloadLength;
if (indicatedMsgLength >
(uint64_t)raw_msg_size) {
- LOGE("phFri_NdefRecord_Parse: invalid length field");
+ ALOGE("phFri_NdefRecord_Parse: invalid length field");
goto end;
}
diff --git a/core/jni/android_nfc_NdefRecord.cpp b/core/jni/android_nfc_NdefRecord.cpp
index 67907b6..2d0e2b9 100644
--- a/core/jni/android_nfc_NdefRecord.cpp
+++ b/core/jni/android_nfc_NdefRecord.cpp
@@ -60,7 +60,7 @@ static jbyteArray android_nfc_NdefRecord_generate(
&record_size);
if (status) {
- LOGE("phFriNfc_NdefRecord_Generate() returned 0x%04x", status);
+ ALOGE("phFriNfc_NdefRecord_Generate() returned 0x%04x", status);
goto end;
}
TRACE("phFriNfc_NdefRecord_Generate() returned 0x%04x", status);
@@ -107,7 +107,7 @@ static jint android_nfc_NdefRecord_parseNdefRecord(JNIEnv *e, jobject o,
TRACE("phFriNfc_NdefRecord_Parse()");
status = phFriNfc_NdefRecord_Parse(&record, (uint8_t *)raw_record);
if (status) {
- LOGE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status);
+ ALOGE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status);
goto clean_and_return;
}
TRACE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status);
diff --git a/core/jni/android_os_StatFs.cpp b/core/jni/android_os_StatFs.cpp
index c658aa5..79d8fef 100644
--- a/core/jni/android_os_StatFs.cpp
+++ b/core/jni/android_os_StatFs.cpp
@@ -91,7 +91,7 @@ android_os_StatFs_native_restat(JNIEnv *env, jobject thiz, jstring path)
// note that stat will contain the new file data corresponding to
// pathstr
if (statfs(pathstr, stat) != 0) {
- LOGE("statfs %s failed, errno: %d", pathstr, errno);
+ ALOGE("statfs %s failed, errno: %d", pathstr, errno);
delete stat;
env->SetIntField(thiz, fields.context, 0);
jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
@@ -146,13 +146,13 @@ int register_android_os_StatFs(JNIEnv *env)
clazz = env->FindClass("android/os/StatFs");
if (clazz == NULL) {
- LOGE("Can't find android/os/StatFs");
+ ALOGE("Can't find android/os/StatFs");
return -1;
}
fields.context = env->GetFieldID(clazz, "mNativeContext", "I");
if (fields.context == NULL) {
- LOGE("Can't find StatFs.mNativeContext");
+ ALOGE("Can't find StatFs.mNativeContext");
return -1;
}
diff --git a/core/jni/android_os_UEventObserver.cpp b/core/jni/android_os_UEventObserver.cpp
index 7f31b00..5639f4f 100644
--- a/core/jni/android_os_UEventObserver.cpp
+++ b/core/jni/android_os_UEventObserver.cpp
@@ -59,7 +59,7 @@ int register_android_os_UEventObserver(JNIEnv *env)
clazz = env->FindClass("android/os/UEventObserver");
if (clazz == NULL) {
- LOGE("Can't find android/os/UEventObserver");
+ ALOGE("Can't find android/os/UEventObserver");
return -1;
}
diff --git a/core/jni/android_server_BluetoothA2dpService.cpp b/core/jni/android_server_BluetoothA2dpService.cpp
index 2bab4b5..d065a9e 100644
--- a/core/jni/android_server_BluetoothA2dpService.cpp
+++ b/core/jni/android_server_BluetoothA2dpService.cpp
@@ -65,7 +65,7 @@ static bool initNative(JNIEnv* env, jobject object) {
#ifdef HAVE_BLUETOOTH
nat = (native_data_t *)calloc(1, sizeof(native_data_t));
if (NULL == nat) {
- LOGE("%s: out of memory!", __FUNCTION__);
+ ALOGE("%s: out of memory!", __FUNCTION__);
return false;
}
env->GetJavaVM( &(nat->vm) );
@@ -77,7 +77,7 @@ static bool initNative(JNIEnv* env, jobject object) {
dbus_threads_init_default();
nat->conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
if (dbus_error_is_set(&err)) {
- LOGE("Could not get onto the system bus: %s", err.message);
+ ALOGE("Could not get onto the system bus: %s", err.message);
dbus_error_free(&err);
return false;
}
@@ -117,7 +117,7 @@ static jobjectArray getSinkPropertiesNative(JNIEnv *env, jobject object,
LOG_AND_FREE_DBUS_ERROR_WITH_MSG(&err, reply);
return NULL;
} else if (!reply) {
- LOGE("DBus reply is NULL in function %s", __FUNCTION__);
+ ALOGE("DBus reply is NULL in function %s", __FUNCTION__);
return NULL;
}
DBusMessageIter iter;
@@ -268,7 +268,7 @@ DBusHandlerResult a2dp_event_filter(DBusMessage *msg, JNIEnv *env) {
ALOGV("... ignored");
}
if (env->ExceptionCheck()) {
- LOGE("VM Exception occurred while handling %s.%s (%s) in %s,"
+ ALOGE("VM Exception occurred while handling %s.%s (%s) in %s,"
" leaving for VM",
dbus_message_get_interface(msg), dbus_message_get_member(msg),
dbus_message_get_path(msg), __FUNCTION__);
@@ -326,7 +326,7 @@ static JNINativeMethod sMethods[] = {
int register_android_server_BluetoothA2dpService(JNIEnv *env) {
jclass clazz = env->FindClass("android/server/BluetoothA2dpService");
if (clazz == NULL) {
- LOGE("Can't find android/server/BluetoothA2dpService");
+ ALOGE("Can't find android/server/BluetoothA2dpService");
return -1;
}
diff --git a/core/jni/android_server_BluetoothEventLoop.cpp b/core/jni/android_server_BluetoothEventLoop.cpp
index 1924dbf..9292fc0 100644
--- a/core/jni/android_server_BluetoothEventLoop.cpp
+++ b/core/jni/android_server_BluetoothEventLoop.cpp
@@ -161,7 +161,7 @@ static void initializeNativeDataNative(JNIEnv* env, jobject object) {
#ifdef HAVE_BLUETOOTH
native_data_t *nat = (native_data_t *)calloc(1, sizeof(native_data_t));
if (NULL == nat) {
- LOGE("%s: out of memory!", __FUNCTION__);
+ ALOGE("%s: out of memory!", __FUNCTION__);
return;
}
memset(nat, 0, sizeof(native_data_t));
@@ -176,7 +176,7 @@ static void initializeNativeDataNative(JNIEnv* env, jobject object) {
dbus_threads_init_default();
nat->conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
if (dbus_error_is_set(&err)) {
- LOGE("%s: Could not get onto the system bus!", __FUNCTION__);
+ ALOGE("%s: Could not get onto the system bus!", __FUNCTION__);
dbus_error_free(&err);
}
dbus_connection_set_exit_on_disconnect(nat->conn, FALSE);
@@ -321,7 +321,7 @@ const char * get_adapter_path(DBusConnection *conn) {
msg = dbus_message_new_method_call("org.bluez", "/",
"org.bluez.Manager", "DefaultAdapter");
if (!msg) {
- LOGE("%s: Can't allocate new method call for get_adapter_path!",
+ ALOGE("%s: Can't allocate new method call for get_adapter_path!",
__FUNCTION__);
return NULL;
}
@@ -346,7 +346,7 @@ const char * get_adapter_path(DBusConnection *conn) {
}
}
if (attempt == 1000) {
- LOGE("Time out while trying to get Adapter path, is bluetoothd up ?");
+ ALOGE("Time out while trying to get Adapter path, is bluetoothd up ?");
goto failed;
}
@@ -375,7 +375,7 @@ static int register_agent(native_data_t *nat,
if (!dbus_connection_register_object_path(nat->conn, agent_path,
&agent_vtable, nat)) {
- LOGE("%s: Can't register object path %s for agent!",
+ ALOGE("%s: Can't register object path %s for agent!",
__FUNCTION__, agent_path);
return -1;
}
@@ -387,7 +387,7 @@ static int register_agent(native_data_t *nat,
msg = dbus_message_new_method_call("org.bluez", nat->adapter,
"org.bluez.Adapter", "RegisterAgent");
if (!msg) {
- LOGE("%s: Can't allocate new method call for agent!",
+ ALOGE("%s: Can't allocate new method call for agent!",
__FUNCTION__);
return -1;
}
@@ -400,7 +400,7 @@ static int register_agent(native_data_t *nat,
dbus_message_unref(msg);
if (!reply) {
- LOGE("%s: Can't register agent!", __FUNCTION__);
+ ALOGE("%s: Can't register agent!", __FUNCTION__);
if (dbus_error_is_set(&err)) {
LOG_AND_FREE_DBUS_ERROR(&err);
}
@@ -442,7 +442,7 @@ static void tearDownEventLoop(native_data_t *nat) {
}
dbus_message_unref(msg);
} else {
- LOGE("%s: Can't create new method call!", __FUNCTION__);
+ ALOGE("%s: Can't create new method call!", __FUNCTION__);
}
dbus_connection_flush(nat->conn);
@@ -725,14 +725,14 @@ static jboolean startEventLoopNative(JNIEnv *env, jobject object) {
nat->pollData = (struct pollfd *)malloc(sizeof(struct pollfd) *
DEFAULT_INITIAL_POLLFD_COUNT);
if (!nat->pollData) {
- LOGE("out of memory error starting EventLoop!");
+ ALOGE("out of memory error starting EventLoop!");
goto done;
}
nat->watchData = (DBusWatch **)malloc(sizeof(DBusWatch *) *
DEFAULT_INITIAL_POLLFD_COUNT);
if (!nat->watchData) {
- LOGE("out of memory error starting EventLoop!");
+ ALOGE("out of memory error starting EventLoop!");
goto done;
}
@@ -744,7 +744,7 @@ static jboolean startEventLoopNative(JNIEnv *env, jobject object) {
nat->pollMemberCount = 1;
if (socketpair(AF_LOCAL, SOCK_STREAM, 0, &(nat->controlFdR))) {
- LOGE("Error getting BT control socket");
+ ALOGE("Error getting BT control socket");
goto done;
}
nat->pollData[0].fd = nat->controlFdR;
@@ -756,7 +756,7 @@ static jboolean startEventLoopNative(JNIEnv *env, jobject object) {
nat->me = env->NewGlobalRef(object);
if (setUpEventLoop(nat) != JNI_TRUE) {
- LOGE("failure setting up Event Loop!");
+ ALOGE("failure setting up Event Loop!");
goto done;
}
@@ -1111,7 +1111,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn,
// reply
DBusMessage *reply = dbus_message_new_method_return(msg);
if (!reply) {
- LOGE("%s: Cannot create message reply\n", __FUNCTION__);
+ ALOGE("%s: Cannot create message reply\n", __FUNCTION__);
goto failure;
}
dbus_connection_send(nat->conn, reply, NULL);
@@ -1126,7 +1126,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn,
DBUS_TYPE_OBJECT_PATH, &object_path,
DBUS_TYPE_STRING, &uuid,
DBUS_TYPE_INVALID)) {
- LOGE("%s: Invalid arguments for Authorize() method", __FUNCTION__);
+ ALOGE("%s: Invalid arguments for Authorize() method", __FUNCTION__);
goto failure;
}
@@ -1145,7 +1145,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn,
if (!dbus_message_get_args(msg, NULL,
DBUS_TYPE_OBJECT_PATH, &object_path,
DBUS_TYPE_INVALID)) {
- LOGE("%s: Invalid arguments for OutOfBandData available() method", __FUNCTION__);
+ ALOGE("%s: Invalid arguments for OutOfBandData available() method", __FUNCTION__);
goto failure;
}
@@ -1160,7 +1160,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn,
if (available) {
DBusMessage *reply = dbus_message_new_method_return(msg);
if (!reply) {
- LOGE("%s: Cannot create message reply\n", __FUNCTION__);
+ ALOGE("%s: Cannot create message reply\n", __FUNCTION__);
goto failure;
}
dbus_connection_send(nat->conn, reply, NULL);
@@ -1169,7 +1169,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn,
DBusMessage *reply = dbus_message_new_error(msg,
"org.bluez.Error.DoesNotExist", "OutofBand data not available");
if (!reply) {
- LOGE("%s: Cannot create message reply\n", __FUNCTION__);
+ ALOGE("%s: Cannot create message reply\n", __FUNCTION__);
goto failure;
}
dbus_connection_send(nat->conn, reply, NULL);
@@ -1182,7 +1182,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn,
if (!dbus_message_get_args(msg, NULL,
DBUS_TYPE_OBJECT_PATH, &object_path,
DBUS_TYPE_INVALID)) {
- LOGE("%s: Invalid arguments for RequestPinCode() method", __FUNCTION__);
+ ALOGE("%s: Invalid arguments for RequestPinCode() method", __FUNCTION__);
goto failure;
}
@@ -1197,7 +1197,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn,
if (!dbus_message_get_args(msg, NULL,
DBUS_TYPE_OBJECT_PATH, &object_path,
DBUS_TYPE_INVALID)) {
- LOGE("%s: Invalid arguments for RequestPasskey() method", __FUNCTION__);
+ ALOGE("%s: Invalid arguments for RequestPasskey() method", __FUNCTION__);
goto failure;
}
@@ -1212,7 +1212,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn,
if (!dbus_message_get_args(msg, NULL,
DBUS_TYPE_OBJECT_PATH, &object_path,
DBUS_TYPE_INVALID)) {
- LOGE("%s: Invalid arguments for RequestOobData() method", __FUNCTION__);
+ ALOGE("%s: Invalid arguments for RequestOobData() method", __FUNCTION__);
goto failure;
}
@@ -1229,7 +1229,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn,
DBUS_TYPE_OBJECT_PATH, &object_path,
DBUS_TYPE_UINT32, &passkey,
DBUS_TYPE_INVALID)) {
- LOGE("%s: Invalid arguments for RequestPasskey() method", __FUNCTION__);
+ ALOGE("%s: Invalid arguments for RequestPasskey() method", __FUNCTION__);
goto failure;
}
@@ -1247,7 +1247,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn,
DBUS_TYPE_OBJECT_PATH, &object_path,
DBUS_TYPE_UINT32, &passkey,
DBUS_TYPE_INVALID)) {
- LOGE("%s: Invalid arguments for RequestConfirmation() method", __FUNCTION__);
+ ALOGE("%s: Invalid arguments for RequestConfirmation() method", __FUNCTION__);
goto failure;
}
@@ -1263,7 +1263,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn,
if (!dbus_message_get_args(msg, NULL,
DBUS_TYPE_OBJECT_PATH, &object_path,
DBUS_TYPE_INVALID)) {
- LOGE("%s: Invalid arguments for RequestPairingConsent() method", __FUNCTION__);
+ ALOGE("%s: Invalid arguments for RequestPairingConsent() method", __FUNCTION__);
goto failure;
}
@@ -1277,7 +1277,7 @@ DBusHandlerResult agent_event_filter(DBusConnection *conn,
// reply
DBusMessage *reply = dbus_message_new_method_return(msg);
if (!reply) {
- LOGE("%s: Cannot create message reply\n", __FUNCTION__);
+ ALOGE("%s: Cannot create message reply\n", __FUNCTION__);
goto failure;
}
dbus_connection_send(nat->conn, reply, NULL);
@@ -1354,7 +1354,7 @@ void onCreatePairedDeviceResult(DBusMessage *msg, void *user, void *n) {
ALOGV("... error = %s (%s)\n", err.name, err.message);
result = BOND_RESULT_AUTH_TIMEOUT;
} else {
- LOGE("%s: D-Bus error: %s (%s)\n", __FUNCTION__, err.name, err.message);
+ ALOGE("%s: D-Bus error: %s (%s)\n", __FUNCTION__, err.name, err.message);
result = BOND_RESULT_ERROR;
}
}
@@ -1445,7 +1445,7 @@ void onGetDeviceServiceChannelResult(DBusMessage *msg, void *user, void *n) {
!dbus_message_get_args(msg, &err,
DBUS_TYPE_INT32, &channel,
DBUS_TYPE_INVALID)) {
- LOGE("%s: D-Bus error: %s (%s)\n", __FUNCTION__, err.name, err.message);
+ ALOGE("%s: D-Bus error: %s (%s)\n", __FUNCTION__, err.name, err.message);
dbus_error_free(&err);
}
diff --git a/core/jni/android_server_BluetoothService.cpp b/core/jni/android_server_BluetoothService.cpp
index 2aeca86..eba378d 100644
--- a/core/jni/android_server_BluetoothService.cpp
+++ b/core/jni/android_server_BluetoothService.cpp
@@ -89,7 +89,7 @@ static inline native_data_t * get_native_data(JNIEnv *env, jobject object) {
native_data_t *nat =
(native_data_t *)(env->GetIntField(object, field_mNativeData));
if (nat == NULL || nat->conn == NULL) {
- LOGE("Uninitialized native data\n");
+ ALOGE("Uninitialized native data\n");
return NULL;
}
return nat;
@@ -113,7 +113,7 @@ static bool initializeNativeDataNative(JNIEnv* env, jobject object) {
#ifdef HAVE_BLUETOOTH
native_data_t *nat = (native_data_t *)calloc(1, sizeof(native_data_t));
if (NULL == nat) {
- LOGE("%s: out of memory!", __FUNCTION__);
+ ALOGE("%s: out of memory!", __FUNCTION__);
return false;
}
nat->env = env;
@@ -124,7 +124,7 @@ static bool initializeNativeDataNative(JNIEnv* env, jobject object) {
dbus_threads_init_default();
nat->conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
if (dbus_error_is_set(&err)) {
- LOGE("Could not get onto the system bus: %s", err.message);
+ ALOGE("Could not get onto the system bus: %s", err.message);
dbus_error_free(&err);
return false;
}
@@ -162,7 +162,7 @@ static jboolean setupNativeDataNative(JNIEnv* env, jobject object) {
if (!dbus_connection_register_object_path(nat->conn, device_agent_path,
&agent_vtable, event_nat)) {
- LOGE("%s: Can't register object path %s for remote device agent!",
+ ALOGE("%s: Can't register object path %s for remote device agent!",
__FUNCTION__, device_agent_path);
return JNI_FALSE;
}
@@ -332,7 +332,7 @@ static jbyteArray readAdapterOutOfBandDataNative(JNIEnv *env, jobject object) {
env->SetByteArrayRegion(byteArray, 16, 16, randomizer);
}
} else {
- LOGE("readAdapterOutOfBandDataNative: Hash len = %d, R len = %d",
+ ALOGE("readAdapterOutOfBandDataNative: Hash len = %d, R len = %d",
hash_len, r_len);
}
} else {
@@ -466,7 +466,7 @@ static jboolean cancelDeviceCreationNative(JNIEnv *env, jobject object,
if (dbus_error_is_set(&err)) {
LOG_AND_FREE_DBUS_ERROR(&err);
} else
- LOGE("DBus reply is NULL in function %s", __FUNCTION__);
+ ALOGE("DBus reply is NULL in function %s", __FUNCTION__);
return JNI_FALSE;
} else {
result = JNI_TRUE;
@@ -540,7 +540,7 @@ static jboolean setPairingConfirmationNative(JNIEnv *env, jobject object,
}
if (!reply) {
- LOGE("%s: Cannot create message reply to RequestPasskeyConfirmation or"
+ ALOGE("%s: Cannot create message reply to RequestPasskeyConfirmation or"
"RequestPairingConsent to D-Bus\n", __FUNCTION__);
dbus_message_unref(msg);
return JNI_FALSE;
@@ -564,7 +564,7 @@ static jboolean setPasskeyNative(JNIEnv *env, jobject object, jstring address,
DBusMessage *msg = (DBusMessage *)nativeData;
DBusMessage *reply = dbus_message_new_method_return(msg);
if (!reply) {
- LOGE("%s: Cannot create message reply to return Passkey code to "
+ ALOGE("%s: Cannot create message reply to return Passkey code to "
"D-Bus\n", __FUNCTION__);
dbus_message_unref(msg);
return JNI_FALSE;
@@ -593,7 +593,7 @@ static jboolean setRemoteOutOfBandDataNative(JNIEnv *env, jobject object, jstrin
jbyte *h_ptr = env->GetByteArrayElements(hash, NULL);
jbyte *r_ptr = env->GetByteArrayElements(randomizer, NULL);
if (!reply) {
- LOGE("%s: Cannot create message reply to return remote OOB data to "
+ ALOGE("%s: Cannot create message reply to return remote OOB data to "
"D-Bus\n", __FUNCTION__);
dbus_message_unref(msg);
return JNI_FALSE;
@@ -631,7 +631,7 @@ static jboolean setAuthorizationNative(JNIEnv *env, jobject object, jstring addr
"org.bluez.Error.Rejected", "Authorization rejected");
}
if (!reply) {
- LOGE("%s: Cannot create message reply D-Bus\n", __FUNCTION__);
+ ALOGE("%s: Cannot create message reply D-Bus\n", __FUNCTION__);
dbus_message_unref(msg);
return JNI_FALSE;
}
@@ -654,7 +654,7 @@ static jboolean setPinNative(JNIEnv *env, jobject object, jstring address,
DBusMessage *msg = (DBusMessage *)nativeData;
DBusMessage *reply = dbus_message_new_method_return(msg);
if (!reply) {
- LOGE("%s: Cannot create message reply to return PIN code to "
+ ALOGE("%s: Cannot create message reply to return PIN code to "
"D-Bus\n", __FUNCTION__);
dbus_message_unref(msg);
return JNI_FALSE;
@@ -685,7 +685,7 @@ static jboolean cancelPairingUserInputNative(JNIEnv *env, jobject object,
DBusMessage *reply = dbus_message_new_error(msg,
"org.bluez.Error.Canceled", "Pairing User Input was canceled");
if (!reply) {
- LOGE("%s: Cannot create message reply to return cancelUserInput to"
+ ALOGE("%s: Cannot create message reply to return cancelUserInput to"
"D-BUS\n", __FUNCTION__);
dbus_message_unref(msg);
return JNI_FALSE;
@@ -722,7 +722,7 @@ static jobjectArray getDevicePropertiesNative(JNIEnv *env, jobject object,
if (dbus_error_is_set(&err)) {
LOG_AND_FREE_DBUS_ERROR(&err);
} else
- LOGE("DBus reply is NULL in function %s", __FUNCTION__);
+ ALOGE("DBus reply is NULL in function %s", __FUNCTION__);
return NULL;
}
env->PushLocalFrame(PROPERTIES_NREFS);
@@ -756,7 +756,7 @@ static jobjectArray getAdapterPropertiesNative(JNIEnv *env, jobject object) {
if (dbus_error_is_set(&err)) {
LOG_AND_FREE_DBUS_ERROR(&err);
} else
- LOGE("DBus reply is NULL in function %s", __FUNCTION__);
+ ALOGE("DBus reply is NULL in function %s", __FUNCTION__);
return NULL;
}
env->PushLocalFrame(PROPERTIES_NREFS);
@@ -788,7 +788,7 @@ static jboolean setAdapterPropertyNative(JNIEnv *env, jobject object, jstring ke
get_adapter_path(env, object),
DBUS_ADAPTER_IFACE, "SetProperty");
if (!msg) {
- LOGE("%s: Can't allocate new method call for GetProperties!",
+ ALOGE("%s: Can't allocate new method call for GetProperties!",
__FUNCTION__);
env->ReleaseStringUTFChars(key, c_key);
return JNI_FALSE;
@@ -856,7 +856,7 @@ static jboolean setDevicePropertyNative(JNIEnv *env, jobject object, jstring pat
msg = dbus_message_new_method_call(BLUEZ_DBUS_BASE_IFC,
c_path, DBUS_DEVICE_IFACE, "SetProperty");
if (!msg) {
- LOGE("%s: Can't allocate new method call for device SetProperty!", __FUNCTION__);
+ ALOGE("%s: Can't allocate new method call for device SetProperty!", __FUNCTION__);
env->ReleaseStringUTFChars(key, c_key);
env->ReleaseStringUTFChars(path, c_path);
return JNI_FALSE;
@@ -985,7 +985,7 @@ static jintArray extract_handles(JNIEnv *env, DBusMessage *reply) {
if (handleArray) {
env->SetIntArrayRegion(handleArray, 0, len, handles);
} else {
- LOGE("Null array in extract_handles");
+ ALOGE("Null array in extract_handles");
}
} else {
LOG_AND_FREE_DBUS_ERROR(&err);
@@ -1169,7 +1169,7 @@ static jboolean setBluetoothTetheringNative(JNIEnv *env, jobject object, jboolea
const char *c_role = env->GetStringUTFChars(src_role, NULL);
const char *c_bridge = env->GetStringUTFChars(bridge, NULL);
if (value) {
- LOGE("setBluetoothTetheringNative true");
+ ALOGE("setBluetoothTetheringNative true");
reply = dbus_func_args(env, nat->conn,
get_adapter_path(env, object),
DBUS_NETWORKSERVER_IFACE,
@@ -1178,7 +1178,7 @@ static jboolean setBluetoothTetheringNative(JNIEnv *env, jobject object, jboolea
DBUS_TYPE_STRING, &c_bridge,
DBUS_TYPE_INVALID);
} else {
- LOGE("setBluetoothTetheringNative false");
+ ALOGE("setBluetoothTetheringNative false");
reply = dbus_func_args(env, nat->conn,
get_adapter_path(env, object),
DBUS_NETWORKSERVER_IFACE,
@@ -1198,7 +1198,7 @@ static jboolean connectPanDeviceNative(JNIEnv *env, jobject object, jstring path
jstring dstRole) {
ALOGV("%s", __FUNCTION__);
#ifdef HAVE_BLUETOOTH
- LOGE("connectPanDeviceNative");
+ ALOGE("connectPanDeviceNative");
native_data_t *nat = get_native_data(env, object);
jobject eventLoop = env->GetObjectField(object, field_mEventLoop);
struct event_loop_native_data_t *eventLoopNat =
@@ -1230,7 +1230,7 @@ static jboolean disconnectPanDeviceNative(JNIEnv *env, jobject object,
jstring path) {
ALOGV("%s", __FUNCTION__);
#ifdef HAVE_BLUETOOTH
- LOGE("disconnectPanDeviceNative");
+ ALOGE("disconnectPanDeviceNative");
native_data_t *nat = get_native_data(env, object);
jobject eventLoop = env->GetObjectField(object, field_mEventLoop);
struct event_loop_native_data_t *eventLoopNat =
@@ -1260,7 +1260,7 @@ static jboolean disconnectPanServerDeviceNative(JNIEnv *env, jobject object,
jstring iface) {
ALOGV("%s", __FUNCTION__);
#ifdef HAVE_BLUETOOTH
- LOGE("disconnectPanServerDeviceNative");
+ ALOGE("disconnectPanServerDeviceNative");
native_data_t *nat = get_native_data(env, object);
jobject eventLoop = env->GetObjectField(object, field_mEventLoop);
struct event_loop_native_data_t *eventLoopNat =
@@ -1316,7 +1316,7 @@ static jstring registerHealthApplicationNative(JNIEnv *env, jobject object,
"CreateApplication");
if (msg == NULL) {
- LOGE("Could not allocate D-Bus message object!");
+ ALOGE("Could not allocate D-Bus message object!");
return NULL;
}
@@ -1379,7 +1379,7 @@ static jstring registerSinkHealthApplicationNative(JNIEnv *env, jobject object,
"CreateApplication");
if (msg == NULL) {
- LOGE("Could not allocate D-Bus message object!");
+ ALOGE("Could not allocate D-Bus message object!");
return NULL;
}
@@ -1487,7 +1487,7 @@ static jboolean createChannelNative(JNIEnv *env, jobject object,
static jboolean destroyChannelNative(JNIEnv *env, jobject object, jstring devicePath,
jstring channelPath, jint code) {
- LOGE("%s", __FUNCTION__);
+ ALOGE("%s", __FUNCTION__);
#ifdef HAVE_BLUETOOTH
native_data_t *nat = get_native_data(env, object);
jobject eventLoop = env->GetObjectField(object, field_mEventLoop);
@@ -1517,7 +1517,7 @@ static jboolean destroyChannelNative(JNIEnv *env, jobject object, jstring device
}
static jstring getMainChannelNative(JNIEnv *env, jobject object, jstring devicePath) {
- LOGE("%s", __FUNCTION__);
+ ALOGE("%s", __FUNCTION__);
#ifdef HAVE_BLUETOOTH
native_data_t *nat = get_native_data(env, object);
if (nat) {
@@ -1551,7 +1551,7 @@ static jstring getMainChannelNative(JNIEnv *env, jobject object, jstring deviceP
}
static jstring getChannelApplicationNative(JNIEnv *env, jobject object, jstring channelPath) {
- LOGE("%s", __FUNCTION__);
+ ALOGE("%s", __FUNCTION__);
#ifdef HAVE_BLUETOOTH
native_data_t *nat = get_native_data(env, object);
if (nat) {
diff --git a/core/jni/android_server_NetworkManagementSocketTagger.cpp b/core/jni/android_server_NetworkManagementSocketTagger.cpp
index c279ced..12beff7 100644
--- a/core/jni/android_server_NetworkManagementSocketTagger.cpp
+++ b/core/jni/android_server_NetworkManagementSocketTagger.cpp
@@ -36,7 +36,7 @@ static jint QTagUid_tagSocketFd(JNIEnv* env, jclass,
int userFd = jniGetFDFromFileDescriptor(env, fileDescriptor);
if (env->ExceptionOccurred() != NULL) {
- LOGE("Can't get FileDescriptor num");
+ ALOGE("Can't get FileDescriptor num");
return (jint)-1;
}
@@ -52,7 +52,7 @@ static int QTagUid_untagSocketFd(JNIEnv* env, jclass,
int userFd = jniGetFDFromFileDescriptor(env, fileDescriptor);
if (env->ExceptionOccurred() != NULL) {
- LOGE("Can't get FileDescriptor num");
+ ALOGE("Can't get FileDescriptor num");
return (jint)-1;
}
diff --git a/core/jni/android_server_Watchdog.cpp b/core/jni/android_server_Watchdog.cpp
index cf52833..6726c14 100644
--- a/core/jni/android_server_Watchdog.cpp
+++ b/core/jni/android_server_Watchdog.cpp
@@ -48,7 +48,7 @@ static void dumpOneStack(int tid, int outFd) {
write(outFd, "\n", 1);
close(stackFd);
} else {
- LOGE("Unable to open stack of tid %d : %d (%s)", tid, errno, strerror(errno));
+ ALOGE("Unable to open stack of tid %d : %d (%s)", tid, errno, strerror(errno));
}
}
@@ -67,7 +67,7 @@ static void dumpKernelStacks(JNIEnv* env, jobject clazz, jstring pathStr) {
int outFd = open(path, O_WRONLY | O_APPEND | O_CREAT,
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
if (outFd < 0) {
- LOGE("Unable to open stack dump file: %d (%s)", errno, strerror(errno));
+ ALOGE("Unable to open stack dump file: %d (%s)", errno, strerror(errno));
goto done;
}
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp
index 4d6bfbc..990a617 100644
--- a/core/jni/android_util_Binder.cpp
+++ b/core/jni/android_util_Binder.cpp
@@ -194,8 +194,8 @@ static void report_exception(JNIEnv* env, jthrowable excep, const char* msg)
if ((tagstr == NULL) || (msgstr == NULL)) {
env->ExceptionClear(); /* assume exception (OOM?) was thrown */
- LOGE("Unable to call Log.e()\n");
- LOGE("%s", msg);
+ ALOGE("Unable to call Log.e()\n");
+ ALOGE("%s", msg);
goto bail;
}
@@ -221,7 +221,7 @@ static void report_exception(JNIEnv* env, jthrowable excep, const char* msg)
env->Throw(excep);
vm->DetachCurrentThread();
sleep(60);
- LOGE("Forcefully exiting");
+ ALOGE("Forcefully exiting");
exit(1);
*((int *) 1) = 1;
}
@@ -699,7 +699,7 @@ static void signalExceptionForError(JNIEnv* env, jobject obj, status_t err,
jniThrowException(env, "java/lang/RuntimeException", "Unknown transaction code");
break;
case FAILED_TRANSACTION:
- LOGE("!!! FAILED BINDER TRANSACTION !!!");
+ ALOGE("!!! FAILED BINDER TRANSACTION !!!");
// TransactionTooLargeException is a checked exception, only throw from certain methods.
// FIXME: Transaction too large is the most common reason for FAILED_TRANSACTION
// but it is not the only one. The Binder driver can return BR_FAILED_REPLY
@@ -715,7 +715,7 @@ static void signalExceptionForError(JNIEnv* env, jobject obj, status_t err,
"Not allowed to write file descriptors here");
break;
default:
- LOGE("Unknown binder error code. 0x%x", err);
+ ALOGE("Unknown binder error code. 0x%x", err);
String8 msg;
msg.appendFormat("Unknown binder error code. 0x%x", err);
// RemoteException is a checked exception, only throw from certain methods.
diff --git a/core/jni/android_util_EventLog.cpp b/core/jni/android_util_EventLog.cpp
index 5d51110..a3981ce 100644
--- a/core/jni/android_util_EventLog.cpp
+++ b/core/jni/android_util_EventLog.cpp
@@ -267,7 +267,7 @@ int register_android_util_EventLog(JNIEnv* env) {
for (int i = 0; i < NELEM(gClasses); ++i) {
jclass clazz = env->FindClass(gClasses[i].name);
if (clazz == NULL) {
- LOGE("Can't find class: %s\n", gClasses[i].name);
+ ALOGE("Can't find class: %s\n", gClasses[i].name);
return -1;
}
*gClasses[i].clazz = (jclass) env->NewGlobalRef(clazz);
@@ -277,7 +277,7 @@ int register_android_util_EventLog(JNIEnv* env) {
*gFields[i].id = env->GetFieldID(
*gFields[i].c, gFields[i].name, gFields[i].ft);
if (*gFields[i].id == NULL) {
- LOGE("Can't find field: %s\n", gFields[i].name);
+ ALOGE("Can't find field: %s\n", gFields[i].name);
return -1;
}
}
@@ -286,7 +286,7 @@ int register_android_util_EventLog(JNIEnv* env) {
*gMethods[i].id = env->GetMethodID(
*gMethods[i].c, gMethods[i].name, gMethods[i].mt);
if (*gMethods[i].id == NULL) {
- LOGE("Can't find method: %s\n", gMethods[i].name);
+ ALOGE("Can't find method: %s\n", gMethods[i].name);
return -1;
}
}
diff --git a/core/jni/android_util_FileObserver.cpp b/core/jni/android_util_FileObserver.cpp
index 65e7130..0327d8c 100644
--- a/core/jni/android_util_FileObserver.cpp
+++ b/core/jni/android_util_FileObserver.cpp
@@ -67,7 +67,7 @@ static void android_os_fileobserver_observe(JNIEnv* env, jobject object, jint fd
if (errno == EINTR)
continue;
- LOGE("***** ERROR! android_os_fileobserver_observe() got a short event!");
+ ALOGE("***** ERROR! android_os_fileobserver_observe() got a short event!");
return;
}
@@ -148,14 +148,14 @@ int register_android_os_FileObserver(JNIEnv* env)
if (clazz == NULL)
{
- LOGE("Can't find android/os/FileObserver$ObserverThread");
+ ALOGE("Can't find android/os/FileObserver$ObserverThread");
return -1;
}
method_onEvent = env->GetMethodID(clazz, "onEvent", "(IILjava/lang/String;)V");
if (method_onEvent == NULL)
{
- LOGE("Can't find FileObserver.onEvent(int, int, String)");
+ ALOGE("Can't find FileObserver.onEvent(int, int, String)");
return -1;
}
diff --git a/core/jni/android_util_Log.cpp b/core/jni/android_util_Log.cpp
index 2c7bb84..a57aad7 100644
--- a/core/jni/android_util_Log.cpp
+++ b/core/jni/android_util_Log.cpp
@@ -139,7 +139,7 @@ int register_android_util_Log(JNIEnv* env)
jclass clazz = env->FindClass("android/util/Log");
if (clazz == NULL) {
- LOGE("Can't find android/util/Log");
+ ALOGE("Can't find android/util/Log");
return -1;
}
diff --git a/core/jni/android_util_Process.cpp b/core/jni/android_util_Process.cpp
index 9245d99..2c494ac 100644
--- a/core/jni/android_util_Process.cpp
+++ b/core/jni/android_util_Process.cpp
@@ -227,7 +227,7 @@ void android_os_Process_setProcessGroup(JNIEnv* env, jobject clazz, int pid, jin
t_pid = atoi(de->d_name);
if (!t_pid) {
- LOGE("Error getting pid for '%s'\n", de->d_name);
+ ALOGE("Error getting pid for '%s'\n", de->d_name);
continue;
}
@@ -274,7 +274,7 @@ void android_os_Process_setThreadPriority(JNIEnv* env, jobject clazz,
if (pid == androidGetTid()) {
void* bgOk = pthread_getspecific(gBgKey);
if (bgOk == ((void*)0xbaad)) {
- LOGE("Thread marked fg-only put self in background!");
+ ALOGE("Thread marked fg-only put self in background!");
jniThrowException(env, "java/lang/SecurityException", "May not put this thread into background");
return;
}
diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp
index d4b9024..03d94c9 100644
--- a/core/jni/android_view_GLES20Canvas.cpp
+++ b/core/jni/android_view_GLES20Canvas.cpp
@@ -492,7 +492,7 @@ static void renderText(OpenGLRenderer* renderer, const jchar* text, int count,
#if USE_TEXT_LAYOUT_CACHE
value = TextLayoutCache::getInstance().getValue(paint, text, 0, count, count, flags);
if (value == NULL) {
- LOGE("Cannot get TextLayoutCache value");
+ ALOGE("Cannot get TextLayoutCache value");
return ;
}
#else
@@ -522,7 +522,7 @@ static void renderTextRun(OpenGLRenderer* renderer, const jchar* text,
#if USE_TEXT_LAYOUT_CACHE
value = TextLayoutCache::getInstance().getValue(paint, text, start, count, contextCount, flags);
if (value == NULL) {
- LOGE("Cannot get TextLayoutCache value");
+ ALOGE("Cannot get TextLayoutCache value");
return ;
}
#else
diff --git a/core/jni/android_view_InputChannel.cpp b/core/jni/android_view_InputChannel.cpp
index e0976a1..fce432b 100644
--- a/core/jni/android_view_InputChannel.cpp
+++ b/core/jni/android_view_InputChannel.cpp
@@ -202,17 +202,17 @@ static void android_view_InputChannel_nativeReadFromParcel(JNIEnv* env, jobject
int32_t parcelAshmemFd = parcel->readFileDescriptor();
int32_t ashmemFd = dup(parcelAshmemFd);
if (ashmemFd < 0) {
- LOGE("Error %d dup ashmem fd %d.", errno, parcelAshmemFd);
+ ALOGE("Error %d dup ashmem fd %d.", errno, parcelAshmemFd);
}
int32_t parcelReceivePipeFd = parcel->readFileDescriptor();
int32_t receivePipeFd = dup(parcelReceivePipeFd);
if (receivePipeFd < 0) {
- LOGE("Error %d dup receive pipe fd %d.", errno, parcelReceivePipeFd);
+ ALOGE("Error %d dup receive pipe fd %d.", errno, parcelReceivePipeFd);
}
int32_t parcelSendPipeFd = parcel->readFileDescriptor();
int32_t sendPipeFd = dup(parcelSendPipeFd);
if (sendPipeFd < 0) {
- LOGE("Error %d dup send pipe fd %d.", errno, parcelSendPipeFd);
+ ALOGE("Error %d dup send pipe fd %d.", errno, parcelSendPipeFd);
}
if (ashmemFd < 0 || receivePipeFd < 0 || sendPipeFd < 0) {
if (ashmemFd >= 0) ::close(ashmemFd);
diff --git a/core/jni/android_view_InputQueue.cpp b/core/jni/android_view_InputQueue.cpp
index f4955cd..8541933 100644
--- a/core/jni/android_view_InputQueue.cpp
+++ b/core/jni/android_view_InputQueue.cpp
@@ -307,14 +307,14 @@ int NativeInputQueue::handleReceiveCallback(int receiveFd, int events, void* dat
ssize_t connectionIndex = q->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
}
connection = q->mConnectionsByReceiveFd.valueAt(connectionIndex);
if (events & (ALOOPER_EVENT_ERROR | ALOOPER_EVENT_HANGUP)) {
- LOGE("channel '%s' ~ Publisher closed input channel or an error occurred. "
+ ALOGE("channel '%s' ~ Publisher closed input channel or an error occurred. "
"events=0x%x", connection->getInputChannelName(), events);
return 0; // remove the callback
}
@@ -327,7 +327,7 @@ int NativeInputQueue::handleReceiveCallback(int receiveFd, int events, void* dat
status_t status = connection->inputConsumer.receiveDispatchSignal();
if (status) {
- LOGE("channel '%s' ~ Failed to receive dispatch signal. status=%d",
+ ALOGE("channel '%s' ~ Failed to receive dispatch signal. status=%d",
connection->getInputChannelName(), status);
return 0; // remove the callback
}
@@ -409,7 +409,7 @@ int NativeInputQueue::handleReceiveCallback(int receiveFd, int events, void* dat
#endif
if (env->ExceptionCheck()) {
- LOGE("An exception occurred while invoking the input handler for an event.");
+ ALOGE("An exception occurred while invoking the input handler for an event.");
LOGE_EX(env);
env->ExceptionClear();
diff --git a/core/jni/android_view_KeyEvent.cpp b/core/jni/android_view_KeyEvent.cpp
index 78951aa..27469a2 100644
--- a/core/jni/android_view_KeyEvent.cpp
+++ b/core/jni/android_view_KeyEvent.cpp
@@ -63,7 +63,7 @@ jobject android_view_KeyEvent_fromNative(JNIEnv* env, const KeyEvent* event) {
event->getSource(),
NULL);
if (env->ExceptionCheck()) {
- LOGE("An exception occurred while obtaining a key event.");
+ ALOGE("An exception occurred while obtaining a key event.");
LOGE_EX(env);
env->ExceptionClear();
return NULL;
diff --git a/core/jni/android_view_MotionEvent.cpp b/core/jni/android_view_MotionEvent.cpp
index fccc66e..2def1d1 100644
--- a/core/jni/android_view_MotionEvent.cpp
+++ b/core/jni/android_view_MotionEvent.cpp
@@ -80,7 +80,7 @@ jobject android_view_MotionEvent_obtainAsCopy(JNIEnv* env, const MotionEvent* ev
jobject eventObj = env->CallStaticObjectMethod(gMotionEventClassInfo.clazz,
gMotionEventClassInfo.obtain);
if (env->ExceptionCheck() || !eventObj) {
- LOGE("An exception occurred while obtaining a motion event.");
+ ALOGE("An exception occurred while obtaining a motion event.");
LOGE_EX(env);
env->ExceptionClear();
return NULL;
diff --git a/drm/common/ReadWriteUtils.cpp b/drm/common/ReadWriteUtils.cpp
index c16214e..fd17e98 100644
--- a/drm/common/ReadWriteUtils.cpp
+++ b/drm/common/ReadWriteUtils.cpp
@@ -85,7 +85,7 @@ void ReadWriteUtils::writeToFile(const String8& filePath, const String8& data) {
int size = data.size();
if (FAILURE != ftruncate(fd, size)) {
if (size != write(fd, data.string(), size)) {
- LOGE("Failed to write the data to: %s", filePath.string());
+ ALOGE("Failed to write the data to: %s", filePath.string());
}
}
fclose(file);
@@ -101,7 +101,7 @@ void ReadWriteUtils::appendToFile(const String8& filePath, const String8& data)
int size = data.size();
if (size != write(fd, data.string(), size)) {
- LOGE("Failed to write the data to: %s", filePath.string());
+ ALOGE("Failed to write the data to: %s", filePath.string());
}
fclose(file);
}
diff --git a/drm/jni/android_drm_DrmManagerClient.cpp b/drm/jni/android_drm_DrmManagerClient.cpp
index e34046f..dfc7fb2 100644
--- a/drm/jni/android_drm_DrmManagerClient.cpp
+++ b/drm/jni/android_drm_DrmManagerClient.cpp
@@ -169,7 +169,7 @@ JNIOnInfoListener::JNIOnInfoListener(JNIEnv* env, jobject thiz, jobject weak_thi
jclass clazz = env->GetObjectClass(thiz);
if (clazz == NULL) {
- LOGE("Can't find android/drm/DrmManagerClient");
+ ALOGE("Can't find android/drm/DrmManagerClient");
jniThrowException(env, "java/lang/Exception", NULL);
return;
}
diff --git a/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp b/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp
index 7799040..0273a4b 100644
--- a/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp
+++ b/drm/libdrmframework/plugins/forward-lock/FwdLockEngine/src/FwdLockEngine.cpp
@@ -92,12 +92,12 @@ int FwdLockEngine::getConvertedStatus(FwdLockConv_Status_t status) {
case FwdLockConv_Status_InvalidArgument:
case FwdLockConv_Status_UnsupportedFileFormat:
case FwdLockConv_Status_UnsupportedContentTransferEncoding:
- LOGE("FwdLockEngine getConvertedStatus: file conversion Error %d. "
+ ALOGE("FwdLockEngine getConvertedStatus: file conversion Error %d. "
"Returning STATUS_INPUTDATA_ERROR", status);
retStatus = DrmConvertedStatus::STATUS_INPUTDATA_ERROR;
break;
default:
- LOGE("FwdLockEngine getConvertedStatus: file conversion Error %d. "
+ ALOGE("FwdLockEngine getConvertedStatus: file conversion Error %d. "
"Returning STATUS_ERROR", status);
retStatus = DrmConvertedStatus::STATUS_ERROR;
break;
@@ -139,7 +139,7 @@ android::status_t FwdLockEngine::onInitialize(int uniqueId) {
if (FwdLockGlue_InitializeKeyEncryption()) {
LOG_VERBOSE("FwdLockEngine::onInitialize -- FwdLockGlue_InitializeKeyEncryption succeeded");
} else {
- LOGE("FwdLockEngine::onInitialize -- FwdLockGlue_InitializeKeyEncryption failed:"
+ ALOGE("FwdLockEngine::onInitialize -- FwdLockGlue_InitializeKeyEncryption failed:"
"errno = %d", errno);
}
@@ -351,7 +351,7 @@ status_t FwdLockEngine::onOpenConvertSession(int uniqueId,
convertSessionMap.addValue(convertId, newSession);
result = DRM_NO_ERROR;
} else {
- LOGE("FwdLockEngine::onOpenConvertSession -- FwdLockConv_OpenSession failed.");
+ ALOGE("FwdLockEngine::onOpenConvertSession -- FwdLockConv_OpenSession failed.");
delete newSession;
}
}
@@ -448,7 +448,7 @@ status_t FwdLockEngine::onOpenDecryptSession(int uniqueId,
(!decodeSessionMap.isCreated(decryptHandle->decryptId))) {
fileDesc = dup(fd);
} else {
- LOGE("FwdLockEngine::onOpenDecryptSession parameter error");
+ ALOGE("FwdLockEngine::onOpenDecryptSession parameter error");
return result;
}
@@ -550,13 +550,13 @@ status_t FwdLockEngine::onInitializeDecryptUnit(int uniqueId,
DecryptHandle* decryptHandle,
int decryptUnitId,
const DrmBuffer* headerInfo) {
- LOGE("FwdLockEngine::onInitializeDecryptUnit is not supported for this DRM scheme");
+ ALOGE("FwdLockEngine::onInitializeDecryptUnit is not supported for this DRM scheme");
return DRM_ERROR_UNKNOWN;
}
status_t FwdLockEngine::onDecrypt(int uniqueId, DecryptHandle* decryptHandle, int decryptUnitId,
const DrmBuffer* encBuffer, DrmBuffer** decBuffer, DrmBuffer* IV) {
- LOGE("FwdLockEngine::onDecrypt is not supported for this DRM scheme");
+ ALOGE("FwdLockEngine::onDecrypt is not supported for this DRM scheme");
return DRM_ERROR_UNKNOWN;
}
@@ -565,14 +565,14 @@ status_t FwdLockEngine::onDecrypt(int uniqueId,
int decryptUnitId,
const DrmBuffer* encBuffer,
DrmBuffer** decBuffer) {
- LOGE("FwdLockEngine::onDecrypt is not supported for this DRM scheme");
+ ALOGE("FwdLockEngine::onDecrypt is not supported for this DRM scheme");
return DRM_ERROR_UNKNOWN;
}
status_t FwdLockEngine::onFinalizeDecryptUnit(int uniqueId,
DecryptHandle* decryptHandle,
int decryptUnitId) {
- LOGE("FwdLockEngine::onFinalizeDecryptUnit is not supported for this DRM scheme");
+ ALOGE("FwdLockEngine::onFinalizeDecryptUnit is not supported for this DRM scheme");
return DRM_ERROR_UNKNOWN;
}
@@ -650,11 +650,11 @@ ssize_t FwdLockEngine::onPread(int uniqueId,
if (((off_t)-1) != decoderSession->offset) {
bytesRead = onRead(uniqueId, decryptHandle, buffer, numBytes);
if (bytesRead < 0) {
- LOGE("FwdLockEngine::onPread error reading");
+ ALOGE("FwdLockEngine::onPread error reading");
}
}
} else {
- LOGE("FwdLockEngine::onPread decryptId not found");
+ ALOGE("FwdLockEngine::onPread decryptId not found");
}
return bytesRead;
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index c4ef993..bc1db4d 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -47,7 +47,7 @@
#include <gui/SurfaceTextureClient.h>
#include <android_runtime/android_graphics_SurfaceTexture.h>
-//#define LOG_API LOGE
+//#define LOG_API ALOGE
#define LOG_API(...)
using namespace android;
@@ -1333,13 +1333,13 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved)
jint result = -1;
if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
- LOGE("ERROR: GetEnv failed\n");
+ ALOGE("ERROR: GetEnv failed\n");
goto bail;
}
assert(env != NULL);
if (registerFuncs(env) < 0) {
- LOGE("ERROR: MediaPlayer native registration failed\n");
+ ALOGE("ERROR: MediaPlayer native registration failed\n");
goto bail;
}
diff --git a/libs/binder/BpBinder.cpp b/libs/binder/BpBinder.cpp
index e8fb1d9..47a62db 100644
--- a/libs/binder/BpBinder.cpp
+++ b/libs/binder/BpBinder.cpp
@@ -50,7 +50,7 @@ void BpBinder::ObjectManager::attach(
e.func = func;
if (mObjects.indexOfKey(objectID) >= 0) {
- LOGE("Trying to attach object ID %p to binder ObjectManager %p with object %p, but object ID already in use",
+ ALOGE("Trying to attach object ID %p to binder ObjectManager %p with object %p, but object ID already in use",
objectID, this, object);
return;
}
diff --git a/libs/binder/CursorWindow.cpp b/libs/binder/CursorWindow.cpp
index 19b7631..a6e5f71 100644
--- a/libs/binder/CursorWindow.cpp
+++ b/libs/binder/CursorWindow.cpp
@@ -150,7 +150,7 @@ status_t CursorWindow::setNumColumns(uint32_t numColumns) {
uint32_t cur = mHeader->numColumns;
if ((cur > 0 || mHeader->numRows > 0) && cur != numColumns) {
- LOGE("Trying to go from %d columns to %d", cur, numColumns);
+ ALOGE("Trying to go from %d columns to %d", cur, numColumns);
return INVALID_OPERATION;
}
mHeader->numColumns = numColumns;
@@ -255,14 +255,14 @@ CursorWindow::RowSlot* CursorWindow::allocRowSlot() {
CursorWindow::FieldSlot* CursorWindow::getFieldSlot(uint32_t row, uint32_t column) {
if (row >= mHeader->numRows || column >= mHeader->numColumns) {
- LOGE("Failed to read row %d, column %d from a CursorWindow which "
+ ALOGE("Failed to read row %d, column %d from a CursorWindow which "
"has %d rows, %d columns.",
row, column, mHeader->numRows, mHeader->numColumns);
return NULL;
}
RowSlot* rowSlot = getRowSlot(row);
if (!rowSlot) {
- LOGE("Failed to find rowSlot for row %d.", row);
+ ALOGE("Failed to find rowSlot for row %d.", row);
return NULL;
}
FieldSlot* fieldDir = static_cast<FieldSlot*>(offsetToPtr(rowSlot->offset));
diff --git a/libs/binder/IMemory.cpp b/libs/binder/IMemory.cpp
index 2111fe8..cd2451a 100644
--- a/libs/binder/IMemory.cpp
+++ b/libs/binder/IMemory.cpp
@@ -298,11 +298,11 @@ void BpMemoryHeap::assertReallyMapped() const
uint32_t flags = reply.readInt32();
uint32_t offset = reply.readInt32();
- LOGE_IF(err, "binder=%p transaction failed fd=%d, size=%ld, err=%d (%s)",
+ ALOGE_IF(err, "binder=%p transaction failed fd=%d, size=%ld, err=%d (%s)",
asBinder().get(), parcel_fd, size, err, strerror(-err));
int fd = dup( parcel_fd );
- LOGE_IF(fd==-1, "cannot dup fd=%d, size=%ld, err=%d (%s)",
+ ALOGE_IF(fd==-1, "cannot dup fd=%d, size=%ld, err=%d (%s)",
parcel_fd, size, err, strerror(errno));
int access = PROT_READ;
@@ -315,7 +315,7 @@ void BpMemoryHeap::assertReallyMapped() const
mRealHeap = true;
mBase = mmap(0, size, access, MAP_SHARED, fd, offset);
if (mBase == MAP_FAILED) {
- LOGE("cannot map BpMemoryHeap (binder=%p), size=%ld, fd=%d (%s)",
+ ALOGE("cannot map BpMemoryHeap (binder=%p), size=%ld, fd=%d (%s)",
asBinder().get(), size, fd, strerror(errno));
close(fd);
} else {
@@ -446,7 +446,7 @@ void HeapCache::free_heap(const wp<IBinder>& binder)
mHeapCache.removeItemsAt(i);
}
} else {
- LOGE("free_heap binder=%p not found!!!", binder.unsafe_get());
+ ALOGE("free_heap binder=%p not found!!!", binder.unsafe_get());
}
}
}
diff --git a/libs/binder/MemoryDealer.cpp b/libs/binder/MemoryDealer.cpp
index fcdb1bc..ff5e6bd 100644
--- a/libs/binder/MemoryDealer.cpp
+++ b/libs/binder/MemoryDealer.cpp
@@ -344,7 +344,7 @@ ssize_t SimpleBestFitAllocator::alloc(size_t size, uint32_t flags)
mList.insertBefore(free_chunk, split);
}
- LOGE_IF((flags&PAGE_ALIGNED) &&
+ ALOGE_IF((flags&PAGE_ALIGNED) &&
((free_chunk->start*kMemoryAlign)&(pagesize-1)),
"PAGE_ALIGNED requested, but page is not aligned!!!");
diff --git a/libs/binder/MemoryHeapBase.cpp b/libs/binder/MemoryHeapBase.cpp
index e171374..d1cbf1c 100644
--- a/libs/binder/MemoryHeapBase.cpp
+++ b/libs/binder/MemoryHeapBase.cpp
@@ -53,7 +53,7 @@ MemoryHeapBase::MemoryHeapBase(size_t size, uint32_t flags, char const * name)
const size_t pagesize = getpagesize();
size = ((size + pagesize-1) & ~(pagesize-1));
int fd = ashmem_create_region(name == NULL ? "MemoryHeapBase" : name, size);
- LOGE_IF(fd<0, "error creating ashmem region: %s", strerror(errno));
+ ALOGE_IF(fd<0, "error creating ashmem region: %s", strerror(errno));
if (fd >= 0) {
if (mapfd(fd, size) == NO_ERROR) {
if (flags & READ_ONLY) {
@@ -72,7 +72,7 @@ MemoryHeapBase::MemoryHeapBase(const char* device, size_t size, uint32_t flags)
open_flags |= O_SYNC;
int fd = open(device, open_flags);
- LOGE_IF(fd<0, "error opening %s: %s", device, strerror(errno));
+ ALOGE_IF(fd<0, "error opening %s: %s", device, strerror(errno));
if (fd >= 0) {
const size_t pagesize = getpagesize();
size = ((size + pagesize-1) & ~(pagesize-1));
@@ -127,7 +127,7 @@ status_t MemoryHeapBase::mapfd(int fd, size_t size, uint32_t offset)
void* base = (uint8_t*)mmap(0, size,
PROT_READ|PROT_WRITE, MAP_SHARED, fd, offset);
if (base == MAP_FAILED) {
- LOGE("mmap(fd=%d, size=%u) failed (%s)",
+ ALOGE("mmap(fd=%d, size=%u) failed (%s)",
fd, uint32_t(size), strerror(errno));
close(fd);
return -errno;
diff --git a/libs/binder/MemoryHeapPmem.cpp b/libs/binder/MemoryHeapPmem.cpp
index 03322ea..66bcf4d 100644
--- a/libs/binder/MemoryHeapPmem.cpp
+++ b/libs/binder/MemoryHeapPmem.cpp
@@ -79,7 +79,7 @@ SubRegionMemory::SubRegionMemory(const sp<MemoryHeapPmem>& heap,
int our_fd = heap->heapID();
struct pmem_region sub = { offset, size };
int err = ioctl(our_fd, PMEM_MAP, &sub);
- LOGE_IF(err<0, "PMEM_MAP failed (%s), "
+ ALOGE_IF(err<0, "PMEM_MAP failed (%s), "
"mFD=%d, sub.offset=%lu, sub.size=%lu",
strerror(errno), our_fd, sub.offset, sub.len);
}
@@ -115,7 +115,7 @@ void SubRegionMemory::revoke()
sub.offset = mOffset;
sub.len = mSize;
int err = ioctl(our_fd, PMEM_UNMAP, &sub);
- LOGE_IF(err<0, "PMEM_UNMAP failed (%s), "
+ ALOGE_IF(err<0, "PMEM_UNMAP failed (%s), "
"mFD=%d, sub.offset=%lu, sub.size=%lu",
strerror(errno), our_fd, sub.offset, sub.len);
mSize = 0;
@@ -133,11 +133,11 @@ MemoryHeapPmem::MemoryHeapPmem(const sp<MemoryHeapBase>& pmemHeap,
#ifdef HAVE_ANDROID_OS
if (device) {
int fd = open(device, O_RDWR | (flags & NO_CACHING ? O_SYNC : 0));
- LOGE_IF(fd<0, "couldn't open %s (%s)", device, strerror(errno));
+ ALOGE_IF(fd<0, "couldn't open %s (%s)", device, strerror(errno));
if (fd >= 0) {
int err = ioctl(fd, PMEM_CONNECT, pmemHeap->heapID());
if (err < 0) {
- LOGE("PMEM_CONNECT failed (%s), mFD=%d, sub-fd=%d",
+ ALOGE("PMEM_CONNECT failed (%s), mFD=%d, sub-fd=%d",
strerror(errno), fd, pmemHeap->heapID());
close(fd);
} else {
@@ -194,7 +194,7 @@ status_t MemoryHeapPmem::slap()
int our_fd = getHeapID();
struct pmem_region sub = { 0, size };
int err = ioctl(our_fd, PMEM_MAP, &sub);
- LOGE_IF(err<0, "PMEM_MAP failed (%s), "
+ ALOGE_IF(err<0, "PMEM_MAP failed (%s), "
"mFD=%d, sub.offset=%lu, sub.size=%lu",
strerror(errno), our_fd, sub.offset, sub.len);
return -errno;
@@ -212,7 +212,7 @@ status_t MemoryHeapPmem::unslap()
int our_fd = getHeapID();
struct pmem_region sub = { 0, size };
int err = ioctl(our_fd, PMEM_UNMAP, &sub);
- LOGE_IF(err<0, "PMEM_UNMAP failed (%s), "
+ ALOGE_IF(err<0, "PMEM_UNMAP failed (%s), "
"mFD=%d, sub.offset=%lu, sub.size=%lu",
strerror(errno), our_fd, sub.offset, sub.len);
return -errno;
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 7281073..3400e97 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -139,7 +139,7 @@ void release_object(const sp<ProcessState>& proc,
}
}
- LOGE("Invalid object type 0x%08lx", obj.type);
+ ALOGE("Invalid object type 0x%08lx", obj.type);
}
inline static status_t finish_flatten_binder(
@@ -159,7 +159,7 @@ status_t flatten_binder(const sp<ProcessState>& proc,
if (!local) {
BpBinder *proxy = binder->remoteBinder();
if (proxy == NULL) {
- LOGE("null proxy");
+ ALOGE("null proxy");
}
const int32_t handle = proxy ? proxy->handle() : 0;
obj.type = BINDER_TYPE_HANDLE;
@@ -192,7 +192,7 @@ status_t flatten_binder(const sp<ProcessState>& proc,
if (!local) {
BpBinder *proxy = real->remoteBinder();
if (proxy == NULL) {
- LOGE("null proxy");
+ ALOGE("null proxy");
}
const int32_t handle = proxy ? proxy->handle() : 0;
obj.type = BINDER_TYPE_WEAK_HANDLE;
@@ -213,7 +213,7 @@ status_t flatten_binder(const sp<ProcessState>& proc,
// The OpenBinder implementation uses a dynamic_cast<> here,
// but we can't do that with the different reference counting
// implementation we are using.
- LOGE("Unable to unflatten Binder weak reference!");
+ ALOGE("Unable to unflatten Binder weak reference!");
obj.type = BINDER_TYPE_BINDER;
obj.binder = NULL;
obj.cookie = NULL;
@@ -1010,7 +1010,7 @@ String16 Parcel::readString16() const
size_t len;
const char16_t* str = readString16Inplace(&len);
if (str) return String16(str, len);
- LOGE("Reading a NULL string not supported here.");
+ ALOGE("Reading a NULL string not supported here.");
return String16();
}
@@ -1503,7 +1503,7 @@ status_t Parcel::continueWrite(size_t desired)
if(!(mDataCapacity == 0 && mObjects == NULL
&& mObjectsCapacity == 0)) {
- LOGE("continueWrite: %d/%p/%d/%d", mDataCapacity, mObjects, mObjectsCapacity, desired);
+ ALOGE("continueWrite: %d/%p/%d/%d", mDataCapacity, mObjects, mObjectsCapacity, desired);
}
mData = data;
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index b6d4f1a..f96fe50 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -109,7 +109,7 @@ sp<IBinder> ProcessState::getContextObject(const String16& name, const sp<IBinde
// Don't attempt to retrieve contexts if we manage them
if (mManagesContexts) {
- LOGE("getContextObject(%s) failed, but we manage the contexts!\n",
+ ALOGE("getContextObject(%s) failed, but we manage the contexts!\n",
String8(name).string());
return NULL;
}
@@ -160,7 +160,7 @@ bool ProcessState::becomeContextManager(context_check_func checkFunc, void* user
} else if (result == -1) {
mBinderContextCheckFunc = NULL;
mBinderContextUserData = NULL;
- LOGE("Binder ioctl to become context manager failed: %s\n", strerror(errno));
+ ALOGE("Binder ioctl to become context manager failed: %s\n", strerror(errno));
}
}
return mManagesContexts;
@@ -302,19 +302,19 @@ static int open_driver()
int vers;
status_t result = ioctl(fd, BINDER_VERSION, &vers);
if (result == -1) {
- LOGE("Binder ioctl to obtain version failed: %s", strerror(errno));
+ ALOGE("Binder ioctl to obtain version failed: %s", strerror(errno));
close(fd);
fd = -1;
}
if (result != 0 || vers != BINDER_CURRENT_PROTOCOL_VERSION) {
- LOGE("Binder driver protocol does not match user space protocol!");
+ ALOGE("Binder driver protocol does not match user space protocol!");
close(fd);
fd = -1;
}
size_t maxThreads = 15;
result = ioctl(fd, BINDER_SET_MAX_THREADS, &maxThreads);
if (result == -1) {
- LOGE("Binder ioctl to set max threads failed: %s", strerror(errno));
+ ALOGE("Binder ioctl to set max threads failed: %s", strerror(errno));
}
} else {
ALOGW("Opening '/dev/binder' failed: %s\n", strerror(errno));
@@ -340,7 +340,7 @@ ProcessState::ProcessState()
mVMStart = mmap(0, BINDER_VM_SIZE, PROT_READ, MAP_PRIVATE | MAP_NORESERVE, mDriverFD, 0);
if (mVMStart == MAP_FAILED) {
// *sigh*
- LOGE("Using /dev/binder failed: unable to mmap transaction memory.\n");
+ ALOGE("Using /dev/binder failed: unable to mmap transaction memory.\n");
close(mDriverFD);
mDriverFD = -1;
}
diff --git a/libs/camera/Camera.cpp b/libs/camera/Camera.cpp
index d28b7f8..ee458f1 100644
--- a/libs/camera/Camera.cpp
+++ b/libs/camera/Camera.cpp
@@ -56,7 +56,7 @@ const sp<ICameraService>& Camera::getCameraService()
binder->linkToDeath(mDeathNotifier);
mCameraService = interface_cast<ICameraService>(binder);
}
- LOGE_IF(mCameraService==0, "no CameraService!?");
+ ALOGE_IF(mCameraService==0, "no CameraService!?");
return mCameraService;
}
@@ -72,7 +72,7 @@ sp<Camera> Camera::create(const sp<ICamera>& camera)
{
ALOGV("create");
if (camera == 0) {
- LOGE("camera remote is a NULL pointer");
+ ALOGE("camera remote is a NULL pointer");
return 0;
}
diff --git a/libs/camera/CameraParameters.cpp b/libs/camera/CameraParameters.cpp
index 209d84a..059a8a5 100644
--- a/libs/camera/CameraParameters.cpp
+++ b/libs/camera/CameraParameters.cpp
@@ -231,12 +231,12 @@ void CameraParameters::set(const char *key, const char *value)
{
// XXX i think i can do this with strspn()
if (strchr(key, '=') || strchr(key, ';')) {
- //XXX LOGE("Key \"%s\"contains invalid character (= or ;)", key);
+ //XXX ALOGE("Key \"%s\"contains invalid character (= or ;)", key);
return;
}
if (strchr(value, '=') || strchr(key, ';')) {
- //XXX LOGE("Value \"%s\"contains invalid character (= or ;)", value);
+ //XXX ALOGE("Value \"%s\"contains invalid character (= or ;)", value);
return;
}
@@ -294,7 +294,7 @@ static int parse_pair(const char *str, int *first, int *second, char delim,
int w = (int)strtol(str, &end, 10);
// If a delimeter does not immediately follow, give up.
if (*end != delim) {
- LOGE("Cannot find delimeter (%c) in str=%s", delim, str);
+ ALOGE("Cannot find delimeter (%c) in str=%s", delim, str);
return -1;
}
@@ -324,7 +324,7 @@ static void parseSizesList(const char *sizesStr, Vector<Size> &sizes)
int success = parse_pair(sizeStartPtr, &width, &height, 'x',
&sizeStartPtr);
if (success == -1 || (*sizeStartPtr != ',' && *sizeStartPtr != '\0')) {
- LOGE("Picture sizes string \"%s\" contains invalid character.", sizesStr);
+ ALOGE("Picture sizes string \"%s\" contains invalid character.", sizesStr);
return;
}
sizes.push(Size(width, height));
diff --git a/libs/cpustats/ThreadCpuUsage.cpp b/libs/cpustats/ThreadCpuUsage.cpp
index c1fb365..ffee039 100644
--- a/libs/cpustats/ThreadCpuUsage.cpp
+++ b/libs/cpustats/ThreadCpuUsage.cpp
@@ -31,7 +31,7 @@ bool ThreadCpuUsage::setEnabled(bool isEnabled)
if (isEnabled) {
rc = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &mPreviousTs);
if (rc) {
- LOGE("clock_gettime(CLOCK_THREAD_CPUTIME_ID) errno=%d", errno);
+ ALOGE("clock_gettime(CLOCK_THREAD_CPUTIME_ID) errno=%d", errno);
isEnabled = false;
} else {
mWasEverEnabled = true;
@@ -39,7 +39,7 @@ bool ThreadCpuUsage::setEnabled(bool isEnabled)
if (!mMonotonicKnown) {
rc = clock_gettime(CLOCK_MONOTONIC, &mMonotonicTs);
if (rc) {
- LOGE("clock_gettime(CLOCK_MONOTONIC) errno=%d", errno);
+ ALOGE("clock_gettime(CLOCK_MONOTONIC) errno=%d", errno);
} else {
mMonotonicKnown = true;
}
@@ -50,7 +50,7 @@ bool ThreadCpuUsage::setEnabled(bool isEnabled)
struct timespec ts;
rc = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts);
if (rc) {
- LOGE("clock_gettime(CLOCK_THREAD_CPUTIME_ID) errno=%d", errno);
+ ALOGE("clock_gettime(CLOCK_THREAD_CPUTIME_ID) errno=%d", errno);
} else {
long long delta = (ts.tv_sec - mPreviousTs.tv_sec) * 1000000000LL +
(ts.tv_nsec - mPreviousTs.tv_nsec);
@@ -86,7 +86,7 @@ void ThreadCpuUsage::sample()
int rc;
rc = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts);
if (rc) {
- LOGE("clock_gettime(CLOCK_THREAD_CPUTIME_ID) errno=%d", errno);
+ ALOGE("clock_gettime(CLOCK_THREAD_CPUTIME_ID) errno=%d", errno);
} else {
long long delta = (ts.tv_sec - mPreviousTs.tv_sec) * 1000000000LL +
(ts.tv_nsec - mPreviousTs.tv_nsec);
@@ -111,7 +111,7 @@ long long ThreadCpuUsage::elapsed() const
int rc;
rc = clock_gettime(CLOCK_MONOTONIC, &ts);
if (rc) {
- LOGE("clock_gettime(CLOCK_MONOTONIC) errno=%d", errno);
+ ALOGE("clock_gettime(CLOCK_MONOTONIC) errno=%d", errno);
elapsed = 0;
} else {
// mMonotonicTs is updated only at first enable and resetStatistics
@@ -132,7 +132,7 @@ void ThreadCpuUsage::resetStatistics()
int rc;
rc = clock_gettime(CLOCK_MONOTONIC, &mMonotonicTs);
if (rc) {
- LOGE("clock_gettime(CLOCK_MONOTONIC) errno=%d", errno);
+ ALOGE("clock_gettime(CLOCK_MONOTONIC) errno=%d", errno);
mMonotonicKnown = false;
}
}
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index 86bc62a..b1b9adb 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -148,27 +148,27 @@ public:
err = data.writeInterfaceToken(
ISurfaceComposer::getInterfaceDescriptor());
if (err != NO_ERROR) {
- LOGE("ISurfaceComposer::authenticateSurfaceTexture: error writing "
+ ALOGE("ISurfaceComposer::authenticateSurfaceTexture: error writing "
"interface descriptor: %s (%d)", strerror(-err), -err);
return false;
}
err = data.writeStrongBinder(surfaceTexture->asBinder());
if (err != NO_ERROR) {
- LOGE("ISurfaceComposer::authenticateSurfaceTexture: error writing "
+ ALOGE("ISurfaceComposer::authenticateSurfaceTexture: error writing "
"strong binder to parcel: %s (%d)", strerror(-err), -err);
return false;
}
err = remote()->transact(BnSurfaceComposer::AUTHENTICATE_SURFACE, data,
&reply);
if (err != NO_ERROR) {
- LOGE("ISurfaceComposer::authenticateSurfaceTexture: error "
+ ALOGE("ISurfaceComposer::authenticateSurfaceTexture: error "
"performing transaction: %s (%d)", strerror(-err), -err);
return false;
}
int32_t result = 0;
err = reply.readInt32(&result);
if (err != NO_ERROR) {
- LOGE("ISurfaceComposer::authenticateSurfaceTexture: error "
+ ALOGE("ISurfaceComposer::authenticateSurfaceTexture: error "
"retrieving result: %s (%d)", strerror(-err), -err);
return false;
}
diff --git a/libs/gui/SensorEventQueue.cpp b/libs/gui/SensorEventQueue.cpp
index f935524..ac362fc 100644
--- a/libs/gui/SensorEventQueue.cpp
+++ b/libs/gui/SensorEventQueue.cpp
@@ -70,12 +70,12 @@ ssize_t SensorEventQueue::write(ASensorEvent const* events, size_t numEvents)
ssize_t SensorEventQueue::read(ASensorEvent* events, size_t numEvents)
{
ssize_t size = mSensorChannel->read(events, numEvents*sizeof(events[0]));
- LOGE_IF(size<0 && size!=-EAGAIN,
+ ALOGE_IF(size<0 && size!=-EAGAIN,
"SensorChannel::read error (%s)", strerror(-size));
if (size >= 0) {
if (size % sizeof(events[0])) {
// partial read!!! should never happen.
- LOGE("SensorEventQueue partial read (event-size=%u, read=%d)",
+ ALOGE("SensorEventQueue partial read (event-size=%u, read=%d)",
sizeof(events[0]), int(size));
return -EINVAL;
}
@@ -104,7 +104,7 @@ status_t SensorEventQueue::waitForEvent() const
do {
result = looper->pollOnce(-1);
if (result == ALOOPER_EVENT_ERROR) {
- LOGE("SensorChannel::waitForEvent error (errno=%d)", errno);
+ ALOGE("SensorChannel::waitForEvent error (errno=%d)", errno);
result = -EPIPE; // unknown error, so we make up one
break;
}
diff --git a/libs/gui/SensorManager.cpp b/libs/gui/SensorManager.cpp
index 3b39601..b80da56 100644
--- a/libs/gui/SensorManager.cpp
+++ b/libs/gui/SensorManager.cpp
@@ -137,7 +137,7 @@ sp<SensorEventQueue> SensorManager::createEventQueue()
mSensorServer->createSensorEventConnection();
if (connection == NULL) {
// SensorService just died.
- LOGE("createEventQueue: connection is NULL. SensorService died.");
+ ALOGE("createEventQueue: connection is NULL. SensorService died.");
continue;
}
queue = new SensorEventQueue(connection);
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp
index ff45fa3..337950c 100644
--- a/libs/gui/Surface.cpp
+++ b/libs/gui/Surface.cpp
@@ -167,7 +167,7 @@ status_t SurfaceControl::setFreezeTint(uint32_t tint) {
status_t SurfaceControl::validate() const
{
if (mToken<0 || mClient==0) {
- LOGE("invalid token (%d, identity=%u) or client (%p)",
+ ALOGE("invalid token (%d, identity=%u) or client (%p)",
mToken, mIdentity, mClient.get());
return NO_INIT;
}
@@ -254,7 +254,7 @@ status_t Surface::writeToParcel(
} else if (surface != 0 &&
(surface->mSurface != NULL ||
surface->getISurfaceTexture() != NULL)) {
- LOGE("Parceling invalid surface with non-NULL ISurface/ISurfaceTexture as NULL: "
+ ALOGE("Parceling invalid surface with non-NULL ISurface/ISurfaceTexture as NULL: "
"mSurface = %p, surfaceTexture = %p, mIdentity = %d, ",
surface->mSurface.get(), surface->getISurfaceTexture().get(),
surface->mIdentity);
@@ -304,7 +304,7 @@ void Surface::cleanCachedSurfacesLocked() {
void Surface::init(const sp<ISurfaceTexture>& surfaceTexture)
{
if (mSurface != NULL || surfaceTexture != NULL) {
- LOGE_IF(surfaceTexture==0, "got a NULL ISurfaceTexture from ISurface");
+ ALOGE_IF(surfaceTexture==0, "got a NULL ISurfaceTexture from ISurface");
if (surfaceTexture != NULL) {
setISurfaceTexture(surfaceTexture);
setUsage(GraphicBuffer::USAGE_HW_RENDER);
diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp
index 91294ed..c80d93d 100644
--- a/libs/gui/SurfaceTexture.cpp
+++ b/libs/gui/SurfaceTexture.cpp
@@ -64,7 +64,7 @@
#define ST_LOGD(x, ...) ALOGD("[%s] "x, mName.string(), ##__VA_ARGS__)
#define ST_LOGI(x, ...) ALOGI("[%s] "x, mName.string(), ##__VA_ARGS__)
#define ST_LOGW(x, ...) ALOGW("[%s] "x, mName.string(), ##__VA_ARGS__)
-#define ST_LOGE(x, ...) LOGE("[%s] "x, mName.string(), ##__VA_ARGS__)
+#define ST_LOGE(x, ...) ALOGE("[%s] "x, mName.string(), ##__VA_ARGS__)
namespace android {
@@ -491,9 +491,9 @@ status_t SurfaceTexture::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
// synchronizing access to it. It's too late at this point to abort the
// dequeue operation.
if (result == EGL_FALSE) {
- LOGE("dequeueBuffer: error waiting for fence: %#x", eglGetError());
+ ALOGE("dequeueBuffer: error waiting for fence: %#x", eglGetError());
} else if (result == EGL_TIMEOUT_EXPIRED_KHR) {
- LOGE("dequeueBuffer: timeout waiting for fence");
+ ALOGE("dequeueBuffer: timeout waiting for fence");
}
eglDestroySyncKHR(dpy, fence);
}
@@ -802,7 +802,7 @@ status_t SurfaceTexture::updateTexImage() {
EGLSyncKHR fence = eglCreateSyncKHR(dpy, EGL_SYNC_FENCE_KHR,
NULL);
if (fence == EGL_NO_SYNC_KHR) {
- LOGE("updateTexImage: error creating fence: %#x",
+ ALOGE("updateTexImage: error creating fence: %#x",
eglGetError());
return -EINVAL;
}
diff --git a/libs/gui/SurfaceTextureClient.cpp b/libs/gui/SurfaceTextureClient.cpp
index c51f45a..5f01ae9 100644
--- a/libs/gui/SurfaceTextureClient.cpp
+++ b/libs/gui/SurfaceTextureClient.cpp
@@ -155,7 +155,7 @@ int SurfaceTextureClient::dequeueBuffer(android_native_buffer_t** buffer) {
if ((result & ISurfaceTexture::BUFFER_NEEDS_REALLOCATION) || gbuf == 0) {
result = mSurfaceTexture->requestBuffer(buf, &gbuf);
if (result != NO_ERROR) {
- LOGE("dequeueBuffer: ISurfaceTexture::requestBuffer failed: %d",
+ ALOGE("dequeueBuffer: ISurfaceTexture::requestBuffer failed: %d",
result);
return result;
}
@@ -200,7 +200,7 @@ int SurfaceTextureClient::getSlotFromBufferLocked(
return i;
}
}
- LOGE("getSlotFromBufferLocked: unknown buffer: %p", buffer->handle);
+ ALOGE("getSlotFromBufferLocked: unknown buffer: %p", buffer->handle);
return BAD_VALUE;
}
@@ -228,7 +228,7 @@ int SurfaceTextureClient::queueBuffer(android_native_buffer_t* buffer) {
status_t err = mSurfaceTexture->queueBuffer(i, timestamp,
&mDefaultWidth, &mDefaultHeight, &mTransformHint);
if (err != OK) {
- LOGE("queueBuffer: error queuing buffer to SurfaceTexture, %d", err);
+ ALOGE("queueBuffer: error queuing buffer to SurfaceTexture, %d", err);
}
return err;
}
@@ -450,7 +450,7 @@ int SurfaceTextureClient::setCrop(Rect const* rect)
}
status_t err = mSurfaceTexture->setCrop(*rect);
- LOGE_IF(err, "ISurfaceTexture::setCrop(...) returned %s", strerror(-err));
+ ALOGE_IF(err, "ISurfaceTexture::setCrop(...) returned %s", strerror(-err));
return err;
}
@@ -461,7 +461,7 @@ int SurfaceTextureClient::setBufferCount(int bufferCount)
Mutex::Autolock lock(mMutex);
status_t err = mSurfaceTexture->setBufferCount(bufferCount);
- LOGE_IF(err, "ISurfaceTexture::setBufferCount(%d) returned %s",
+ ALOGE_IF(err, "ISurfaceTexture::setBufferCount(%d) returned %s",
bufferCount, strerror(-err));
if (err == NO_ERROR) {
@@ -486,7 +486,7 @@ int SurfaceTextureClient::setBuffersDimensions(int w, int h)
mReqHeight = h;
status_t err = mSurfaceTexture->setCrop(Rect(0, 0));
- LOGE_IF(err, "ISurfaceTexture::setCrop(...) returned %s", strerror(-err));
+ ALOGE_IF(err, "ISurfaceTexture::setCrop(...) returned %s", strerror(-err));
return err;
}
@@ -510,7 +510,7 @@ int SurfaceTextureClient::setScalingMode(int mode)
Mutex::Autolock lock(mMutex);
// mode is validated on the server
status_t err = mSurfaceTexture->setScalingMode(mode);
- LOGE_IF(err, "ISurfaceTexture::setScalingMode(%d) returned %s",
+ ALOGE_IF(err, "ISurfaceTexture::setScalingMode(%d) returned %s",
mode, strerror(-err));
return err;
@@ -551,11 +551,11 @@ static status_t copyBlt(
status_t err;
uint8_t const * src_bits = NULL;
err = src->lock(GRALLOC_USAGE_SW_READ_OFTEN, reg.bounds(), (void**)&src_bits);
- LOGE_IF(err, "error locking src buffer %s", strerror(-err));
+ ALOGE_IF(err, "error locking src buffer %s", strerror(-err));
uint8_t* dst_bits = NULL;
err = dst->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, reg.bounds(), (void**)&dst_bits);
- LOGE_IF(err, "error locking dst buffer %s", strerror(-err));
+ ALOGE_IF(err, "error locking dst buffer %s", strerror(-err));
Region::const_iterator head(reg.begin());
Region::const_iterator tail(reg.end());
@@ -598,7 +598,7 @@ status_t SurfaceTextureClient::lock(
ANativeWindow_Buffer* outBuffer, ARect* inOutDirtyBounds)
{
if (mLockedBuffer != 0) {
- LOGE("Surface::lock failed, already locked");
+ ALOGE("Surface::lock failed, already locked");
return INVALID_OPERATION;
}
@@ -613,11 +613,11 @@ status_t SurfaceTextureClient::lock(
ANativeWindowBuffer* out;
status_t err = dequeueBuffer(&out);
- LOGE_IF(err, "dequeueBuffer failed (%s)", strerror(-err));
+ ALOGE_IF(err, "dequeueBuffer failed (%s)", strerror(-err));
if (err == NO_ERROR) {
sp<GraphicBuffer> backBuffer(GraphicBuffer::getSelf(out));
err = lockBuffer(backBuffer.get());
- LOGE_IF(err, "lockBuffer (handle=%p) failed (%s)",
+ ALOGE_IF(err, "lockBuffer (handle=%p) failed (%s)",
backBuffer->handle, strerror(-err));
if (err == NO_ERROR) {
const Rect bounds(backBuffer->width, backBuffer->height);
@@ -678,15 +678,15 @@ status_t SurfaceTextureClient::lock(
status_t SurfaceTextureClient::unlockAndPost()
{
if (mLockedBuffer == 0) {
- LOGE("Surface::unlockAndPost failed, no locked buffer");
+ ALOGE("Surface::unlockAndPost failed, no locked buffer");
return INVALID_OPERATION;
}
status_t err = mLockedBuffer->unlock();
- LOGE_IF(err, "failed unlocking buffer (%p)", mLockedBuffer->handle);
+ ALOGE_IF(err, "failed unlocking buffer (%p)", mLockedBuffer->handle);
err = queueBuffer(mLockedBuffer.get());
- LOGE_IF(err, "queueBuffer (handle=%p) failed (%s)",
+ ALOGE_IF(err, "queueBuffer (handle=%p) failed (%s)",
mLockedBuffer->handle, strerror(-err));
mPostedBuffer = mLockedBuffer;
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp
index 158f785..42e672b 100644
--- a/libs/hwui/FontRenderer.cpp
+++ b/libs/hwui/FontRenderer.cpp
@@ -126,7 +126,7 @@ void Font::drawCachedGlyph(CachedGlyphInfo* glyph, int x, int y,
for (cacheX = glyph->mStartX, bX = nPenX; cacheX < endX; cacheX++, bX++) {
for (cacheY = glyph->mStartY, bY = nPenY; cacheY < endY; cacheY++, bY++) {
if (bX < 0 || bY < 0 || bX >= (int32_t) bitmapW || bY >= (int32_t) bitmapH) {
- LOGE("Skipping invalid index");
+ ALOGE("Skipping invalid index");
continue;
}
uint8_t tempCol = cacheBuffer[cacheY * cacheWidth + cacheX];
@@ -168,7 +168,7 @@ void Font::render(SkPaint* paint, const char* text, uint32_t start, uint32_t len
void Font::measure(SkPaint* paint, const char* text, uint32_t start, uint32_t len,
int numGlyphs, Rect *bounds) {
if (bounds == NULL) {
- LOGE("No return rectangle provided to measure text");
+ ALOGE("No return rectangle provided to measure text");
return;
}
bounds->set(1e6, -1e6, -1e6, 1e6);
@@ -401,7 +401,7 @@ bool FontRenderer::cacheBitmap(const SkGlyph& glyph, uint32_t* retOriginX, uint3
initTextTexture(true);
}
if (glyph.fHeight + 2 > mCacheLines[mCacheLines.size() - 1]->mMaxHeight) {
- LOGE("Font size to large to fit in cache. width, height = %i, %i",
+ ALOGE("Font size to large to fit in cache. width, height = %i, %i",
(int) glyph.fWidth, (int) glyph.fHeight);
return false;
}
@@ -433,7 +433,7 @@ bool FontRenderer::cacheBitmap(const SkGlyph& glyph, uint32_t* retOriginX, uint3
// if we still don't fit, something is wrong and we shouldn't draw
if (!bitmapFit) {
- LOGE("Bitmap doesn't fit in cache. width, height = %i, %i",
+ ALOGE("Bitmap doesn't fit in cache. width, height = %i, %i",
(int) glyph.fWidth, (int) glyph.fHeight);
return false;
}
@@ -758,12 +758,12 @@ bool FontRenderer::renderText(SkPaint* paint, const Rect* clip, const char *text
checkInit();
if (!mCurrentFont) {
- LOGE("No font set");
+ ALOGE("No font set");
return false;
}
if (mPositionAttrSlot < 0 || mTexcoordAttrSlot < 0) {
- LOGE("Font renderer unable to draw, attribute slots undefined");
+ ALOGE("Font renderer unable to draw, attribute slots undefined");
return false;
}
diff --git a/libs/hwui/GradientCache.cpp b/libs/hwui/GradientCache.cpp
index aacf22a..27c2677 100644
--- a/libs/hwui/GradientCache.cpp
+++ b/libs/hwui/GradientCache.cpp
@@ -154,7 +154,7 @@ Texture* GradientCache::addLinearGradient(GradientCacheEntry& gradient,
void GradientCache::generateTexture(SkBitmap* bitmap, Texture* texture) {
SkAutoLockPixels autoLock(*bitmap);
if (!bitmap->readyToDraw()) {
- LOGE("Cannot generate texture from shader");
+ ALOGE("Cannot generate texture from shader");
return;
}
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index fb8664e..5089c5c 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -176,7 +176,7 @@ void OpenGLRenderer::finish() {
ALOGD("GL error from OpenGLRenderer: 0x%x", status);
switch (status) {
case GL_OUT_OF_MEMORY:
- LOGE(" OpenGLRenderer is out of memory!");
+ ALOGE(" OpenGLRenderer is out of memory!");
break;
}
}
@@ -539,7 +539,7 @@ bool OpenGLRenderer::createFboLayer(Layer* layer, Rect& bounds, sp<Snapshot> sna
#if DEBUG_LAYERS_AS_REGIONS
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
if (status != GL_FRAMEBUFFER_COMPLETE) {
- LOGE("Framebuffer incomplete (GL error code 0x%x)", status);
+ ALOGE("Framebuffer incomplete (GL error code 0x%x)", status);
glBindFramebuffer(GL_FRAMEBUFFER, previousFbo);
layer->deleteTexture();
@@ -571,7 +571,7 @@ bool OpenGLRenderer::createFboLayer(Layer* layer, Rect& bounds, sp<Snapshot> sna
*/
void OpenGLRenderer::composeLayer(sp<Snapshot> current, sp<Snapshot> previous) {
if (!current->layer) {
- LOGE("Attempting to compose a layer that does not exist");
+ ALOGE("Attempting to compose a layer that does not exist");
return;
}
diff --git a/libs/hwui/Program.cpp b/libs/hwui/Program.cpp
index 972dd87..043a092 100644
--- a/libs/hwui/Program.cpp
+++ b/libs/hwui/Program.cpp
@@ -42,13 +42,13 @@ Program::Program(const char* vertex, const char* fragment) {
GLint status;
glGetProgramiv(id, GL_LINK_STATUS, &status);
if (status != GL_TRUE) {
- LOGE("Error while linking shaders:");
+ ALOGE("Error while linking shaders:");
GLint infoLen = 0;
glGetProgramiv(id, GL_INFO_LOG_LENGTH, &infoLen);
if (infoLen > 1) {
GLchar log[infoLen];
glGetProgramInfoLog(id, infoLen, 0, &log[0]);
- LOGE("%s", log);
+ ALOGE("%s", log);
}
glDeleteShader(vertexShader);
glDeleteShader(fragmentShader);
@@ -115,7 +115,7 @@ GLuint Program::buildShader(const char* source, GLenum type) {
// use a fixed size instead
GLchar log[512];
glGetShaderInfoLog(shader, sizeof(log), 0, &log[0]);
- LOGE("Error while compiling shader: %s", log);
+ ALOGE("Error while compiling shader: %s", log);
glDeleteShader(shader);
return 0;
}
diff --git a/libs/hwui/ShapeCache.h b/libs/hwui/ShapeCache.h
index b019af3..c07a6c9 100644
--- a/libs/hwui/ShapeCache.h
+++ b/libs/hwui/ShapeCache.h
@@ -570,7 +570,7 @@ template<class Entry>
void ShapeCache<Entry>::generateTexture(SkBitmap& bitmap, Texture* texture) {
SkAutoLockPixels alp(bitmap);
if (!bitmap.readyToDraw()) {
- LOGE("Cannot generate texture from bitmap");
+ ALOGE("Cannot generate texture from bitmap");
return;
}
diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp
index 5b8854b..7a88f2a 100644
--- a/libs/hwui/TextureCache.cpp
+++ b/libs/hwui/TextureCache.cpp
@@ -201,7 +201,7 @@ void TextureCache::generateTexture(SkBitmap* bitmap, Texture* texture, bool rege
SkAutoLockPixels alp(*bitmap);
if (!bitmap->readyToDraw()) {
- LOGE("Cannot generate texture from bitmap");
+ ALOGE("Cannot generate texture from bitmap");
return;
}
diff --git a/libs/rs/driver/rsdAllocation.cpp b/libs/rs/driver/rsdAllocation.cpp
index e79cd0f..1f70e66 100644
--- a/libs/rs/driver/rsdAllocation.cpp
+++ b/libs/rs/driver/rsdAllocation.cpp
@@ -172,7 +172,7 @@ static void AllocateRenderTarget(const Context *rsc, const Allocation *alloc) {
if (!drv->renderTargetID) {
// This should generally not happen
- LOGE("allocateRenderTarget failed to gen mRenderTargetID");
+ ALOGE("allocateRenderTarget failed to gen mRenderTargetID");
rsc->dumpDebug();
return;
}
@@ -195,7 +195,7 @@ static void UploadToBufferObject(const Context *rsc, const Allocation *alloc) {
RSD_CALL_GL(glGenBuffers, 1, &drv->bufferID);
}
if (!drv->bufferID) {
- LOGE("Upload to buffer object failed");
+ ALOGE("Upload to buffer object failed");
drv->uploadDeferred = true;
return;
}
@@ -460,7 +460,7 @@ void rsdAllocationData2D_alloc_script(const android::renderscript::Context *rsc,
uint8_t *srcPtr = getOffsetPtr(srcAlloc, srcXoff, srcYoff + i, srcLod, srcFace);
memcpy(dstPtr, srcPtr, w * elementSize);
- //LOGE("COPIED dstXoff(%u), dstYoff(%u), dstLod(%u), dstFace(%u), w(%u), h(%u), srcXoff(%u), srcYoff(%u), srcLod(%u), srcFace(%u)",
+ //ALOGE("COPIED dstXoff(%u), dstYoff(%u), dstLod(%u), dstFace(%u), w(%u), h(%u), srcXoff(%u), srcYoff(%u), srcLod(%u), srcFace(%u)",
// dstXoff, dstYoff, dstLod, dstFace, w, h, srcXoff, srcYoff, srcLod, srcFace);
}
}
diff --git a/libs/rs/driver/rsdBcc.cpp b/libs/rs/driver/rsdBcc.cpp
index c16091c..a36bae9 100644
--- a/libs/rs/driver/rsdBcc.cpp
+++ b/libs/rs/driver/rsdBcc.cpp
@@ -69,7 +69,7 @@ bool rsdScriptInit(const Context *rsc,
uint8_t const *bitcode,
size_t bitcodeSize,
uint32_t flags) {
- //LOGE("rsdScriptCreate %p %p %p %p %i %i %p", rsc, resName, cacheDir, bitcode, bitcodeSize, flags, lookupFunc);
+ //ALOGE("rsdScriptCreate %p %p %p %p %i %i %p", rsc, resName, cacheDir, bitcode, bitcodeSize, flags, lookupFunc);
pthread_mutex_lock(&rsdgInitMutex);
char *cachePath = NULL;
@@ -93,14 +93,14 @@ bool rsdScriptInit(const Context *rsc,
drv->ME = new bcinfo::MetadataExtractor((const char*)drv->mScriptText,
drv->mScriptTextLength);
if (!drv->ME->extract()) {
- LOGE("bcinfo: failed to read script metadata");
+ ALOGE("bcinfo: failed to read script metadata");
goto error;
}
- //LOGE("mBccScript %p", script->mBccScript);
+ //ALOGE("mBccScript %p", script->mBccScript);
if (bccRegisterSymbolCallback(drv->mBccScript, &rsdLookupRuntimeStub, script) != 0) {
- LOGE("bcc: FAILS to register symbol callback");
+ ALOGE("bcc: FAILS to register symbol callback");
goto error;
}
@@ -108,17 +108,17 @@ bool rsdScriptInit(const Context *rsc,
resName,
(char const *)drv->mScriptText,
drv->mScriptTextLength, 0) != 0) {
- LOGE("bcc: FAILS to read bitcode");
+ ALOGE("bcc: FAILS to read bitcode");
goto error;
}
if (bccLinkFile(drv->mBccScript, "/system/lib/libclcore.bc", 0) != 0) {
- LOGE("bcc: FAILS to link bitcode");
+ ALOGE("bcc: FAILS to link bitcode");
goto error;
}
if (bccPrepareExecutable(drv->mBccScript, cacheDir, resName, 0) != 0) {
- LOGE("bcc: FAILS to prepare executable");
+ ALOGE("bcc: FAILS to prepare executable");
goto error;
}
@@ -236,8 +236,8 @@ static void wc_xy(void *usr, uint32_t idx) {
return;
}
- //LOGE("usr idx %i, x %i,%i y %i,%i", idx, mtls->xStart, mtls->xEnd, yStart, yEnd);
- //LOGE("usr ptr in %p, out %p", mtls->ptrIn, mtls->ptrOut);
+ //ALOGE("usr idx %i, x %i,%i y %i,%i", idx, mtls->xStart, mtls->xEnd, yStart, yEnd);
+ //ALOGE("usr ptr in %p, out %p", mtls->ptrIn, mtls->ptrOut);
for (p.y = yStart; p.y < yEnd; p.y++) {
uint32_t offset = mtls->dimX * p.y;
p.out = mtls->ptrOut + (mtls->eStrideOut * offset);
@@ -267,8 +267,8 @@ static void wc_x(void *usr, uint32_t idx) {
return;
}
- //LOGE("usr slice %i idx %i, x %i,%i", slice, idx, xStart, xEnd);
- //LOGE("usr ptr in %p, out %p", mtls->ptrIn, mtls->ptrOut);
+ //ALOGE("usr slice %i idx %i, x %i,%i", slice, idx, xStart, xEnd);
+ //ALOGE("usr ptr in %p, out %p", mtls->ptrIn, mtls->ptrOut);
p.out = mtls->ptrOut + (mtls->eStrideOut * xStart);
p.in = mtls->ptrIn + (mtls->eStrideIn * xStart);
@@ -374,7 +374,7 @@ void rsdScriptInvokeForEach(const Context *rsc,
rsdLaunchThreads(mrsc, wc_x, &mtls);
}
- //LOGE("launch 1");
+ //ALOGE("launch 1");
} else {
RsForEachStubParamStruct p;
memset(&p, 0, sizeof(p));
@@ -382,7 +382,7 @@ void rsdScriptInvokeForEach(const Context *rsc,
p.usr_len = mtls.usrLen;
uint32_t sig = mtls.sig;
- //LOGE("launch 3");
+ //ALOGE("launch 3");
outer_foreach_t fn = dc->mForEachLaunch[sig];
for (p.ar[0] = mtls.arrayStart; p.ar[0] < mtls.arrayEnd; p.ar[0]++) {
for (p.z = mtls.zStart; p.z < mtls.zEnd; p.z++) {
@@ -434,7 +434,7 @@ void rsdScriptInvokeFunction(const Context *dc, Script *script,
const void *params,
size_t paramLength) {
DrvScript *drv = (DrvScript *)script->mHal.drv;
- //LOGE("invoke %p %p %i %p %i", dc, script, slot, params, paramLength);
+ //ALOGE("invoke %p %p %i %p %i", dc, script, slot, params, paramLength);
Script * oldTLS = setTLS(script);
((void (*)(const void *, uint32_t))
@@ -446,7 +446,7 @@ void rsdScriptSetGlobalVar(const Context *dc, const Script *script,
uint32_t slot, void *data, size_t dataLength) {
DrvScript *drv = (DrvScript *)script->mHal.drv;
//rsAssert(!script->mFieldIsObject[slot]);
- //LOGE("setGlobalVar %p %p %i %p %i", dc, script, slot, data, dataLength);
+ //ALOGE("setGlobalVar %p %p %i %p %i", dc, script, slot, data, dataLength);
int32_t *destPtr = ((int32_t **)drv->mFieldAddress)[slot];
if (!destPtr) {
@@ -460,7 +460,7 @@ void rsdScriptSetGlobalVar(const Context *dc, const Script *script,
void rsdScriptSetGlobalBind(const Context *dc, const Script *script, uint32_t slot, void *data) {
DrvScript *drv = (DrvScript *)script->mHal.drv;
//rsAssert(!script->mFieldIsObject[slot]);
- //LOGE("setGlobalBind %p %p %i %p", dc, script, slot, data);
+ //ALOGE("setGlobalBind %p %p %i %p", dc, script, slot, data);
int32_t *destPtr = ((int32_t **)drv->mFieldAddress)[slot];
if (!destPtr) {
@@ -474,7 +474,7 @@ void rsdScriptSetGlobalBind(const Context *dc, const Script *script, uint32_t sl
void rsdScriptSetGlobalObj(const Context *dc, const Script *script, uint32_t slot, ObjectBase *data) {
DrvScript *drv = (DrvScript *)script->mHal.drv;
//rsAssert(script->mFieldIsObject[slot]);
- //LOGE("setGlobalObj %p %p %i %p", dc, script, slot, data);
+ //ALOGE("setGlobalObj %p %p %i %p", dc, script, slot, data);
int32_t *destPtr = ((int32_t **)drv->mFieldAddress)[slot];
if (!destPtr) {
diff --git a/libs/rs/driver/rsdCore.cpp b/libs/rs/driver/rsdCore.cpp
index 9292fa1..b514e21 100644
--- a/libs/rs/driver/rsdCore.cpp
+++ b/libs/rs/driver/rsdCore.cpp
@@ -146,7 +146,7 @@ static void * HelperThreadProc(void *vrsc) {
int status = pthread_setspecific(rsdgThreadTLSKey, &dc->mTlsStruct);
if (status) {
- LOGE("pthread_setspecific %i", status);
+ ALOGE("pthread_setspecific %i", status);
}
#if 0
@@ -156,7 +156,7 @@ static void * HelperThreadProc(void *vrsc) {
cpuset.bits[idx / 64] |= 1ULL << (idx % 64);
int ret = syscall(241, rsc->mWorkers.mNativeThreadId[idx],
sizeof(cpuset), &cpuset);
- LOGE("SETAFFINITY ret = %i %s", ret, EGLUtils::strerror(ret));
+ ALOGE("SETAFFINITY ret = %i %s", ret, EGLUtils::strerror(ret));
#endif
while (!dc->mExit) {
@@ -191,7 +191,7 @@ bool rsdHalInit(Context *rsc, uint32_t version_major, uint32_t version_minor) {
RsdHal *dc = (RsdHal *)calloc(1, sizeof(RsdHal));
if (!dc) {
- LOGE("Calloc for driver hal failed.");
+ ALOGE("Calloc for driver hal failed.");
return false;
}
rsc->mHal.drv = dc;
@@ -200,7 +200,7 @@ bool rsdHalInit(Context *rsc, uint32_t version_major, uint32_t version_minor) {
if (!rsdgThreadTLSKeyCount) {
int status = pthread_key_create(&rsdgThreadTLSKey, NULL);
if (status) {
- LOGE("Failed to init thread tls key.");
+ ALOGE("Failed to init thread tls key.");
pthread_mutex_unlock(&rsdgInitMutex);
return false;
}
@@ -214,7 +214,7 @@ bool rsdHalInit(Context *rsc, uint32_t version_major, uint32_t version_minor) {
dc->mTlsStruct.mScript = NULL;
int status = pthread_setspecific(rsdgThreadTLSKey, &dc->mTlsStruct);
if (status) {
- LOGE("pthread_setspecific %i", status);
+ ALOGE("pthread_setspecific %i", status);
}
@@ -236,7 +236,7 @@ bool rsdHalInit(Context *rsc, uint32_t version_major, uint32_t version_minor) {
pthread_attr_t threadAttr;
status = pthread_attr_init(&threadAttr);
if (status) {
- LOGE("Failed to init thread attribute.");
+ ALOGE("Failed to init thread attribute.");
return false;
}
@@ -244,7 +244,7 @@ bool rsdHalInit(Context *rsc, uint32_t version_major, uint32_t version_minor) {
status = pthread_create(&dc->mWorkers.mThreadId[ct], &threadAttr, HelperThreadProc, rsc);
if (status) {
dc->mWorkers.mCount = ct;
- LOGE("Created fewer than expected number of RS threads.");
+ ALOGE("Created fewer than expected number of RS threads.");
break;
}
}
diff --git a/libs/rs/driver/rsdGL.cpp b/libs/rs/driver/rsdGL.cpp
index d4deefb..b53a68c 100644
--- a/libs/rs/driver/rsdGL.cpp
+++ b/libs/rs/driver/rsdGL.cpp
@@ -107,14 +107,14 @@ static void printEGLConfiguration(EGLDisplay dpy, EGLConfig config) {
}
static void DumpDebug(RsdHal *dc) {
- LOGE(" EGL ver %i %i", dc->gl.egl.majorVersion, dc->gl.egl.minorVersion);
- LOGE(" EGL context %p surface %p, Display=%p", dc->gl.egl.context, dc->gl.egl.surface,
+ ALOGE(" EGL ver %i %i", dc->gl.egl.majorVersion, dc->gl.egl.minorVersion);
+ ALOGE(" EGL context %p surface %p, Display=%p", dc->gl.egl.context, dc->gl.egl.surface,
dc->gl.egl.display);
- LOGE(" GL vendor: %s", dc->gl.gl.vendor);
- LOGE(" GL renderer: %s", dc->gl.gl.renderer);
- LOGE(" GL Version: %s", dc->gl.gl.version);
- LOGE(" GL Extensions: %s", dc->gl.gl.extensions);
- LOGE(" GL int Versions %i %i", dc->gl.gl.majorVersion, dc->gl.gl.minorVersion);
+ ALOGE(" GL vendor: %s", dc->gl.gl.vendor);
+ ALOGE(" GL renderer: %s", dc->gl.gl.renderer);
+ ALOGE(" GL Version: %s", dc->gl.gl.version);
+ ALOGE(" GL Extensions: %s", dc->gl.gl.extensions);
+ ALOGE(" GL int Versions %i %i", dc->gl.gl.majorVersion, dc->gl.gl.minorVersion);
ALOGV("MAX Textures %i, %i %i", dc->gl.gl.maxVertexTextureUnits,
dc->gl.gl.maxFragmentTextureImageUnits, dc->gl.gl.maxTextureImageUnits);
@@ -223,7 +223,7 @@ bool rsdGLInit(const Context *rsc) {
configAttribs, configs, numConfigs, &n);
if (!ret || !n) {
checkEglError("eglChooseConfig", ret);
- LOGE("%p, couldn't find an EGLConfig matching the screen format\n", rsc);
+ ALOGE("%p, couldn't find an EGLConfig matching the screen format\n", rsc);
}
// The first config is guaranteed to over-satisfy the constraints
@@ -268,7 +268,7 @@ bool rsdGLInit(const Context *rsc) {
EGL_NO_CONTEXT, context_attribs2);
checkEglError("eglCreateContext");
if (dc->gl.egl.context == EGL_NO_CONTEXT) {
- LOGE("%p, eglCreateContext returned EGL_NO_CONTEXT", rsc);
+ ALOGE("%p, eglCreateContext returned EGL_NO_CONTEXT", rsc);
rsc->setWatchdogGL(NULL, 0, NULL);
return false;
}
@@ -281,7 +281,7 @@ bool rsdGLInit(const Context *rsc) {
pbuffer_attribs);
checkEglError("eglCreatePbufferSurface");
if (dc->gl.egl.surfaceDefault == EGL_NO_SURFACE) {
- LOGE("eglCreatePbufferSurface returned EGL_NO_SURFACE");
+ ALOGE("eglCreatePbufferSurface returned EGL_NO_SURFACE");
rsdGLShutdown(rsc);
rsc->setWatchdogGL(NULL, 0, NULL);
return false;
@@ -291,7 +291,7 @@ bool rsdGLInit(const Context *rsc) {
ret = eglMakeCurrent(dc->gl.egl.display, dc->gl.egl.surfaceDefault,
dc->gl.egl.surfaceDefault, dc->gl.egl.context);
if (ret == EGL_FALSE) {
- LOGE("eglMakeCurrent returned EGL_FALSE");
+ ALOGE("eglMakeCurrent returned EGL_FALSE");
checkEglError("eglMakeCurrent", ret);
rsdGLShutdown(rsc);
rsc->setWatchdogGL(NULL, 0, NULL);
@@ -320,7 +320,7 @@ bool rsdGLInit(const Context *rsc) {
}
if (!verptr) {
- LOGE("Error, OpenGL ES Lite not supported");
+ ALOGE("Error, OpenGL ES Lite not supported");
rsdGLShutdown(rsc);
rsc->setWatchdogGL(NULL, 0, NULL);
return false;
@@ -402,7 +402,7 @@ bool rsdGLSetSurface(const Context *rsc, uint32_t w, uint32_t h, RsNativeWindow
dc->gl.wndSurface, NULL);
checkEglError("eglCreateWindowSurface");
if (dc->gl.egl.surface == EGL_NO_SURFACE) {
- LOGE("eglCreateWindowSurface returned EGL_NO_SURFACE");
+ ALOGE("eglCreateWindowSurface returned EGL_NO_SURFACE");
}
rsc->setWatchdogGL("eglMakeCurrent", __LINE__, __FILE__);
@@ -439,7 +439,7 @@ void rsdGLCheckError(const android::renderscript::Context *rsc,
}
}
- LOGE("%p, %s", rsc, buf);
+ ALOGE("%p, %s", rsc, buf);
}
}
diff --git a/libs/rs/driver/rsdMeshObj.cpp b/libs/rs/driver/rsdMeshObj.cpp
index 24a7183..99d79dc 100644
--- a/libs/rs/driver/rsdMeshObj.cpp
+++ b/libs/rs/driver/rsdMeshObj.cpp
@@ -133,7 +133,7 @@ bool RsdMeshObj::init() {
void RsdMeshObj::renderPrimitiveRange(const Context *rsc, uint32_t primIndex,
uint32_t start, uint32_t len) const {
if (len < 1 || primIndex >= mRSMesh->mHal.state.primitivesCount || mAttribCount == 0) {
- LOGE("Invalid mesh or parameters");
+ ALOGE("Invalid mesh or parameters");
return;
}
diff --git a/libs/rs/driver/rsdProgramStore.cpp b/libs/rs/driver/rsdProgramStore.cpp
index af44b02..fca9ba9 100644
--- a/libs/rs/driver/rsdProgramStore.cpp
+++ b/libs/rs/driver/rsdProgramStore.cpp
@@ -70,7 +70,7 @@ bool rsdProgramStoreInit(const Context *rsc, const ProgramStore *ps) {
drv->depthFunc = GL_NOTEQUAL;
break;
default:
- LOGE("Unknown depth function.");
+ ALOGE("Unknown depth function.");
goto error;
}
@@ -111,7 +111,7 @@ bool rsdProgramStoreInit(const Context *rsc, const ProgramStore *ps) {
drv->blendSrc = GL_SRC_ALPHA_SATURATE;
break;
default:
- LOGE("Unknown blend src mode.");
+ ALOGE("Unknown blend src mode.");
goto error;
}
@@ -141,7 +141,7 @@ bool rsdProgramStoreInit(const Context *rsc, const ProgramStore *ps) {
drv->blendDst = GL_ONE_MINUS_DST_ALPHA;
break;
default:
- LOGE("Unknown blend dst mode.");
+ ALOGE("Unknown blend dst mode.");
goto error;
}
diff --git a/libs/rs/driver/rsdRuntimeMath.cpp b/libs/rs/driver/rsdRuntimeMath.cpp
index d29da7e..4c300b7 100644
--- a/libs/rs/driver/rsdRuntimeMath.cpp
+++ b/libs/rs/driver/rsdRuntimeMath.cpp
@@ -120,7 +120,7 @@ static float SC_min_f32(float v, float v2) {
}
static float SC_mix_f32(float start, float stop, float amount) {
- //LOGE("lerpf %f %f %f", start, stop, amount);
+ //ALOGE("lerpf %f %f %f", start, stop, amount);
return start + (stop - start) * amount;
}
diff --git a/libs/rs/driver/rsdRuntimeStubs.cpp b/libs/rs/driver/rsdRuntimeStubs.cpp
index b457d8b..14c2970 100644
--- a/libs/rs/driver/rsdRuntimeStubs.cpp
+++ b/libs/rs/driver/rsdRuntimeStubs.cpp
@@ -686,7 +686,7 @@ void* rsdLookupRuntimeStub(void* pContext, char const* name) {
s->mHal.info.isThreadable &= sym->threadable;
return sym->mPtr;
}
- LOGE("ScriptC sym lookup failed for %s", name);
+ ALOGE("ScriptC sym lookup failed for %s", name);
return NULL;
}
diff --git a/libs/rs/driver/rsdShader.cpp b/libs/rs/driver/rsdShader.cpp
index e9ce7c2..a10deb4 100644
--- a/libs/rs/driver/rsdShader.cpp
+++ b/libs/rs/driver/rsdShader.cpp
@@ -190,7 +190,7 @@ bool RsdShader::loadShader(const Context *rsc) {
char* buf = (char*) malloc(infoLen);
if (buf) {
RSD_CALL_GL(glGetShaderInfoLog, mShaderID, infoLen, NULL, buf);
- LOGE("Could not compile shader \n%s\n", buf);
+ ALOGE("Could not compile shader \n%s\n", buf);
free(buf);
}
RSD_CALL_GL(glDeleteShader, mShaderID);
@@ -287,9 +287,9 @@ void RsdShader::logUniform(const Element *field, const float *fd, uint32_t array
rsAssert(0);
}
}
- LOGE("Element size %u data=%p", elementSize, fd);
+ ALOGE("Element size %u data=%p", elementSize, fd);
fd += elementSize;
- LOGE("New data=%p", fd);
+ ALOGE("New data=%p", fd);
}
}
@@ -404,7 +404,7 @@ void RsdShader::setupTextures(const Context *rsc, RsdShaderCache *sc) {
uint32_t numTexturesToBind = mRSProgram->mHal.state.texturesCount;
uint32_t numTexturesAvailable = dc->gl.gl.maxFragmentTextureImageUnits;
if (numTexturesToBind >= numTexturesAvailable) {
- LOGE("Attempting to bind %u textures on shader id %u, but only %u are available",
+ ALOGE("Attempting to bind %u textures on shader id %u, but only %u are available",
mRSProgram->mHal.state.texturesCount, (uint32_t)this, numTexturesAvailable);
rsc->setError(RS_ERROR_BAD_SHADER, "Cannot bind more textuers than available");
numTexturesToBind = numTexturesAvailable;
@@ -422,7 +422,7 @@ void RsdShader::setupTextures(const Context *rsc, RsdShaderCache *sc) {
DrvAllocation *drvTex = (DrvAllocation *)mRSProgram->mHal.state.textures[ct]->mHal.drv;
if (drvTex->glTarget != GL_TEXTURE_2D && drvTex->glTarget != GL_TEXTURE_CUBE_MAP) {
- LOGE("Attempting to bind unknown texture to shader id %u, texture unit %u", (uint)this, ct);
+ ALOGE("Attempting to bind unknown texture to shader id %u, texture unit %u", (uint)this, ct);
rsc->setError(RS_ERROR_BAD_SHADER, "Non-texture allocation bound to a shader");
}
RSD_CALL_GL(glBindTexture, drvTex->glTarget, drvTex->textureID);
@@ -450,7 +450,7 @@ void RsdShader::setupUserConstants(const Context *rsc, RsdShaderCache *sc, bool
for (uint32_t ct=0; ct < mRSProgram->mHal.state.constantsCount; ct++) {
Allocation *alloc = mRSProgram->mHal.state.constants[ct];
if (!alloc) {
- LOGE("Attempting to set constants on shader id %u, but alloc at slot %u is not set",
+ ALOGE("Attempting to set constants on shader id %u, but alloc at slot %u is not set",
(uint32_t)this, ct);
rsc->setError(RS_ERROR_BAD_SHADER, "No constant allocation bound");
continue;
diff --git a/libs/rs/driver/rsdShaderCache.cpp b/libs/rs/driver/rsdShaderCache.cpp
index 2871a12..f6236e7 100644
--- a/libs/rs/driver/rsdShaderCache.cpp
+++ b/libs/rs/driver/rsdShaderCache.cpp
@@ -135,7 +135,7 @@ bool RsdShaderCache::link(const Context *rsc) {
}
//ALOGV("RsdShaderCache miss");
- //LOGE("e0 %x", glGetError());
+ //ALOGE("e0 %x", glGetError());
ProgramEntry *e = new ProgramEntry(vtx->getAttribCount(),
vtx->getUniformCount(),
frag->getUniformCount());
@@ -147,7 +147,7 @@ bool RsdShaderCache::link(const Context *rsc) {
if (e->program) {
GLuint pgm = e->program;
glAttachShader(pgm, vtx->getShaderID());
- //LOGE("e1 %x", glGetError());
+ //ALOGE("e1 %x", glGetError());
glAttachShader(pgm, frag->getShaderID());
glBindAttribLocation(pgm, 0, "ATTRIB_position");
@@ -155,9 +155,9 @@ bool RsdShaderCache::link(const Context *rsc) {
glBindAttribLocation(pgm, 2, "ATTRIB_normal");
glBindAttribLocation(pgm, 3, "ATTRIB_texture0");
- //LOGE("e2 %x", glGetError());
+ //ALOGE("e2 %x", glGetError());
glLinkProgram(pgm);
- //LOGE("e3 %x", glGetError());
+ //ALOGE("e3 %x", glGetError());
GLint linkStatus = GL_FALSE;
glGetProgramiv(pgm, GL_LINK_STATUS, &linkStatus);
if (linkStatus != GL_TRUE) {
@@ -167,7 +167,7 @@ bool RsdShaderCache::link(const Context *rsc) {
char* buf = (char*) malloc(bufLength);
if (buf) {
glGetProgramInfoLog(pgm, bufLength, NULL, buf);
- LOGE("Could not link program:\n%s\n", buf);
+ ALOGE("Could not link program:\n%s\n", buf);
free(buf);
}
}
@@ -205,7 +205,7 @@ bool RsdShaderCache::link(const Context *rsc) {
glGetActiveUniform(pgm, ct, maxNameLength, &uniformList[ct]->writtenLength,
&uniformList[ct]->arraySize, &uniformList[ct]->type,
uniformList[ct]->name);
- //LOGE("GL UNI idx=%u, arraySize=%u, name=%s", ct,
+ //ALOGE("GL UNI idx=%u, arraySize=%u, name=%s", ct,
// uniformList[ct]->arraySize, uniformList[ct]->name);
}
}
diff --git a/libs/rs/rsAdapter.cpp b/libs/rs/rsAdapter.cpp
index 6e8ca70..177fb60 100644
--- a/libs/rs/rsAdapter.cpp
+++ b/libs/rs/rsAdapter.cpp
@@ -140,7 +140,7 @@ void * Adapter2D::getElement(uint32_t x, uint32_t y) const {
rsAssert(mAllocation->getPtr());
rsAssert(mAllocation->getType());
if (mFace != 0 && !mAllocation->getType()->getDimFaces()) {
- LOGE("Adapter wants cubemap face, but allocation has none");
+ ALOGE("Adapter wants cubemap face, but allocation has none");
return NULL;
}
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index 35d812d..7b92b39 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -75,7 +75,7 @@ void Allocation::data(Context *rsc, uint32_t xoff, uint32_t lod,
const uint32_t eSize = mHal.state.type->getElementSizeBytes();
if ((count * eSize) != sizeBytes) {
- LOGE("Allocation::subData called with mismatched size expected %i, got %i",
+ ALOGE("Allocation::subData called with mismatched size expected %i, got %i",
(count * eSize), sizeBytes);
mHal.state.type->dumpLOGV("type info");
return;
@@ -90,10 +90,10 @@ void Allocation::data(Context *rsc, uint32_t xoff, uint32_t yoff, uint32_t lod,
const uint32_t eSize = mHal.state.elementSizeBytes;
const uint32_t lineSize = eSize * w;
- //LOGE("data2d %p, %i %i %i %i %i %i %p %i", this, xoff, yoff, lod, face, w, h, data, sizeBytes);
+ //ALOGE("data2d %p, %i %i %i %i %i %i %p %i", this, xoff, yoff, lod, face, w, h, data, sizeBytes);
if ((lineSize * h) != sizeBytes) {
- LOGE("Allocation size mismatch, expected %i, got %i", (lineSize * h), sizeBytes);
+ ALOGE("Allocation size mismatch, expected %i, got %i", (lineSize * h), sizeBytes);
rsAssert(!"Allocation::subData called with mismatched size");
return;
}
@@ -112,20 +112,20 @@ void Allocation::elementData(Context *rsc, uint32_t x, const void *data,
uint32_t eSize = mHal.state.elementSizeBytes;
if (cIdx >= mHal.state.type->getElement()->getFieldCount()) {
- LOGE("Error Allocation::subElementData component %i out of range.", cIdx);
+ ALOGE("Error Allocation::subElementData component %i out of range.", cIdx);
rsc->setError(RS_ERROR_BAD_VALUE, "subElementData component out of range.");
return;
}
if (x >= mHal.state.dimensionX) {
- LOGE("Error Allocation::subElementData X offset %i out of range.", x);
+ ALOGE("Error Allocation::subElementData X offset %i out of range.", x);
rsc->setError(RS_ERROR_BAD_VALUE, "subElementData X offset out of range.");
return;
}
const Element * e = mHal.state.type->getElement()->getField(cIdx);
if (sizeBytes != e->getSizeBytes()) {
- LOGE("Error Allocation::subElementData data size %i does not match field size %zu.", sizeBytes, e->getSizeBytes());
+ ALOGE("Error Allocation::subElementData data size %i does not match field size %zu.", sizeBytes, e->getSizeBytes());
rsc->setError(RS_ERROR_BAD_VALUE, "subElementData bad size.");
return;
}
@@ -139,19 +139,19 @@ void Allocation::elementData(Context *rsc, uint32_t x, uint32_t y,
uint32_t eSize = mHal.state.elementSizeBytes;
if (x >= mHal.state.dimensionX) {
- LOGE("Error Allocation::subElementData X offset %i out of range.", x);
+ ALOGE("Error Allocation::subElementData X offset %i out of range.", x);
rsc->setError(RS_ERROR_BAD_VALUE, "subElementData X offset out of range.");
return;
}
if (y >= mHal.state.dimensionY) {
- LOGE("Error Allocation::subElementData X offset %i out of range.", x);
+ ALOGE("Error Allocation::subElementData X offset %i out of range.", x);
rsc->setError(RS_ERROR_BAD_VALUE, "subElementData X offset out of range.");
return;
}
if (cIdx >= mHal.state.type->getElement()->getFieldCount()) {
- LOGE("Error Allocation::subElementData component %i out of range.", cIdx);
+ ALOGE("Error Allocation::subElementData component %i out of range.", cIdx);
rsc->setError(RS_ERROR_BAD_VALUE, "subElementData component out of range.");
return;
}
@@ -159,7 +159,7 @@ void Allocation::elementData(Context *rsc, uint32_t x, uint32_t y,
const Element * e = mHal.state.type->getElement()->getField(cIdx);
if (sizeBytes != e->getSizeBytes()) {
- LOGE("Error Allocation::subElementData data size %i does not match field size %zu.", sizeBytes, e->getSizeBytes());
+ ALOGE("Error Allocation::subElementData data size %i does not match field size %zu.", sizeBytes, e->getSizeBytes());
rsc->setError(RS_ERROR_BAD_VALUE, "subElementData bad size.");
return;
}
@@ -217,7 +217,7 @@ Allocation *Allocation::createFromStream(Context *rsc, IStream *stream) {
// First make sure we are reading the correct object
RsA3DClassID classID = (RsA3DClassID)stream->loadU32();
if (classID != RS_A3D_CLASS_ID_ALLOCATION) {
- LOGE("allocation loading skipped due to invalid class id\n");
+ ALOGE("allocation loading skipped due to invalid class id\n");
return NULL;
}
@@ -233,7 +233,7 @@ Allocation *Allocation::createFromStream(Context *rsc, IStream *stream) {
// Number of bytes we wrote out for this allocation
uint32_t dataSize = stream->loadU32();
if (dataSize != type->getSizeBytes()) {
- LOGE("failed to read allocation because numbytes written is not the same loaded type wants\n");
+ ALOGE("failed to read allocation because numbytes written is not the same loaded type wants\n");
ObjectBase::checkDelete(type);
return NULL;
}
@@ -319,7 +319,7 @@ void Allocation::resize1D(Context *rsc, uint32_t dimX) {
}
void Allocation::resize2D(Context *rsc, uint32_t dimX, uint32_t dimY) {
- LOGE("not implemented");
+ ALOGE("not implemented");
}
/////////////////
@@ -497,7 +497,7 @@ RsAllocation rsi_AllocationCreateFromBitmap(Context *rsc, RsType vtype,
RsAllocation vTexAlloc = rsi_AllocationCreateTyped(rsc, vtype, mips, usages);
Allocation *texAlloc = static_cast<Allocation *>(vTexAlloc);
if (texAlloc == NULL) {
- LOGE("Memory allocation failure");
+ ALOGE("Memory allocation failure");
return NULL;
}
@@ -521,7 +521,7 @@ RsAllocation rsi_AllocationCubeCreateFromBitmap(Context *rsc, RsType vtype,
RsAllocation vTexAlloc = rsi_AllocationCreateTyped(rsc, vtype, mips, usages);
Allocation *texAlloc = static_cast<Allocation *>(vTexAlloc);
if (texAlloc == NULL) {
- LOGE("Memory allocation failure");
+ ALOGE("Memory allocation failure");
return NULL;
}
diff --git a/libs/rs/rsAnimation.cpp b/libs/rs/rsAnimation.cpp
index 48b4f02..a4093d9 100644
--- a/libs/rs/rsAnimation.cpp
+++ b/libs/rs/rsAnimation.cpp
@@ -126,7 +126,7 @@ RsAnimation rsi_AnimationCreate(Context *rsc,
RsAnimationInterpolation interp,
RsAnimationEdge pre,
RsAnimationEdge post) {
- //LOGE("rsi_ElementCreate %i %i %i %i", dt, dk, norm, vecSize);
+ //ALOGE("rsi_ElementCreate %i %i %i %i", dt, dk, norm, vecSize);
Animation *a = NULL;//Animation::create(rsc, inValues, outValues, valueCount, interp, pre, post);
if (a != NULL) {
a->incUserRef();
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index f8213a1..54fe529 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -40,7 +40,7 @@ bool Context::initGLThread() {
if (!mHal.funcs.initGraphics(this)) {
pthread_mutex_unlock(&gInitMutex);
- LOGE("%p initGraphics failed", this);
+ ALOGE("%p initGraphics failed", this);
return false;
}
@@ -219,7 +219,7 @@ void * Context::threadProc(void *vrsc) {
if (!rsdHalInit(rsc, 0, 0)) {
rsc->setError(RS_ERROR_FATAL_DRIVER, "Failed initializing GL");
- LOGE("Hal init failed");
+ ALOGE("Hal init failed");
return NULL;
}
rsc->mHal.funcs.setPriority(rsc, rsc->mThreadPriority);
@@ -322,10 +322,10 @@ void Context::destroyWorkerThreadResources() {
void Context::printWatchdogInfo(void *ctx) {
Context *rsc = (Context *)ctx;
if (rsc->watchdog.command && rsc->watchdog.file) {
- LOGE("RS watchdog timeout: %i %s line %i %s", rsc->watchdog.inRoot,
+ ALOGE("RS watchdog timeout: %i %s line %i %s", rsc->watchdog.inRoot,
rsc->watchdog.command, rsc->watchdog.line, rsc->watchdog.file);
} else {
- LOGE("RS watchdog timeout: %i", rsc->watchdog.inRoot);
+ ALOGE("RS watchdog timeout: %i", rsc->watchdog.inRoot);
}
}
@@ -403,7 +403,7 @@ bool Context::initContext(Device *dev, const RsSurfaceConfig *sc) {
status = pthread_attr_init(&threadAttr);
if (status) {
- LOGE("Failed to init thread attribute.");
+ ALOGE("Failed to init thread attribute.");
return false;
}
@@ -414,7 +414,7 @@ bool Context::initContext(Device *dev, const RsSurfaceConfig *sc) {
status = pthread_create(&mThreadId, &threadAttr, threadProc, this);
if (status) {
- LOGE("Failed to start rs context thread.");
+ ALOGE("Failed to start rs context thread.");
return false;
}
while (!mRunning && (mError == RS_ERROR_NONE)) {
@@ -422,7 +422,7 @@ bool Context::initContext(Device *dev, const RsSurfaceConfig *sc) {
}
if (mError != RS_ERROR_NONE) {
- LOGE("Errors during thread init");
+ ALOGE("Errors during thread init");
return false;
}
@@ -578,12 +578,12 @@ void Context::setError(RsError e, const char *msg) const {
void Context::dumpDebug() const {
- LOGE("RS Context debug %p", this);
- LOGE("RS Context debug");
+ ALOGE("RS Context debug %p", this);
+ ALOGE("RS Context debug");
- LOGE(" RS width %i, height %i", mWidth, mHeight);
- LOGE(" RS running %i, exit %i, paused %i", mRunning, mExit, mPaused);
- LOGE(" RS pThreadID %li, nativeThreadID %i", (long int)mThreadId, mNativeThreadId);
+ ALOGE(" RS width %i, height %i", mWidth, mHeight);
+ ALOGE(" RS running %i, exit %i, paused %i", mRunning, mExit, mPaused);
+ ALOGE(" RS pThreadID %li, nativeThreadID %i", (long int)mThreadId, mNativeThreadId);
}
///////////////////////////////////////////////////////////////////////////////////////////
@@ -604,7 +604,7 @@ void rsi_ContextBindSampler(Context *rsc, uint32_t slot, RsSampler vs) {
Sampler *s = static_cast<Sampler *>(vs);
if (slot > RS_MAX_SAMPLER_SLOT) {
- LOGE("Invalid sampler slot");
+ ALOGE("Invalid sampler slot");
return;
}
diff --git a/libs/rs/rsContext.h b/libs/rs/rsContext.h
index 199cc5a..35221e0 100644
--- a/libs/rs/rsContext.h
+++ b/libs/rs/rsContext.h
@@ -50,13 +50,13 @@ namespace renderscript {
#define CHECK_OBJ(o) { \
GET_TLS(); \
if (!ObjectBase::isValid(rsc, (const ObjectBase *)o)) { \
- LOGE("Bad object %p at %s, %i", o, __FILE__, __LINE__); \
+ ALOGE("Bad object %p at %s, %i", o, __FILE__, __LINE__); \
} \
}
#define CHECK_OBJ_OR_NULL(o) { \
GET_TLS(); \
if (o && !ObjectBase::isValid(rsc, (const ObjectBase *)o)) { \
- LOGE("Bad object %p at %s, %i", o, __FILE__, __LINE__); \
+ ALOGE("Bad object %p at %s, %i", o, __FILE__, __LINE__); \
} \
}
#else
diff --git a/libs/rs/rsElement.cpp b/libs/rs/rsElement.cpp
index df90ce4..b65f380 100644
--- a/libs/rs/rsElement.cpp
+++ b/libs/rs/rsElement.cpp
@@ -94,7 +94,7 @@ Element *Element::createFromStream(Context *rsc, IStream *stream) {
// First make sure we are reading the correct object
RsA3DClassID classID = (RsA3DClassID)stream->loadU32();
if (classID != RS_A3D_CLASS_ID_ELEMENT) {
- LOGE("element loading skipped due to invalid class id\n");
+ ALOGE("element loading skipped due to invalid class id\n");
return NULL;
}
diff --git a/libs/rs/rsFBOCache.cpp b/libs/rs/rsFBOCache.cpp
index f4a8bc6..d50f3e0 100644
--- a/libs/rs/rsFBOCache.cpp
+++ b/libs/rs/rsFBOCache.cpp
@@ -46,12 +46,12 @@ void FBOCache::deinit(Context *rsc) {
void FBOCache::bindColorTarget(Context *rsc, Allocation *a, uint32_t slot) {
if (slot >= mHal.state.colorTargetsCount) {
- LOGE("Invalid render target index");
+ ALOGE("Invalid render target index");
return;
}
if (a != NULL) {
if (!a->getIsTexture()) {
- LOGE("Invalid Color Target");
+ ALOGE("Invalid Color Target");
return;
}
}
@@ -63,7 +63,7 @@ void FBOCache::bindColorTarget(Context *rsc, Allocation *a, uint32_t slot) {
void FBOCache::bindDepthTarget(Context *rsc, Allocation *a) {
if (a != NULL) {
if (!a->getIsRenderTarget()) {
- LOGE("Invalid Depth Target");
+ ALOGE("Invalid Depth Target");
return;
}
}
diff --git a/libs/rs/rsFifoSocket.cpp b/libs/rs/rsFifoSocket.cpp
index 8b8008d..163a44b 100644
--- a/libs/rs/rsFifoSocket.cpp
+++ b/libs/rs/rsFifoSocket.cpp
@@ -48,31 +48,31 @@ void FifoSocket::writeAsync(const void *data, size_t bytes) {
if (bytes == 0) {
return;
}
- //LOGE("writeAsync %p %i", data, bytes);
+ //ALOGE("writeAsync %p %i", data, bytes);
size_t ret = ::send(sv[0], data, bytes, 0);
- //LOGE("writeAsync ret %i", ret);
+ //ALOGE("writeAsync ret %i", ret);
rsAssert(ret == bytes);
}
void FifoSocket::writeWaitReturn(void *retData, size_t retBytes) {
- //LOGE("writeWaitReturn %p %i", retData, retBytes);
+ //ALOGE("writeWaitReturn %p %i", retData, retBytes);
size_t ret = ::recv(sv[0], retData, retBytes, 0);
- //LOGE("writeWaitReturn %i", ret);
+ //ALOGE("writeWaitReturn %i", ret);
rsAssert(ret == retBytes);
}
size_t FifoSocket::read(void *data, size_t bytes) {
- //LOGE("read %p %i", data, bytes);
+ //ALOGE("read %p %i", data, bytes);
size_t ret = ::recv(sv[1], data, bytes, 0);
rsAssert(ret == bytes);
- //LOGE("read ret %i", ret);
+ //ALOGE("read ret %i", ret);
return ret;
}
void FifoSocket::readReturn(const void *data, size_t bytes) {
- LOGE("readReturn %p %Zu", data, bytes);
+ ALOGE("readReturn %p %Zu", data, bytes);
size_t ret = ::send(sv[1], data, bytes, 0);
- LOGE("readReturn %Zu", ret);
+ ALOGE("readReturn %Zu", ret);
rsAssert(ret == bytes);
}
diff --git a/libs/rs/rsFileA3D.cpp b/libs/rs/rsFileA3D.cpp
index 530e79e..ac658c8 100644
--- a/libs/rs/rsFileA3D.cpp
+++ b/libs/rs/rsFileA3D.cpp
@@ -278,17 +278,17 @@ ObjectBase *FileA3D::initializeFromEntry(size_t index) {
bool FileA3D::writeFile(const char *filename) {
if (!mWriteStream) {
- LOGE("No objects to write\n");
+ ALOGE("No objects to write\n");
return false;
}
if (mWriteStream->getPos() == 0) {
- LOGE("No objects to write\n");
+ ALOGE("No objects to write\n");
return false;
}
FILE *writeHandle = fopen(filename, "wb");
if (!writeHandle) {
- LOGE("Couldn't open the file for writing\n");
+ ALOGE("Couldn't open the file for writing\n");
return false;
}
@@ -335,7 +335,7 @@ bool FileA3D::writeFile(const char *filename) {
int status = fclose(writeHandle);
if (status != 0) {
- LOGE("Couldn't close file\n");
+ ALOGE("Couldn't close file\n");
return false;
}
@@ -364,7 +364,7 @@ void FileA3D::appendToFile(ObjectBase *obj) {
RsObjectBase rsaFileA3DGetEntryByIndex(RsContext con, uint32_t index, RsFile file) {
FileA3D *fa3d = static_cast<FileA3D *>(file);
if (!fa3d) {
- LOGE("Can't load entry. No valid file");
+ ALOGE("Can't load entry. No valid file");
return NULL;
}
@@ -389,13 +389,13 @@ void rsaFileA3DGetIndexEntries(RsContext con, RsFileIndexEntry *fileEntries, uin
FileA3D *fa3d = static_cast<FileA3D *>(file);
if (!fa3d) {
- LOGE("Can't load index entries. No valid file");
+ ALOGE("Can't load index entries. No valid file");
return;
}
uint32_t numFileEntries = fa3d->getNumIndexEntries();
if (numFileEntries != numEntries || numEntries == 0 || fileEntries == NULL) {
- LOGE("Can't load index entries. Invalid number requested");
+ ALOGE("Can't load index entries. Invalid number requested");
return;
}
@@ -408,7 +408,7 @@ void rsaFileA3DGetIndexEntries(RsContext con, RsFileIndexEntry *fileEntries, uin
RsFile rsaFileA3DCreateFromMemory(RsContext con, const void *data, uint32_t len) {
if (data == NULL) {
- LOGE("File load failed. Asset stream is NULL");
+ ALOGE("File load failed. Asset stream is NULL");
return NULL;
}
@@ -432,7 +432,7 @@ RsFile rsaFileA3DCreateFromAsset(RsContext con, void *_asset) {
RsFile rsaFileA3DCreateFromFile(RsContext con, const char *path) {
if (path == NULL) {
- LOGE("File load failed. Path is NULL");
+ ALOGE("File load failed. Path is NULL");
return NULL;
}
@@ -446,7 +446,7 @@ RsFile rsaFileA3DCreateFromFile(RsContext con, const char *path) {
fa3d->load(f);
fclose(f);
} else {
- LOGE("Could not open file %s", path);
+ ALOGE("Could not open file %s", path);
}
return fa3d;
diff --git a/libs/rs/rsFont.cpp b/libs/rs/rsFont.cpp
index 7efed9d..e09f81c 100644
--- a/libs/rs/rsFont.cpp
+++ b/libs/rs/rsFont.cpp
@@ -39,7 +39,7 @@ Font::Font(Context *rsc) : ObjectBase(rsc), mCachedGlyphs(NULL) {
bool Font::init(const char *name, float fontSize, uint32_t dpi, const void *data, uint32_t dataLen) {
#ifndef ANDROID_RS_SERIALIZE
if (mInitialized) {
- LOGE("Reinitialization of fonts not supported");
+ ALOGE("Reinitialization of fonts not supported");
return false;
}
@@ -51,7 +51,7 @@ bool Font::init(const char *name, float fontSize, uint32_t dpi, const void *data
}
if (error) {
- LOGE("Unable to initialize font %s", name);
+ ALOGE("Unable to initialize font %s", name);
return false;
}
@@ -61,7 +61,7 @@ bool Font::init(const char *name, float fontSize, uint32_t dpi, const void *data
error = FT_Set_Char_Size(mFace, (FT_F26Dot6)(fontSize * 64.0f), 0, dpi, 0);
if (error) {
- LOGE("Unable to set font size on %s", name);
+ ALOGE("Unable to set font size on %s", name);
return false;
}
@@ -124,7 +124,7 @@ void Font::drawCachedGlyph(CachedGlyphInfo* glyph, int32_t x, int32_t y,
for (cacheX = glyph->mBitmapMinX, bX = nPenX; cacheX < endX; cacheX++, bX++) {
for (cacheY = glyph->mBitmapMinY, bY = nPenY; cacheY < endY; cacheY++, bY++) {
if (bX < 0 || bY < 0 || bX >= (int32_t) bitmapW || bY >= (int32_t) bitmapH) {
- LOGE("Skipping invalid index");
+ ALOGE("Skipping invalid index");
continue;
}
uint8_t tempCol = cacheBuffer[cacheY * cacheWidth + cacheX];
@@ -165,7 +165,7 @@ void Font::renderUTF(const char *text, uint32_t len, int32_t x, int32_t y,
if (mode == Font::MEASURE) {
if (bounds == NULL) {
- LOGE("No return rectangle provided to measure text");
+ ALOGE("No return rectangle provided to measure text");
return;
}
// Reset min and max of the bounding box to something large
@@ -237,7 +237,7 @@ void Font::updateGlyphCache(CachedGlyphInfo *glyph) {
#ifndef ANDROID_RS_SERIALIZE
FT_Error error = FT_Load_Glyph( mFace, glyph->mGlyphIndex, FT_LOAD_RENDER );
if (error) {
- LOGE("Couldn't load glyph.");
+ ALOGE("Couldn't load glyph.");
return;
}
@@ -378,7 +378,7 @@ FT_Library FontState::getLib() {
if (!mLibrary) {
FT_Error error = FT_Init_FreeType(&mLibrary);
if (error) {
- LOGE("Unable to initialize freetype");
+ ALOGE("Unable to initialize freetype");
return NULL;
}
}
@@ -409,7 +409,7 @@ void FontState::flushAllAndInvalidate() {
bool FontState::cacheBitmap(FT_Bitmap *bitmap, uint32_t *retOriginX, uint32_t *retOriginY) {
// If the glyph is too tall, don't cache it
if ((uint32_t)bitmap->rows > mCacheLines[mCacheLines.size()-1]->mMaxHeight) {
- LOGE("Font size to large to fit in cache. width, height = %i, %i", (int)bitmap->width, (int)bitmap->rows);
+ ALOGE("Font size to large to fit in cache. width, height = %i, %i", (int)bitmap->width, (int)bitmap->rows);
return false;
}
@@ -439,7 +439,7 @@ bool FontState::cacheBitmap(FT_Bitmap *bitmap, uint32_t *retOriginX, uint32_t *r
// if we still don't fit, something is wrong and we shouldn't draw
if (!bitmapFit) {
- LOGE("Bitmap doesn't fit in cache. width, height = %i, %i", (int)bitmap->width, (int)bitmap->rows);
+ ALOGE("Bitmap doesn't fit in cache. width, height = %i, %i", (int)bitmap->width, (int)bitmap->rows);
return false;
}
}
@@ -471,7 +471,7 @@ bool FontState::cacheBitmap(FT_Bitmap *bitmap, uint32_t *retOriginX, uint32_t *r
// Some debug code
/*for (uint32_t i = 0; i < mCacheLines.size(); i ++) {
- LOGE("Cache Line: H: %u Empty Space: %f",
+ ALOGE("Cache Line: H: %u Empty Space: %f",
mCacheLines[i]->mMaxHeight,
(1.0f - (float)mCacheLines[i]->mCurrentCol/(float)mCacheLines[i]->mMaxWidth)*100.0f);
@@ -663,9 +663,9 @@ void FontState::appendMeshQuad(float x1, float y1, float z1,
}
/*LOGE("V0 x: %f y: %f z: %f", x1, y1, z1);
- LOGE("V1 x: %f y: %f z: %f", x2, y2, z2);
- LOGE("V2 x: %f y: %f z: %f", x3, y3, z3);
- LOGE("V3 x: %f y: %f z: %f", x4, y4, z4);*/
+ ALOGE("V1 x: %f y: %f z: %f", x2, y2, z2);
+ ALOGE("V2 x: %f y: %f z: %f", x3, y3, z3);
+ ALOGE("V3 x: %f y: %f z: %f", x4, y4, z4);*/
(*currentPos++) = x1;
(*currentPos++) = y1;
@@ -742,7 +742,7 @@ void FontState::renderText(const char *text, uint32_t len, int32_t x, int32_t y,
currentFont = mDefault.get();
}
if (!currentFont) {
- LOGE("Unable to initialize any fonts");
+ ALOGE("Unable to initialize any fonts");
return;
}
diff --git a/libs/rs/rsLocklessFifo.cpp b/libs/rs/rsLocklessFifo.cpp
index ce69a60..0466d8b 100644
--- a/libs/rs/rsLocklessFifo.cpp
+++ b/libs/rs/rsLocklessFifo.cpp
@@ -45,12 +45,12 @@ bool LocklessCommandFifo::init(uint32_t sizeInBytes) {
// Add room for a buffer reset command
mBuffer = static_cast<uint8_t *>(malloc(sizeInBytes + 4));
if (!mBuffer) {
- LOGE("LocklessFifo allocation failure");
+ ALOGE("LocklessFifo allocation failure");
return false;
}
if (!mSignalToControl.init() || !mSignalToWorker.init()) {
- LOGE("Signal setup failed");
+ ALOGE("Signal setup failed");
free(mBuffer);
return false;
}
diff --git a/libs/rs/rsMesh.cpp b/libs/rs/rsMesh.cpp
index bf9284f..67c7299 100644
--- a/libs/rs/rsMesh.cpp
+++ b/libs/rs/rsMesh.cpp
@@ -107,7 +107,7 @@ Mesh *Mesh::createFromStream(Context *rsc, IStream *stream) {
// First make sure we are reading the correct object
RsA3DClassID classID = (RsA3DClassID)stream->loadU32();
if (classID != RS_A3D_CLASS_ID_MESH) {
- LOGE("mesh loading skipped due to invalid class id");
+ ALOGE("mesh loading skipped due to invalid class id");
return NULL;
}
@@ -178,7 +178,7 @@ void Mesh::render(Context *rsc) const {
void Mesh::renderPrimitive(Context *rsc, uint32_t primIndex) const {
if (primIndex >= mHal.state.primitivesCount) {
- LOGE("Invalid primitive index");
+ ALOGE("Invalid primitive index");
return;
}
@@ -192,7 +192,7 @@ void Mesh::renderPrimitive(Context *rsc, uint32_t primIndex) const {
void Mesh::renderPrimitiveRange(Context *rsc, uint32_t primIndex, uint32_t start, uint32_t len) const {
if (len < 1 || primIndex >= mHal.state.primitivesCount) {
- LOGE("Invalid mesh or parameters");
+ ALOGE("Invalid mesh or parameters");
return;
}
@@ -241,7 +241,7 @@ void Mesh::computeBBox() {
mBBoxMin[0] = mBBoxMin[1] = mBBoxMin[2] = 1e6;
mBBoxMax[0] = mBBoxMax[1] = mBBoxMax[2] = -1e6;
if (!posPtr) {
- LOGE("Unable to compute bounding box");
+ ALOGE("Unable to compute bounding box");
mBBoxMin[0] = mBBoxMin[1] = mBBoxMin[2] = 0.0f;
mBBoxMax[0] = mBBoxMax[1] = mBBoxMax[2] = 0.0f;
return;
diff --git a/libs/rs/rsMutex.cpp b/libs/rs/rsMutex.cpp
index 2105288..6512372 100644
--- a/libs/rs/rsMutex.cpp
+++ b/libs/rs/rsMutex.cpp
@@ -30,7 +30,7 @@ Mutex::~Mutex() {
bool Mutex::init() {
int status = pthread_mutex_init(&mMutex, NULL);
if (status) {
- LOGE("Mutex::Mutex init failure");
+ ALOGE("Mutex::Mutex init failure");
return false;
}
return true;
@@ -40,7 +40,7 @@ bool Mutex::lock() {
int status;
status = pthread_mutex_lock(&mMutex);
if (status) {
- LOGE("Mutex: error %i locking.", status);
+ ALOGE("Mutex: error %i locking.", status);
return false;
}
return true;
@@ -50,7 +50,7 @@ bool Mutex::unlock() {
int status;
status = pthread_mutex_unlock(&mMutex);
if (status) {
- LOGE("Mutex error %i unlocking.", status);
+ ALOGE("Mutex error %i unlocking.", status);
return false;
}
return true;
diff --git a/libs/rs/rsObjectBase.cpp b/libs/rs/rsObjectBase.cpp
index addf932..6a64582 100644
--- a/libs/rs/rsObjectBase.cpp
+++ b/libs/rs/rsObjectBase.cpp
@@ -204,14 +204,14 @@ void ObjectBase::zeroAllUserRef(Context *rsc) {
// This operation can be slow, only to be called during context cleanup.
const ObjectBase * o = rsc->mObjHead;
while (o) {
- //LOGE("o %p", o);
+ //ALOGE("o %p", o);
if (o->zeroUserRef()) {
// deleted the object and possibly others, restart from head.
o = rsc->mObjHead;
- //LOGE("o head %p", o);
+ //ALOGE("o head %p", o);
} else {
o = o->mNext;
- //LOGE("o next %p", o);
+ //ALOGE("o next %p", o);
}
}
diff --git a/libs/rs/rsProgram.cpp b/libs/rs/rsProgram.cpp
index a9fd877..8061515 100644
--- a/libs/rs/rsProgram.cpp
+++ b/libs/rs/rsProgram.cpp
@@ -139,13 +139,13 @@ void Program::initMemberVars() {
void Program::bindAllocation(Context *rsc, Allocation *alloc, uint32_t slot) {
if (alloc != NULL) {
if (slot >= mHal.state.constantsCount) {
- LOGE("Attempt to bind alloc at slot %u, on shader id %u, but const count is %u",
+ ALOGE("Attempt to bind alloc at slot %u, on shader id %u, but const count is %u",
slot, (uint32_t)this, mHal.state.constantsCount);
rsc->setError(RS_ERROR_BAD_SHADER, "Cannot bind allocation");
return;
}
if (alloc->getType() != mConstantTypes[slot].get()) {
- LOGE("Attempt to bind alloc at slot %u, on shader id %u, but types mismatch",
+ ALOGE("Attempt to bind alloc at slot %u, on shader id %u, but types mismatch",
slot, (uint32_t)this);
rsc->setError(RS_ERROR_BAD_SHADER, "Cannot bind allocation");
return;
@@ -167,13 +167,13 @@ void Program::bindAllocation(Context *rsc, Allocation *alloc, uint32_t slot) {
void Program::bindTexture(Context *rsc, uint32_t slot, Allocation *a) {
if (slot >= mHal.state.texturesCount) {
- LOGE("Attempt to bind texture to slot %u but tex count is %u", slot, mHal.state.texturesCount);
+ ALOGE("Attempt to bind texture to slot %u but tex count is %u", slot, mHal.state.texturesCount);
rsc->setError(RS_ERROR_BAD_SHADER, "Cannot bind texture");
return;
}
if (a && a->getType()->getDimFaces() && mHal.state.textureTargets[slot] != RS_TEXTURE_CUBE) {
- LOGE("Attempt to bind cubemap to slot %u but 2d texture needed", slot);
+ ALOGE("Attempt to bind cubemap to slot %u but 2d texture needed", slot);
rsc->setError(RS_ERROR_BAD_SHADER, "Cannot bind cubemap to 2d texture slot");
return;
}
@@ -186,7 +186,7 @@ void Program::bindTexture(Context *rsc, uint32_t slot, Allocation *a) {
void Program::bindSampler(Context *rsc, uint32_t slot, Sampler *s) {
if (slot >= mHal.state.texturesCount) {
- LOGE("Attempt to bind sampler to slot %u but tex count is %u", slot, mHal.state.texturesCount);
+ ALOGE("Attempt to bind sampler to slot %u but tex count is %u", slot, mHal.state.texturesCount);
rsc->setError(RS_ERROR_BAD_SHADER, "Cannot bind sampler");
return;
}
diff --git a/libs/rs/rsProgramFragment.cpp b/libs/rs/rsProgramFragment.cpp
index 81eedc4..4e73ca6 100644
--- a/libs/rs/rsProgramFragment.cpp
+++ b/libs/rs/rsProgramFragment.cpp
@@ -38,12 +38,12 @@ ProgramFragment::~ProgramFragment() {
void ProgramFragment::setConstantColor(Context *rsc, float r, float g, float b, float a) {
if (isUserProgram()) {
- LOGE("Attempting to set fixed function emulation color on user program");
+ ALOGE("Attempting to set fixed function emulation color on user program");
rsc->setError(RS_ERROR_BAD_SHADER, "Cannot set fixed function emulation color on user program");
return;
}
if (mHal.state.constants[0] == NULL) {
- LOGE("Unable to set fixed function emulation color because allocation is missing");
+ ALOGE("Unable to set fixed function emulation color because allocation is missing");
rsc->setError(RS_ERROR_BAD_SHADER, "Unable to set fixed function emulation color because allocation is missing");
return;
}
@@ -63,7 +63,7 @@ void ProgramFragment::setup(Context *rsc, ProgramFragmentState *state) {
for (uint32_t ct=0; ct < mHal.state.texturesCount; ct++) {
if (!mHal.state.textures[ct]) {
- LOGE("No texture bound for shader id %u, texture unit %u", (uint)this, ct);
+ ALOGE("No texture bound for shader id %u, texture unit %u", (uint)this, ct);
rsc->setError(RS_ERROR_BAD_SHADER, "No texture bound");
continue;
}
@@ -131,7 +131,7 @@ RsProgramFragment rsi_ProgramFragmentCreate(Context *rsc, const char * shaderTex
size_t paramLength) {
ProgramFragment *pf = new ProgramFragment(rsc, shaderText, shaderLength, params, paramLength);
pf->incUserRef();
- //LOGE("rsi_ProgramFragmentCreate %p", pf);
+ //ALOGE("rsi_ProgramFragmentCreate %p", pf);
return pf;
}
diff --git a/libs/rs/rsScript.cpp b/libs/rs/rsScript.cpp
index 93513fe..fad9c08 100644
--- a/libs/rs/rsScript.cpp
+++ b/libs/rs/rsScript.cpp
@@ -39,9 +39,9 @@ Script::~Script() {
}
void Script::setSlot(uint32_t slot, Allocation *a) {
- //LOGE("setSlot %i %p", slot, a);
+ //ALOGE("setSlot %i %p", slot, a);
if (slot >= mHal.info.exportedVariableCount) {
- LOGE("Script::setSlot unable to set allocation, invalid slot index");
+ ALOGE("Script::setSlot unable to set allocation, invalid slot index");
return;
}
@@ -54,21 +54,21 @@ void Script::setSlot(uint32_t slot, Allocation *a) {
}
void Script::setVar(uint32_t slot, const void *val, size_t len) {
- //LOGE("setVar %i %p %i", slot, val, len);
+ //ALOGE("setVar %i %p %i", slot, val, len);
if (slot >= mHal.info.exportedVariableCount) {
- LOGE("Script::setVar unable to set allocation, invalid slot index");
+ ALOGE("Script::setVar unable to set allocation, invalid slot index");
return;
}
mRSC->mHal.funcs.script.setGlobalVar(mRSC, this, slot, (void *)val, len);
}
void Script::setVarObj(uint32_t slot, ObjectBase *val) {
- //LOGE("setVarObj %i %p", slot, val);
+ //ALOGE("setVarObj %i %p", slot, val);
if (slot >= mHal.info.exportedVariableCount) {
- LOGE("Script::setVarObj unable to set allocation, invalid slot index");
+ ALOGE("Script::setVarObj unable to set allocation, invalid slot index");
return;
}
- //LOGE("setvarobj %i %p", slot, val);
+ //ALOGE("setvarobj %i %p", slot, val);
mRSC->mHal.funcs.script.setGlobalObj(mRSC, this, slot, val);
}
@@ -85,7 +85,7 @@ void rsi_ScriptBindAllocation(Context * rsc, RsScript vs, RsAllocation va, uint3
Script *s = static_cast<Script *>(vs);
Allocation *a = static_cast<Allocation *>(va);
s->setSlot(slot, a);
- //LOGE("rsi_ScriptBindAllocation %i %p %p", slot, a, a->getPtr());
+ //ALOGE("rsi_ScriptBindAllocation %i %p %p", slot, a, a->getPtr());
}
void rsi_ScriptSetTimeZone(Context * rsc, RsScript vs, const char * timeZone, size_t length) {
diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp
index 0738106..5079b63 100644
--- a/libs/rs/rsScriptC.cpp
+++ b/libs/rs/rsScriptC.cpp
@@ -70,7 +70,7 @@ void ScriptC::setupScript(Context *rsc) {
}
const Allocation *ScriptC::ptrToAllocation(const void *ptr) const {
- //LOGE("ptr to alloc %p", ptr);
+ //ALOGE("ptr to alloc %p", ptr);
if (!ptr) {
return NULL;
}
@@ -81,7 +81,7 @@ const Allocation *ScriptC::ptrToAllocation(const void *ptr) const {
return mSlots[ct].get();
}
}
- LOGE("ScriptC::ptrToAllocation, failed to find %p", ptr);
+ ALOGE("ScriptC::ptrToAllocation, failed to find %p", ptr);
return NULL;
}
@@ -179,7 +179,7 @@ static void* symbolLookup(void* pContext, char const* name) {
s->mHal.info.isThreadable &= sym->threadable;
return sym->mPtr;
}
- LOGE("ScriptC sym lookup failed for %s", name);
+ ALOGE("ScriptC sym lookup failed for %s", name);
return NULL;
}
*/
@@ -195,12 +195,12 @@ bool ScriptC::runCompiler(Context *rsc,
const uint8_t *bitcode,
size_t bitcodeLen) {
- //LOGE("runCompiler %p %p %p %p %p %i", rsc, this, resName, cacheDir, bitcode, bitcodeLen);
+ //ALOGE("runCompiler %p %p %p %p %p %i", rsc, this, resName, cacheDir, bitcode, bitcodeLen);
#ifndef ANDROID_RS_SERIALIZE
uint32_t sdkVersion = 0;
bcinfo::BitcodeWrapper bcWrapper((const char *)bitcode, bitcodeLen);
if (!bcWrapper.unwrap()) {
- LOGE("Bitcode is not in proper container format (raw or wrapper)");
+ ALOGE("Bitcode is not in proper container format (raw or wrapper)");
return false;
}
@@ -221,7 +221,7 @@ bool ScriptC::runCompiler(Context *rsc,
BT = new bcinfo::BitcodeTranslator((const char *)bitcode, bitcodeLen,
sdkVersion);
if (!BT->translate()) {
- LOGE("Failed to translate bitcode from version: %u", sdkVersion);
+ ALOGE("Failed to translate bitcode from version: %u", sdkVersion);
delete BT;
BT = NULL;
return false;
@@ -242,12 +242,12 @@ bool ScriptC::runCompiler(Context *rsc,
for (size_t i=0; i < mHal.info.exportedPragmaCount; ++i) {
const char * key = mHal.info.exportedPragmaKeyList[i];
const char * value = mHal.info.exportedPragmaValueList[i];
- //LOGE("pragma %s %s", keys[i], values[i]);
+ //ALOGE("pragma %s %s", keys[i], values[i]);
if (!strcmp(key, "version")) {
if (!strcmp(value, "1")) {
continue;
}
- LOGE("Invalid version pragma value: %s\n", value);
+ ALOGE("Invalid version pragma value: %s\n", value);
return false;
}
@@ -259,7 +259,7 @@ bool ScriptC::runCompiler(Context *rsc,
mEnviroment.mVertex.clear();
continue;
}
- LOGE("Unrecognized value %s passed to stateVertex", value);
+ ALOGE("Unrecognized value %s passed to stateVertex", value);
return false;
}
@@ -271,7 +271,7 @@ bool ScriptC::runCompiler(Context *rsc,
mEnviroment.mRaster.clear();
continue;
}
- LOGE("Unrecognized value %s passed to stateRaster", value);
+ ALOGE("Unrecognized value %s passed to stateRaster", value);
return false;
}
@@ -283,7 +283,7 @@ bool ScriptC::runCompiler(Context *rsc,
mEnviroment.mFragment.clear();
continue;
}
- LOGE("Unrecognized value %s passed to stateFragment", value);
+ ALOGE("Unrecognized value %s passed to stateFragment", value);
return false;
}
@@ -295,7 +295,7 @@ bool ScriptC::runCompiler(Context *rsc,
mEnviroment.mFragmentStore.clear();
continue;
}
- LOGE("Unrecognized value %s passed to stateStore", value);
+ ALOGE("Unrecognized value %s passed to stateStore", value);
return false;
}
}
diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp
index ec15bc0..183e207 100644
--- a/libs/rs/rsScriptC_Lib.cpp
+++ b/libs/rs/rsScriptC_Lib.cpp
@@ -115,7 +115,7 @@ float rsrGetDt(Context *rsc, Script *sc) {
//////////////////////////////////////////////////////////////////////////////
void rsrSetObject(const Context *rsc, const Script *sc, ObjectBase **dst, ObjectBase * src) {
- //LOGE("rsiSetObject %p,%p %p", vdst, *vdst, vsrc);
+ //ALOGE("rsiSetObject %p,%p %p", vdst, *vdst, vsrc);
if (src) {
CHECK_OBJ(src);
src->incSysRef();
@@ -128,7 +128,7 @@ void rsrSetObject(const Context *rsc, const Script *sc, ObjectBase **dst, Object
}
void rsrClearObject(const Context *rsc, const Script *sc, ObjectBase **dst) {
- //LOGE("rsiClearObject %p,%p", vdst, *vdst);
+ //ALOGE("rsiClearObject %p,%p", vdst, *vdst);
if (dst[0]) {
CHECK_OBJ(dst[0]);
dst[0]->decSysRef();
@@ -142,12 +142,12 @@ bool rsrIsObject(const Context *rsc, const Script *sc, const ObjectBase *src) {
uint32_t rsrToClient(Context *rsc, Script *sc, int cmdID, void *data, int len) {
- //LOGE("SC_toClient %i %i %i", cmdID, len);
+ //ALOGE("SC_toClient %i %i %i", cmdID, len);
return rsc->sendMessageToClient(data, RS_MESSAGE_TO_CLIENT_USER, cmdID, len, false);
}
uint32_t rsrToClientBlocking(Context *rsc, Script *sc, int cmdID, void *data, int len) {
- //LOGE("SC_toClientBlocking %i %i", cmdID, len);
+ //ALOGE("SC_toClientBlocking %i %i", cmdID, len);
return rsc->sendMessageToClient(data, RS_MESSAGE_TO_CLIENT_USER, cmdID, len, true);
}
diff --git a/libs/rs/rsScriptC_LibGL.cpp b/libs/rs/rsScriptC_LibGL.cpp
index 7862f3c..a7ba7d2 100644
--- a/libs/rs/rsScriptC_LibGL.cpp
+++ b/libs/rs/rsScriptC_LibGL.cpp
@@ -142,11 +142,11 @@ void rsrDrawQuadTexCoords(Context *rsc, Script *sc,
return;
}
- //LOGE("Quad");
- //LOGE("%4.2f, %4.2f, %4.2f", x1, y1, z1);
- //LOGE("%4.2f, %4.2f, %4.2f", x2, y2, z2);
- //LOGE("%4.2f, %4.2f, %4.2f", x3, y3, z3);
- //LOGE("%4.2f, %4.2f, %4.2f", x4, y4, z4);
+ //ALOGE("Quad");
+ //ALOGE("%4.2f, %4.2f, %4.2f", x1, y1, z1);
+ //ALOGE("%4.2f, %4.2f, %4.2f", x2, y2, z2);
+ //ALOGE("%4.2f, %4.2f, %4.2f", x3, y3, z3);
+ //ALOGE("%4.2f, %4.2f, %4.2f", x4, y4, z4);
float vtx[] = {x1,y1,z1, x2,y2,z2, x3,y3,z3, x4,y4,z4};
const float tex[] = {u1,v1, u2,v2, u3,v3, u4,v4};
@@ -191,7 +191,7 @@ void rsrDrawSpriteScreenspace(Context *rsc, Script *sc,
}
void rsrDrawRect(Context *rsc, Script *sc, float x1, float y1, float x2, float y2, float z) {
- //LOGE("SC_drawRect %f,%f %f,%f %f", x1, y1, x2, y2, z);
+ //ALOGE("SC_drawRect %f,%f %f,%f %f", x1, y1, x2, y2, z);
rsrDrawQuad(rsc, sc, x1, y2, z, x2, y2, z, x2, y1, z, x1, y1, z);
}
diff --git a/libs/rs/rsSignal.cpp b/libs/rs/rsSignal.cpp
index 413ac2b..3f6a13c 100644
--- a/libs/rs/rsSignal.cpp
+++ b/libs/rs/rsSignal.cpp
@@ -32,13 +32,13 @@ Signal::~Signal() {
bool Signal::init() {
int status = pthread_mutex_init(&mMutex, NULL);
if (status) {
- LOGE("LocklessFifo mutex init failure");
+ ALOGE("LocklessFifo mutex init failure");
return false;
}
status = pthread_cond_init(&mCondition, NULL);
if (status) {
- LOGE("LocklessFifo condition init failure");
+ ALOGE("LocklessFifo condition init failure");
pthread_mutex_destroy(&mMutex);
return false;
}
@@ -51,7 +51,7 @@ void Signal::set() {
status = pthread_mutex_lock(&mMutex);
if (status) {
- LOGE("LocklessCommandFifo: error %i locking for set condition.", status);
+ ALOGE("LocklessCommandFifo: error %i locking for set condition.", status);
return;
}
@@ -59,12 +59,12 @@ void Signal::set() {
status = pthread_cond_signal(&mCondition);
if (status) {
- LOGE("LocklessCommandFifo: error %i on set condition.", status);
+ ALOGE("LocklessCommandFifo: error %i on set condition.", status);
}
status = pthread_mutex_unlock(&mMutex);
if (status) {
- LOGE("LocklessCommandFifo: error %i unlocking for set condition.", status);
+ ALOGE("LocklessCommandFifo: error %i unlocking for set condition.", status);
}
}
@@ -74,7 +74,7 @@ bool Signal::wait(uint64_t timeout) {
status = pthread_mutex_lock(&mMutex);
if (status) {
- LOGE("LocklessCommandFifo: error %i locking for condition.", status);
+ ALOGE("LocklessCommandFifo: error %i locking for condition.", status);
return false;
}
@@ -96,13 +96,13 @@ bool Signal::wait(uint64_t timeout) {
ret = true;
} else {
if (status != ETIMEDOUT) {
- LOGE("LocklessCommandFifo: error %i waiting for condition.", status);
+ ALOGE("LocklessCommandFifo: error %i waiting for condition.", status);
}
}
status = pthread_mutex_unlock(&mMutex);
if (status) {
- LOGE("LocklessCommandFifo: error %i unlocking for condition.", status);
+ ALOGE("LocklessCommandFifo: error %i unlocking for condition.", status);
}
return ret;
diff --git a/libs/rs/rsThreadIO.cpp b/libs/rs/rsThreadIO.cpp
index 13e789d..8ba1a0e 100644
--- a/libs/rs/rsThreadIO.cpp
+++ b/libs/rs/rsThreadIO.cpp
@@ -40,22 +40,22 @@ void ThreadIO::init(bool useSocket) {
}
void ThreadIO::shutdown() {
- //LOGE("shutdown 1");
+ //ALOGE("shutdown 1");
mToCore.shutdown();
- //LOGE("shutdown 2");
+ //ALOGE("shutdown 2");
}
void ThreadIO::coreFlush() {
- //LOGE("coreFlush 1");
+ //ALOGE("coreFlush 1");
if (mUsingSocket) {
} else {
mToCore.flush();
}
- //LOGE("coreFlush 2");
+ //ALOGE("coreFlush 2");
}
void * ThreadIO::coreHeader(uint32_t cmdID, size_t dataLen) {
- //LOGE("coreHeader %i %i", cmdID, dataLen);
+ //ALOGE("coreHeader %i %i", cmdID, dataLen);
if (mUsingSocket) {
CoreCmdHeader hdr;
hdr.bytes = dataLen;
@@ -67,40 +67,40 @@ void * ThreadIO::coreHeader(uint32_t cmdID, size_t dataLen) {
mCoreDataPtr = (uint8_t *)mToCore.reserve(dataLen);
mCoreDataBasePtr = mCoreDataPtr;
}
- //LOGE("coreHeader ret %p", mCoreDataPtr);
+ //ALOGE("coreHeader ret %p", mCoreDataPtr);
return mCoreDataPtr;
}
void ThreadIO::coreData(const void *data, size_t dataLen) {
- //LOGE("coreData %p %i", data, dataLen);
+ //ALOGE("coreData %p %i", data, dataLen);
mToCoreSocket.writeAsync(data, dataLen);
- //LOGE("coreData ret %p", mCoreDataPtr);
+ //ALOGE("coreData ret %p", mCoreDataPtr);
}
void ThreadIO::coreCommit() {
- //LOGE("coreCommit %p %p %i", mCoreDataPtr, mCoreDataBasePtr, mCoreCommandSize);
+ //ALOGE("coreCommit %p %p %i", mCoreDataPtr, mCoreDataBasePtr, mCoreCommandSize);
if (mUsingSocket) {
} else {
rsAssert((size_t)(mCoreDataPtr - mCoreDataBasePtr) <= mCoreCommandSize);
mToCore.commit(mCoreCommandID, mCoreCommandSize);
}
- //LOGE("coreCommit ret");
+ //ALOGE("coreCommit ret");
}
void ThreadIO::coreCommitSync() {
- //LOGE("coreCommitSync %p %p %i", mCoreDataPtr, mCoreDataBasePtr, mCoreCommandSize);
+ //ALOGE("coreCommitSync %p %p %i", mCoreDataPtr, mCoreDataBasePtr, mCoreCommandSize);
if (mUsingSocket) {
} else {
rsAssert((size_t)(mCoreDataPtr - mCoreDataBasePtr) <= mCoreCommandSize);
mToCore.commitSync(mCoreCommandID, mCoreCommandSize);
}
- //LOGE("coreCommitSync ret");
+ //ALOGE("coreCommitSync ret");
}
void ThreadIO::clientShutdown() {
- //LOGE("coreShutdown 1");
+ //ALOGE("coreShutdown 1");
mToClient.shutdown();
- //LOGE("coreShutdown 2");
+ //ALOGE("coreShutdown 2");
}
void ThreadIO::coreSetReturn(const void *data, size_t dataLen) {
@@ -149,7 +149,7 @@ bool ThreadIO::playCoreCommands(Context *con, bool waitForCommand, uint64_t time
if (cmdID >= (sizeof(gPlaybackFuncs) / sizeof(void *))) {
rsAssert(cmdID < (sizeof(gPlaybackFuncs) / sizeof(void *)));
- LOGE("playCoreCommands error con %p, cmd %i", con, cmdID);
+ ALOGE("playCoreCommands error con %p, cmd %i", con, cmdID);
mToCore.printDebugData();
}
gPlaybackFuncs[cmdID](con, data, cmdSize << 2);
@@ -193,8 +193,8 @@ RsMessageToClientType ThreadIO::getClientPayload(void *data, size_t *receiveLen,
uint32_t bytesData = 0;
uint32_t commandID = 0;
const uint32_t *d = (const uint32_t *)mToClient.get(&commandID, &bytesData);
- //LOGE("getMessageToClient 3 %i %i", commandID, bytesData);
- //LOGE("getMessageToClient %i %i", commandID, *subID);
+ //ALOGE("getMessageToClient 3 %i %i", commandID, bytesData);
+ //ALOGE("getMessageToClient %i %i", commandID, *subID);
if (bufferLen >= receiveLen[0]) {
memcpy(data, d+1, receiveLen[0]);
mToClient.next();
@@ -224,14 +224,14 @@ bool ThreadIO::sendToClient(RsMessageToClientType cmdID, uint32_t usrID, const v
}
}
- //LOGE("sendMessageToClient 2");
+ //ALOGE("sendMessageToClient 2");
uint32_t *p = (uint32_t *)mToClient.reserve(dataLen + sizeof(usrID));
p[0] = usrID;
if (dataLen > 0) {
memcpy(p+1, data, dataLen);
}
mToClient.commit(cmdID, dataLen + sizeof(usrID));
- //LOGE("sendMessageToClient 3");
+ //ALOGE("sendMessageToClient 3");
return true;
}
return false;
diff --git a/libs/rs/rsType.cpp b/libs/rs/rsType.cpp
index 271c9e2..7966470 100644
--- a/libs/rs/rsType.cpp
+++ b/libs/rs/rsType.cpp
@@ -167,7 +167,7 @@ Type *Type::createFromStream(Context *rsc, IStream *stream) {
// First make sure we are reading the correct object
RsA3DClassID classID = (RsA3DClassID)stream->loadU32();
if (classID != RS_A3D_CLASS_ID_TYPE) {
- LOGE("type loading skipped due to invalid class id\n");
+ ALOGE("type loading skipped due to invalid class id\n");
return NULL;
}
diff --git a/libs/rs/rsUtils.h b/libs/rs/rsUtils.h
index 3a6c85a..db6f592 100644
--- a/libs/rs/rsUtils.h
+++ b/libs/rs/rsUtils.h
@@ -40,7 +40,7 @@ namespace android {
namespace renderscript {
#if 1
-#define rsAssert(v) do {if(!(v)) LOGE("rsAssert failed: %s, in %s at %i", #v, __FILE__, __LINE__);} while (0)
+#define rsAssert(v) do {if(!(v)) ALOGE("rsAssert failed: %s, in %s at %i", #v, __FILE__, __LINE__);} while (0)
#else
#define rsAssert(v) while (0)
#endif
diff --git a/libs/rs/rsg_generator.c b/libs/rs/rsg_generator.c
index b3f6c55..6b84e56 100644
--- a/libs/rs/rsg_generator.c
+++ b/libs/rs/rsg_generator.c
@@ -235,7 +235,7 @@ void printApiCpp(FILE *f) {
}
}
- //fprintf(f, " LOGE(\"add command %s\\n\");\n", api->name);
+ //fprintf(f, " ALOGE(\"add command %s\\n\");\n", api->name);
if (hasInlineDataPointers(api)) {
fprintf(f, " RS_CMD_%s *cmd = NULL;\n", api->name);
fprintf(f, " if (dataSize < 1024) {;\n");
@@ -441,7 +441,7 @@ void printPlaybackCpp(FILE *f) {
fprintf(f, "void rsp_%s(Context *con, const void *vp, size_t cmdSizeBytes) {\n", api->name);
- //fprintf(f, " LOGE(\"play command %s\\n\");\n", api->name);
+ //fprintf(f, " ALOGE(\"play command %s\\n\");\n", api->name);
fprintf(f, " const RS_CMD_%s *cmd = static_cast<const RS_CMD_%s *>(vp);\n", api->name, api->name);
fprintf(f, " ");
@@ -469,7 +469,7 @@ void printPlaybackCpp(FILE *f) {
fprintf(f, "void rspr_%s(Context *con, Fifo *f, uint8_t *scratch, size_t scratchSize) {\n", api->name);
- //fprintf(f, " LOGE(\"play command %s\\n\");\n", api->name);
+ //fprintf(f, " ALOGE(\"play command %s\\n\");\n", api->name);
fprintf(f, " RS_CMD_%s cmd;\n", api->name);
fprintf(f, " f->read(&cmd, sizeof(cmd));\n");
diff --git a/libs/ui/FramebufferNativeWindow.cpp b/libs/ui/FramebufferNativeWindow.cpp
index 8949730..f5ed981 100644
--- a/libs/ui/FramebufferNativeWindow.cpp
+++ b/libs/ui/FramebufferNativeWindow.cpp
@@ -85,10 +85,10 @@ FramebufferNativeWindow::FramebufferNativeWindow()
int err;
int i;
err = framebuffer_open(module, &fbDev);
- LOGE_IF(err, "couldn't open framebuffer HAL (%s)", strerror(-err));
+ ALOGE_IF(err, "couldn't open framebuffer HAL (%s)", strerror(-err));
err = gralloc_open(module, &grDev);
- LOGE_IF(err, "couldn't open gralloc HAL (%s)", strerror(-err));
+ ALOGE_IF(err, "couldn't open gralloc HAL (%s)", strerror(-err));
// bail out if we can't initialize the modules
if (!fbDev || !grDev)
@@ -113,7 +113,7 @@ FramebufferNativeWindow::FramebufferNativeWindow()
fbDev->width, fbDev->height, fbDev->format,
GRALLOC_USAGE_HW_FB, &buffers[i]->handle, &buffers[i]->stride);
- LOGE_IF(err, "fb buffer %d allocation failed w=%d, h=%d, err=%s",
+ ALOGE_IF(err, "fb buffer %d allocation failed w=%d, h=%d, err=%s",
i, fbDev->width, fbDev->height, strerror(-err));
if (err)
@@ -133,7 +133,7 @@ FramebufferNativeWindow::FramebufferNativeWindow()
const_cast<int&>(ANativeWindow::maxSwapInterval) =
fbDev->maxSwapInterval;
} else {
- LOGE("Couldn't get gralloc module");
+ ALOGE("Couldn't get gralloc module");
}
ANativeWindow::setSwapInterval = setSwapInterval;
diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp
index 54a3ffa..f549a37 100644
--- a/libs/ui/GraphicBuffer.cpp
+++ b/libs/ui/GraphicBuffer.cpp
@@ -167,7 +167,7 @@ status_t GraphicBuffer::lock(uint32_t usage, const Rect& rect, void** vaddr)
{
if (rect.left < 0 || rect.right > this->width ||
rect.top < 0 || rect.bottom > this->height) {
- LOGE("locking pixels (%d,%d,%d,%d) outside of buffer (w=%d, h=%d)",
+ ALOGE("locking pixels (%d,%d,%d,%d) outside of buffer (w=%d, h=%d)",
rect.left, rect.top, rect.right, rect.bottom,
this->width, this->height);
return BAD_VALUE;
diff --git a/libs/ui/GraphicBufferAllocator.cpp b/libs/ui/GraphicBufferAllocator.cpp
index 466fce6..d344737 100644
--- a/libs/ui/GraphicBufferAllocator.cpp
+++ b/libs/ui/GraphicBufferAllocator.cpp
@@ -38,7 +38,7 @@ GraphicBufferAllocator::GraphicBufferAllocator()
{
hw_module_t const* module;
int err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module);
- LOGE_IF(err, "FATAL: can't find the %s module", GRALLOC_HARDWARE_MODULE_ID);
+ ALOGE_IF(err, "FATAL: can't find the %s module", GRALLOC_HARDWARE_MODULE_ID);
if (err == 0) {
gralloc_open(module, &mAllocDev);
}
diff --git a/libs/ui/GraphicBufferMapper.cpp b/libs/ui/GraphicBufferMapper.cpp
index ac53da8..b173c85 100644
--- a/libs/ui/GraphicBufferMapper.cpp
+++ b/libs/ui/GraphicBufferMapper.cpp
@@ -38,7 +38,7 @@ GraphicBufferMapper::GraphicBufferMapper()
{
hw_module_t const* module;
int err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module);
- LOGE_IF(err, "FATAL: can't find the %s module", GRALLOC_HARDWARE_MODULE_ID);
+ ALOGE_IF(err, "FATAL: can't find the %s module", GRALLOC_HARDWARE_MODULE_ID);
if (err == 0) {
mAllocMod = (gralloc_module_t const *)module;
}
diff --git a/libs/ui/InputTransport.cpp b/libs/ui/InputTransport.cpp
index 00716d7..09cbb31 100644
--- a/libs/ui/InputTransport.cpp
+++ b/libs/ui/InputTransport.cpp
@@ -88,12 +88,12 @@ status_t InputChannel::openInputChannelPair(const String8& name,
int serverAshmemFd = ashmem_create_region(ashmemName.string(), DEFAULT_MESSAGE_BUFFER_SIZE);
if (serverAshmemFd < 0) {
result = -errno;
- LOGE("channel '%s' ~ Could not create shared memory region. errno=%d",
+ ALOGE("channel '%s' ~ Could not create shared memory region. errno=%d",
name.string(), errno);
} else {
result = ashmem_set_prot_region(serverAshmemFd, PROT_READ | PROT_WRITE);
if (result < 0) {
- LOGE("channel '%s' ~ Error %d trying to set protection of ashmem fd %d.",
+ ALOGE("channel '%s' ~ Error %d trying to set protection of ashmem fd %d.",
name.string(), result, serverAshmemFd);
} else {
// Dup the file descriptor because the server and client input channel objects that
@@ -102,19 +102,19 @@ status_t InputChannel::openInputChannelPair(const String8& name,
clientAshmemFd = dup(serverAshmemFd);
if (clientAshmemFd < 0) {
result = -errno;
- LOGE("channel '%s' ~ Could not dup() shared memory region fd. errno=%d",
+ ALOGE("channel '%s' ~ Could not dup() shared memory region fd. errno=%d",
name.string(), errno);
} else {
int forward[2];
if (pipe(forward)) {
result = -errno;
- LOGE("channel '%s' ~ Could not create forward pipe. errno=%d",
+ ALOGE("channel '%s' ~ Could not create forward pipe. errno=%d",
name.string(), errno);
} else {
int reverse[2];
if (pipe(reverse)) {
result = -errno;
- LOGE("channel '%s' ~ Could not create reverse pipe. errno=%d",
+ ALOGE("channel '%s' ~ Could not create reverse pipe. errno=%d",
name.string(), errno);
} else {
String8 serverChannelName = name;
@@ -220,7 +220,7 @@ status_t InputPublisher::initialize() {
int ashmemFd = mChannel->getAshmemFd();
int result = ashmem_get_size_region(ashmemFd);
if (result < 0) {
- LOGE("channel '%s' publisher ~ Error %d getting size of ashmem fd %d.",
+ ALOGE("channel '%s' publisher ~ Error %d getting size of ashmem fd %d.",
mChannel->getName().string(), result, ashmemFd);
return UNKNOWN_ERROR;
}
@@ -229,7 +229,7 @@ status_t InputPublisher::initialize() {
mSharedMessage = static_cast<InputMessage*>(mmap(NULL, mAshmemSize,
PROT_READ | PROT_WRITE, MAP_SHARED, ashmemFd, 0));
if (! mSharedMessage) {
- LOGE("channel '%s' publisher ~ mmap failed on ashmem fd %d.",
+ ALOGE("channel '%s' publisher ~ mmap failed on ashmem fd %d.",
mChannel->getName().string(), ashmemFd);
return NO_MEMORY;
}
@@ -253,7 +253,7 @@ status_t InputPublisher::reset() {
if (mSharedMessage->consumed) {
result = sem_post(& mSharedMessage->semaphore);
if (result < 0) {
- LOGE("channel '%s' publisher ~ Error %d in sem_post.",
+ ALOGE("channel '%s' publisher ~ Error %d in sem_post.",
mChannel->getName().string(), errno);
return UNKNOWN_ERROR;
}
@@ -261,7 +261,7 @@ status_t InputPublisher::reset() {
result = sem_destroy(& mSharedMessage->semaphore);
if (result < 0) {
- LOGE("channel '%s' publisher ~ Error %d in sem_destroy.",
+ ALOGE("channel '%s' publisher ~ Error %d in sem_destroy.",
mChannel->getName().string(), errno);
return UNKNOWN_ERROR;
}
@@ -273,7 +273,7 @@ status_t InputPublisher::reset() {
int ashmemFd = mChannel->getAshmemFd();
result = ashmem_unpin_region(ashmemFd, 0, 0);
if (result < 0) {
- LOGE("channel '%s' publisher ~ Error %d unpinning ashmem fd %d.",
+ ALOGE("channel '%s' publisher ~ Error %d unpinning ashmem fd %d.",
mChannel->getName().string(), result, ashmemFd);
return UNKNOWN_ERROR;
}
@@ -291,7 +291,7 @@ status_t InputPublisher::publishInputEvent(
int32_t deviceId,
int32_t source) {
if (mPinned) {
- LOGE("channel '%s' publisher ~ Attempted to publish a new event but publisher has "
+ ALOGE("channel '%s' publisher ~ Attempted to publish a new event but publisher has "
"not yet been reset.", mChannel->getName().string());
return INVALID_OPERATION;
}
@@ -302,7 +302,7 @@ status_t InputPublisher::publishInputEvent(
int ashmemFd = mChannel->getAshmemFd();
int result = ashmem_pin_region(ashmemFd, 0, 0);
if (result < 0) {
- LOGE("channel '%s' publisher ~ Error %d pinning ashmem fd %d.",
+ ALOGE("channel '%s' publisher ~ Error %d pinning ashmem fd %d.",
mChannel->getName().string(), result, ashmemFd);
return UNKNOWN_ERROR;
}
@@ -311,7 +311,7 @@ status_t InputPublisher::publishInputEvent(
result = sem_init(& mSharedMessage->semaphore, 1, 1);
if (result < 0) {
- LOGE("channel '%s' publisher ~ Error %d in sem_init.",
+ ALOGE("channel '%s' publisher ~ Error %d in sem_init.",
mChannel->getName().string(), errno);
return UNKNOWN_ERROR;
}
@@ -390,7 +390,7 @@ status_t InputPublisher::publishMotionEvent(
#endif
if (pointerCount > MAX_POINTERS || pointerCount < 1) {
- LOGE("channel '%s' publisher ~ Invalid number of pointers provided: %d.",
+ ALOGE("channel '%s' publisher ~ Invalid number of pointers provided: %d.",
mChannel->getName().string(), pointerCount);
return BAD_VALUE;
}
@@ -444,7 +444,7 @@ status_t InputPublisher::appendMotionSample(
#endif
if (! mPinned || ! mMotionEventSampleDataTail) {
- LOGE("channel '%s' publisher ~ Cannot append motion sample because there is no current "
+ ALOGE("channel '%s' publisher ~ Cannot append motion sample because there is no current "
"AMOTION_EVENT_ACTION_MOVE or AMOTION_EVENT_ACTION_HOVER_MOVE event.",
mChannel->getName().string());
return INVALID_OPERATION;
@@ -478,7 +478,7 @@ status_t InputPublisher::appendMotionSample(
#endif
return FAILED_TRANSACTION;
} else {
- LOGE("channel '%s' publisher ~ Error %d in sem_trywait.",
+ ALOGE("channel '%s' publisher ~ Error %d in sem_trywait.",
mChannel->getName().string(), errno);
return UNKNOWN_ERROR;
}
@@ -496,7 +496,7 @@ status_t InputPublisher::appendMotionSample(
if (mWasDispatched) {
result = sem_post(& mSharedMessage->semaphore);
if (result < 0) {
- LOGE("channel '%s' publisher ~ Error %d in sem_post.",
+ ALOGE("channel '%s' publisher ~ Error %d in sem_post.",
mChannel->getName().string(), errno);
return UNKNOWN_ERROR;
}
@@ -531,7 +531,7 @@ status_t InputPublisher::receiveFinishedSignal(bool* outHandled) {
} else if (signal == INPUT_SIGNAL_FINISHED_UNHANDLED) {
*outHandled = false;
} else {
- LOGE("channel '%s' publisher ~ Received unexpected signal '%c' from consumer",
+ ALOGE("channel '%s' publisher ~ Received unexpected signal '%c' from consumer",
mChannel->getName().string(), signal);
return UNKNOWN_ERROR;
}
@@ -559,7 +559,7 @@ status_t InputConsumer::initialize() {
int ashmemFd = mChannel->getAshmemFd();
int result = ashmem_get_size_region(ashmemFd);
if (result < 0) {
- LOGE("channel '%s' consumer ~ Error %d getting size of ashmem fd %d.",
+ ALOGE("channel '%s' consumer ~ Error %d getting size of ashmem fd %d.",
mChannel->getName().string(), result, ashmemFd);
return UNKNOWN_ERROR;
}
@@ -569,7 +569,7 @@ status_t InputConsumer::initialize() {
mSharedMessage = static_cast<InputMessage*>(mmap(NULL, mAshmemSize,
PROT_READ | PROT_WRITE, MAP_SHARED, ashmemFd, 0));
if (! mSharedMessage) {
- LOGE("channel '%s' consumer ~ mmap failed on ashmem fd %d.",
+ ALOGE("channel '%s' consumer ~ mmap failed on ashmem fd %d.",
mChannel->getName().string(), ashmemFd);
return NO_MEMORY;
}
@@ -589,19 +589,19 @@ status_t InputConsumer::consume(InputEventFactoryInterface* factory, InputEvent*
int result = ashmem_pin_region(ashmemFd, 0, 0);
if (result != ASHMEM_NOT_PURGED) {
if (result == ASHMEM_WAS_PURGED) {
- LOGE("channel '%s' consumer ~ Error %d pinning ashmem fd %d because it was purged "
+ ALOGE("channel '%s' consumer ~ Error %d pinning ashmem fd %d because it was purged "
"which probably indicates that the publisher and consumer are out of sync.",
mChannel->getName().string(), result, ashmemFd);
return INVALID_OPERATION;
}
- LOGE("channel '%s' consumer ~ Error %d pinning ashmem fd %d.",
+ ALOGE("channel '%s' consumer ~ Error %d pinning ashmem fd %d.",
mChannel->getName().string(), result, ashmemFd);
return UNKNOWN_ERROR;
}
if (mSharedMessage->consumed) {
- LOGE("channel '%s' consumer ~ The current message has already been consumed.",
+ ALOGE("channel '%s' consumer ~ The current message has already been consumed.",
mChannel->getName().string());
return INVALID_OPERATION;
}
@@ -611,7 +611,7 @@ status_t InputConsumer::consume(InputEventFactoryInterface* factory, InputEvent*
// consumed). Eventually the publisher will reinitialize the semaphore for the next message.
result = sem_wait(& mSharedMessage->semaphore);
if (result < 0) {
- LOGE("channel '%s' consumer ~ Error %d in sem_wait.",
+ ALOGE("channel '%s' consumer ~ Error %d in sem_wait.",
mChannel->getName().string(), errno);
return UNKNOWN_ERROR;
}
@@ -640,7 +640,7 @@ status_t InputConsumer::consume(InputEventFactoryInterface* factory, InputEvent*
}
default:
- LOGE("channel '%s' consumer ~ Received message of unknown type %d",
+ ALOGE("channel '%s' consumer ~ Received message of unknown type %d",
mChannel->getName().string(), mSharedMessage->type);
return UNKNOWN_ERROR;
}
@@ -671,7 +671,7 @@ status_t InputConsumer::receiveDispatchSignal() {
return result;
}
if (signal != INPUT_SIGNAL_DISPATCH) {
- LOGE("channel '%s' consumer ~ Received unexpected signal '%c' from publisher",
+ ALOGE("channel '%s' consumer ~ Received unexpected signal '%c' from publisher",
mChannel->getName().string(), signal);
return UNKNOWN_ERROR;
}
diff --git a/libs/ui/KeyCharacterMap.cpp b/libs/ui/KeyCharacterMap.cpp
index e1d5e8b..485234c 100644
--- a/libs/ui/KeyCharacterMap.cpp
+++ b/libs/ui/KeyCharacterMap.cpp
@@ -95,11 +95,11 @@ status_t KeyCharacterMap::load(const String8& filename, KeyCharacterMap** outMap
Tokenizer* tokenizer;
status_t status = Tokenizer::open(filename, &tokenizer);
if (status) {
- LOGE("Error %d opening key character map file %s.", status, filename.string());
+ ALOGE("Error %d opening key character map file %s.", status, filename.string());
} else {
KeyCharacterMap* map = new KeyCharacterMap();
if (!map) {
- LOGE("Error allocating key character map.");
+ ALOGE("Error allocating key character map.");
status = NO_MEMORY;
} else {
#if DEBUG_PARSER_PERFORMANCE
@@ -474,7 +474,7 @@ status_t KeyCharacterMap::Parser::parse() {
status_t status = parseKey();
if (status) return status;
} else {
- LOGE("%s: Expected keyword, got '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Expected keyword, got '%s'.", mTokenizer->getLocation().string(),
keywordToken.string());
return BAD_VALUE;
}
@@ -490,7 +490,7 @@ status_t KeyCharacterMap::Parser::parse() {
mTokenizer->skipDelimiters(WHITESPACE);
if (!mTokenizer->isEol()) {
- LOGE("%s: Expected end of line, got '%s'.",
+ ALOGE("%s: Expected end of line, got '%s'.",
mTokenizer->getLocation().string(),
mTokenizer->peekRemainderOfLine().string());
return BAD_VALUE;
@@ -501,13 +501,13 @@ status_t KeyCharacterMap::Parser::parse() {
}
if (mState != STATE_TOP) {
- LOGE("%s: Unterminated key description at end of file.",
+ ALOGE("%s: Unterminated key description at end of file.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
if (mMap->mType == KEYBOARD_TYPE_UNKNOWN) {
- LOGE("%s: Missing required keyboard 'type' declaration.",
+ ALOGE("%s: Missing required keyboard 'type' declaration.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -517,7 +517,7 @@ status_t KeyCharacterMap::Parser::parse() {
status_t KeyCharacterMap::Parser::parseType() {
if (mMap->mType != KEYBOARD_TYPE_UNKNOWN) {
- LOGE("%s: Duplicate keyboard 'type' declaration.",
+ ALOGE("%s: Duplicate keyboard 'type' declaration.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -535,7 +535,7 @@ status_t KeyCharacterMap::Parser::parseType() {
} else if (typeToken == "SPECIAL_FUNCTION") {
type = KEYBOARD_TYPE_SPECIAL_FUNCTION;
} else {
- LOGE("%s: Expected keyboard type label, got '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Expected keyboard type label, got '%s'.", mTokenizer->getLocation().string(),
typeToken.string());
return BAD_VALUE;
}
@@ -551,12 +551,12 @@ status_t KeyCharacterMap::Parser::parseKey() {
String8 keyCodeToken = mTokenizer->nextToken(WHITESPACE);
int32_t keyCode = getKeyCodeByLabel(keyCodeToken.string());
if (!keyCode) {
- LOGE("%s: Expected key code label, got '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Expected key code label, got '%s'.", mTokenizer->getLocation().string(),
keyCodeToken.string());
return BAD_VALUE;
}
if (mMap->mKeys.indexOfKey(keyCode) >= 0) {
- LOGE("%s: Duplicate entry for key code '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Duplicate entry for key code '%s'.", mTokenizer->getLocation().string(),
keyCodeToken.string());
return BAD_VALUE;
}
@@ -564,7 +564,7 @@ status_t KeyCharacterMap::Parser::parseKey() {
mTokenizer->skipDelimiters(WHITESPACE);
String8 openBraceToken = mTokenizer->nextToken(WHITESPACE);
if (openBraceToken != "{") {
- LOGE("%s: Expected '{' after key code label, got '%s'.",
+ ALOGE("%s: Expected '{' after key code label, got '%s'.",
mTokenizer->getLocation().string(), openBraceToken.string());
return BAD_VALUE;
}
@@ -597,7 +597,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
int32_t metaState;
status_t status = parseModifier(token, &metaState);
if (status) {
- LOGE("%s: Expected a property name or modifier, got '%s'.",
+ ALOGE("%s: Expected a property name or modifier, got '%s'.",
mTokenizer->getLocation().string(), token.string());
return status;
}
@@ -616,7 +616,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
}
}
- LOGE("%s: Expected ',' or ':' after property name.",
+ ALOGE("%s: Expected ',' or ':' after property name.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -634,12 +634,12 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
char16_t character;
status_t status = parseCharacterLiteral(&character);
if (status || !character) {
- LOGE("%s: Invalid character literal for key.",
+ ALOGE("%s: Invalid character literal for key.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
if (haveCharacter) {
- LOGE("%s: Cannot combine multiple character literals or 'none'.",
+ ALOGE("%s: Cannot combine multiple character literals or 'none'.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -649,7 +649,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
token = mTokenizer->nextToken(WHITESPACE);
if (token == "none") {
if (haveCharacter) {
- LOGE("%s: Cannot combine multiple character literals or 'none'.",
+ ALOGE("%s: Cannot combine multiple character literals or 'none'.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -659,20 +659,20 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
token = mTokenizer->nextToken(WHITESPACE);
int32_t keyCode = getKeyCodeByLabel(token.string());
if (!keyCode) {
- LOGE("%s: Invalid key code label for fallback behavior, got '%s'.",
+ ALOGE("%s: Invalid key code label for fallback behavior, got '%s'.",
mTokenizer->getLocation().string(),
token.string());
return BAD_VALUE;
}
if (haveFallback) {
- LOGE("%s: Cannot combine multiple fallback key codes.",
+ ALOGE("%s: Cannot combine multiple fallback key codes.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
behavior.fallbackKeyCode = keyCode;
haveFallback = true;
} else {
- LOGE("%s: Expected a key behavior after ':'.",
+ ALOGE("%s: Expected a key behavior after ':'.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -688,7 +688,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
switch (property.property) {
case PROPERTY_LABEL:
if (key->label) {
- LOGE("%s: Duplicate label for key.",
+ ALOGE("%s: Duplicate label for key.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -699,7 +699,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
break;
case PROPERTY_NUMBER:
if (key->number) {
- LOGE("%s: Duplicate number for key.",
+ ALOGE("%s: Duplicate number for key.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -711,7 +711,7 @@ status_t KeyCharacterMap::Parser::parseKeyProperty() {
case PROPERTY_META: {
for (Behavior* b = key->firstBehavior; b; b = b->next) {
if (b->metaState == property.metaState) {
- LOGE("%s: Duplicate key behavior for modifier.",
+ ALOGE("%s: Duplicate key behavior for modifier.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -757,7 +757,7 @@ status_t KeyCharacterMap::Parser::parseModifier(const String8& token, int32_t* o
return BAD_VALUE;
}
if (combinedMeta & metaState) {
- LOGE("%s: Duplicate modifier combination '%s'.",
+ ALOGE("%s: Duplicate modifier combination '%s'.",
mTokenizer->getLocation().string(), token.string());
return BAD_VALUE;
}
@@ -831,7 +831,7 @@ status_t KeyCharacterMap::Parser::parseCharacterLiteral(char16_t* outCharacter)
}
Error:
- LOGE("%s: Malformed character literal.", mTokenizer->getLocation().string());
+ ALOGE("%s: Malformed character literal.", mTokenizer->getLocation().string());
return BAD_VALUE;
}
diff --git a/libs/ui/KeyLayoutMap.cpp b/libs/ui/KeyLayoutMap.cpp
index 7ba654a..44a9420 100644
--- a/libs/ui/KeyLayoutMap.cpp
+++ b/libs/ui/KeyLayoutMap.cpp
@@ -53,11 +53,11 @@ status_t KeyLayoutMap::load(const String8& filename, KeyLayoutMap** outMap) {
Tokenizer* tokenizer;
status_t status = Tokenizer::open(filename, &tokenizer);
if (status) {
- LOGE("Error %d opening key layout map file %s.", status, filename.string());
+ ALOGE("Error %d opening key layout map file %s.", status, filename.string());
} else {
KeyLayoutMap* map = new KeyLayoutMap();
if (!map) {
- LOGE("Error allocating key layout map.");
+ ALOGE("Error allocating key layout map.");
status = NO_MEMORY;
} else {
#if DEBUG_PARSER_PERFORMANCE
@@ -164,14 +164,14 @@ status_t KeyLayoutMap::Parser::parse() {
status_t status = parseAxis();
if (status) return status;
} else {
- LOGE("%s: Expected keyword, got '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Expected keyword, got '%s'.", mTokenizer->getLocation().string(),
keywordToken.string());
return BAD_VALUE;
}
mTokenizer->skipDelimiters(WHITESPACE);
if (!mTokenizer->isEol()) {
- LOGE("%s: Expected end of line, got '%s'.",
+ ALOGE("%s: Expected end of line, got '%s'.",
mTokenizer->getLocation().string(),
mTokenizer->peekRemainderOfLine().string());
return BAD_VALUE;
@@ -188,12 +188,12 @@ status_t KeyLayoutMap::Parser::parseKey() {
char* end;
int32_t scanCode = int32_t(strtol(scanCodeToken.string(), &end, 0));
if (*end) {
- LOGE("%s: Expected key scan code number, got '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Expected key scan code number, got '%s'.", mTokenizer->getLocation().string(),
scanCodeToken.string());
return BAD_VALUE;
}
if (mMap->mKeys.indexOfKey(scanCode) >= 0) {
- LOGE("%s: Duplicate entry for key scan code '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Duplicate entry for key scan code '%s'.", mTokenizer->getLocation().string(),
scanCodeToken.string());
return BAD_VALUE;
}
@@ -202,7 +202,7 @@ status_t KeyLayoutMap::Parser::parseKey() {
String8 keyCodeToken = mTokenizer->nextToken(WHITESPACE);
int32_t keyCode = getKeyCodeByLabel(keyCodeToken.string());
if (!keyCode) {
- LOGE("%s: Expected key code label, got '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Expected key code label, got '%s'.", mTokenizer->getLocation().string(),
keyCodeToken.string());
return BAD_VALUE;
}
@@ -215,12 +215,12 @@ status_t KeyLayoutMap::Parser::parseKey() {
String8 flagToken = mTokenizer->nextToken(WHITESPACE);
uint32_t flag = getKeyFlagByLabel(flagToken.string());
if (!flag) {
- LOGE("%s: Expected key flag label, got '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Expected key flag label, got '%s'.", mTokenizer->getLocation().string(),
flagToken.string());
return BAD_VALUE;
}
if (flags & flag) {
- LOGE("%s: Duplicate key flag '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Duplicate key flag '%s'.", mTokenizer->getLocation().string(),
flagToken.string());
return BAD_VALUE;
}
@@ -242,12 +242,12 @@ status_t KeyLayoutMap::Parser::parseAxis() {
char* end;
int32_t scanCode = int32_t(strtol(scanCodeToken.string(), &end, 0));
if (*end) {
- LOGE("%s: Expected axis scan code number, got '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Expected axis scan code number, got '%s'.", mTokenizer->getLocation().string(),
scanCodeToken.string());
return BAD_VALUE;
}
if (mMap->mAxes.indexOfKey(scanCode) >= 0) {
- LOGE("%s: Duplicate entry for axis scan code '%s'.", mTokenizer->getLocation().string(),
+ ALOGE("%s: Duplicate entry for axis scan code '%s'.", mTokenizer->getLocation().string(),
scanCodeToken.string());
return BAD_VALUE;
}
@@ -263,7 +263,7 @@ status_t KeyLayoutMap::Parser::parseAxis() {
String8 axisToken = mTokenizer->nextToken(WHITESPACE);
axisInfo.axis = getAxisByLabel(axisToken.string());
if (axisInfo.axis < 0) {
- LOGE("%s: Expected inverted axis label, got '%s'.",
+ ALOGE("%s: Expected inverted axis label, got '%s'.",
mTokenizer->getLocation().string(), axisToken.string());
return BAD_VALUE;
}
@@ -274,7 +274,7 @@ status_t KeyLayoutMap::Parser::parseAxis() {
String8 splitToken = mTokenizer->nextToken(WHITESPACE);
axisInfo.splitValue = int32_t(strtol(splitToken.string(), &end, 0));
if (*end) {
- LOGE("%s: Expected split value, got '%s'.",
+ ALOGE("%s: Expected split value, got '%s'.",
mTokenizer->getLocation().string(), splitToken.string());
return BAD_VALUE;
}
@@ -283,7 +283,7 @@ status_t KeyLayoutMap::Parser::parseAxis() {
String8 lowAxisToken = mTokenizer->nextToken(WHITESPACE);
axisInfo.axis = getAxisByLabel(lowAxisToken.string());
if (axisInfo.axis < 0) {
- LOGE("%s: Expected low axis label, got '%s'.",
+ ALOGE("%s: Expected low axis label, got '%s'.",
mTokenizer->getLocation().string(), lowAxisToken.string());
return BAD_VALUE;
}
@@ -292,14 +292,14 @@ status_t KeyLayoutMap::Parser::parseAxis() {
String8 highAxisToken = mTokenizer->nextToken(WHITESPACE);
axisInfo.highAxis = getAxisByLabel(highAxisToken.string());
if (axisInfo.highAxis < 0) {
- LOGE("%s: Expected high axis label, got '%s'.",
+ ALOGE("%s: Expected high axis label, got '%s'.",
mTokenizer->getLocation().string(), highAxisToken.string());
return BAD_VALUE;
}
} else {
axisInfo.axis = getAxisByLabel(token.string());
if (axisInfo.axis < 0) {
- LOGE("%s: Expected axis label, 'split' or 'invert', got '%s'.",
+ ALOGE("%s: Expected axis label, 'split' or 'invert', got '%s'.",
mTokenizer->getLocation().string(), token.string());
return BAD_VALUE;
}
@@ -316,12 +316,12 @@ status_t KeyLayoutMap::Parser::parseAxis() {
String8 flatToken = mTokenizer->nextToken(WHITESPACE);
axisInfo.flatOverride = int32_t(strtol(flatToken.string(), &end, 0));
if (*end) {
- LOGE("%s: Expected flat value, got '%s'.",
+ ALOGE("%s: Expected flat value, got '%s'.",
mTokenizer->getLocation().string(), flatToken.string());
return BAD_VALUE;
}
} else {
- LOGE("%s: Expected keyword 'flat', got '%s'.",
+ ALOGE("%s: Expected keyword 'flat', got '%s'.",
mTokenizer->getLocation().string(), keywordToken.string());
return BAD_VALUE;
}
diff --git a/libs/ui/Keyboard.cpp b/libs/ui/Keyboard.cpp
index 10bb39c..e4611f7 100644
--- a/libs/ui/Keyboard.cpp
+++ b/libs/ui/Keyboard.cpp
@@ -50,7 +50,7 @@ status_t KeyMap::load(const InputDeviceIdentifier& deviceIdenfifier,
keyLayoutName)) {
status_t status = loadKeyLayout(deviceIdenfifier, keyLayoutName);
if (status == NAME_NOT_FOUND) {
- LOGE("Configuration for keyboard device '%s' requested keyboard layout '%s' but "
+ ALOGE("Configuration for keyboard device '%s' requested keyboard layout '%s' but "
"it was not found.",
deviceIdenfifier.name.string(), keyLayoutName.string());
}
@@ -61,7 +61,7 @@ status_t KeyMap::load(const InputDeviceIdentifier& deviceIdenfifier,
keyCharacterMapName)) {
status_t status = loadKeyCharacterMap(deviceIdenfifier, keyCharacterMapName);
if (status == NAME_NOT_FOUND) {
- LOGE("Configuration for keyboard device '%s' requested keyboard character "
+ ALOGE("Configuration for keyboard device '%s' requested keyboard character "
"map '%s' but it was not found.",
deviceIdenfifier.name.string(), keyLayoutName.string());
}
@@ -90,7 +90,7 @@ status_t KeyMap::load(const InputDeviceIdentifier& deviceIdenfifier,
}
// Give up!
- LOGE("Could not determine key map for device '%s' and no default key maps were found!",
+ ALOGE("Could not determine key map for device '%s' and no default key maps were found!",
deviceIdenfifier.name.string());
return NAME_NOT_FOUND;
}
diff --git a/libs/ui/Region.cpp b/libs/ui/Region.cpp
index d9ad863..8cd047a 100644
--- a/libs/ui/Region.cpp
+++ b/libs/ui/Region.cpp
@@ -69,7 +69,7 @@ Region::Region(const Rect& rhs)
Region::Region(const void* buffer)
{
status_t err = read(buffer);
- LOGE_IF(err<0, "error %s reading Region from buffer", strerror(err));
+ ALOGE_IF(err<0, "error %s reading Region from buffer", strerror(err));
}
Region::~Region()
@@ -338,15 +338,15 @@ bool Region::validate(const Region& reg, const char* name)
b.bottom = b.bottom > cur->bottom ? b.bottom : cur->bottom;
if (cur->top == prev->top) {
if (cur->bottom != prev->bottom) {
- LOGE("%s: invalid span %p", name, cur);
+ ALOGE("%s: invalid span %p", name, cur);
result = false;
} else if (cur->left < prev->right) {
- LOGE("%s: spans overlap horizontally prev=%p, cur=%p",
+ ALOGE("%s: spans overlap horizontally prev=%p, cur=%p",
name, prev, cur);
result = false;
}
} else if (cur->top < prev->bottom) {
- LOGE("%s: spans overlap vertically prev=%p, cur=%p",
+ ALOGE("%s: spans overlap vertically prev=%p, cur=%p",
name, prev, cur);
result = false;
}
@@ -355,7 +355,7 @@ bool Region::validate(const Region& reg, const char* name)
}
if (b != reg.getBounds()) {
result = false;
- LOGE("%s: invalid bounds [%d,%d,%d,%d] vs. [%d,%d,%d,%d]", name,
+ ALOGE("%s: invalid bounds [%d,%d,%d,%d] vs. [%d,%d,%d,%d]", name,
b.left, b.top, b.right, b.bottom,
reg.getBounds().left, reg.getBounds().top,
reg.getBounds().right, reg.getBounds().bottom);
@@ -480,7 +480,7 @@ void Region::boolean_operation(int op, Region& dst,
const Rect& rhs, int dx, int dy)
{
if (!rhs.isValid()) {
- LOGE("Region::boolean_operation(op=%d) invalid Rect={%d,%d,%d,%d}",
+ ALOGE("Region::boolean_operation(op=%d) invalid Rect={%d,%d,%d,%d}",
op, rhs.left, rhs.top, rhs.right, rhs.bottom);
return;
}
diff --git a/libs/ui/VirtualKeyMap.cpp b/libs/ui/VirtualKeyMap.cpp
index 90c092d..62d5b59 100644
--- a/libs/ui/VirtualKeyMap.cpp
+++ b/libs/ui/VirtualKeyMap.cpp
@@ -51,11 +51,11 @@ status_t VirtualKeyMap::load(const String8& filename, VirtualKeyMap** outMap) {
Tokenizer* tokenizer;
status_t status = Tokenizer::open(filename, &tokenizer);
if (status) {
- LOGE("Error %d opening virtual key map file %s.", status, filename.string());
+ ALOGE("Error %d opening virtual key map file %s.", status, filename.string());
} else {
VirtualKeyMap* map = new VirtualKeyMap();
if (!map) {
- LOGE("Error allocating virtual key map.");
+ ALOGE("Error allocating virtual key map.");
status = NO_MEMORY;
} else {
#if DEBUG_PARSER_PERFORMANCE
@@ -104,7 +104,7 @@ status_t VirtualKeyMap::Parser::parse() {
do {
String8 token = mTokenizer->nextToken(WHITESPACE_OR_FIELD_DELIMITER);
if (token != "0x01") {
- LOGE("%s: Unknown virtual key type, expected 0x01.",
+ ALOGE("%s: Unknown virtual key type, expected 0x01.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -116,7 +116,7 @@ status_t VirtualKeyMap::Parser::parse() {
&& parseNextIntField(&defn.width)
&& parseNextIntField(&defn.height);
if (!success) {
- LOGE("%s: Expected 5 colon-delimited integers in virtual key definition.",
+ ALOGE("%s: Expected 5 colon-delimited integers in virtual key definition.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -130,7 +130,7 @@ status_t VirtualKeyMap::Parser::parse() {
} while (consumeFieldDelimiterAndSkipWhitespace());
if (!mTokenizer->isEol()) {
- LOGE("%s: Expected end of line, got '%s'.",
+ ALOGE("%s: Expected end of line, got '%s'.",
mTokenizer->getLocation().string(),
mTokenizer->peekRemainderOfLine().string());
return BAD_VALUE;
@@ -162,7 +162,7 @@ bool VirtualKeyMap::Parser::parseNextIntField(int32_t* outValue) {
char* end;
*outValue = strtol(token.string(), &end, 0);
if (token.isEmpty() || *end != '\0') {
- LOGE("Expected an integer, got '%s'.", token.string());
+ ALOGE("Expected an integer, got '%s'.", token.string());
return false;
}
return true;
diff --git a/libs/utils/Asset.cpp b/libs/utils/Asset.cpp
index 22af816..50e701a 100644
--- a/libs/utils/Asset.cpp
+++ b/libs/utils/Asset.cpp
@@ -473,7 +473,7 @@ ssize_t _FileAsset::read(void* buf, size_t count)
/* read from the file */
//printf("file read\n");
if (ftell(mFp) != mStart + mOffset) {
- LOGE("Hosed: %ld != %ld+%ld\n",
+ ALOGE("Hosed: %ld != %ld+%ld\n",
ftell(mFp), (long) mStart, (long) mOffset);
assert(false);
}
@@ -581,7 +581,7 @@ const void* _FileAsset::getBuffer(bool wordAligned)
buf = new unsigned char[allocLen];
if (buf == NULL) {
- LOGE("alloc of %ld bytes failed\n", (long) allocLen);
+ ALOGE("alloc of %ld bytes failed\n", (long) allocLen);
return NULL;
}
@@ -590,7 +590,7 @@ const void* _FileAsset::getBuffer(bool wordAligned)
long oldPosn = ftell(mFp);
fseek(mFp, mStart, SEEK_SET);
if (fread(buf, 1, mLength, mFp) != (size_t) mLength) {
- LOGE("failed reading %ld bytes\n", (long) mLength);
+ ALOGE("failed reading %ld bytes\n", (long) mLength);
delete[] buf;
return NULL;
}
@@ -658,7 +658,7 @@ const void* _FileAsset::ensureAlignment(FileMap* map)
getAssetSource(), (int)mLength);
unsigned char* buf = new unsigned char[mLength];
if (buf == NULL) {
- LOGE("alloc of %ld bytes failed\n", (long) mLength);
+ ALOGE("alloc of %ld bytes failed\n", (long) mLength);
return NULL;
}
memcpy(buf, data, mLength);
diff --git a/libs/utils/AssetManager.cpp b/libs/utils/AssetManager.cpp
index 8a8551f..47a2b99 100644
--- a/libs/utils/AssetManager.cpp
+++ b/libs/utils/AssetManager.cpp
@@ -1461,7 +1461,7 @@ bool AssetManager::scanAndMergeZipLocked(SortedVector<AssetDir::FileInfo>* pMerg
entry = pZip->findEntryByIndex(i);
if (pZip->getEntryFileName(entry, nameBuf, sizeof(nameBuf)) != 0) {
// TODO: fix this if we expect to have long names
- LOGE("ARGH: name too long?\n");
+ ALOGE("ARGH: name too long?\n");
continue;
}
//printf("Comparing %s in %s?\n", nameBuf, dirName.string());
diff --git a/libs/utils/BackupHelpers.cpp b/libs/utils/BackupHelpers.cpp
index 04b2e71..f77a891 100644
--- a/libs/utils/BackupHelpers.cpp
+++ b/libs/utils/BackupHelpers.cpp
@@ -232,7 +232,7 @@ write_update_file(BackupDataWriter* dataStream, int fd, int mode, const String8&
lseek(fd, 0, SEEK_SET);
if (sizeof(metadata) != 16) {
- LOGE("ERROR: metadata block is the wrong size!");
+ ALOGE("ERROR: metadata block is the wrong size!");
}
bytesLeft = fileSize + sizeof(metadata);
@@ -280,7 +280,7 @@ write_update_file(BackupDataWriter* dataStream, int fd, int mode, const String8&
}
}
}
- LOGE("write_update_file size mismatch for %s. expected=%d actual=%d."
+ ALOGE("write_update_file size mismatch for %s. expected=%d actual=%d."
" You aren't doing proper locking!", realFilename, fileSize, fileSize-bytesLeft);
}
@@ -525,7 +525,7 @@ int write_tarfile(const String8& packageName, const String8& domain,
struct stat64 s;
if (lstat64(filepath.string(), &s) != 0) {
err = errno;
- LOGE("Error %d (%s) from lstat64(%s)", err, strerror(err), filepath.string());
+ ALOGE("Error %d (%s) from lstat64(%s)", err, strerror(err), filepath.string());
return err;
}
@@ -540,7 +540,7 @@ int write_tarfile(const String8& packageName, const String8& domain,
int fd = open(filepath.string(), O_RDONLY);
if (fd < 0) {
err = errno;
- LOGE("Error %d (%s) from open(%s)", err, strerror(err), filepath.string());
+ ALOGE("Error %d (%s) from open(%s)", err, strerror(err), filepath.string());
return err;
}
@@ -551,7 +551,7 @@ int write_tarfile(const String8& packageName, const String8& domain,
char* paxData = buf + 1024;
if (buf == NULL) {
- LOGE("Out of mem allocating transfer buffer");
+ ALOGE("Out of mem allocating transfer buffer");
err = ENOMEM;
goto cleanup;
}
@@ -688,11 +688,11 @@ int write_tarfile(const String8& packageName, const String8& domain,
ssize_t nRead = read(fd, buf, toRead);
if (nRead < 0) {
err = errno;
- LOGE("Unable to read file [%s], err=%d (%s)", filepath.string(),
+ ALOGE("Unable to read file [%s], err=%d (%s)", filepath.string(),
err, strerror(err));
break;
} else if (nRead == 0) {
- LOGE("EOF but expect %lld more bytes in [%s]", (long long) toWrite,
+ ALOGE("EOF but expect %lld more bytes in [%s]", (long long) toWrite,
filepath.string());
err = EIO;
break;
diff --git a/libs/utils/BlobCache.cpp b/libs/utils/BlobCache.cpp
index 0011d29..e52cf2f 100644
--- a/libs/utils/BlobCache.cpp
+++ b/libs/utils/BlobCache.cpp
@@ -183,13 +183,13 @@ size_t BlobCache::getFdCount() const {
status_t BlobCache::flatten(void* buffer, size_t size, int fds[], size_t count)
const {
if (count != 0) {
- LOGE("flatten: nonzero fd count: %d", count);
+ ALOGE("flatten: nonzero fd count: %d", count);
return BAD_VALUE;
}
// Write the cache header
if (size < sizeof(Header)) {
- LOGE("flatten: not enough room for cache header");
+ ALOGE("flatten: not enough room for cache header");
return BAD_VALUE;
}
Header* header = reinterpret_cast<Header*>(buffer);
@@ -210,7 +210,7 @@ status_t BlobCache::flatten(void* buffer, size_t size, int fds[], size_t count)
size_t entrySize = sizeof(EntryHeader) + keySize + valueSize;
if (byteOffset + entrySize > size) {
- LOGE("flatten: not enough room for cache entries");
+ ALOGE("flatten: not enough room for cache entries");
return BAD_VALUE;
}
@@ -234,18 +234,18 @@ status_t BlobCache::unflatten(void const* buffer, size_t size, int fds[],
mCacheEntries.clear();
if (count != 0) {
- LOGE("unflatten: nonzero fd count: %d", count);
+ ALOGE("unflatten: nonzero fd count: %d", count);
return BAD_VALUE;
}
// Read the cache header
if (size < sizeof(Header)) {
- LOGE("unflatten: not enough room for cache header");
+ ALOGE("unflatten: not enough room for cache header");
return BAD_VALUE;
}
const Header* header = reinterpret_cast<const Header*>(buffer);
if (header->mMagicNumber != blobCacheMagic) {
- LOGE("unflatten: bad magic number: %d", header->mMagicNumber);
+ ALOGE("unflatten: bad magic number: %d", header->mMagicNumber);
return BAD_VALUE;
}
if (header->mBlobCacheVersion != blobCacheVersion ||
@@ -261,7 +261,7 @@ status_t BlobCache::unflatten(void const* buffer, size_t size, int fds[],
for (size_t i = 0; i < numEntries; i++) {
if (byteOffset + sizeof(EntryHeader) > size) {
mCacheEntries.clear();
- LOGE("unflatten: not enough room for cache entry headers");
+ ALOGE("unflatten: not enough room for cache entry headers");
return BAD_VALUE;
}
@@ -273,7 +273,7 @@ status_t BlobCache::unflatten(void const* buffer, size_t size, int fds[],
if (byteOffset + entrySize > size) {
mCacheEntries.clear();
- LOGE("unflatten: not enough room for cache entry headers");
+ ALOGE("unflatten: not enough room for cache entry headers");
return BAD_VALUE;
}
diff --git a/libs/utils/FileMap.cpp b/libs/utils/FileMap.cpp
index c9a423e..9ce370e 100644
--- a/libs/utils/FileMap.cpp
+++ b/libs/utils/FileMap.cpp
@@ -108,7 +108,7 @@ bool FileMap::create(const char* origFileName, int fd, off64_t offset, size_t le
mFileHandle = (HANDLE) _get_osfhandle(fd);
mFileMapping = CreateFileMapping( mFileHandle, NULL, protect, 0, 0, NULL);
if (mFileMapping == NULL) {
- LOGE("CreateFileMapping(%p, %lx) failed with error %ld\n",
+ ALOGE("CreateFileMapping(%p, %lx) failed with error %ld\n",
mFileHandle, protect, GetLastError() );
return false;
}
@@ -123,7 +123,7 @@ bool FileMap::create(const char* origFileName, int fd, off64_t offset, size_t le
(DWORD)(adjOffset),
adjLength );
if (mBasePtr == NULL) {
- LOGE("MapViewOfFile(%ld, %ld) failed with error %ld\n",
+ ALOGE("MapViewOfFile(%ld, %ld) failed with error %ld\n",
adjOffset, adjLength, GetLastError() );
CloseHandle(mFileMapping);
mFileMapping = INVALID_HANDLE_VALUE;
@@ -147,7 +147,7 @@ bool FileMap::create(const char* origFileName, int fd, off64_t offset, size_t le
#if NOT_USING_KLIBC
mPageSize = sysconf(_SC_PAGESIZE);
if (mPageSize == -1) {
- LOGE("could not get _SC_PAGESIZE\n");
+ ALOGE("could not get _SC_PAGESIZE\n");
return false;
}
#else
@@ -175,7 +175,7 @@ try_again:
goto try_again;
}
- LOGE("mmap(%ld,%ld) failed: %s\n",
+ ALOGE("mmap(%ld,%ld) failed: %s\n",
(long) adjOffset, (long) adjLength, strerror(errno));
return false;
}
diff --git a/libs/utils/Looper.cpp b/libs/utils/Looper.cpp
index 28ed0e8..d1aa664 100644
--- a/libs/utils/Looper.cpp
+++ b/libs/utils/Looper.cpp
@@ -520,12 +520,12 @@ int Looper::addFd(int fd, int ident, int events, ALooper_callbackFunc callback,
if (! callback) {
if (! mAllowNonCallbacks) {
- LOGE("Invalid attempt to set NULL callback but not allowed for this looper.");
+ ALOGE("Invalid attempt to set NULL callback but not allowed for this looper.");
return -1;
}
if (ident < 0) {
- LOGE("Invalid attempt to set NULL callback with ident <= 0.");
+ ALOGE("Invalid attempt to set NULL callback with ident <= 0.");
return -1;
}
}
@@ -553,14 +553,14 @@ int Looper::addFd(int fd, int ident, int events, ALooper_callbackFunc callback,
if (requestIndex < 0) {
int epollResult = epoll_ctl(mEpollFd, EPOLL_CTL_ADD, fd, & eventItem);
if (epollResult < 0) {
- LOGE("Error adding epoll events for fd %d, errno=%d", fd, errno);
+ ALOGE("Error adding epoll events for fd %d, errno=%d", fd, errno);
return -1;
}
mRequests.add(fd, request);
} else {
int epollResult = epoll_ctl(mEpollFd, EPOLL_CTL_MOD, fd, & eventItem);
if (epollResult < 0) {
- LOGE("Error modifying epoll events for fd %d, errno=%d", fd, errno);
+ ALOGE("Error modifying epoll events for fd %d, errno=%d", fd, errno);
return -1;
}
mRequests.replaceValueAt(requestIndex, request);
@@ -611,7 +611,7 @@ int Looper::removeFd(int fd) {
int epollResult = epoll_ctl(mEpollFd, EPOLL_CTL_DEL, fd, NULL);
if (epollResult < 0) {
- LOGE("Error removing epoll events for fd %d, errno=%d", fd, errno);
+ ALOGE("Error removing epoll events for fd %d, errno=%d", fd, errno);
return -1;
}
diff --git a/libs/utils/PropertyMap.cpp b/libs/utils/PropertyMap.cpp
index d801609..5520702 100644
--- a/libs/utils/PropertyMap.cpp
+++ b/libs/utils/PropertyMap.cpp
@@ -121,11 +121,11 @@ status_t PropertyMap::load(const String8& filename, PropertyMap** outMap) {
Tokenizer* tokenizer;
status_t status = Tokenizer::open(filename, &tokenizer);
if (status) {
- LOGE("Error %d opening property file %s.", status, filename.string());
+ ALOGE("Error %d opening property file %s.", status, filename.string());
} else {
PropertyMap* map = new PropertyMap();
if (!map) {
- LOGE("Error allocating property map.");
+ ALOGE("Error allocating property map.");
status = NO_MEMORY;
} else {
#if DEBUG_PARSER_PERFORMANCE
@@ -172,14 +172,14 @@ status_t PropertyMap::Parser::parse() {
if (!mTokenizer->isEol() && mTokenizer->peekChar() != '#') {
String8 keyToken = mTokenizer->nextToken(WHITESPACE_OR_PROPERTY_DELIMITER);
if (keyToken.isEmpty()) {
- LOGE("%s: Expected non-empty property key.", mTokenizer->getLocation().string());
+ ALOGE("%s: Expected non-empty property key.", mTokenizer->getLocation().string());
return BAD_VALUE;
}
mTokenizer->skipDelimiters(WHITESPACE);
if (mTokenizer->nextChar() != '=') {
- LOGE("%s: Expected '=' between property key and value.",
+ ALOGE("%s: Expected '=' between property key and value.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
@@ -188,21 +188,21 @@ status_t PropertyMap::Parser::parse() {
String8 valueToken = mTokenizer->nextToken(WHITESPACE);
if (valueToken.find("\\", 0) >= 0 || valueToken.find("\"", 0) >= 0) {
- LOGE("%s: Found reserved character '\\' or '\"' in property value.",
+ ALOGE("%s: Found reserved character '\\' or '\"' in property value.",
mTokenizer->getLocation().string());
return BAD_VALUE;
}
mTokenizer->skipDelimiters(WHITESPACE);
if (!mTokenizer->isEol()) {
- LOGE("%s: Expected end of line, got '%s'.",
+ ALOGE("%s: Expected end of line, got '%s'.",
mTokenizer->getLocation().string(),
mTokenizer->peekRemainderOfLine().string());
return BAD_VALUE;
}
if (mMap->hasProperty(keyToken)) {
- LOGE("%s: Duplicate property value for key '%s'.",
+ ALOGE("%s: Duplicate property value for key '%s'.",
mTokenizer->getLocation().string(), keyToken.string());
return BAD_VALUE;
}
diff --git a/libs/utils/RefBase.cpp b/libs/utils/RefBase.cpp
index 0b7dd92..ad0939e 100644
--- a/libs/utils/RefBase.cpp
+++ b/libs/utils/RefBase.cpp
@@ -98,7 +98,7 @@ public:
#if DEBUG_REFS_FATAL_SANITY_CHECKS
LOG_ALWAYS_FATAL("Strong references remain!");
#else
- LOGE("Strong references remain:");
+ ALOGE("Strong references remain:");
#endif
ref_entry* refs = mStrongRefs;
while (refs) {
@@ -116,7 +116,7 @@ public:
#if DEBUG_REFS_FATAL_SANITY_CHECKS
LOG_ALWAYS_FATAL("Weak references remain:");
#else
- LOGE("Weak references remain!");
+ ALOGE("Weak references remain!");
#endif
ref_entry* refs = mWeakRefs;
while (refs) {
@@ -129,7 +129,7 @@ public:
}
}
if (dumpStack) {
- LOGE("above errors at:");
+ ALOGE("above errors at:");
CallStack stack;
stack.update();
stack.dump();
@@ -205,7 +205,7 @@ public:
close(rc);
ALOGD("STACK TRACE for %p saved in %s", this, name);
}
- else LOGE("FAILED TO PRINT STACK TRACE for %p in %s: %s", this,
+ else ALOGE("FAILED TO PRINT STACK TRACE for %p in %s: %s", this,
name, strerror(errno));
}
}
@@ -263,7 +263,7 @@ private:
id, mBase, this);
#endif
- LOGE("RefBase: removing id %p on RefBase %p"
+ ALOGE("RefBase: removing id %p on RefBase %p"
"(weakref_type %p) that doesn't exist!",
id, mBase, this);
diff --git a/libs/utils/ResourceTypes.cpp b/libs/utils/ResourceTypes.cpp
index 9a8816f..15b83bb 100644
--- a/libs/utils/ResourceTypes.cpp
+++ b/libs/utils/ResourceTypes.cpp
@@ -296,7 +296,7 @@ static status_t getIdmapPackageId(const uint32_t* map, size_t mapSize, uint32_t
Res_png_9patch* Res_png_9patch::deserialize(const void* inData)
{
if (sizeof(void*) != sizeof(int32_t)) {
- LOGE("Cannot deserialize on non 32-bit system\n");
+ ALOGE("Cannot deserialize on non 32-bit system\n");
return NULL;
}
deserializeInternal(inData, (Res_png_9patch*) inData);
@@ -1574,7 +1574,7 @@ status_t ResTable::Theme::applyStyle(uint32_t resID, bool force)
if (curPackage != p) {
const ssize_t pidx = mTable.getResourcePackageIndex(attrRes);
if (pidx < 0) {
- LOGE("Style contains key with bad package: 0x%08x\n", attrRes);
+ ALOGE("Style contains key with bad package: 0x%08x\n", attrRes);
bag++;
continue;
}
@@ -1594,7 +1594,7 @@ status_t ResTable::Theme::applyStyle(uint32_t resID, bool force)
}
if (curType != t) {
if (t >= curPI->numTypes) {
- LOGE("Style contains key with bad type: 0x%08x\n", attrRes);
+ ALOGE("Style contains key with bad type: 0x%08x\n", attrRes);
bag++;
continue;
}
@@ -1612,7 +1612,7 @@ status_t ResTable::Theme::applyStyle(uint32_t resID, bool force)
numEntries = curPI->types[t].numEntries;
}
if (e >= numEntries) {
- LOGE("Style contains key with bad entry: 0x%08x\n", attrRes);
+ ALOGE("Style contains key with bad entry: 0x%08x\n", attrRes);
bag++;
continue;
}
@@ -2099,7 +2099,7 @@ ssize_t ResTable::getResource(uint32_t resID, Res_value* outValue, bool mayBeBag
if (density > 0) {
overrideConfig = (ResTable_config*) malloc(sizeof(ResTable_config));
if (overrideConfig == NULL) {
- LOGE("Couldn't malloc ResTable_config for overrides: %s", strerror(errno));
+ ALOGE("Couldn't malloc ResTable_config for overrides: %s", strerror(errno));
return BAD_INDEX;
}
memcpy(overrideConfig, &mParams, sizeof(ResTable_config));
diff --git a/libs/utils/StreamingZipInflater.cpp b/libs/utils/StreamingZipInflater.cpp
index 59a46f9..8512170 100644
--- a/libs/utils/StreamingZipInflater.cpp
+++ b/libs/utils/StreamingZipInflater.cpp
@@ -138,7 +138,7 @@ ssize_t StreamingZipInflater::read(void* outBuf, size_t count) {
if (mInflateState.avail_in == 0) {
int err = readNextChunk();
if (err < 0) {
- LOGE("Unable to access asset data: %d", err);
+ ALOGE("Unable to access asset data: %d", err);
if (!mStreamNeedsInit) {
::inflateEnd(&mInflateState);
initInflateState();
@@ -165,7 +165,7 @@ ssize_t StreamingZipInflater::read(void* outBuf, size_t count) {
if (result == Z_OK) result = ::inflate(&mInflateState, Z_SYNC_FLUSH);
if (result < 0) {
// Whoops, inflation failed
- LOGE("Error inflating asset: %d", result);
+ ALOGE("Error inflating asset: %d", result);
::inflateEnd(&mInflateState);
initInflateState();
return -1;
@@ -195,7 +195,7 @@ int StreamingZipInflater::readNextChunk() {
//ALOGV("Reading input chunk, size %08x didread %08x", toRead, didRead);
if (didRead < 0) {
// TODO: error
- LOGE("Error reading asset data");
+ ALOGE("Error reading asset data");
return didRead;
} else {
mInNextChunkOffset += didRead;
diff --git a/libs/utils/Threads.cpp b/libs/utils/Threads.cpp
index fb52d7c..e343c62 100644
--- a/libs/utils/Threads.cpp
+++ b/libs/utils/Threads.cpp
@@ -163,7 +163,7 @@ int androidCreateRawThreadEtc(android_thread_func_t entryFunction,
(android_pthread_entry)entryFunction, userData);
pthread_attr_destroy(&attr);
if (result != 0) {
- LOGE("androidCreateRawThreadEtc failed (entry=%p, res=%d, errno=%d)\n"
+ ALOGE("androidCreateRawThreadEtc failed (entry=%p, res=%d, errno=%d)\n"
"(android threadPriority=%d)",
entryFunction, result, errno, threadPriority);
return 0;
diff --git a/libs/utils/Tokenizer.cpp b/libs/utils/Tokenizer.cpp
index 68752b4..efda2bf 100644
--- a/libs/utils/Tokenizer.cpp
+++ b/libs/utils/Tokenizer.cpp
@@ -55,12 +55,12 @@ status_t Tokenizer::open(const String8& filename, Tokenizer** outTokenizer) {
int fd = ::open(filename.string(), O_RDONLY);
if (fd < 0) {
result = -errno;
- LOGE("Error opening file '%s', %s.", filename.string(), strerror(errno));
+ ALOGE("Error opening file '%s', %s.", filename.string(), strerror(errno));
} else {
struct stat stat;
if (fstat(fd, &stat)) {
result = -errno;
- LOGE("Error getting size of file '%s', %s.", filename.string(), strerror(errno));
+ ALOGE("Error getting size of file '%s', %s.", filename.string(), strerror(errno));
} else {
size_t length = size_t(stat.st_size);
@@ -80,7 +80,7 @@ status_t Tokenizer::open(const String8& filename, Tokenizer** outTokenizer) {
ssize_t nrd = read(fd, buffer, length);
if (nrd < 0) {
result = -errno;
- LOGE("Error reading file '%s', %s.", filename.string(), strerror(errno));
+ ALOGE("Error reading file '%s', %s.", filename.string(), strerror(errno));
delete[] buffer;
buffer = NULL;
} else {
diff --git a/libs/utils/ZipFileRO.cpp b/libs/utils/ZipFileRO.cpp
index a6cce7e..1498aac 100644
--- a/libs/utils/ZipFileRO.cpp
+++ b/libs/utils/ZipFileRO.cpp
@@ -527,7 +527,7 @@ bool ZipFileRO::getEntryInfo(ZipEntryRO entry, int* pMethod, size_t* pUncompLen,
if (pOffset != NULL) {
long localHdrOffset = get4LE(ptr + kCDELocalOffset);
if (localHdrOffset + kLFHLen >= cdOffset) {
- LOGE("ERROR: bad local hdr offset in zip\n");
+ ALOGE("ERROR: bad local hdr offset in zip\n");
return false;
}
@@ -605,7 +605,7 @@ bool ZipFileRO::getEntryInfo(ZipEntryRO entry, int* pMethod, size_t* pUncompLen,
if (method == kCompressStored &&
(off64_t)(dataOffset + uncompLen) > cdOffset)
{
- LOGE("ERROR: bad uncompressed length in zip (%ld + " ZD " > %ld)\n",
+ ALOGE("ERROR: bad uncompressed length in zip (%ld + " ZD " > %ld)\n",
(long) dataOffset, (ZD_TYPE) uncompLen, (long) cdOffset);
return false;
}
@@ -754,10 +754,10 @@ bool ZipFileRO::uncompressEntry(ZipEntryRO entry, int fd) const
if (method == kCompressStored) {
ssize_t actual = write(fd, ptr, uncompLen);
if (actual < 0) {
- LOGE("Write failed: %s\n", strerror(errno));
+ ALOGE("Write failed: %s\n", strerror(errno));
goto unmap;
} else if ((size_t) actual != uncompLen) {
- LOGE("Partial write during uncompress (" ZD " of " ZD ")\n",
+ ALOGE("Partial write during uncompress (" ZD " of " ZD ")\n",
(ZD_TYPE) actual, (ZD_TYPE) uncompLen);
goto unmap;
} else {
@@ -806,10 +806,10 @@ bail:
zerr = inflateInit2(&zstream, -MAX_WBITS);
if (zerr != Z_OK) {
if (zerr == Z_VERSION_ERROR) {
- LOGE("Installed zlib is not compatible with linked version (%s)\n",
+ ALOGE("Installed zlib is not compatible with linked version (%s)\n",
ZLIB_VERSION);
} else {
- LOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
+ ALOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
}
goto bail;
}
@@ -873,10 +873,10 @@ bail:
zerr = inflateInit2(&zstream, -MAX_WBITS);
if (zerr != Z_OK) {
if (zerr == Z_VERSION_ERROR) {
- LOGE("Installed zlib is not compatible with linked version (%s)\n",
+ ALOGE("Installed zlib is not compatible with linked version (%s)\n",
ZLIB_VERSION);
} else {
- LOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
+ ALOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
}
goto bail;
}
diff --git a/libs/utils/ZipUtils.cpp b/libs/utils/ZipUtils.cpp
index 0fe1a7b..2dbdc1d 100644
--- a/libs/utils/ZipUtils.cpp
+++ b/libs/utils/ZipUtils.cpp
@@ -77,10 +77,10 @@ using namespace android;
zerr = inflateInit2(&zstream, -MAX_WBITS);
if (zerr != Z_OK) {
if (zerr == Z_VERSION_ERROR) {
- LOGE("Installed zlib is not compatible with linked version (%s)\n",
+ ALOGE("Installed zlib is not compatible with linked version (%s)\n",
ZLIB_VERSION);
} else {
- LOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
+ ALOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
}
goto bail;
}
@@ -189,10 +189,10 @@ bail:
zerr = inflateInit2(&zstream, -MAX_WBITS);
if (zerr != Z_OK) {
if (zerr == Z_VERSION_ERROR) {
- LOGE("Installed zlib is not compatible with linked version (%s)\n",
+ ALOGE("Installed zlib is not compatible with linked version (%s)\n",
ZLIB_VERSION);
} else {
- LOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
+ ALOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
}
goto bail;
}
diff --git a/media/jni/android_media_MediaMetadataRetriever.cpp b/media/jni/android_media_MediaMetadataRetriever.cpp
index f749d51..0dc3b65 100644
--- a/media/jni/android_media_MediaMetadataRetriever.cpp
+++ b/media/jni/android_media_MediaMetadataRetriever.cpp
@@ -153,13 +153,13 @@ static void android_media_MediaMetadataRetriever_setDataSourceFD(JNIEnv *env, jo
int fd = jniGetFDFromFileDescriptor(env, fileDescriptor);
if (offset < 0 || length < 0 || fd < 0) {
if (offset < 0) {
- LOGE("negative offset (%lld)", offset);
+ ALOGE("negative offset (%lld)", offset);
}
if (length < 0) {
- LOGE("negative length (%lld)", length);
+ ALOGE("negative length (%lld)", length);
}
if (fd < 0) {
- LOGE("invalid file descriptor");
+ ALOGE("invalid file descriptor");
}
jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
return;
@@ -238,7 +238,7 @@ static jobject android_media_MediaMetadataRetriever_getFrameAtTime(JNIEnv *env,
videoFrame = static_cast<VideoFrame *>(frameMemory->pointer());
}
if (videoFrame == NULL) {
- LOGE("getFrameAtTime: videoFrame is a NULL pointer");
+ ALOGE("getFrameAtTime: videoFrame is a NULL pointer");
return NULL;
}
@@ -322,7 +322,7 @@ static jbyteArray android_media_MediaMetadataRetriever_getEmbeddedPicture(
mediaAlbumArt = static_cast<MediaAlbumArt *>(albumArtMemory->pointer());
}
if (mediaAlbumArt == NULL) {
- LOGE("getEmbeddedPicture: Call to getEmbeddedPicture failed.");
+ ALOGE("getEmbeddedPicture: Call to getEmbeddedPicture failed.");
return NULL;
}
@@ -330,7 +330,7 @@ static jbyteArray android_media_MediaMetadataRetriever_getEmbeddedPicture(
char* data = (char*) mediaAlbumArt + sizeof(MediaAlbumArt);
jbyteArray array = env->NewByteArray(len);
if (!array) { // OutOfMemoryError exception has already been thrown.
- LOGE("getEmbeddedPicture: OutOfMemoryError is thrown.");
+ ALOGE("getEmbeddedPicture: OutOfMemoryError is thrown.");
} else {
jbyte* bytes = env->GetByteArrayElements(array, NULL);
if (bytes != NULL) {
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index 39f470f..39fd9a9 100644
--- a/media/jni/android_media_MediaPlayer.cpp
+++ b/media/jni/android_media_MediaPlayer.cpp
@@ -80,7 +80,7 @@ JNIMediaPlayerListener::JNIMediaPlayerListener(JNIEnv* env, jobject thiz, jobjec
// that posts events to the application thread.
jclass clazz = env->GetObjectClass(thiz);
if (clazz == NULL) {
- LOGE("Can't find android/media/MediaPlayer");
+ ALOGE("Can't find android/media/MediaPlayer");
jniThrowException(env, "java/lang/Exception", NULL);
return;
}
@@ -405,7 +405,7 @@ android_media_MediaPlayer_getVideoWidth(JNIEnv *env, jobject thiz)
}
int w;
if (0 != mp->getVideoWidth(&w)) {
- LOGE("getVideoWidth failed");
+ ALOGE("getVideoWidth failed");
w = 0;
}
ALOGV("getVideoWidth: %d", w);
@@ -422,7 +422,7 @@ android_media_MediaPlayer_getVideoHeight(JNIEnv *env, jobject thiz)
}
int h;
if (0 != mp->getVideoHeight(&h)) {
- LOGE("getVideoHeight failed");
+ ALOGE("getVideoHeight failed");
h = 0;
}
ALOGV("getVideoHeight: %d", h);
@@ -826,58 +826,58 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved)
jint result = -1;
if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
- LOGE("ERROR: GetEnv failed\n");
+ ALOGE("ERROR: GetEnv failed\n");
goto bail;
}
assert(env != NULL);
if (register_android_media_MediaPlayer(env) < 0) {
- LOGE("ERROR: MediaPlayer native registration failed\n");
+ ALOGE("ERROR: MediaPlayer native registration failed\n");
goto bail;
}
if (register_android_media_MediaRecorder(env) < 0) {
- LOGE("ERROR: MediaRecorder native registration failed\n");
+ ALOGE("ERROR: MediaRecorder native registration failed\n");
goto bail;
}
if (register_android_media_MediaScanner(env) < 0) {
- LOGE("ERROR: MediaScanner native registration failed\n");
+ ALOGE("ERROR: MediaScanner native registration failed\n");
goto bail;
}
if (register_android_media_MediaMetadataRetriever(env) < 0) {
- LOGE("ERROR: MediaMetadataRetriever native registration failed\n");
+ ALOGE("ERROR: MediaMetadataRetriever native registration failed\n");
goto bail;
}
if (register_android_media_AmrInputStream(env) < 0) {
- LOGE("ERROR: AmrInputStream native registration failed\n");
+ ALOGE("ERROR: AmrInputStream native registration failed\n");
goto bail;
}
if (register_android_media_ResampleInputStream(env) < 0) {
- LOGE("ERROR: ResampleInputStream native registration failed\n");
+ ALOGE("ERROR: ResampleInputStream native registration failed\n");
goto bail;
}
if (register_android_media_MediaProfiles(env) < 0) {
- LOGE("ERROR: MediaProfiles native registration failed");
+ ALOGE("ERROR: MediaProfiles native registration failed");
goto bail;
}
if (register_android_mtp_MtpDatabase(env) < 0) {
- LOGE("ERROR: MtpDatabase native registration failed");
+ ALOGE("ERROR: MtpDatabase native registration failed");
goto bail;
}
if (register_android_mtp_MtpDevice(env) < 0) {
- LOGE("ERROR: MtpDevice native registration failed");
+ ALOGE("ERROR: MtpDevice native registration failed");
goto bail;
}
if (register_android_mtp_MtpServer(env) < 0) {
- LOGE("ERROR: MtpServer native registration failed");
+ ALOGE("ERROR: MtpServer native registration failed");
goto bail;
}
diff --git a/media/jni/android_media_MediaRecorder.cpp b/media/jni/android_media_MediaRecorder.cpp
index 3fc75ed..acc65f1 100644
--- a/media/jni/android_media_MediaRecorder.cpp
+++ b/media/jni/android_media_MediaRecorder.cpp
@@ -77,7 +77,7 @@ JNIMediaRecorderListener::JNIMediaRecorderListener(JNIEnv* env, jobject thiz, jo
// that posts events to the application thread.
jclass clazz = env->GetObjectClass(thiz);
if (clazz == NULL) {
- LOGE("Can't find android/media/MediaRecorder");
+ ALOGE("Can't find android/media/MediaRecorder");
jniThrowException(env, "java/lang/Exception", NULL);
return;
}
@@ -229,7 +229,7 @@ android_media_MediaRecorder_setParameter(JNIEnv *env, jobject thiz, jstring para
ALOGV("setParameter()");
if (params == NULL)
{
- LOGE("Invalid or empty params string. This parameter will be ignored.");
+ ALOGE("Invalid or empty params string. This parameter will be ignored.");
return;
}
@@ -238,7 +238,7 @@ android_media_MediaRecorder_setParameter(JNIEnv *env, jobject thiz, jstring para
const char* params8 = env->GetStringUTFChars(params, NULL);
if (params8 == NULL)
{
- LOGE("Failed to covert jstring to String8. This parameter will be ignored.");
+ ALOGE("Failed to covert jstring to String8. This parameter will be ignored.");
return;
}
@@ -323,7 +323,7 @@ android_media_MediaRecorder_prepare(JNIEnv *env, jobject thiz)
// The application may misbehave and
// the preview surface becomes unavailable
if (native_surface.get() == 0) {
- LOGE("Application lost the surface");
+ ALOGE("Application lost the surface");
jniThrowException(env, "java/io/IOException", "invalid preview surface");
return;
}
diff --git a/media/jni/android_media_MediaScanner.cpp b/media/jni/android_media_MediaScanner.cpp
index 67c85cc..5d27966 100644
--- a/media/jni/android_media_MediaScanner.cpp
+++ b/media/jni/android_media_MediaScanner.cpp
@@ -48,7 +48,7 @@ static fields_t fields;
static status_t 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 UNKNOWN_ERROR;
@@ -118,7 +118,7 @@ public:
env->FindClass(kClassMediaScannerClient);
if (mediaScannerClientInterface == NULL) {
- LOGE("Class %s not found", kClassMediaScannerClient);
+ ALOGE("Class %s not found", kClassMediaScannerClient);
} else {
mScanFileMethodID = env->GetMethodID(
mediaScannerClientInterface,
@@ -257,7 +257,7 @@ android_media_MediaScanner_processDirectory(
MyMediaScannerClient myClient(env, client);
MediaScanResult result = mp->processDirectory(pathStr, myClient);
if (result == MEDIA_SCAN_RESULT_ERROR) {
- LOGE("An error occurred while scanning directory '%s'.", pathStr);
+ ALOGE("An error occurred while scanning directory '%s'.", pathStr);
}
env->ReleaseStringUTFChars(path, pathStr);
}
@@ -297,7 +297,7 @@ android_media_MediaScanner_processFile(
MyMediaScannerClient myClient(env, client);
MediaScanResult result = mp->processFile(pathStr, mimeTypeStr, myClient);
if (result == MEDIA_SCAN_RESULT_ERROR) {
- LOGE("An error occurred while scanning file '%s'.", pathStr);
+ ALOGE("An error occurred while scanning file '%s'.", pathStr);
}
env->ReleaseStringUTFChars(path, pathStr);
if (mimeType) {
diff --git a/media/jni/android_media_Utils.cpp b/media/jni/android_media_Utils.cpp
index 27e46a4..47963b1 100644
--- a/media/jni/android_media_Utils.cpp
+++ b/media/jni/android_media_Utils.cpp
@@ -39,7 +39,7 @@ bool ConvertKeyValueArraysToKeyedVector(
}
if (failed) {
- LOGE("keys and values arrays have different length");
+ ALOGE("keys and values arrays have different length");
jniThrowException(env, "java/lang/IllegalArgumentException", NULL);
return false;
}
diff --git a/media/jni/android_mtp_MtpDatabase.cpp b/media/jni/android_mtp_MtpDatabase.cpp
index 4dbcb90..99e543b 100644
--- a/media/jni/android_mtp_MtpDatabase.cpp
+++ b/media/jni/android_mtp_MtpDatabase.cpp
@@ -174,7 +174,7 @@ public:
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();
}
@@ -439,7 +439,7 @@ MtpResponseCode MyMtpDatabase::getObjectPropertyValue(MtpObjectHandle handle,
break;
}
default:
- LOGE("unsupported type in getObjectPropertyValue\n");
+ ALOGE("unsupported type in getObjectPropertyValue\n");
result = MTP_RESPONSE_INVALID_OBJECT_PROP_FORMAT;
}
out:
@@ -508,7 +508,7 @@ MtpResponseCode MyMtpDatabase::setObjectPropertyValue(MtpObjectHandle handle,
break;
}
default:
- LOGE("unsupported type in getObjectPropertyValue\n");
+ ALOGE("unsupported type in getObjectPropertyValue\n");
return MTP_RESPONSE_INVALID_OBJECT_PROP_FORMAT;
}
@@ -579,7 +579,7 @@ MtpResponseCode MyMtpDatabase::getDevicePropertyValue(MtpDeviceProperty property
break;
}
default:
- LOGE("unsupported type in getDevicePropertyValue\n");
+ ALOGE("unsupported type in getDevicePropertyValue\n");
return MTP_RESPONSE_INVALID_DEVICE_PROP_FORMAT;
}
@@ -631,7 +631,7 @@ MtpResponseCode MyMtpDatabase::setDevicePropertyValue(MtpDeviceProperty property
break;
}
default:
- LOGE("unsupported type in setDevicePropertyValue\n");
+ ALOGE("unsupported type in setDevicePropertyValue\n");
return MTP_RESPONSE_INVALID_OBJECT_PROP_FORMAT;
}
@@ -724,7 +724,7 @@ MtpResponseCode MyMtpDatabase::getObjectPropertyList(MtpObjectHandle handle,
break;
}
default:
- LOGE("bad or unsupported data type in MyMtpDatabase::getObjectPropertyList");
+ ALOGE("bad or unsupported data type in MyMtpDatabase::getObjectPropertyList");
break;
}
}
@@ -957,7 +957,7 @@ MtpResponseCode MyMtpDatabase::setObjectReferences(MtpObjectHandle handle,
int count = references->size();
jintArray array = env->NewIntArray(count);
if (!array) {
- LOGE("out of memory in setObjectReferences");
+ ALOGE("out of memory in setObjectReferences");
return false;
}
jint* handles = env->GetIntArrayElements(array, 0);
@@ -1044,7 +1044,7 @@ MtpProperty* MyMtpDatabase::getDevicePropertyDesc(MtpDeviceProperty property) {
result->setDefaultValue(str);
env->ReleaseCharArrayElements(mStringBuffer, str, 0);
} else {
- LOGE("unable to read device property, response: %04X", ret);
+ ALOGE("unable to read device property, response: %04X", ret);
}
break;
}
@@ -1113,151 +1113,151 @@ int register_android_mtp_MtpDatabase(JNIEnv *env)
clazz = env->FindClass("android/mtp/MtpDatabase");
if (clazz == NULL) {
- LOGE("Can't find android/mtp/MtpDatabase");
+ ALOGE("Can't find android/mtp/MtpDatabase");
return -1;
}
method_beginSendObject = env->GetMethodID(clazz, "beginSendObject", "(Ljava/lang/String;IIIJJ)I");
if (method_beginSendObject == NULL) {
- LOGE("Can't find beginSendObject");
+ ALOGE("Can't find beginSendObject");
return -1;
}
method_endSendObject = env->GetMethodID(clazz, "endSendObject", "(Ljava/lang/String;IIZ)V");
if (method_endSendObject == NULL) {
- LOGE("Can't find endSendObject");
+ ALOGE("Can't find endSendObject");
return -1;
}
method_getObjectList = env->GetMethodID(clazz, "getObjectList", "(III)[I");
if (method_getObjectList == NULL) {
- LOGE("Can't find getObjectList");
+ ALOGE("Can't find getObjectList");
return -1;
}
method_getNumObjects = env->GetMethodID(clazz, "getNumObjects", "(III)I");
if (method_getNumObjects == NULL) {
- LOGE("Can't find getNumObjects");
+ ALOGE("Can't find getNumObjects");
return -1;
}
method_getSupportedPlaybackFormats = env->GetMethodID(clazz, "getSupportedPlaybackFormats", "()[I");
if (method_getSupportedPlaybackFormats == NULL) {
- LOGE("Can't find getSupportedPlaybackFormats");
+ ALOGE("Can't find getSupportedPlaybackFormats");
return -1;
}
method_getSupportedCaptureFormats = env->GetMethodID(clazz, "getSupportedCaptureFormats", "()[I");
if (method_getSupportedCaptureFormats == NULL) {
- LOGE("Can't find getSupportedCaptureFormats");
+ ALOGE("Can't find getSupportedCaptureFormats");
return -1;
}
method_getSupportedObjectProperties = env->GetMethodID(clazz, "getSupportedObjectProperties", "(I)[I");
if (method_getSupportedObjectProperties == NULL) {
- LOGE("Can't find getSupportedObjectProperties");
+ ALOGE("Can't find getSupportedObjectProperties");
return -1;
}
method_getSupportedDeviceProperties = env->GetMethodID(clazz, "getSupportedDeviceProperties", "()[I");
if (method_getSupportedDeviceProperties == NULL) {
- LOGE("Can't find getSupportedDeviceProperties");
+ ALOGE("Can't find getSupportedDeviceProperties");
return -1;
}
method_setObjectProperty = env->GetMethodID(clazz, "setObjectProperty", "(IIJLjava/lang/String;)I");
if (method_setObjectProperty == NULL) {
- LOGE("Can't find setObjectProperty");
+ ALOGE("Can't find setObjectProperty");
return -1;
}
method_getDeviceProperty = env->GetMethodID(clazz, "getDeviceProperty", "(I[J[C)I");
if (method_getDeviceProperty == NULL) {
- LOGE("Can't find getDeviceProperty");
+ ALOGE("Can't find getDeviceProperty");
return -1;
}
method_setDeviceProperty = env->GetMethodID(clazz, "setDeviceProperty", "(IJLjava/lang/String;)I");
if (method_setDeviceProperty == NULL) {
- LOGE("Can't find setDeviceProperty");
+ ALOGE("Can't find setDeviceProperty");
return -1;
}
method_getObjectPropertyList = env->GetMethodID(clazz, "getObjectPropertyList",
"(JIJII)Landroid/mtp/MtpPropertyList;");
if (method_getObjectPropertyList == NULL) {
- LOGE("Can't find getObjectPropertyList");
+ ALOGE("Can't find getObjectPropertyList");
return -1;
}
method_getObjectInfo = env->GetMethodID(clazz, "getObjectInfo", "(I[I[C[J)Z");
if (method_getObjectInfo == NULL) {
- LOGE("Can't find getObjectInfo");
+ ALOGE("Can't find getObjectInfo");
return -1;
}
method_getObjectFilePath = env->GetMethodID(clazz, "getObjectFilePath", "(I[C[J)I");
if (method_getObjectFilePath == NULL) {
- LOGE("Can't find getObjectFilePath");
+ ALOGE("Can't find getObjectFilePath");
return -1;
}
method_deleteFile = env->GetMethodID(clazz, "deleteFile", "(I)I");
if (method_deleteFile == NULL) {
- LOGE("Can't find deleteFile");
+ ALOGE("Can't find deleteFile");
return -1;
}
method_getObjectReferences = env->GetMethodID(clazz, "getObjectReferences", "(I)[I");
if (method_getObjectReferences == NULL) {
- LOGE("Can't find getObjectReferences");
+ ALOGE("Can't find getObjectReferences");
return -1;
}
method_setObjectReferences = env->GetMethodID(clazz, "setObjectReferences", "(I[I)I");
if (method_setObjectReferences == NULL) {
- LOGE("Can't find setObjectReferences");
+ ALOGE("Can't find setObjectReferences");
return -1;
}
method_sessionStarted = env->GetMethodID(clazz, "sessionStarted", "()V");
if (method_sessionStarted == NULL) {
- LOGE("Can't find sessionStarted");
+ ALOGE("Can't find sessionStarted");
return -1;
}
method_sessionEnded = env->GetMethodID(clazz, "sessionEnded", "()V");
if (method_sessionEnded == NULL) {
- LOGE("Can't find sessionEnded");
+ ALOGE("Can't find sessionEnded");
return -1;
}
field_context = env->GetFieldID(clazz, "mNativeContext", "I");
if (field_context == NULL) {
- LOGE("Can't find MtpDatabase.mNativeContext");
+ ALOGE("Can't find MtpDatabase.mNativeContext");
return -1;
}
// now set up fields for MtpPropertyList class
clazz = env->FindClass("android/mtp/MtpPropertyList");
if (clazz == NULL) {
- LOGE("Can't find android/mtp/MtpPropertyList");
+ ALOGE("Can't find android/mtp/MtpPropertyList");
return -1;
}
field_mCount = env->GetFieldID(clazz, "mCount", "I");
if (field_mCount == NULL) {
- LOGE("Can't find MtpPropertyList.mCount");
+ ALOGE("Can't find MtpPropertyList.mCount");
return -1;
}
field_mResult = env->GetFieldID(clazz, "mResult", "I");
if (field_mResult == NULL) {
- LOGE("Can't find MtpPropertyList.mResult");
+ ALOGE("Can't find MtpPropertyList.mResult");
return -1;
}
field_mObjectHandles = env->GetFieldID(clazz, "mObjectHandles", "[I");
if (field_mObjectHandles == NULL) {
- LOGE("Can't find MtpPropertyList.mObjectHandles");
+ ALOGE("Can't find MtpPropertyList.mObjectHandles");
return -1;
}
field_mPropertyCodes = env->GetFieldID(clazz, "mPropertyCodes", "[I");
if (field_mPropertyCodes == NULL) {
- LOGE("Can't find MtpPropertyList.mPropertyCodes");
+ ALOGE("Can't find MtpPropertyList.mPropertyCodes");
return -1;
}
field_mDataTypes = env->GetFieldID(clazz, "mDataTypes", "[I");
if (field_mDataTypes == NULL) {
- LOGE("Can't find MtpPropertyList.mDataTypes");
+ ALOGE("Can't find MtpPropertyList.mDataTypes");
return -1;
}
field_mLongValues = env->GetFieldID(clazz, "mLongValues", "[J");
if (field_mLongValues == NULL) {
- LOGE("Can't find MtpPropertyList.mLongValues");
+ ALOGE("Can't find MtpPropertyList.mLongValues");
return -1;
}
field_mStringValues = env->GetFieldID(clazz, "mStringValues", "[Ljava/lang/String;");
if (field_mStringValues == NULL) {
- LOGE("Can't find MtpPropertyList.mStringValues");
+ ALOGE("Can't find MtpPropertyList.mStringValues");
return -1;
}
diff --git a/media/jni/android_mtp_MtpDevice.cpp b/media/jni/android_mtp_MtpDevice.cpp
index c71410b..113784e 100644
--- a/media/jni/android_mtp_MtpDevice.cpp
+++ b/media/jni/android_mtp_MtpDevice.cpp
@@ -92,7 +92,7 @@ MtpDevice* get_device_from_object(JNIEnv* env, jobject javaDevice)
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();
}
@@ -142,7 +142,7 @@ android_mtp_MtpDevice_get_device_info(JNIEnv *env, jobject thiz)
}
jobject info = env->NewObject(clazz_deviceInfo, constructor_deviceInfo);
if (info == NULL) {
- LOGE("Could not create a MtpDeviceInfo object");
+ ALOGE("Could not create a MtpDeviceInfo object");
delete deviceInfo;
return NULL;
}
@@ -195,7 +195,7 @@ android_mtp_MtpDevice_get_storage_info(JNIEnv *env, jobject thiz, jint storageID
jobject info = env->NewObject(clazz_storageInfo, constructor_storageInfo);
if (info == NULL) {
- LOGE("Could not create a MtpStorageInfo object");
+ ALOGE("Could not create a MtpStorageInfo object");
delete storageInfo;
return NULL;
}
@@ -248,7 +248,7 @@ android_mtp_MtpDevice_get_object_info(JNIEnv *env, jobject thiz, jint objectID)
return NULL;
jobject info = env->NewObject(clazz_objectInfo, constructor_objectInfo);
if (info == NULL) {
- LOGE("Could not create a MtpObjectInfo object");
+ ALOGE("Could not create a MtpObjectInfo object");
delete objectInfo;
return NULL;
}
@@ -433,193 +433,193 @@ int register_android_mtp_MtpDevice(JNIEnv *env)
clazz = env->FindClass("android/mtp/MtpDeviceInfo");
if (clazz == NULL) {
- LOGE("Can't find android/mtp/MtpDeviceInfo");
+ ALOGE("Can't find android/mtp/MtpDeviceInfo");
return -1;
}
constructor_deviceInfo = env->GetMethodID(clazz, "<init>", "()V");
if (constructor_deviceInfo == NULL) {
- LOGE("Can't find android/mtp/MtpDeviceInfo constructor");
+ ALOGE("Can't find android/mtp/MtpDeviceInfo constructor");
return -1;
}
field_deviceInfo_manufacturer = env->GetFieldID(clazz, "mManufacturer", "Ljava/lang/String;");
if (field_deviceInfo_manufacturer == NULL) {
- LOGE("Can't find MtpDeviceInfo.mManufacturer");
+ ALOGE("Can't find MtpDeviceInfo.mManufacturer");
return -1;
}
field_deviceInfo_model = env->GetFieldID(clazz, "mModel", "Ljava/lang/String;");
if (field_deviceInfo_model == NULL) {
- LOGE("Can't find MtpDeviceInfo.mModel");
+ ALOGE("Can't find MtpDeviceInfo.mModel");
return -1;
}
field_deviceInfo_version = env->GetFieldID(clazz, "mVersion", "Ljava/lang/String;");
if (field_deviceInfo_version == NULL) {
- LOGE("Can't find MtpDeviceInfo.mVersion");
+ ALOGE("Can't find MtpDeviceInfo.mVersion");
return -1;
}
field_deviceInfo_serialNumber = env->GetFieldID(clazz, "mSerialNumber", "Ljava/lang/String;");
if (field_deviceInfo_serialNumber == NULL) {
- LOGE("Can't find MtpDeviceInfo.mSerialNumber");
+ ALOGE("Can't find MtpDeviceInfo.mSerialNumber");
return -1;
}
clazz_deviceInfo = (jclass)env->NewGlobalRef(clazz);
clazz = env->FindClass("android/mtp/MtpStorageInfo");
if (clazz == NULL) {
- LOGE("Can't find android/mtp/MtpStorageInfo");
+ ALOGE("Can't find android/mtp/MtpStorageInfo");
return -1;
}
constructor_storageInfo = env->GetMethodID(clazz, "<init>", "()V");
if (constructor_storageInfo == NULL) {
- LOGE("Can't find android/mtp/MtpStorageInfo constructor");
+ ALOGE("Can't find android/mtp/MtpStorageInfo constructor");
return -1;
}
field_storageInfo_storageId = env->GetFieldID(clazz, "mStorageId", "I");
if (field_storageInfo_storageId == NULL) {
- LOGE("Can't find MtpStorageInfo.mStorageId");
+ ALOGE("Can't find MtpStorageInfo.mStorageId");
return -1;
}
field_storageInfo_maxCapacity = env->GetFieldID(clazz, "mMaxCapacity", "J");
if (field_storageInfo_maxCapacity == NULL) {
- LOGE("Can't find MtpStorageInfo.mMaxCapacity");
+ ALOGE("Can't find MtpStorageInfo.mMaxCapacity");
return -1;
}
field_storageInfo_freeSpace = env->GetFieldID(clazz, "mFreeSpace", "J");
if (field_storageInfo_freeSpace == NULL) {
- LOGE("Can't find MtpStorageInfo.mFreeSpace");
+ ALOGE("Can't find MtpStorageInfo.mFreeSpace");
return -1;
}
field_storageInfo_description = env->GetFieldID(clazz, "mDescription", "Ljava/lang/String;");
if (field_storageInfo_description == NULL) {
- LOGE("Can't find MtpStorageInfo.mDescription");
+ ALOGE("Can't find MtpStorageInfo.mDescription");
return -1;
}
field_storageInfo_volumeIdentifier = env->GetFieldID(clazz, "mVolumeIdentifier", "Ljava/lang/String;");
if (field_storageInfo_volumeIdentifier == NULL) {
- LOGE("Can't find MtpStorageInfo.mVolumeIdentifier");
+ ALOGE("Can't find MtpStorageInfo.mVolumeIdentifier");
return -1;
}
clazz_storageInfo = (jclass)env->NewGlobalRef(clazz);
clazz = env->FindClass("android/mtp/MtpObjectInfo");
if (clazz == NULL) {
- LOGE("Can't find android/mtp/MtpObjectInfo");
+ ALOGE("Can't find android/mtp/MtpObjectInfo");
return -1;
}
constructor_objectInfo = env->GetMethodID(clazz, "<init>", "()V");
if (constructor_objectInfo == NULL) {
- LOGE("Can't find android/mtp/MtpObjectInfo constructor");
+ ALOGE("Can't find android/mtp/MtpObjectInfo constructor");
return -1;
}
field_objectInfo_handle = env->GetFieldID(clazz, "mHandle", "I");
if (field_objectInfo_handle == NULL) {
- LOGE("Can't find MtpObjectInfo.mHandle");
+ ALOGE("Can't find MtpObjectInfo.mHandle");
return -1;
}
field_objectInfo_storageId = env->GetFieldID(clazz, "mStorageId", "I");
if (field_objectInfo_storageId == NULL) {
- LOGE("Can't find MtpObjectInfo.mStorageId");
+ ALOGE("Can't find MtpObjectInfo.mStorageId");
return -1;
}
field_objectInfo_format = env->GetFieldID(clazz, "mFormat", "I");
if (field_objectInfo_format == NULL) {
- LOGE("Can't find MtpObjectInfo.mFormat");
+ ALOGE("Can't find MtpObjectInfo.mFormat");
return -1;
}
field_objectInfo_protectionStatus = env->GetFieldID(clazz, "mProtectionStatus", "I");
if (field_objectInfo_protectionStatus == NULL) {
- LOGE("Can't find MtpObjectInfo.mProtectionStatus");
+ ALOGE("Can't find MtpObjectInfo.mProtectionStatus");
return -1;
}
field_objectInfo_compressedSize = env->GetFieldID(clazz, "mCompressedSize", "I");
if (field_objectInfo_compressedSize == NULL) {
- LOGE("Can't find MtpObjectInfo.mCompressedSize");
+ ALOGE("Can't find MtpObjectInfo.mCompressedSize");
return -1;
}
field_objectInfo_thumbFormat = env->GetFieldID(clazz, "mThumbFormat", "I");
if (field_objectInfo_thumbFormat == NULL) {
- LOGE("Can't find MtpObjectInfo.mThumbFormat");
+ ALOGE("Can't find MtpObjectInfo.mThumbFormat");
return -1;
}
field_objectInfo_thumbCompressedSize = env->GetFieldID(clazz, "mThumbCompressedSize", "I");
if (field_objectInfo_thumbCompressedSize == NULL) {
- LOGE("Can't find MtpObjectInfo.mThumbCompressedSize");
+ ALOGE("Can't find MtpObjectInfo.mThumbCompressedSize");
return -1;
}
field_objectInfo_thumbPixWidth = env->GetFieldID(clazz, "mThumbPixWidth", "I");
if (field_objectInfo_thumbPixWidth == NULL) {
- LOGE("Can't find MtpObjectInfo.mThumbPixWidth");
+ ALOGE("Can't find MtpObjectInfo.mThumbPixWidth");
return -1;
}
field_objectInfo_thumbPixHeight = env->GetFieldID(clazz, "mThumbPixHeight", "I");
if (field_objectInfo_thumbPixHeight == NULL) {
- LOGE("Can't find MtpObjectInfo.mThumbPixHeight");
+ ALOGE("Can't find MtpObjectInfo.mThumbPixHeight");
return -1;
}
field_objectInfo_imagePixWidth = env->GetFieldID(clazz, "mImagePixWidth", "I");
if (field_objectInfo_imagePixWidth == NULL) {
- LOGE("Can't find MtpObjectInfo.mImagePixWidth");
+ ALOGE("Can't find MtpObjectInfo.mImagePixWidth");
return -1;
}
field_objectInfo_imagePixHeight = env->GetFieldID(clazz, "mImagePixHeight", "I");
if (field_objectInfo_imagePixHeight == NULL) {
- LOGE("Can't find MtpObjectInfo.mImagePixHeight");
+ ALOGE("Can't find MtpObjectInfo.mImagePixHeight");
return -1;
}
field_objectInfo_imagePixDepth = env->GetFieldID(clazz, "mImagePixDepth", "I");
if (field_objectInfo_imagePixDepth == NULL) {
- LOGE("Can't find MtpObjectInfo.mImagePixDepth");
+ ALOGE("Can't find MtpObjectInfo.mImagePixDepth");
return -1;
}
field_objectInfo_parent = env->GetFieldID(clazz, "mParent", "I");
if (field_objectInfo_parent == NULL) {
- LOGE("Can't find MtpObjectInfo.mParent");
+ ALOGE("Can't find MtpObjectInfo.mParent");
return -1;
}
field_objectInfo_associationType = env->GetFieldID(clazz, "mAssociationType", "I");
if (field_objectInfo_associationType == NULL) {
- LOGE("Can't find MtpObjectInfo.mAssociationType");
+ ALOGE("Can't find MtpObjectInfo.mAssociationType");
return -1;
}
field_objectInfo_associationDesc = env->GetFieldID(clazz, "mAssociationDesc", "I");
if (field_objectInfo_associationDesc == NULL) {
- LOGE("Can't find MtpObjectInfo.mAssociationDesc");
+ ALOGE("Can't find MtpObjectInfo.mAssociationDesc");
return -1;
}
field_objectInfo_sequenceNumber = env->GetFieldID(clazz, "mSequenceNumber", "I");
if (field_objectInfo_sequenceNumber == NULL) {
- LOGE("Can't find MtpObjectInfo.mSequenceNumber");
+ ALOGE("Can't find MtpObjectInfo.mSequenceNumber");
return -1;
}
field_objectInfo_name = env->GetFieldID(clazz, "mName", "Ljava/lang/String;");
if (field_objectInfo_name == NULL) {
- LOGE("Can't find MtpObjectInfo.mName");
+ ALOGE("Can't find MtpObjectInfo.mName");
return -1;
}
field_objectInfo_dateCreated = env->GetFieldID(clazz, "mDateCreated", "J");
if (field_objectInfo_dateCreated == NULL) {
- LOGE("Can't find MtpObjectInfo.mDateCreated");
+ ALOGE("Can't find MtpObjectInfo.mDateCreated");
return -1;
}
field_objectInfo_dateModified = env->GetFieldID(clazz, "mDateModified", "J");
if (field_objectInfo_dateModified == NULL) {
- LOGE("Can't find MtpObjectInfo.mDateModified");
+ ALOGE("Can't find MtpObjectInfo.mDateModified");
return -1;
}
field_objectInfo_keywords = env->GetFieldID(clazz, "mKeywords", "Ljava/lang/String;");
if (field_objectInfo_keywords == NULL) {
- LOGE("Can't find MtpObjectInfo.mKeywords");
+ ALOGE("Can't find MtpObjectInfo.mKeywords");
return -1;
}
clazz_objectInfo = (jclass)env->NewGlobalRef(clazz);
clazz = env->FindClass("android/mtp/MtpDevice");
if (clazz == NULL) {
- LOGE("Can't find android/mtp/MtpDevice");
+ ALOGE("Can't find android/mtp/MtpDevice");
return -1;
}
field_context = env->GetFieldID(clazz, "mNativeContext", "I");
if (field_context == NULL) {
- LOGE("Can't find MtpDevice.mNativeContext");
+ ALOGE("Can't find MtpDevice.mNativeContext");
return -1;
}
diff --git a/media/jni/android_mtp_MtpServer.cpp b/media/jni/android_mtp_MtpServer.cpp
index 107db08..5252a3a 100644
--- a/media/jni/android_mtp_MtpServer.cpp
+++ b/media/jni/android_mtp_MtpServer.cpp
@@ -65,7 +65,7 @@ android_mtp_MtpServer_setup(JNIEnv *env, jobject thiz, jobject javaDatabase, jbo
usePtp, AID_MEDIA_RW, 0664, 0775);
env->SetIntField(thiz, field_MtpServer_nativeContext, (int)server);
} else {
- LOGE("could not open MTP driver, errno: %d", errno);
+ ALOGE("could not open MTP driver, errno: %d", errno);
}
}
@@ -76,7 +76,7 @@ android_mtp_MtpServer_run(JNIEnv *env, jobject thiz)
if (server)
server->run();
else
- LOGE("server is null in run");
+ ALOGE("server is null in run");
}
static void
@@ -89,7 +89,7 @@ android_mtp_MtpServer_cleanup(JNIEnv *env, jobject thiz)
delete server;
env->SetIntField(thiz, field_MtpServer_nativeContext, 0);
} else {
- LOGE("server is null in cleanup");
+ ALOGE("server is null in cleanup");
}
}
@@ -102,7 +102,7 @@ android_mtp_MtpServer_send_object_added(JNIEnv *env, jobject thiz, jint handle)
if (server)
server->sendObjectAdded(handle);
else
- LOGE("server is null in send_object_added");
+ ALOGE("server is null in send_object_added");
}
static void
@@ -114,7 +114,7 @@ android_mtp_MtpServer_send_object_removed(JNIEnv *env, jobject thiz, jint handle
if (server)
server->sendObjectRemoved(handle);
else
- LOGE("server is null in send_object_removed");
+ ALOGE("server is null in send_object_removed");
}
static void
@@ -145,7 +145,7 @@ android_mtp_MtpServer_add_storage(JNIEnv *env, jobject thiz, jobject jstorage)
}
}
} else {
- LOGE("server is null in add_storage");
+ ALOGE("server is null in add_storage");
}
}
@@ -162,7 +162,7 @@ android_mtp_MtpServer_remove_storage(JNIEnv *env, jobject thiz, jint storageId)
delete storage;
}
} else
- LOGE("server is null in remove_storage");
+ ALOGE("server is null in remove_storage");
}
// ----------------------------------------------------------------------------
@@ -187,48 +187,48 @@ int register_android_mtp_MtpServer(JNIEnv *env)
clazz = env->FindClass("android/mtp/MtpStorage");
if (clazz == NULL) {
- LOGE("Can't find android/mtp/MtpStorage");
+ ALOGE("Can't find android/mtp/MtpStorage");
return -1;
}
field_MtpStorage_storageId = env->GetFieldID(clazz, "mStorageId", "I");
if (field_MtpStorage_storageId == NULL) {
- LOGE("Can't find MtpStorage.mStorageId");
+ ALOGE("Can't find MtpStorage.mStorageId");
return -1;
}
field_MtpStorage_path = env->GetFieldID(clazz, "mPath", "Ljava/lang/String;");
if (field_MtpStorage_path == NULL) {
- LOGE("Can't find MtpStorage.mPath");
+ ALOGE("Can't find MtpStorage.mPath");
return -1;
}
field_MtpStorage_description = env->GetFieldID(clazz, "mDescription", "Ljava/lang/String;");
if (field_MtpStorage_description == NULL) {
- LOGE("Can't find MtpStorage.mDescription");
+ ALOGE("Can't find MtpStorage.mDescription");
return -1;
}
field_MtpStorage_reserveSpace = env->GetFieldID(clazz, "mReserveSpace", "J");
if (field_MtpStorage_reserveSpace == NULL) {
- LOGE("Can't find MtpStorage.mReserveSpace");
+ ALOGE("Can't find MtpStorage.mReserveSpace");
return -1;
}
field_MtpStorage_removable = env->GetFieldID(clazz, "mRemovable", "Z");
if (field_MtpStorage_removable == NULL) {
- LOGE("Can't find MtpStorage.mRemovable");
+ ALOGE("Can't find MtpStorage.mRemovable");
return -1;
}
field_MtpStorage_maxFileSize = env->GetFieldID(clazz, "mMaxFileSize", "J");
if (field_MtpStorage_maxFileSize == NULL) {
- LOGE("Can't find MtpStorage.mMaxFileSize");
+ ALOGE("Can't find MtpStorage.mMaxFileSize");
return -1;
}
clazz = env->FindClass("android/mtp/MtpServer");
if (clazz == NULL) {
- LOGE("Can't find android/mtp/MtpServer");
+ ALOGE("Can't find android/mtp/MtpServer");
return -1;
}
field_MtpServer_nativeContext = env->GetFieldID(clazz, "mNativeContext", "I");
if (field_MtpServer_nativeContext == NULL) {
- LOGE("Can't find MtpServer.mNativeContext");
+ ALOGE("Can't find MtpServer.mNativeContext");
return -1;
}
diff --git a/media/jni/audioeffect/android_media_AudioEffect.cpp b/media/jni/audioeffect/android_media_AudioEffect.cpp
index 0ce0277..3b325b7 100644
--- a/media/jni/audioeffect/android_media_AudioEffect.cpp
+++ b/media/jni/audioeffect/android_media_AudioEffect.cpp
@@ -149,7 +149,7 @@ static void effectCallback(int event, void* user, void *info) {
size = arg1 + p->vsize;
array = env->NewByteArray(size);
if (array == NULL) {
- LOGE("effectCallback: Couldn't allocate byte array for parameter data");
+ ALOGE("effectCallback: Couldn't allocate byte array for parameter data");
goto effectCallback_Exit;
}
bytes = env->GetByteArrayElements(array, NULL);
@@ -195,7 +195,7 @@ android_media_AudioEffect_native_init(JNIEnv *env)
// Get the AudioEffect class
jclass clazz = env->FindClass(kClassPathName);
if (clazz == NULL) {
- LOGE("Can't find %s", kClassPathName);
+ ALOGE("Can't find %s", kClassPathName);
return;
}
@@ -206,7 +206,7 @@ android_media_AudioEffect_native_init(JNIEnv *env)
fields.clazzEffect,
"postEventFromNative", "(Ljava/lang/Object;IIILjava/lang/Object;)V");
if (fields.midPostNativeEvent == NULL) {
- LOGE("Can't find AudioEffect.%s", "postEventFromNative");
+ ALOGE("Can't find AudioEffect.%s", "postEventFromNative");
return;
}
@@ -216,7 +216,7 @@ android_media_AudioEffect_native_init(JNIEnv *env)
fields.clazzEffect,
"mNativeAudioEffect", "I");
if (fields.fidNativeAudioEffect == NULL) {
- LOGE("Can't find AudioEffect.%s", "mNativeAudioEffect");
+ ALOGE("Can't find AudioEffect.%s", "mNativeAudioEffect");
return;
}
// fidJniData;
@@ -224,13 +224,13 @@ android_media_AudioEffect_native_init(JNIEnv *env)
fields.clazzEffect,
"mJniData", "I");
if (fields.fidJniData == NULL) {
- LOGE("Can't find AudioEffect.%s", "mJniData");
+ ALOGE("Can't find AudioEffect.%s", "mJniData");
return;
}
clazz = env->FindClass("android/media/audiofx/AudioEffect$Descriptor");
if (clazz == NULL) {
- LOGE("Can't find android/media/audiofx/AudioEffect$Descriptor class");
+ ALOGE("Can't find android/media/audiofx/AudioEffect$Descriptor class");
return;
}
fields.clazzDesc = (jclass)env->NewGlobalRef(clazz);
@@ -241,7 +241,7 @@ android_media_AudioEffect_native_init(JNIEnv *env)
"<init>",
"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
if (fields.midDescCstor == NULL) {
- LOGE("Can't find android/media/audiofx/AudioEffect$Descriptor class constructor");
+ ALOGE("Can't find android/media/audiofx/AudioEffect$Descriptor class constructor");
return;
}
}
@@ -290,7 +290,7 @@ android_media_AudioEffect_native_setup(JNIEnv *env, jobject thiz, jobject weak_t
lpJniStorage = new AudioEffectJniStorage();
if (lpJniStorage == NULL) {
- LOGE("setup: Error creating JNI Storage");
+ ALOGE("setup: Error creating JNI Storage");
goto setup_failure;
}
@@ -305,7 +305,7 @@ android_media_AudioEffect_native_setup(JNIEnv *env, jobject thiz, jobject weak_t
&lpJniStorage->mCallbackData);
if (jId == NULL) {
- LOGE("setup: NULL java array for id pointer");
+ ALOGE("setup: NULL java array for id pointer");
lStatus = AUDIOEFFECT_ERROR_BAD_VALUE;
goto setup_failure;
}
@@ -319,19 +319,19 @@ android_media_AudioEffect_native_setup(JNIEnv *env, jobject thiz, jobject weak_t
sessionId,
0);
if (lpAudioEffect == NULL) {
- LOGE("Error creating AudioEffect");
+ ALOGE("Error creating AudioEffect");
goto setup_failure;
}
lStatus = translateError(lpAudioEffect->initCheck());
if (lStatus != AUDIOEFFECT_SUCCESS && lStatus != AUDIOEFFECT_ERROR_ALREADY_EXISTS) {
- LOGE("AudioEffect initCheck failed %d", lStatus);
+ ALOGE("AudioEffect initCheck failed %d", lStatus);
goto setup_failure;
}
nId = (jint *) env->GetPrimitiveArrayCritical(jId, NULL);
if (nId == NULL) {
- LOGE("setup: Error retrieving id pointer");
+ ALOGE("setup: Error retrieving id pointer");
lStatus = AUDIOEFFECT_ERROR_BAD_VALUE;
goto setup_failure;
}
@@ -382,7 +382,7 @@ android_media_AudioEffect_native_setup(JNIEnv *env, jobject thiz, jobject weak_t
env->DeleteLocalRef(jdescName);
env->DeleteLocalRef(jdescImplementor);
if (jdesc == NULL) {
- LOGE("env->NewObject(fields.clazzDesc, fields.midDescCstor)");
+ ALOGE("env->NewObject(fields.clazzDesc, fields.midDescCstor)");
goto setup_failure;
}
@@ -534,14 +534,14 @@ static jint android_media_AudioEffect_native_setParameter(JNIEnv *env,
// get the pointer for the param from the java array
lpParam = (jbyte *) env->GetPrimitiveArrayCritical(pJavaParam, NULL);
if (lpParam == NULL) {
- LOGE("setParameter: Error retrieving param pointer");
+ ALOGE("setParameter: Error retrieving param pointer");
goto setParameter_Exit;
}
// get the pointer for the value from the java array
lpValue = (jbyte *) env->GetPrimitiveArrayCritical(pJavaValue, NULL);
if (lpValue == NULL) {
- LOGE("setParameter: Error retrieving value pointer");
+ ALOGE("setParameter: Error retrieving value pointer");
goto setParameter_Exit;
}
@@ -597,14 +597,14 @@ android_media_AudioEffect_native_getParameter(JNIEnv *env,
// get the pointer for the param from the java array
lpParam = (jbyte *) env->GetPrimitiveArrayCritical(pJavaParam, NULL);
if (lpParam == NULL) {
- LOGE("getParameter: Error retrieving param pointer");
+ ALOGE("getParameter: Error retrieving param pointer");
goto getParameter_Exit;
}
// get the pointer for the value from the java array
lpValue = (jbyte *) env->GetPrimitiveArrayCritical(pJavaValue, NULL);
if (lpValue == NULL) {
- LOGE("getParameter: Error retrieving value pointer");
+ ALOGE("getParameter: Error retrieving value pointer");
goto getParameter_Exit;
}
@@ -665,7 +665,7 @@ static jint android_media_AudioEffect_native_command(JNIEnv *env, jobject thiz,
if (cmdSize != 0) {
pCmdData = (jbyte *) env->GetPrimitiveArrayCritical(jCmdData, NULL);
if (pCmdData == NULL) {
- LOGE("setParameter: Error retrieving command pointer");
+ ALOGE("setParameter: Error retrieving command pointer");
goto command_Exit;
}
}
@@ -674,7 +674,7 @@ static jint android_media_AudioEffect_native_command(JNIEnv *env, jobject thiz,
if (replySize != 0 && jReplyData != NULL) {
pReplyData = (jbyte *) env->GetPrimitiveArrayCritical(jReplyData, NULL);
if (pReplyData == NULL) {
- LOGE("setParameter: Error retrieving reply pointer");
+ ALOGE("setParameter: Error retrieving reply pointer");
goto command_Exit;
}
}
@@ -759,7 +759,7 @@ android_media_AudioEffect_native_queryEffects(JNIEnv *env, jclass clazz)
env->DeleteLocalRef(jdescName);
env->DeleteLocalRef(jdescImplementor);
if (jdesc == NULL) {
- LOGE("env->NewObject(fields.clazzDesc, fields.midDescCstor)");
+ ALOGE("env->NewObject(fields.clazzDesc, fields.midDescCstor)");
goto queryEffects_failure;
}
@@ -847,7 +847,7 @@ android_media_AudioEffect_native_queryPreProcessings(JNIEnv *env, jclass clazz,
env->DeleteLocalRef(jdescName);
env->DeleteLocalRef(jdescImplementor);
if (jdesc == NULL) {
- LOGE("env->NewObject(fields.clazzDesc, fields.midDescCstor)");
+ ALOGE("env->NewObject(fields.clazzDesc, fields.midDescCstor)");
env->DeleteLocalRef(ret);
return NULL;;
}
@@ -895,18 +895,18 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved)
jint result = -1;
if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
- LOGE("ERROR: GetEnv failed\n");
+ ALOGE("ERROR: GetEnv failed\n");
goto bail;
}
assert(env != NULL);
if (register_android_media_AudioEffect(env) < 0) {
- LOGE("ERROR: AudioEffect native registration failed\n");
+ ALOGE("ERROR: AudioEffect native registration failed\n");
goto bail;
}
if (register_android_media_visualizer(env) < 0) {
- LOGE("ERROR: Visualizer native registration failed\n");
+ ALOGE("ERROR: Visualizer native registration failed\n");
goto bail;
}
diff --git a/media/jni/audioeffect/android_media_Visualizer.cpp b/media/jni/audioeffect/android_media_Visualizer.cpp
index 53c90f3..ecd4d07 100644
--- a/media/jni/audioeffect/android_media_Visualizer.cpp
+++ b/media/jni/audioeffect/android_media_Visualizer.cpp
@@ -185,7 +185,7 @@ android_media_visualizer_native_init(JNIEnv *env)
// Get the Visualizer class
jclass clazz = env->FindClass(kClassPathName);
if (clazz == NULL) {
- LOGE("Can't find %s", kClassPathName);
+ ALOGE("Can't find %s", kClassPathName);
return;
}
@@ -196,7 +196,7 @@ android_media_visualizer_native_init(JNIEnv *env)
fields.clazzEffect,
"postEventFromNative", "(Ljava/lang/Object;IIILjava/lang/Object;)V");
if (fields.midPostNativeEvent == NULL) {
- LOGE("Can't find Visualizer.%s", "postEventFromNative");
+ ALOGE("Can't find Visualizer.%s", "postEventFromNative");
return;
}
@@ -206,7 +206,7 @@ android_media_visualizer_native_init(JNIEnv *env)
fields.clazzEffect,
"mNativeVisualizer", "I");
if (fields.fidNativeVisualizer == NULL) {
- LOGE("Can't find Visualizer.%s", "mNativeVisualizer");
+ ALOGE("Can't find Visualizer.%s", "mNativeVisualizer");
return;
}
// fidJniData;
@@ -214,7 +214,7 @@ android_media_visualizer_native_init(JNIEnv *env)
fields.clazzEffect,
"mJniData", "I");
if (fields.fidJniData == NULL) {
- LOGE("Can't find Visualizer.%s", "mJniData");
+ ALOGE("Can't find Visualizer.%s", "mJniData");
return;
}
@@ -233,7 +233,7 @@ android_media_visualizer_native_setup(JNIEnv *env, jobject thiz, jobject weak_th
lpJniStorage = new visualizerJniStorage();
if (lpJniStorage == NULL) {
- LOGE("setup: Error creating JNI Storage");
+ ALOGE("setup: Error creating JNI Storage");
goto setup_failure;
}
@@ -248,7 +248,7 @@ android_media_visualizer_native_setup(JNIEnv *env, jobject thiz, jobject weak_th
&lpJniStorage->mCallbackData);
if (jId == NULL) {
- LOGE("setup: NULL java array for id pointer");
+ ALOGE("setup: NULL java array for id pointer");
lStatus = VISUALIZER_ERROR_BAD_VALUE;
goto setup_failure;
}
@@ -259,19 +259,19 @@ android_media_visualizer_native_setup(JNIEnv *env, jobject thiz, jobject weak_th
NULL,
sessionId);
if (lpVisualizer == NULL) {
- LOGE("Error creating Visualizer");
+ ALOGE("Error creating Visualizer");
goto setup_failure;
}
lStatus = translateError(lpVisualizer->initCheck());
if (lStatus != VISUALIZER_SUCCESS && lStatus != VISUALIZER_ERROR_ALREADY_EXISTS) {
- LOGE("Visualizer initCheck failed %d", lStatus);
+ ALOGE("Visualizer initCheck failed %d", lStatus);
goto setup_failure;
}
nId = (jint *) env->GetPrimitiveArrayCritical(jId, NULL);
if (nId == NULL) {
- LOGE("setup: Error retrieving id pointer");
+ ALOGE("setup: Error retrieving id pointer");
lStatus = VISUALIZER_ERROR_BAD_VALUE;
goto setup_failure;
}
diff --git a/media/jni/mediaeditor/VideoEditorMain.cpp b/media/jni/mediaeditor/VideoEditorMain.cpp
index 7083a91..c84a883 100755
--- a/media/jni/mediaeditor/VideoEditorMain.cpp
+++ b/media/jni/mediaeditor/VideoEditorMain.cpp
@@ -441,7 +441,7 @@ static void jniPreviewProgressCallback (void* cookie, M4OSA_UInt32 msgType,
if (extPos != NULL) {
*extPos = '\0';
} else {
- LOGE("ERROR the overlay file is incorrect");
+ ALOGE("ERROR the overlay file is incorrect");
}
strcat(pContext->mOverlayFileName, ".png");
@@ -518,7 +518,7 @@ static M4OSA_ERR checkClipVideoProfileAndLevel(M4DECODER_VideoDecoders *pDecoder
// For these case we do not check the profile and level
return M4NO_ERROR;
default :
- LOGE("checkClipVideoProfileAndLevel unsupport Video format %ld", format);
+ ALOGE("checkClipVideoProfileAndLevel unsupport Video format %ld", format);
break;
}
@@ -971,7 +971,7 @@ static int videoEditor_renderPreviewFrame(JNIEnv* pEnv,
if (extPos != NULL) {
*extPos = '\0';
} else {
- LOGE("ERROR the overlay file is incorrect");
+ ALOGE("ERROR the overlay file is incorrect");
}
strcat(tmpOverlayFilename, ".png");
@@ -1510,7 +1510,7 @@ static int removeAlphafromRGB8888 (
M4OSA_UInt8 *pTmpData = (M4OSA_UInt8*) M4OSA_32bitAlignedMalloc(frameSize_argb, M4VS, (M4OSA_Char*)"Image argb data");
if (pTmpData == M4OSA_NULL) {
- LOGE("Failed to allocate memory for Image clip");
+ ALOGE("Failed to allocate memory for Image clip");
return M4ERR_ALLOC;
}
@@ -1520,7 +1520,7 @@ static int removeAlphafromRGB8888 (
if ((lerr != M4NO_ERROR) || (lImageFileFp == M4OSA_NULL))
{
- LOGE("removeAlphafromRGB8888: Can not open the file ");
+ ALOGE("removeAlphafromRGB8888: Can not open the file ");
free(pTmpData);
return M4ERR_FILE_NOT_FOUND;
}
@@ -1529,7 +1529,7 @@ static int removeAlphafromRGB8888 (
lerr = M4OSA_fileReadData(lImageFileFp, (M4OSA_MemAddr8)pTmpData, &frameSize_argb);
if (lerr != M4NO_ERROR)
{
- LOGE("removeAlphafromRGB8888: can not read the data ");
+ ALOGE("removeAlphafromRGB8888: can not read the data ");
M4OSA_fileReadClose(lImageFileFp);
free(pTmpData);
return lerr;
@@ -1545,7 +1545,7 @@ static int removeAlphafromRGB8888 (
if (pFramingCtx->FramingRgb == M4OSA_NULL)
{
- LOGE("Failed to allocate memory for Image clip");
+ ALOGE("Failed to allocate memory for Image clip");
free(pTmpData);
return M4ERR_ALLOC;
}
@@ -2904,7 +2904,7 @@ M4OSA_ERR videoEditor_processClip(
// Other states are unexpected
else {
result = M4ERR_STATE;
- LOGE("videoEditor_processClip ITEM %d State ERROR 0x%x",
+ ALOGE("videoEditor_processClip ITEM %d State ERROR 0x%x",
unuseditemID, (unsigned int) result);
}
}
@@ -2916,13 +2916,13 @@ M4OSA_ERR videoEditor_processClip(
pContext->state = errorState;
// Log the result.
- LOGE("videoEditor_processClip ITEM %d Processing ERROR 0x%x",
+ ALOGE("videoEditor_processClip ITEM %d Processing ERROR 0x%x",
unuseditemID, (unsigned int) result);
}
}
// Return the error result
- LOGE("videoEditor_processClip ITEM %d END 0x%x", unuseditemID, (unsigned int) result);
+ ALOGE("videoEditor_processClip ITEM %d END 0x%x", unuseditemID, (unsigned int) result);
return result;
}
/*+ PROGRESS CB */
diff --git a/media/jni/soundpool/SoundPool.cpp b/media/jni/soundpool/SoundPool.cpp
index ed63189..14a5309 100644
--- a/media/jni/soundpool/SoundPool.cpp
+++ b/media/jni/soundpool/SoundPool.cpp
@@ -508,19 +508,19 @@ status_t Sample::doLoad()
mFd = -1;
}
if (p == 0) {
- LOGE("Unable to load sample: %s", mUrl);
+ ALOGE("Unable to load sample: %s", mUrl);
return -1;
}
ALOGV("pointer = %p, size = %u, sampleRate = %u, numChannels = %d",
p->pointer(), p->size(), sampleRate, numChannels);
if (sampleRate > kMaxSampleRate) {
- LOGE("Sample rate (%u) out of range", sampleRate);
+ ALOGE("Sample rate (%u) out of range", sampleRate);
return - 1;
}
if ((numChannels < 1) || (numChannels > 2)) {
- LOGE("Sample channel count (%d) out of range", numChannels);
+ ALOGE("Sample channel count (%d) out of range", numChannels);
return - 1;
}
@@ -616,7 +616,7 @@ void SoundChannel::play(const sp<Sample>& sample, int nextChannelID, float leftV
oldTrack = mAudioTrack;
status = newTrack->initCheck();
if (status != NO_ERROR) {
- LOGE("Error creating AudioTrack");
+ ALOGE("Error creating AudioTrack");
goto exit;
}
ALOGV("setVolume %p", newTrack);
diff --git a/media/jni/soundpool/android_media_SoundPool.cpp b/media/jni/soundpool/android_media_SoundPool.cpp
index f86892f..fe1c20a 100644
--- a/media/jni/soundpool/android_media_SoundPool.cpp
+++ b/media/jni/soundpool/android_media_SoundPool.cpp
@@ -288,27 +288,27 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved)
jclass clazz;
if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) {
- LOGE("ERROR: GetEnv failed\n");
+ ALOGE("ERROR: GetEnv failed\n");
goto bail;
}
assert(env != NULL);
clazz = env->FindClass(kClassPathName);
if (clazz == NULL) {
- LOGE("Can't find %s", kClassPathName);
+ ALOGE("Can't find %s", kClassPathName);
goto bail;
}
fields.mNativeContext = env->GetFieldID(clazz, "mNativeContext", "I");
if (fields.mNativeContext == NULL) {
- LOGE("Can't find SoundPool.mNativeContext");
+ ALOGE("Can't find SoundPool.mNativeContext");
goto bail;
}
fields.mPostEvent = env->GetStaticMethodID(clazz, "postEventFromNative",
"(Ljava/lang/Object;IIILjava/lang/Object;)V");
if (fields.mPostEvent == NULL) {
- LOGE("Can't find android/media/SoundPool.postEventFromNative");
+ ALOGE("Can't find android/media/SoundPool.postEventFromNative");
goto bail;
}
diff --git a/media/libeffects/preprocessing/PreProcessing.cpp b/media/libeffects/preprocessing/PreProcessing.cpp
index 032c5aa..6267d1d 100755
--- a/media/libeffects/preprocessing/PreProcessing.cpp
+++ b/media/libeffects/preprocessing/PreProcessing.cpp
@@ -616,7 +616,7 @@ int Effect_SetState(preproc_effect_t *effect, uint32_t state)
case PREPROC_EFFECT_STATE_CREATED:
case PREPROC_EFFECT_STATE_ACTIVE:
case PREPROC_EFFECT_STATE_CONFIG:
- LOGE("Effect_SetState invalid transition");
+ ALOGE("Effect_SetState invalid transition");
status = -ENOSYS;
break;
default:
@@ -626,7 +626,7 @@ int Effect_SetState(preproc_effect_t *effect, uint32_t state)
case PREPROC_EFFECT_STATE_CONFIG:
switch(effect->state) {
case PREPROC_EFFECT_STATE_INIT:
- LOGE("Effect_SetState invalid transition");
+ ALOGE("Effect_SetState invalid transition");
status = -ENOSYS;
break;
case PREPROC_EFFECT_STATE_ACTIVE:
@@ -645,7 +645,7 @@ int Effect_SetState(preproc_effect_t *effect, uint32_t state)
case PREPROC_EFFECT_STATE_INIT:
case PREPROC_EFFECT_STATE_CREATED:
case PREPROC_EFFECT_STATE_ACTIVE:
- LOGE("Effect_SetState invalid transition");
+ ALOGE("Effect_SetState invalid transition");
status = -ENOSYS;
break;
case PREPROC_EFFECT_STATE_CONFIG:
diff --git a/media/libmedia/AudioEffect.cpp b/media/libmedia/AudioEffect.cpp
index d74389d..6639d06 100644
--- a/media/libmedia/AudioEffect.cpp
+++ b/media/libmedia/AudioEffect.cpp
@@ -107,7 +107,7 @@ status_t AudioEffect::set(const effect_uuid_t *type,
const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger();
if (audioFlinger == 0) {
- LOGE("set(): Could not get audioflinger");
+ ALOGE("set(): Could not get audioflinger");
return NO_INIT;
}
@@ -138,7 +138,7 @@ status_t AudioEffect::set(const effect_uuid_t *type,
mIEffectClient, priority, io, mSessionId, &mStatus, &mId, &enabled);
if (iEffect == 0 || (mStatus != NO_ERROR && mStatus != ALREADY_EXISTS)) {
- LOGE("set(): AudioFlinger could not create effect, status: %d", mStatus);
+ ALOGE("set(): AudioFlinger could not create effect, status: %d", mStatus);
return mStatus;
}
@@ -148,7 +148,7 @@ status_t AudioEffect::set(const effect_uuid_t *type,
cblk = iEffect->getCblk();
if (cblk == 0) {
mStatus = NO_INIT;
- LOGE("Could not get control block");
+ ALOGE("Could not get control block");
return mStatus;
}
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp
index 3e6d429..34a5eb7 100644
--- a/media/libmedia/AudioRecord.cpp
+++ b/media/libmedia/AudioRecord.cpp
@@ -56,12 +56,12 @@ status_t AudioRecord::getMinFrameCount(
size_t size = 0;
if (AudioSystem::getInputBufferSize(sampleRate, format, channelCount, &size)
!= NO_ERROR) {
- LOGE("AudioSystem could not query the input buffer size.");
+ ALOGE("AudioSystem could not query the input buffer size.");
return NO_INIT;
}
if (size == 0) {
- LOGE("Unsupported configuration: sampleRate %d, format %d, channelCount %d",
+ ALOGE("Unsupported configuration: sampleRate %d, format %d, channelCount %d",
sampleRate, format, channelCount);
return BAD_VALUE;
}
@@ -153,7 +153,7 @@ status_t AudioRecord::set(
}
// validate parameters
if (!audio_is_valid_format(format)) {
- LOGE("Invalid format");
+ ALOGE("Invalid format");
return BAD_VALUE;
}
@@ -177,7 +177,7 @@ status_t AudioRecord::set(
(audio_in_acoustics_t)flags,
mSessionId);
if (input == 0) {
- LOGE("Could not get audio input for record source %d", inputSource);
+ ALOGE("Could not get audio input for record source %d", inputSource);
return BAD_VALUE;
}
@@ -292,7 +292,7 @@ status_t AudioRecord::start()
if (t != 0) {
if (t->exitPending()) {
if (t->requestExitAndWait() == WOULD_BLOCK) {
- LOGE("AudioRecord::start called from thread");
+ ALOGE("AudioRecord::start called from thread");
return WOULD_BLOCK;
}
}
@@ -469,12 +469,12 @@ status_t AudioRecord::openRecord_l(
&status);
if (record == 0) {
- LOGE("AudioFlinger could not create record track, status: %d", status);
+ ALOGE("AudioFlinger could not create record track, status: %d", status);
return status;
}
sp<IMemory> cblk = record->getCblk();
if (cblk == 0) {
- LOGE("Could not get control block");
+ ALOGE("Could not get control block");
return NO_INIT;
}
mAudioRecord.clear();
@@ -623,7 +623,7 @@ ssize_t AudioRecord::read(void* buffer, size_t userSize)
if (ssize_t(userSize) < 0) {
// sanity-check. user is most-likely passing an error code.
- LOGE("AudioRecord::read(buffer=%p, size=%u (%d)",
+ ALOGE("AudioRecord::read(buffer=%p, size=%u (%d)",
buffer, userSize, userSize);
return BAD_VALUE;
}
@@ -706,7 +706,7 @@ bool AudioRecord::processAudioBuffer(const sp<ClientRecordThread>& thread)
status_t err = obtainBuffer(&audioBuffer, 1);
if (err < NO_ERROR) {
if (err != TIMED_OUT) {
- LOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up.");
+ ALOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up.");
return false;
}
break;
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp
index 0ef1885..f7f129c 100644
--- a/media/libmedia/AudioSystem.cpp
+++ b/media/libmedia/AudioSystem.cpp
@@ -70,7 +70,7 @@ const sp<IAudioFlinger>& AudioSystem::get_audio_flinger()
gAudioFlinger = interface_cast<IAudioFlinger>(binder);
gAudioFlinger->registerClient(gAudioFlingerClient);
}
- LOGE_IF(gAudioFlinger==0, "no AudioFlinger!?");
+ ALOGE_IF(gAudioFlinger==0, "no AudioFlinger!?");
return gAudioFlinger;
}
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index c6fc126..d51cd69 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -157,7 +157,7 @@ status_t AudioTrack::set(
AutoMutex lock(mLock);
if (mAudioTrack != 0) {
- LOGE("Track already in use");
+ ALOGE("Track already in use");
return INVALID_OPERATION;
}
@@ -187,7 +187,7 @@ status_t AudioTrack::set(
// validate parameters
if (!audio_is_valid_format(format)) {
- LOGE("Invalid format");
+ ALOGE("Invalid format");
return BAD_VALUE;
}
@@ -197,7 +197,7 @@ status_t AudioTrack::set(
}
if (!audio_is_output_channel(channelMask)) {
- LOGE("Invalid channel mask");
+ ALOGE("Invalid channel mask");
return BAD_VALUE;
}
uint32_t channelCount = popcount(channelMask);
@@ -208,7 +208,7 @@ status_t AudioTrack::set(
(audio_policy_output_flags_t)flags);
if (output == 0) {
- LOGE("Could not get audio output for stream type %d", streamType);
+ ALOGE("Could not get audio output for stream type %d", streamType);
return BAD_VALUE;
}
@@ -238,7 +238,7 @@ status_t AudioTrack::set(
if (cbf != 0) {
mAudioTrackThread = new AudioTrackThread(*this, threadCanCallJava);
if (mAudioTrackThread == 0) {
- LOGE("Could not create callback thread");
+ ALOGE("Could not create callback thread");
return NO_INIT;
}
}
@@ -323,7 +323,7 @@ void AudioTrack::start()
if (t != 0) {
if (t->exitPending()) {
if (t->requestExitAndWait() == WOULD_BLOCK) {
- LOGE("AudioTrack::start called from thread");
+ ALOGE("AudioTrack::start called from thread");
return;
}
}
@@ -561,12 +561,12 @@ status_t AudioTrack::setLoop_l(uint32_t loopStart, uint32_t loopEnd, int loopCou
if (loopStart >= loopEnd ||
loopEnd - loopStart > cblk->frameCount ||
cblk->server > loopStart) {
- LOGE("setLoop invalid value: loopStart %d, loopEnd %d, loopCount %d, framecount %d, user %d", loopStart, loopEnd, loopCount, cblk->frameCount, cblk->user);
+ ALOGE("setLoop invalid value: loopStart %d, loopEnd %d, loopCount %d, framecount %d, user %d", loopStart, loopEnd, loopCount, cblk->frameCount, cblk->user);
return BAD_VALUE;
}
if ((mSharedBuffer != 0) && (loopEnd > cblk->frameCount)) {
- LOGE("setLoop invalid value: loop markers beyond data: loopStart %d, loopEnd %d, framecount %d",
+ ALOGE("setLoop invalid value: loop markers beyond data: loopStart %d, loopEnd %d, framecount %d",
loopStart, loopEnd, cblk->frameCount);
return BAD_VALUE;
}
@@ -721,7 +721,7 @@ status_t AudioTrack::createTrack_l(
status_t status;
const sp<IAudioFlinger>& audioFlinger = AudioSystem::get_audio_flinger();
if (audioFlinger == 0) {
- LOGE("Could not get audioflinger");
+ ALOGE("Could not get audioflinger");
return NO_INIT;
}
@@ -764,7 +764,7 @@ status_t AudioTrack::createTrack_l(
}
if (frameCount < minFrameCount) {
if (enforceFrameCount) {
- LOGE("Invalid buffer size: minFrameCount %d, frameCount %d", minFrameCount, frameCount);
+ ALOGE("Invalid buffer size: minFrameCount %d, frameCount %d", minFrameCount, frameCount);
return BAD_VALUE;
} else {
frameCount = minFrameCount;
@@ -774,7 +774,7 @@ status_t AudioTrack::createTrack_l(
// Ensure that buffer alignment matches channelcount
int channelCount = popcount(channelMask);
if (((uint32_t)sharedBuffer->pointer() & (channelCount | 1)) != 0) {
- LOGE("Invalid buffer alignement: address %p, channelCount %d", sharedBuffer->pointer(), channelCount);
+ ALOGE("Invalid buffer alignement: address %p, channelCount %d", sharedBuffer->pointer(), channelCount);
return BAD_VALUE;
}
frameCount = sharedBuffer->size()/channelCount/sizeof(int16_t);
@@ -794,12 +794,12 @@ status_t AudioTrack::createTrack_l(
&status);
if (track == 0) {
- LOGE("AudioFlinger could not create track, status: %d", status);
+ ALOGE("AudioFlinger could not create track, status: %d", status);
return status;
}
sp<IMemory> cblk = track->getCblk();
if (cblk == 0) {
- LOGE("Could not get control block");
+ ALOGE("Could not get control block");
return NO_INIT;
}
mAudioTrack.clear();
@@ -961,7 +961,7 @@ ssize_t AudioTrack::write(const void* buffer, size_t userSize)
if (ssize_t(userSize) < 0) {
// sanity-check. user is most-likely passing an error code.
- LOGE("AudioTrack::write(buffer=%p, size=%u (%d)",
+ ALOGE("AudioTrack::write(buffer=%p, size=%u (%d)",
buffer, userSize, userSize);
return BAD_VALUE;
}
@@ -1093,7 +1093,7 @@ bool AudioTrack::processAudioBuffer(const sp<AudioTrackThread>& thread)
status_t err = obtainBuffer(&audioBuffer, waitCount);
if (err < NO_ERROR) {
if (err != TIMED_OUT) {
- LOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up.");
+ ALOGE_IF(err != status_t(NO_MORE_BUFFERS), "Error obtaining an audio buffer, giving up.");
return false;
}
break;
diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp
index bedf8d3..abd491f 100644
--- a/media/libmedia/IAudioFlinger.cpp
+++ b/media/libmedia/IAudioFlinger.cpp
@@ -112,7 +112,7 @@ public:
data.writeInt32(lSessionId);
status_t lStatus = remote()->transact(CREATE_TRACK, data, &reply);
if (lStatus != NO_ERROR) {
- LOGE("createTrack error: %s", strerror(-lStatus));
+ ALOGE("createTrack error: %s", strerror(-lStatus));
} else {
lSessionId = reply.readInt32();
if (sessionId != NULL) {
@@ -155,7 +155,7 @@ public:
data.writeInt32(lSessionId);
status_t lStatus = remote()->transact(OPEN_RECORD, data, &reply);
if (lStatus != NO_ERROR) {
- LOGE("openRecord error: %s", strerror(-lStatus));
+ ALOGE("openRecord error: %s", strerror(-lStatus));
} else {
lSessionId = reply.readInt32();
if (sessionId != NULL) {
@@ -632,7 +632,7 @@ public:
status_t lStatus = remote()->transact(CREATE_EFFECT, data, &reply);
if (lStatus != NO_ERROR) {
- LOGE("createEffect error: %s", strerror(-lStatus));
+ ALOGE("createEffect error: %s", strerror(-lStatus));
} else {
lStatus = reply.readInt32();
int tmp = reply.readInt32();
diff --git a/media/libmedia/IMediaDeathNotifier.cpp b/media/libmedia/IMediaDeathNotifier.cpp
index 08b2286..8525482 100644
--- a/media/libmedia/IMediaDeathNotifier.cpp
+++ b/media/libmedia/IMediaDeathNotifier.cpp
@@ -54,7 +54,7 @@ IMediaDeathNotifier::getMediaPlayerService()
binder->linkToDeath(sDeathNotifier);
sMediaPlayerService = interface_cast<IMediaPlayerService>(binder);
}
- LOGE_IF(sMediaPlayerService == 0, "no media player service!?");
+ ALOGE_IF(sMediaPlayerService == 0, "no media player service!?");
return sMediaPlayerService;
}
diff --git a/media/libmedia/JetPlayer.cpp b/media/libmedia/JetPlayer.cpp
index 3d94b49..fa5b67a 100644
--- a/media/libmedia/JetPlayer.cpp
+++ b/media/libmedia/JetPlayer.cpp
@@ -68,21 +68,21 @@ int JetPlayer::init()
if (pLibConfig == NULL)
pLibConfig = EAS_Config();
if (pLibConfig == NULL) {
- LOGE("JetPlayer::init(): EAS library configuration could not be retrieved, aborting.");
+ ALOGE("JetPlayer::init(): EAS library configuration could not be retrieved, aborting.");
return EAS_FAILURE;
}
// init the EAS library
result = EAS_Init(&mEasData);
if( result != EAS_SUCCESS) {
- LOGE("JetPlayer::init(): Error initializing Sonivox EAS library, aborting.");
+ ALOGE("JetPlayer::init(): Error initializing Sonivox EAS library, aborting.");
mState = EAS_STATE_ERROR;
return result;
}
// init the JET library with the default app event controller range
result = JET_Init(mEasData, NULL, sizeof(S_JET_CONFIG));
if( result != EAS_SUCCESS) {
- LOGE("JetPlayer::init(): Error initializing JET library, aborting.");
+ ALOGE("JetPlayer::init(): Error initializing JET library, aborting.");
mState = EAS_STATE_ERROR;
return result;
}
@@ -108,7 +108,7 @@ int JetPlayer::init()
ALOGV("JetPlayer::init(): render thread(%d) successfully started.", mTid);
mState = EAS_STATE_READY;
} else {
- LOGE("JetPlayer::init(): failed to start render thread.");
+ ALOGE("JetPlayer::init(): failed to start render thread.");
mState = EAS_STATE_ERROR;
return EAS_FAILURE;
}
@@ -174,7 +174,7 @@ int JetPlayer::render() {
mAudioBuffer =
new EAS_PCM[pLibConfig->mixBufferSize * pLibConfig->numChannels * MIX_NUM_BUFFERS];
if (!mAudioBuffer) {
- LOGE("JetPlayer::render(): mAudioBuffer allocate failed");
+ ALOGE("JetPlayer::render(): mAudioBuffer allocate failed");
goto threadExit;
}
@@ -215,7 +215,7 @@ int JetPlayer::render() {
for (int i = 0; i < MIX_NUM_BUFFERS; i++) {
result = EAS_Render(mEasData, p, pLibConfig->mixBufferSize, &count);
if (result != EAS_SUCCESS) {
- LOGE("JetPlayer::render(): EAS_Render returned error %ld", result);
+ ALOGE("JetPlayer::render(): EAS_Render returned error %ld", result);
}
p += count * pLibConfig->numChannels;
num_output += count * pLibConfig->numChannels * sizeof(EAS_PCM);
@@ -234,14 +234,14 @@ int JetPlayer::render() {
// check audio output track
if (mAudioTrack == NULL) {
- LOGE("JetPlayer::render(): output AudioTrack was not created");
+ ALOGE("JetPlayer::render(): output AudioTrack was not created");
goto threadExit;
}
// Write data to the audio hardware
//ALOGV("JetPlayer::render(): writing to audio output");
if ((temp = mAudioTrack->write(mAudioBuffer, num_output)) < 0) {
- LOGE("JetPlayer::render(): Error in writing:%d",temp);
+ ALOGE("JetPlayer::render(): Error in writing:%d",temp);
return temp;
}
@@ -474,7 +474,7 @@ int JetPlayer::clearQueue()
//-------------------------------------------------------------------------------------------------
void JetPlayer::dump()
{
- LOGE("JetPlayer dump: JET file=%s", mEasJetFileLoc->path);
+ ALOGE("JetPlayer dump: JET file=%s", mEasJetFileLoc->path);
}
void JetPlayer::dumpJetStatus(S_JET_STATUS* pJetStatus)
@@ -484,7 +484,7 @@ void JetPlayer::dumpJetStatus(S_JET_STATUS* pJetStatus)
pJetStatus->currentUserID, pJetStatus->segmentRepeatCount,
pJetStatus->numQueuedSegments, pJetStatus->paused);
else
- LOGE(">> JET player status is NULL");
+ ALOGE(">> JET player status is NULL");
}
diff --git a/media/libmedia/MediaProfiles.cpp b/media/libmedia/MediaProfiles.cpp
index c9e8bc2..c905762 100644
--- a/media/libmedia/MediaProfiles.cpp
+++ b/media/libmedia/MediaProfiles.cpp
@@ -903,7 +903,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml)
expat is not compiled with -DXML_DTD. We don't have DTD parsing support.
if (!::XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS)) {
- LOGE("failed to enable DTD support in the xml file");
+ ALOGE("failed to enable DTD support in the xml file");
return UNKNOWN_ERROR;
}
@@ -913,7 +913,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml)
for (;;) {
void *buff = ::XML_GetBuffer(parser, BUFF_SIZE);
if (buff == NULL) {
- LOGE("failed to in call to XML_GetBuffer()");
+ ALOGE("failed to in call to XML_GetBuffer()");
delete profiles;
profiles = NULL;
goto exit;
@@ -921,7 +921,7 @@ MediaProfiles::createInstanceFromXmlFile(const char *xml)
int bytes_read = ::fread(buff, 1, BUFF_SIZE, fp);
if (bytes_read < 0) {
- LOGE("failed in call to read");
+ ALOGE("failed in call to read");
delete profiles;
profiles = NULL;
goto exit;
@@ -963,7 +963,7 @@ int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder co
}
}
if (index == -1) {
- LOGE("The given video encoder %d is not found", codec);
+ ALOGE("The given video encoder %d is not found", codec);
return -1;
}
@@ -976,7 +976,7 @@ int MediaProfiles::getVideoEncoderParamByName(const char *name, video_encoder co
if (!strcmp("enc.vid.fps.min", name)) return mVideoEncoders[index]->mMinFrameRate;
if (!strcmp("enc.vid.fps.max", name)) return mVideoEncoders[index]->mMaxFrameRate;
- LOGE("The given video encoder param name %s is not found", name);
+ ALOGE("The given video encoder param name %s is not found", name);
return -1;
}
int MediaProfiles::getVideoEditorExportParamByName(
@@ -993,7 +993,7 @@ int MediaProfiles::getVideoEditorExportParamByName(
}
}
if (index == -1) {
- LOGE("The given video decoder %d is not found", codec);
+ ALOGE("The given video decoder %d is not found", codec);
return -1;
}
if (!strcmp("videoeditor.export.profile", name))
@@ -1001,7 +1001,7 @@ int MediaProfiles::getVideoEditorExportParamByName(
if (!strcmp("videoeditor.export.level", name))
return exportProfile->mLevel;
- LOGE("The given video editor export param name %s is not found", name);
+ ALOGE("The given video editor export param name %s is not found", name);
return -1;
}
int MediaProfiles::getVideoEditorCapParamByName(const char *name) const
@@ -1009,7 +1009,7 @@ int MediaProfiles::getVideoEditorCapParamByName(const char *name) const
ALOGV("getVideoEditorCapParamByName: %s", name);
if (mVideoEditorCap == NULL) {
- LOGE("The mVideoEditorCap is not created, then create default cap.");
+ ALOGE("The mVideoEditorCap is not created, then create default cap.");
createDefaultVideoEditorCap(sInstance);
}
@@ -1024,7 +1024,7 @@ int MediaProfiles::getVideoEditorCapParamByName(const char *name) const
if (!strcmp("maxPrefetchYUVFrames", name))
return mVideoEditorCap->mMaxPrefetchYUVFrames;
- LOGE("The given video editor param name %s is not found", name);
+ ALOGE("The given video editor param name %s is not found", name);
return -1;
}
@@ -1048,7 +1048,7 @@ int MediaProfiles::getAudioEncoderParamByName(const char *name, audio_encoder co
}
}
if (index == -1) {
- LOGE("The given audio encoder %d is not found", codec);
+ ALOGE("The given audio encoder %d is not found", codec);
return -1;
}
@@ -1059,7 +1059,7 @@ int MediaProfiles::getAudioEncoderParamByName(const char *name, audio_encoder co
if (!strcmp("enc.aud.hz.min", name)) return mAudioEncoders[index]->mMinSampleRate;
if (!strcmp("enc.aud.hz.max", name)) return mAudioEncoders[index]->mMaxSampleRate;
- LOGE("The given audio encoder param name %s is not found", name);
+ ALOGE("The given audio encoder param name %s is not found", name);
return -1;
}
@@ -1103,7 +1103,7 @@ int MediaProfiles::getCamcorderProfileParamByName(const char *name,
int index = getCamcorderProfileIndex(cameraId, quality);
if (index == -1) {
- LOGE("The given camcorder profile camera %d quality %d is not found",
+ ALOGE("The given camcorder profile camera %d quality %d is not found",
cameraId, quality);
return -1;
}
@@ -1120,7 +1120,7 @@ int MediaProfiles::getCamcorderProfileParamByName(const char *name,
if (!strcmp("aud.ch", name)) return mCamcorderProfiles[index]->mAudioCodec->mChannels;
if (!strcmp("aud.hz", name)) return mCamcorderProfiles[index]->mAudioCodec->mSampleRate;
- LOGE("The given camcorder profile param id %d name %s is not found", cameraId, name);
+ ALOGE("The given camcorder profile param id %d name %s is not found", cameraId, name);
return -1;
}
diff --git a/media/libmedia/MediaScannerClient.cpp b/media/libmedia/MediaScannerClient.cpp
index 629b165..40b8188 100644
--- a/media/libmedia/MediaScannerClient.cpp
+++ b/media/libmedia/MediaScannerClient.cpp
@@ -142,12 +142,12 @@ void MediaScannerClient::convertValues(uint32_t encoding)
UConverter *conv = ucnv_open(enc, &status);
if (U_FAILURE(status)) {
- LOGE("could not create UConverter for %s\n", enc);
+ ALOGE("could not create UConverter for %s\n", enc);
return;
}
UConverter *utf8Conv = ucnv_open("UTF-8", &status);
if (U_FAILURE(status)) {
- LOGE("could not create UConverter for UTF-8\n");
+ ALOGE("could not create UConverter for UTF-8\n");
ucnv_close(conv);
return;
}
@@ -180,7 +180,7 @@ void MediaScannerClient::convertValues(uint32_t encoding)
ucnv_convertEx(utf8Conv, conv, &target, target + targetLength,
&source, (const char *)dest, NULL, NULL, NULL, NULL, TRUE, TRUE, &status);
if (U_FAILURE(status)) {
- LOGE("ucnv_convertEx failed: %d\n", status);
+ ALOGE("ucnv_convertEx failed: %d\n", status);
mValues->setEntry(i, "???");
} else {
// zero terminate
diff --git a/media/libmedia/Metadata.cpp b/media/libmedia/Metadata.cpp
index 8eeebbb..546a9b0 100644
--- a/media/libmedia/Metadata.cpp
+++ b/media/libmedia/Metadata.cpp
@@ -135,7 +135,7 @@ bool Metadata::checkKey(int key)
{
if (key < FIRST_SYSTEM_ID ||
(LAST_SYSTEM_ID < key && key < FIRST_CUSTOM_ID)) {
- LOGE("Bad key %d", key);
+ ALOGE("Bad key %d", key);
return false;
}
size_t curr = mData->dataPosition();
@@ -152,7 +152,7 @@ bool Metadata::checkKey(int key)
break;
}
if (mData->readInt32() == key) {
- LOGE("Key exists already %d", key);
+ ALOGE("Key exists already %d", key);
error = true;
break;
}
diff --git a/media/libmedia/ToneGenerator.cpp b/media/libmedia/ToneGenerator.cpp
index 6a38ff1..35dfbb8 100644
--- a/media/libmedia/ToneGenerator.cpp
+++ b/media/libmedia/ToneGenerator.cpp
@@ -805,7 +805,7 @@ ToneGenerator::ToneGenerator(int streamType, float volume, bool threadCanCallJav
mState = TONE_IDLE;
if (AudioSystem::getOutputSamplingRate(&mSamplingRate, streamType) != NO_ERROR) {
- LOGE("Unable to marshal AudioFlinger");
+ ALOGE("Unable to marshal AudioFlinger");
return;
}
mThreadCanCallJava = threadCanCallJava;
@@ -906,7 +906,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) {
ALOGV("Start waiting for previous tone to stop");
lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3));
if (lStatus != NO_ERROR) {
- LOGE("--- start wait for stop timed out, status %d", lStatus);
+ ALOGE("--- start wait for stop timed out, status %d", lStatus);
mState = TONE_IDLE;
mLock.unlock();
return lResult;
@@ -925,7 +925,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) {
ALOGV("Wait for start callback");
lStatus = mWaitCbkCond.waitRelative(mLock, seconds(3));
if (lStatus != NO_ERROR) {
- LOGE("--- Immediate start timed out, status %d", lStatus);
+ ALOGE("--- Immediate start timed out, status %d", lStatus);
mState = TONE_IDLE;
lResult = false;
}
@@ -943,7 +943,7 @@ bool ToneGenerator::startTone(int toneType, int durationMs) {
}
ALOGV("cond received");
} else {
- LOGE("--- Delayed start timed out, status %d", lStatus);
+ ALOGE("--- Delayed start timed out, status %d", lStatus);
mState = TONE_IDLE;
}
}
@@ -979,7 +979,7 @@ void ToneGenerator::stopTone() {
if (lStatus == NO_ERROR) {
ALOGV("track stop complete, time %d", (unsigned int)(systemTime()/1000000));
} else {
- LOGE("--- Stop timed out");
+ ALOGE("--- Stop timed out");
mState = TONE_IDLE;
mpAudioTrack->stop();
}
@@ -1018,7 +1018,7 @@ bool ToneGenerator::initAudioTrack() {
// Open audio track in mono, PCM 16bit, default sampling rate, default buffer size
mpAudioTrack = new AudioTrack();
if (mpAudioTrack == 0) {
- LOGE("AudioTrack allocation failed");
+ ALOGE("AudioTrack allocation failed");
goto initAudioTrack_exit;
}
ALOGV("Create Track: %p\n", mpAudioTrack);
@@ -1036,7 +1036,7 @@ bool ToneGenerator::initAudioTrack() {
mThreadCanCallJava);
if (mpAudioTrack->initCheck() != NO_ERROR) {
- LOGE("AudioTrack->initCheck failed");
+ ALOGE("AudioTrack->initCheck failed");
goto initAudioTrack_exit;
}
diff --git a/media/libmedia/Visualizer.cpp b/media/libmedia/Visualizer.cpp
index de40f98..d08ffa5 100644
--- a/media/libmedia/Visualizer.cpp
+++ b/media/libmedia/Visualizer.cpp
@@ -61,7 +61,7 @@ status_t Visualizer::setEnabled(bool enabled)
if (enabled) {
if (t->exitPending()) {
if (t->requestExitAndWait() == WOULD_BLOCK) {
- LOGE("Visualizer::enable() called from thread");
+ ALOGE("Visualizer::enable() called from thread");
return INVALID_OPERATION;
}
}
@@ -116,7 +116,7 @@ status_t Visualizer::setCaptureCallBack(capture_cbk_t cbk, void* user, uint32_t
if (cbk != NULL) {
mCaptureThread = new CaptureThread(*this, rate, ((flags & CAPTURE_CALL_JAVA) != 0));
if (mCaptureThread == 0) {
- LOGE("Could not create callback thread");
+ ALOGE("Could not create callback thread");
return NO_INIT;
}
}
diff --git a/media/libmedia/mediametadataretriever.cpp b/media/libmedia/mediametadataretriever.cpp
index 1658f41..88e269f 100644
--- a/media/libmedia/mediametadataretriever.cpp
+++ b/media/libmedia/mediametadataretriever.cpp
@@ -52,7 +52,7 @@ const sp<IMediaPlayerService>& MediaMetadataRetriever::getService()
binder->linkToDeath(sDeathNotifier);
sService = interface_cast<IMediaPlayerService>(binder);
}
- LOGE_IF(sService == 0, "no MediaPlayerService!?");
+ ALOGE_IF(sService == 0, "no MediaPlayerService!?");
return sService;
}
@@ -61,12 +61,12 @@ MediaMetadataRetriever::MediaMetadataRetriever()
ALOGV("constructor");
const sp<IMediaPlayerService>& service(getService());
if (service == 0) {
- LOGE("failed to obtain MediaMetadataRetrieverService");
+ ALOGE("failed to obtain MediaMetadataRetrieverService");
return;
}
sp<IMediaMetadataRetriever> retriever(service->createMetadataRetriever(getpid()));
if (retriever == 0) {
- LOGE("failed to create IMediaMetadataRetriever object from server");
+ ALOGE("failed to create IMediaMetadataRetriever object from server");
}
mRetriever = retriever;
}
@@ -98,11 +98,11 @@ status_t MediaMetadataRetriever::setDataSource(
ALOGV("setDataSource");
Mutex::Autolock _l(mLock);
if (mRetriever == 0) {
- LOGE("retriever is not initialized");
+ ALOGE("retriever is not initialized");
return INVALID_OPERATION;
}
if (srcUrl == NULL) {
- LOGE("data source is a null pointer");
+ ALOGE("data source is a null pointer");
return UNKNOWN_ERROR;
}
ALOGV("data source (%s)", srcUrl);
@@ -114,11 +114,11 @@ status_t MediaMetadataRetriever::setDataSource(int fd, int64_t offset, int64_t l
ALOGV("setDataSource(%d, %lld, %lld)", fd, offset, length);
Mutex::Autolock _l(mLock);
if (mRetriever == 0) {
- LOGE("retriever is not initialized");
+ ALOGE("retriever is not initialized");
return INVALID_OPERATION;
}
if (fd < 0 || offset < 0 || length < 0) {
- LOGE("Invalid negative argument");
+ ALOGE("Invalid negative argument");
return UNKNOWN_ERROR;
}
return mRetriever->setDataSource(fd, offset, length);
@@ -129,7 +129,7 @@ sp<IMemory> MediaMetadataRetriever::getFrameAtTime(int64_t timeUs, int option)
ALOGV("getFrameAtTime: time(%lld us) option(%d)", timeUs, option);
Mutex::Autolock _l(mLock);
if (mRetriever == 0) {
- LOGE("retriever is not initialized");
+ ALOGE("retriever is not initialized");
return NULL;
}
return mRetriever->getFrameAtTime(timeUs, option);
@@ -140,7 +140,7 @@ const char* MediaMetadataRetriever::extractMetadata(int keyCode)
ALOGV("extractMetadata(%d)", keyCode);
Mutex::Autolock _l(mLock);
if (mRetriever == 0) {
- LOGE("retriever is not initialized");
+ ALOGE("retriever is not initialized");
return NULL;
}
return mRetriever->extractMetadata(keyCode);
@@ -151,7 +151,7 @@ sp<IMemory> MediaMetadataRetriever::extractAlbumArt()
ALOGV("extractAlbumArt");
Mutex::Autolock _l(mLock);
if (mRetriever == 0) {
- LOGE("retriever is not initialized");
+ ALOGE("retriever is not initialized");
return NULL;
}
return mRetriever->extractAlbumArt();
diff --git a/media/libmedia/mediaplayer.cpp b/media/libmedia/mediaplayer.cpp
index 6054749..2284927 100644
--- a/media/libmedia/mediaplayer.cpp
+++ b/media/libmedia/mediaplayer.cpp
@@ -115,7 +115,7 @@ status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player)
if ( !( (mCurrentState & MEDIA_PLAYER_IDLE) ||
(mCurrentState == MEDIA_PLAYER_STATE_ERROR ) ) ) {
- LOGE("attachNewPlayer called in state %d", mCurrentState);
+ ALOGE("attachNewPlayer called in state %d", mCurrentState);
return INVALID_OPERATION;
}
@@ -126,7 +126,7 @@ status_t MediaPlayer::attachNewPlayer(const sp<IMediaPlayer>& player)
mCurrentState = MEDIA_PLAYER_INITIALIZED;
err = NO_ERROR;
} else {
- LOGE("Unable to to create media player");
+ ALOGE("Unable to to create media player");
}
}
@@ -195,7 +195,7 @@ status_t MediaPlayer::invoke(const Parcel& request, Parcel *reply)
ALOGV("invoke %d", request.dataSize());
return mPlayer->invoke(request, reply);
}
- LOGE("invoke failed: wrong state %X", mCurrentState);
+ ALOGE("invoke failed: wrong state %X", mCurrentState);
return INVALID_OPERATION;
}
@@ -236,7 +236,7 @@ status_t MediaPlayer::prepareAsync_l()
mCurrentState = MEDIA_PLAYER_PREPARING;
return mPlayer->prepareAsync();
}
- LOGE("prepareAsync called in state %d", mCurrentState);
+ ALOGE("prepareAsync called in state %d", mCurrentState);
return INVALID_OPERATION;
}
@@ -298,7 +298,7 @@ status_t MediaPlayer::start()
}
return ret;
}
- LOGE("start called in state %d", mCurrentState);
+ ALOGE("start called in state %d", mCurrentState);
return INVALID_OPERATION;
}
@@ -317,7 +317,7 @@ status_t MediaPlayer::stop()
}
return ret;
}
- LOGE("stop called in state %d", mCurrentState);
+ ALOGE("stop called in state %d", mCurrentState);
return INVALID_OPERATION;
}
@@ -336,7 +336,7 @@ status_t MediaPlayer::pause()
}
return ret;
}
- LOGE("pause called in state %d", mCurrentState);
+ ALOGE("pause called in state %d", mCurrentState);
return INVALID_OPERATION;
}
@@ -348,7 +348,7 @@ bool MediaPlayer::isPlaying()
mPlayer->isPlaying(&temp);
ALOGV("isPlaying: %d", temp);
if ((mCurrentState & MEDIA_PLAYER_STARTED) && ! temp) {
- LOGE("internal/external state mismatch corrected");
+ ALOGE("internal/external state mismatch corrected");
mCurrentState = MEDIA_PLAYER_PAUSED;
}
return temp;
@@ -402,7 +402,7 @@ status_t MediaPlayer::getDuration_l(int *msec)
*msec = mDuration;
return ret;
}
- LOGE("Attempt to call getDuration without a valid mediaplayer");
+ ALOGE("Attempt to call getDuration without a valid mediaplayer");
return INVALID_OPERATION;
}
@@ -435,7 +435,7 @@ status_t MediaPlayer::seekTo_l(int msec)
return NO_ERROR;
}
}
- LOGE("Attempt to perform seekTo in wrong state: mPlayer=%p, mCurrentState=%u", mPlayer.get(), mCurrentState);
+ ALOGE("Attempt to perform seekTo in wrong state: mPlayer=%p, mCurrentState=%u", mPlayer.get(), mCurrentState);
return INVALID_OPERATION;
}
@@ -457,7 +457,7 @@ status_t MediaPlayer::reset_l()
if (mPlayer != 0) {
status_t ret = mPlayer->reset();
if (ret != NO_ERROR) {
- LOGE("reset() failed with return code (%d)", ret);
+ ALOGE("reset() failed with return code (%d)", ret);
mCurrentState = MEDIA_PLAYER_STATE_ERROR;
} else {
mCurrentState = MEDIA_PLAYER_IDLE;
@@ -486,7 +486,7 @@ status_t MediaPlayer::setAudioStreamType(int type)
if (mCurrentState & ( MEDIA_PLAYER_PREPARED | MEDIA_PLAYER_STARTED |
MEDIA_PLAYER_PAUSED | MEDIA_PLAYER_PLAYBACK_COMPLETE ) ) {
// Can't change the stream type after prepare
- LOGE("setAudioStream called in state %d", mCurrentState);
+ ALOGE("setAudioStream called in state %d", mCurrentState);
return INVALID_OPERATION;
}
// cache
@@ -532,7 +532,7 @@ status_t MediaPlayer::setAudioSessionId(int sessionId)
ALOGV("MediaPlayer::setAudioSessionId(%d)", sessionId);
Mutex::Autolock _l(mLock);
if (!(mCurrentState & MEDIA_PLAYER_IDLE)) {
- LOGE("setAudioSessionId called in state %d", mCurrentState);
+ ALOGE("setAudioSessionId called in state %d", mCurrentState);
return INVALID_OPERATION;
}
if (sessionId < 0) {
@@ -570,7 +570,7 @@ status_t MediaPlayer::attachAuxEffect(int effectId)
if (mPlayer == 0 ||
(mCurrentState & MEDIA_PLAYER_IDLE) ||
(mCurrentState == MEDIA_PLAYER_STATE_ERROR )) {
- LOGE("attachAuxEffect called in state %d", mCurrentState);
+ ALOGE("attachAuxEffect called in state %d", mCurrentState);
return INVALID_OPERATION;
}
@@ -641,7 +641,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj)
case MEDIA_PLAYBACK_COMPLETE:
ALOGV("playback complete");
if (mCurrentState == MEDIA_PLAYER_IDLE) {
- LOGE("playback complete in idle state");
+ ALOGE("playback complete in idle state");
}
if (!mLoop) {
mCurrentState = MEDIA_PLAYER_PLAYBACK_COMPLETE;
@@ -651,7 +651,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj)
// Always log errors.
// ext1: Media framework error code.
// ext2: Implementation dependant error code.
- LOGE("error (%d, %d)", ext1, ext2);
+ ALOGE("error (%d, %d)", ext1, ext2);
mCurrentState = MEDIA_PLAYER_STATE_ERROR;
if (mPrepareSync)
{
@@ -717,7 +717,7 @@ void MediaPlayer::notify(int msg, int ext1, int ext2, const Parcel *obj)
if (service != 0) {
p = service->decode(url, pSampleRate, pNumChannels, pFormat);
} else {
- LOGE("Unable to locate media service");
+ ALOGE("Unable to locate media service");
}
return p;
@@ -737,7 +737,7 @@ void MediaPlayer::died()
if (service != 0) {
p = service->decode(fd, offset, length, pSampleRate, pNumChannels, pFormat);
} else {
- LOGE("Unable to locate media service");
+ ALOGE("Unable to locate media service");
}
return p;
diff --git a/media/libmedia/mediarecorder.cpp b/media/libmedia/mediarecorder.cpp
index ec62978..8d947d8 100644
--- a/media/libmedia/mediarecorder.cpp
+++ b/media/libmedia/mediarecorder.cpp
@@ -33,11 +33,11 @@ status_t MediaRecorder::setCamera(const sp<ICamera>& camera, const sp<ICameraRec
{
ALOGV("setCamera(%p,%p)", camera.get(), proxy.get());
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_IDLE)) {
- LOGE("setCamera called in an invalid state(%d)", mCurrentState);
+ ALOGE("setCamera called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -54,15 +54,15 @@ status_t MediaRecorder::setPreviewSurface(const sp<Surface>& surface)
{
ALOGV("setPreviewSurface(%p)", surface.get());
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setPreviewSurface called in an invalid state(%d)", mCurrentState);
+ ALOGE("setPreviewSurface called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
if (!mIsVideoSourceSet) {
- LOGE("try to set preview surface without setting the video source first");
+ ALOGE("try to set preview surface without setting the video source first");
return INVALID_OPERATION;
}
@@ -79,11 +79,11 @@ status_t MediaRecorder::init()
{
ALOGV("init");
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_IDLE)) {
- LOGE("init called in an invalid state(%d)", mCurrentState);
+ ALOGE("init called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -109,11 +109,11 @@ status_t MediaRecorder::setVideoSource(int vs)
{
ALOGV("setVideoSource(%d)", vs);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (mIsVideoSourceSet) {
- LOGE("video source has already been set");
+ ALOGE("video source has already been set");
return INVALID_OPERATION;
}
if (mCurrentState & MEDIA_RECORDER_IDLE) {
@@ -124,7 +124,7 @@ status_t MediaRecorder::setVideoSource(int vs)
}
}
if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) {
- LOGE("setVideoSource called in an invalid state(%d)", mCurrentState);
+ ALOGE("setVideoSource called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -144,7 +144,7 @@ status_t MediaRecorder::setAudioSource(int as)
{
ALOGV("setAudioSource(%d)", as);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (mCurrentState & MEDIA_RECORDER_IDLE) {
@@ -155,11 +155,11 @@ status_t MediaRecorder::setAudioSource(int as)
}
}
if (mIsAudioSourceSet) {
- LOGE("audio source has already been set");
+ ALOGE("audio source has already been set");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) {
- LOGE("setAudioSource called in an invalid state(%d)", mCurrentState);
+ ALOGE("setAudioSource called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -177,21 +177,21 @@ status_t MediaRecorder::setOutputFormat(int of)
{
ALOGV("setOutputFormat(%d)", of);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) {
- LOGE("setOutputFormat called in an invalid state: %d", mCurrentState);
+ ALOGE("setOutputFormat called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
if (mIsVideoSourceSet && of >= OUTPUT_FORMAT_AUDIO_ONLY_START && of != OUTPUT_FORMAT_RTP_AVP && of != OUTPUT_FORMAT_MPEG2TS) { //first non-video output format
- LOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of);
+ ALOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->setOutputFormat(of);
if (OK != ret) {
- LOGE("setOutputFormat failed: %d", ret);
+ ALOGE("setOutputFormat failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -203,19 +203,19 @@ status_t MediaRecorder::setVideoEncoder(int ve)
{
ALOGV("setVideoEncoder(%d)", ve);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!mIsVideoSourceSet) {
- LOGE("try to set the video encoder without setting the video source first");
+ ALOGE("try to set the video encoder without setting the video source first");
return INVALID_OPERATION;
}
if (mIsVideoEncoderSet) {
- LOGE("video encoder has already been set");
+ ALOGE("video encoder has already been set");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setVideoEncoder called in an invalid state(%d)", mCurrentState);
+ ALOGE("setVideoEncoder called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -233,19 +233,19 @@ status_t MediaRecorder::setAudioEncoder(int ae)
{
ALOGV("setAudioEncoder(%d)", ae);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!mIsAudioSourceSet) {
- LOGE("try to set the audio encoder without setting the audio source first");
+ ALOGE("try to set the audio encoder without setting the audio source first");
return INVALID_OPERATION;
}
if (mIsAudioEncoderSet) {
- LOGE("audio encoder has already been set");
+ ALOGE("audio encoder has already been set");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setAudioEncoder called in an invalid state(%d)", mCurrentState);
+ ALOGE("setAudioEncoder called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -263,15 +263,15 @@ status_t MediaRecorder::setOutputFile(const char* path)
{
ALOGV("setOutputFile(%s)", path);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (mIsOutputFileSet) {
- LOGE("output file has already been set");
+ ALOGE("output file has already been set");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setOutputFile called in an invalid state(%d)", mCurrentState);
+ ALOGE("setOutputFile called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -289,15 +289,15 @@ status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length)
{
ALOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (mIsOutputFileSet) {
- LOGE("output file has already been set");
+ ALOGE("output file has already been set");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setOutputFile called in an invalid state(%d)", mCurrentState);
+ ALOGE("setOutputFile called in an invalid state(%d)", mCurrentState);
return INVALID_OPERATION;
}
@@ -308,7 +308,7 @@ status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length)
// this issue by checking the file descriptor first before passing
// it through binder call.
if (fd < 0) {
- LOGE("Invalid file descriptor: %d", fd);
+ ALOGE("Invalid file descriptor: %d", fd);
return BAD_VALUE;
}
@@ -326,21 +326,21 @@ status_t MediaRecorder::setVideoSize(int width, int height)
{
ALOGV("setVideoSize(%d, %d)", width, height);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setVideoSize called in an invalid state: %d", mCurrentState);
+ ALOGE("setVideoSize called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
if (!mIsVideoSourceSet) {
- LOGE("Cannot set video size without setting video source first");
+ ALOGE("Cannot set video size without setting video source first");
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->setVideoSize(width, height);
if (OK != ret) {
- LOGE("setVideoSize failed: %d", ret);
+ ALOGE("setVideoSize failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -358,7 +358,7 @@ sp<ISurfaceTexture> MediaRecorder::
mSurfaceMediaSource =
mMediaRecorder->querySurfaceMediaSource();
if (mSurfaceMediaSource == NULL) {
- LOGE("SurfaceMediaSource could not be initialized!");
+ ALOGE("SurfaceMediaSource could not be initialized!");
}
return mSurfaceMediaSource;
}
@@ -369,21 +369,21 @@ status_t MediaRecorder::setVideoFrameRate(int frames_per_second)
{
ALOGV("setVideoFrameRate(%d)", frames_per_second);
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("setVideoFrameRate called in an invalid state: %d", mCurrentState);
+ ALOGE("setVideoFrameRate called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
if (!mIsVideoSourceSet) {
- LOGE("Cannot set video frame rate without setting video source first");
+ ALOGE("Cannot set video frame rate without setting video source first");
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->setVideoFrameRate(frames_per_second);
if (OK != ret) {
- LOGE("setVideoFrameRate failed: %d", ret);
+ ALOGE("setVideoFrameRate failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -393,7 +393,7 @@ status_t MediaRecorder::setVideoFrameRate(int frames_per_second)
status_t MediaRecorder::setParameters(const String8& params) {
ALOGV("setParameters(%s)", params.string());
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -402,13 +402,13 @@ status_t MediaRecorder::setParameters(const String8& params) {
MEDIA_RECORDER_RECORDING |
MEDIA_RECORDER_ERROR));
if (isInvalidState) {
- LOGE("setParameters is called in an invalid state: %d", mCurrentState);
+ ALOGE("setParameters is called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->setParameters(params);
if (OK != ret) {
- LOGE("setParameters(%s) failed: %d", params.string(), ret);
+ ALOGE("setParameters(%s) failed: %d", params.string(), ret);
// Do not change our current state to MEDIA_RECORDER_ERROR, failures
// of the only currently supported parameters, "max-duration" and
// "max-filesize" are _not_ fatal.
@@ -421,34 +421,34 @@ status_t MediaRecorder::prepare()
{
ALOGV("prepare");
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_DATASOURCE_CONFIGURED)) {
- LOGE("prepare called in an invalid state: %d", mCurrentState);
+ ALOGE("prepare called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
if (mIsAudioSourceSet != mIsAudioEncoderSet) {
if (mIsAudioSourceSet) {
- LOGE("audio source is set, but audio encoder is not set");
+ ALOGE("audio source is set, but audio encoder is not set");
} else { // must not happen, since setAudioEncoder checks this already
- LOGE("audio encoder is set, but audio source is not set");
+ ALOGE("audio encoder is set, but audio source is not set");
}
return INVALID_OPERATION;
}
if (mIsVideoSourceSet != mIsVideoEncoderSet) {
if (mIsVideoSourceSet) {
- LOGE("video source is set, but video encoder is not set");
+ ALOGE("video source is set, but video encoder is not set");
} else { // must not happen, since setVideoEncoder checks this already
- LOGE("video encoder is set, but video source is not set");
+ ALOGE("video encoder is set, but video source is not set");
}
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->prepare();
if (OK != ret) {
- LOGE("prepare failed: %d", ret);
+ ALOGE("prepare failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -460,17 +460,17 @@ status_t MediaRecorder::getMaxAmplitude(int* max)
{
ALOGV("getMaxAmplitude");
if(mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (mCurrentState & MEDIA_RECORDER_ERROR) {
- LOGE("getMaxAmplitude called in an invalid state: %d", mCurrentState);
+ ALOGE("getMaxAmplitude called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->getMaxAmplitude(max);
if (OK != ret) {
- LOGE("getMaxAmplitude failed: %d", ret);
+ ALOGE("getMaxAmplitude failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -481,17 +481,17 @@ status_t MediaRecorder::start()
{
ALOGV("start");
if (mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_PREPARED)) {
- LOGE("start called in an invalid state: %d", mCurrentState);
+ ALOGE("start called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->start();
if (OK != ret) {
- LOGE("start failed: %d", ret);
+ ALOGE("start failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -503,17 +503,17 @@ status_t MediaRecorder::stop()
{
ALOGV("stop");
if (mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
if (!(mCurrentState & MEDIA_RECORDER_RECORDING)) {
- LOGE("stop called in an invalid state: %d", mCurrentState);
+ ALOGE("stop called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->stop();
if (OK != ret) {
- LOGE("stop failed: %d", ret);
+ ALOGE("stop failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
}
@@ -531,7 +531,7 @@ status_t MediaRecorder::reset()
{
ALOGV("reset");
if (mMediaRecorder == NULL) {
- LOGE("media recorder is not initialized yet");
+ ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -556,7 +556,7 @@ status_t MediaRecorder::reset()
break;
default: {
- LOGE("Unexpected non-existing state: %d", mCurrentState);
+ ALOGE("Unexpected non-existing state: %d", mCurrentState);
break;
}
}
@@ -567,12 +567,12 @@ status_t MediaRecorder::close()
{
ALOGV("close");
if (!(mCurrentState & MEDIA_RECORDER_INITIALIZED)) {
- LOGE("close called in an invalid state: %d", mCurrentState);
+ ALOGE("close called in an invalid state: %d", mCurrentState);
return INVALID_OPERATION;
}
status_t ret = mMediaRecorder->close();
if (OK != ret) {
- LOGE("close failed: %d", ret);
+ ALOGE("close failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return UNKNOWN_ERROR;
} else {
@@ -586,7 +586,7 @@ status_t MediaRecorder::doReset()
ALOGV("doReset");
status_t ret = mMediaRecorder->reset();
if (OK != ret) {
- LOGE("doReset failed: %d", ret);
+ ALOGE("doReset failed: %d", ret);
mCurrentState = MEDIA_RECORDER_ERROR;
return ret;
} else {
diff --git a/media/libmediaplayerservice/MediaPlayerService.cpp b/media/libmediaplayerservice/MediaPlayerService.cpp
index 91221ac..f5cb019 100644
--- a/media/libmediaplayerservice/MediaPlayerService.cpp
+++ b/media/libmediaplayerservice/MediaPlayerService.cpp
@@ -112,14 +112,14 @@ bool unmarshallFilter(const Parcel& p,
int32_t val;
if (p.readInt32(&val) != OK)
{
- LOGE("Failed to read filter's length");
+ ALOGE("Failed to read filter's length");
*status = NOT_ENOUGH_DATA;
return false;
}
if( val > kMaxFilterSize || val < 0)
{
- LOGE("Invalid filter len %d", val);
+ ALOGE("Invalid filter len %d", val);
*status = BAD_VALUE;
return false;
}
@@ -134,7 +134,7 @@ bool unmarshallFilter(const Parcel& p,
if (p.dataAvail() < size)
{
- LOGE("Filter too short expected %d but got %d", size, p.dataAvail());
+ ALOGE("Filter too short expected %d but got %d", size, p.dataAvail());
*status = NOT_ENOUGH_DATA;
return false;
}
@@ -144,7 +144,7 @@ bool unmarshallFilter(const Parcel& p,
if (NULL == data)
{
- LOGE("Filter had no data");
+ ALOGE("Filter had no data");
*status = BAD_VALUE;
return false;
}
@@ -184,7 +184,7 @@ static bool checkPermission(const char* permissionString) {
#endif
if (getpid() == IPCThreadState::self()->getCallingPid()) return true;
bool ok = checkCallingPermission(String16(permissionString));
- if (!ok) LOGE("Request requires %s", permissionString);
+ if (!ok) ALOGE("Request requires %s", permissionString);
return ok;
}
@@ -630,7 +630,7 @@ static sp<MediaPlayerBase> createPlayer(player_type playerType, void* cookie,
p = new TestPlayerStub();
break;
default:
- LOGE("Unknown player type: %d", playerType);
+ ALOGE("Unknown player type: %d", playerType);
return NULL;
}
if (p != NULL) {
@@ -641,7 +641,7 @@ static sp<MediaPlayerBase> createPlayer(player_type playerType, void* cookie,
}
}
if (p == NULL) {
- LOGE("Failed to create player object");
+ ALOGE("Failed to create player object");
}
return p;
}
@@ -688,7 +688,7 @@ status_t MediaPlayerService::Client::setDataSource(
int fd = android::openContentProviderFile(url16);
if (fd < 0)
{
- LOGE("Couldn't open fd for %s", url);
+ ALOGE("Couldn't open fd for %s", url);
return UNKNOWN_ERROR;
}
setDataSource(fd, 0, 0x7fffffffffLL); // this sets mStatus
@@ -713,7 +713,7 @@ status_t MediaPlayerService::Client::setDataSource(
if (mStatus == NO_ERROR) {
mPlayer = p;
} else {
- LOGE(" error: %d", mStatus);
+ ALOGE(" error: %d", mStatus);
}
return mStatus;
}
@@ -725,7 +725,7 @@ status_t MediaPlayerService::Client::setDataSource(int fd, int64_t offset, int64
struct stat sb;
int ret = fstat(fd, &sb);
if (ret != 0) {
- LOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno));
+ ALOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno));
return UNKNOWN_ERROR;
}
@@ -736,7 +736,7 @@ status_t MediaPlayerService::Client::setDataSource(int fd, int64_t offset, int64
ALOGV("st_size = %llu", sb.st_size);
if (offset >= sb.st_size) {
- LOGE("offset error");
+ ALOGE("offset error");
::close(fd);
return UNKNOWN_ERROR;
}
@@ -821,7 +821,7 @@ status_t MediaPlayerService::Client::setVideoSurfaceTexture(
NATIVE_WINDOW_API_MEDIA);
if (err != OK) {
- LOGE("setVideoSurfaceTexture failed: %d", err);
+ ALOGE("setVideoSurfaceTexture failed: %d", err);
// Note that we must do the reset before disconnecting from the ANW.
// Otherwise queue/dequeue calls could be made on the disconnected
// ANW, which may result in errors.
@@ -905,7 +905,7 @@ status_t MediaPlayerService::Client::getMetadata(
if (status != OK) {
metadata.resetParcel();
- LOGE("getMetadata failed %d", status);
+ ALOGE("getMetadata failed %d", status);
return status;
}
@@ -975,7 +975,7 @@ status_t MediaPlayerService::Client::getCurrentPosition(int *msec)
if (ret == NO_ERROR) {
ALOGV("[%d] getCurrentPosition = %d", mConnId, *msec);
} else {
- LOGE("getCurrentPosition returned %d", ret);
+ ALOGE("getCurrentPosition returned %d", ret);
}
return ret;
}
@@ -989,7 +989,7 @@ status_t MediaPlayerService::Client::getDuration(int *msec)
if (ret == NO_ERROR) {
ALOGV("[%d] getDuration = %d", mConnId, *msec);
} else {
- LOGE("getDuration returned %d", ret);
+ ALOGE("getDuration returned %d", ret);
}
return ret;
}
@@ -1394,7 +1394,7 @@ status_t MediaPlayerService::AudioOutput::open(
}
if ((t == 0) || (t->initCheck() != NO_ERROR)) {
- LOGE("Unable to create audio track");
+ ALOGE("Unable to create audio track");
delete t;
return NO_INIT;
}
@@ -1652,7 +1652,7 @@ ssize_t MediaPlayerService::AudioCache::write(const void* buffer, size_t size)
p += mSize;
ALOGV("memcpy(%p, %p, %u)", p, buffer, size);
if (mSize + size > mHeap->getSize()) {
- LOGE("Heap size overflow! req size: %d, max size: %d", (mSize + size), mHeap->getSize());
+ ALOGE("Heap size overflow! req size: %d, max size: %d", (mSize + size), mHeap->getSize());
size = mHeap->getSize() - mSize;
}
memcpy(p, buffer, size);
@@ -1687,7 +1687,7 @@ void MediaPlayerService::AudioCache::notify(
switch (msg)
{
case MEDIA_ERROR:
- LOGE("Error %d, %d occurred", ext1, ext2);
+ ALOGE("Error %d, %d occurred", ext1, ext2);
p->mError = ext1;
break;
case MEDIA_PREPARED:
@@ -1807,7 +1807,7 @@ void MediaPlayerService::addBatteryData(uint32_t params)
info.refCount = 0;
if (mBatteryData.add(uid, info) == NO_MEMORY) {
- LOGE("Battery track error: no memory for new app");
+ ALOGE("Battery track error: no memory for new app");
return;
}
}
@@ -1828,7 +1828,7 @@ void MediaPlayerService::addBatteryData(uint32_t params)
ALOGW("Battery track warning: refCount is already 0");
return;
} else if (info.refCount < 0) {
- LOGE("Battery track error: refCount < 0");
+ ALOGE("Battery track error: refCount < 0");
mBatteryData.removeItem(uid);
return;
}
diff --git a/media/libmediaplayerservice/MediaRecorderClient.cpp b/media/libmediaplayerservice/MediaRecorderClient.cpp
index ca92c77..d219fc2 100644
--- a/media/libmediaplayerservice/MediaRecorderClient.cpp
+++ b/media/libmediaplayerservice/MediaRecorderClient.cpp
@@ -54,7 +54,7 @@ static bool checkPermission(const char* permissionString) {
#endif
if (getpid() == IPCThreadState::self()->getCallingPid()) return true;
bool ok = checkCallingPermission(String16(permissionString));
- if (!ok) LOGE("Request requires %s", permissionString);
+ if (!ok) ALOGE("Request requires %s", permissionString);
return ok;
}
@@ -64,7 +64,7 @@ sp<ISurfaceTexture> MediaRecorderClient::querySurfaceMediaSource()
ALOGV("Query SurfaceMediaSource");
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NULL;
}
return mRecorder->querySurfaceMediaSource();
@@ -78,7 +78,7 @@ status_t MediaRecorderClient::setCamera(const sp<ICamera>& camera,
ALOGV("setCamera");
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setCamera(camera, proxy);
@@ -89,7 +89,7 @@ status_t MediaRecorderClient::setPreviewSurface(const sp<Surface>& surface)
ALOGV("setPreviewSurface");
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setPreviewSurface(surface);
@@ -103,7 +103,7 @@ status_t MediaRecorderClient::setVideoSource(int vs)
}
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setVideoSource((video_source)vs);
@@ -117,7 +117,7 @@ status_t MediaRecorderClient::setAudioSource(int as)
}
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setAudioSource((audio_source_t)as);
@@ -128,7 +128,7 @@ status_t MediaRecorderClient::setOutputFormat(int of)
ALOGV("setOutputFormat(%d)", of);
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setOutputFormat((output_format)of);
@@ -139,7 +139,7 @@ status_t MediaRecorderClient::setVideoEncoder(int ve)
ALOGV("setVideoEncoder(%d)", ve);
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setVideoEncoder((video_encoder)ve);
@@ -150,7 +150,7 @@ status_t MediaRecorderClient::setAudioEncoder(int ae)
ALOGV("setAudioEncoder(%d)", ae);
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setAudioEncoder((audio_encoder)ae);
@@ -161,7 +161,7 @@ status_t MediaRecorderClient::setOutputFile(const char* path)
ALOGV("setOutputFile(%s)", path);
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setOutputFile(path);
@@ -172,7 +172,7 @@ status_t MediaRecorderClient::setOutputFile(int fd, int64_t offset, int64_t leng
ALOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length);
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setOutputFile(fd, offset, length);
@@ -183,7 +183,7 @@ status_t MediaRecorderClient::setVideoSize(int width, int height)
ALOGV("setVideoSize(%dx%d)", width, height);
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setVideoSize(width, height);
@@ -194,7 +194,7 @@ status_t MediaRecorderClient::setVideoFrameRate(int frames_per_second)
ALOGV("setVideoFrameRate(%d)", frames_per_second);
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setVideoFrameRate(frames_per_second);
@@ -204,7 +204,7 @@ status_t MediaRecorderClient::setParameters(const String8& params) {
ALOGV("setParameters(%s)", params.string());
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setParameters(params);
@@ -215,7 +215,7 @@ status_t MediaRecorderClient::prepare()
ALOGV("prepare");
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->prepare();
@@ -227,7 +227,7 @@ status_t MediaRecorderClient::getMaxAmplitude(int* max)
ALOGV("getMaxAmplitude");
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->getMaxAmplitude(max);
@@ -238,7 +238,7 @@ status_t MediaRecorderClient::start()
ALOGV("start");
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->start();
@@ -250,7 +250,7 @@ status_t MediaRecorderClient::stop()
ALOGV("stop");
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->stop();
@@ -261,7 +261,7 @@ status_t MediaRecorderClient::init()
ALOGV("init");
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->init();
@@ -272,7 +272,7 @@ status_t MediaRecorderClient::close()
ALOGV("close");
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->close();
@@ -284,7 +284,7 @@ status_t MediaRecorderClient::reset()
ALOGV("reset");
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->reset();
@@ -322,7 +322,7 @@ status_t MediaRecorderClient::setListener(const sp<IMediaRecorderClient>& listen
ALOGV("setListener");
Mutex::Autolock lock(mLock);
if (mRecorder == NULL) {
- LOGE("recorder is not initialized");
+ ALOGE("recorder is not initialized");
return NO_INIT;
}
return mRecorder->setListener(listener);
diff --git a/media/libmediaplayerservice/MetadataRetrieverClient.cpp b/media/libmediaplayerservice/MetadataRetrieverClient.cpp
index f945c6a3..7dbb57f 100644
--- a/media/libmediaplayerservice/MetadataRetrieverClient.cpp
+++ b/media/libmediaplayerservice/MetadataRetrieverClient.cpp
@@ -98,11 +98,11 @@ static sp<MediaMetadataRetrieverBase> createRetriever(player_type playerType)
default:
// TODO:
// support for TEST_PLAYER
- LOGE("player type %d is not supported", playerType);
+ ALOGE("player type %d is not supported", playerType);
break;
}
if (p == NULL) {
- LOGE("failed to create a retriever object");
+ ALOGE("failed to create a retriever object");
}
return p;
}
@@ -131,7 +131,7 @@ status_t MetadataRetrieverClient::setDataSource(int fd, int64_t offset, int64_t
struct stat sb;
int ret = fstat(fd, &sb);
if (ret != 0) {
- LOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno));
+ ALOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno));
return BAD_VALUE;
}
ALOGV("st_dev = %llu", sb.st_dev);
@@ -141,7 +141,7 @@ status_t MetadataRetrieverClient::setDataSource(int fd, int64_t offset, int64_t
ALOGV("st_size = %llu", sb.st_size);
if (offset >= sb.st_size) {
- LOGE("offset (%lld) bigger than file size (%llu)", offset, sb.st_size);
+ ALOGE("offset (%lld) bigger than file size (%llu)", offset, sb.st_size);
::close(fd);
return BAD_VALUE;
}
@@ -169,24 +169,24 @@ sp<IMemory> MetadataRetrieverClient::getFrameAtTime(int64_t timeUs, int option)
Mutex::Autolock lock(mLock);
mThumbnail.clear();
if (mRetriever == NULL) {
- LOGE("retriever is not initialized");
+ ALOGE("retriever is not initialized");
return NULL;
}
VideoFrame *frame = mRetriever->getFrameAtTime(timeUs, option);
if (frame == NULL) {
- LOGE("failed to capture a video frame");
+ ALOGE("failed to capture a video frame");
return NULL;
}
size_t size = sizeof(VideoFrame) + frame->mSize;
sp<MemoryHeapBase> heap = new MemoryHeapBase(size, 0, "MetadataRetrieverClient");
if (heap == NULL) {
- LOGE("failed to create MemoryDealer");
+ ALOGE("failed to create MemoryDealer");
delete frame;
return NULL;
}
mThumbnail = new MemoryBase(heap, 0, size);
if (mThumbnail == NULL) {
- LOGE("not enough memory for VideoFrame size=%u", size);
+ ALOGE("not enough memory for VideoFrame size=%u", size);
delete frame;
return NULL;
}
@@ -210,24 +210,24 @@ sp<IMemory> MetadataRetrieverClient::extractAlbumArt()
Mutex::Autolock lock(mLock);
mAlbumArt.clear();
if (mRetriever == NULL) {
- LOGE("retriever is not initialized");
+ ALOGE("retriever is not initialized");
return NULL;
}
MediaAlbumArt *albumArt = mRetriever->extractAlbumArt();
if (albumArt == NULL) {
- LOGE("failed to extract an album art");
+ ALOGE("failed to extract an album art");
return NULL;
}
size_t size = sizeof(MediaAlbumArt) + albumArt->mSize;
sp<MemoryHeapBase> heap = new MemoryHeapBase(size, 0, "MetadataRetrieverClient");
if (heap == NULL) {
- LOGE("failed to create MemoryDealer object");
+ ALOGE("failed to create MemoryDealer object");
delete albumArt;
return NULL;
}
mAlbumArt = new MemoryBase(heap, 0, size);
if (mAlbumArt == NULL) {
- LOGE("not enough memory for MediaAlbumArt size=%u", size);
+ ALOGE("not enough memory for MediaAlbumArt size=%u", size);
delete albumArt;
return NULL;
}
@@ -244,7 +244,7 @@ const char* MetadataRetrieverClient::extractMetadata(int keyCode)
ALOGV("extractMetadata");
Mutex::Autolock lock(mLock);
if (mRetriever == NULL) {
- LOGE("retriever is not initialized");
+ ALOGE("retriever is not initialized");
return NULL;
}
return mRetriever->extractMetadata(keyCode);
diff --git a/media/libmediaplayerservice/MidiFile.cpp b/media/libmediaplayerservice/MidiFile.cpp
index 85b1f9d..d89b5f4 100644
--- a/media/libmediaplayerservice/MidiFile.cpp
+++ b/media/libmediaplayerservice/MidiFile.cpp
@@ -69,13 +69,13 @@ MidiFile::MidiFile() :
if (pLibConfig == NULL)
pLibConfig = EAS_Config();
if ((pLibConfig == NULL) || (LIB_VERSION != pLibConfig->libVersion)) {
- LOGE("EAS library/header mismatch");
+ ALOGE("EAS library/header mismatch");
goto Failed;
}
// initialize EAS library
if (EAS_Init(&mEasData) != EAS_SUCCESS) {
- LOGE("EAS_Init failed");
+ ALOGE("EAS_Init failed");
goto Failed;
}
@@ -133,7 +133,7 @@ status_t MidiFile::setDataSource(
}
if (result != EAS_SUCCESS) {
- LOGE("EAS_OpenFile failed: [%d]", (int)result);
+ ALOGE("EAS_OpenFile failed: [%d]", (int)result);
mState = EAS_STATE_ERROR;
return ERROR_OPEN_FAILED;
}
@@ -161,7 +161,7 @@ status_t MidiFile::setDataSource(int fd, int64_t offset, int64_t length)
updateState();
if (result != EAS_SUCCESS) {
- LOGE("EAS_OpenFile failed: [%d]", (int)result);
+ ALOGE("EAS_OpenFile failed: [%d]", (int)result);
mState = EAS_STATE_ERROR;
return ERROR_OPEN_FAILED;
}
@@ -180,7 +180,7 @@ status_t MidiFile::prepare()
}
EAS_RESULT result;
if ((result = EAS_Prepare(mEasData, mEasHandle)) != EAS_SUCCESS) {
- LOGE("EAS_Prepare failed: [%ld]", result);
+ ALOGE("EAS_Prepare failed: [%ld]", result);
return ERROR_EAS_FAILURE;
}
updateState();
@@ -236,7 +236,7 @@ status_t MidiFile::stop()
if (!mPaused && (mState != EAS_STATE_STOPPED)) {
EAS_RESULT result = EAS_Pause(mEasData, mEasHandle);
if (result != EAS_SUCCESS) {
- LOGE("EAS_Pause returned error %ld", result);
+ ALOGE("EAS_Pause returned error %ld", result);
return ERROR_EAS_FAILURE;
}
}
@@ -257,7 +257,7 @@ status_t MidiFile::seekTo(int position)
if ((result = EAS_Locate(mEasData, mEasHandle, position, false))
!= EAS_SUCCESS)
{
- LOGE("EAS_Locate returned %ld", result);
+ ALOGE("EAS_Locate returned %ld", result);
return ERROR_EAS_FAILURE;
}
EAS_GetLocation(mEasData, mEasHandle, &mPlayTime);
@@ -292,11 +292,11 @@ status_t MidiFile::getCurrentPosition(int* position)
{
ALOGV("MidiFile::getCurrentPosition");
if (!mEasHandle) {
- LOGE("getCurrentPosition(): file not open");
+ ALOGE("getCurrentPosition(): file not open");
return ERROR_NOT_OPEN;
}
if (mPlayTime < 0) {
- LOGE("getCurrentPosition(): mPlayTime = %ld", mPlayTime);
+ ALOGE("getCurrentPosition(): mPlayTime = %ld", mPlayTime);
return ERROR_EAS_FAILURE;
}
*position = mPlayTime;
@@ -421,7 +421,7 @@ status_t MidiFile::setLooping(int loop)
status_t MidiFile::createOutputTrack() {
if (mAudioSink->open(pLibConfig->sampleRate, pLibConfig->numChannels, AUDIO_FORMAT_PCM_16_BIT, 2) != NO_ERROR) {
- LOGE("mAudioSink open failed");
+ ALOGE("mAudioSink open failed");
return ERROR_OPEN_FAILED;
}
return NO_ERROR;
@@ -443,7 +443,7 @@ int MidiFile::render() {
// allocate render buffer
mAudioBuffer = new EAS_PCM[pLibConfig->mixBufferSize * pLibConfig->numChannels * NUM_BUFFERS];
if (!mAudioBuffer) {
- LOGE("mAudioBuffer allocate failed");
+ ALOGE("mAudioBuffer allocate failed");
goto threadExit;
}
@@ -477,7 +477,7 @@ int MidiFile::render() {
for (int i = 0; i < NUM_BUFFERS; i++) {
result = EAS_Render(mEasData, p, pLibConfig->mixBufferSize, &count);
if (result != EAS_SUCCESS) {
- LOGE("EAS_Render returned %ld", result);
+ ALOGE("EAS_Render returned %ld", result);
}
p += count * pLibConfig->numChannels;
num_output += count * pLibConfig->numChannels * sizeof(EAS_PCM);
@@ -499,7 +499,7 @@ int MidiFile::render() {
// Write data to the audio hardware
// ALOGV("MidiFile::render - writing to audio output");
if ((temp = mAudioSink->write(mAudioBuffer, num_output)) < 0) {
- LOGE("Error in writing:%d",temp);
+ ALOGE("Error in writing:%d",temp);
return temp;
}
@@ -523,7 +523,7 @@ int MidiFile::render() {
}
case EAS_STATE_ERROR:
{
- LOGE("MidiFile::render - error");
+ ALOGE("MidiFile::render - error");
sendEvent(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN);
break;
}
diff --git a/media/libmediaplayerservice/MidiMetadataRetriever.cpp b/media/libmediaplayerservice/MidiMetadataRetriever.cpp
index bb65ed4..465209f 100644
--- a/media/libmediaplayerservice/MidiMetadataRetriever.cpp
+++ b/media/libmediaplayerservice/MidiMetadataRetriever.cpp
@@ -63,7 +63,7 @@ const char* MidiMetadataRetriever::extractMetadata(int keyCode)
ALOGV("extractMetdata: key(%d)", keyCode);
Mutex::Autolock lock(mLock);
if (mMidiPlayer == 0 || mMidiPlayer->initCheck() != NO_ERROR) {
- LOGE("Midi player is not initialized yet");
+ ALOGE("Midi player is not initialized yet");
return NULL;
}
switch (keyCode) {
@@ -72,7 +72,7 @@ const char* MidiMetadataRetriever::extractMetadata(int keyCode)
if (mMetadataValues[0][0] == '\0') {
int duration = -1;
if (mMidiPlayer->getDuration(&duration) != NO_ERROR) {
- LOGE("failed to get duration");
+ ALOGE("failed to get duration");
return NULL;
}
snprintf(mMetadataValues[0], MAX_METADATA_STRING_LENGTH, "%d", duration);
@@ -82,7 +82,7 @@ const char* MidiMetadataRetriever::extractMetadata(int keyCode)
return mMetadataValues[0];
}
default:
- LOGE("Unsupported key code (%d)", keyCode);
+ ALOGE("Unsupported key code (%d)", keyCode);
return NULL;
}
return NULL;
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp
index 87305ee..4632016 100644
--- a/media/libmediaplayerservice/StagefrightRecorder.cpp
+++ b/media/libmediaplayerservice/StagefrightRecorder.cpp
@@ -97,7 +97,7 @@ status_t StagefrightRecorder::setAudioSource(audio_source_t as) {
ALOGV("setAudioSource: %d", as);
if (as < AUDIO_SOURCE_DEFAULT ||
as >= AUDIO_SOURCE_CNT) {
- LOGE("Invalid audio source: %d", as);
+ ALOGE("Invalid audio source: %d", as);
return BAD_VALUE;
}
@@ -114,7 +114,7 @@ status_t StagefrightRecorder::setVideoSource(video_source vs) {
ALOGV("setVideoSource: %d", vs);
if (vs < VIDEO_SOURCE_DEFAULT ||
vs >= VIDEO_SOURCE_LIST_END) {
- LOGE("Invalid video source: %d", vs);
+ ALOGE("Invalid video source: %d", vs);
return BAD_VALUE;
}
@@ -131,7 +131,7 @@ status_t StagefrightRecorder::setOutputFormat(output_format of) {
ALOGV("setOutputFormat: %d", of);
if (of < OUTPUT_FORMAT_DEFAULT ||
of >= OUTPUT_FORMAT_LIST_END) {
- LOGE("Invalid output format: %d", of);
+ ALOGE("Invalid output format: %d", of);
return BAD_VALUE;
}
@@ -148,7 +148,7 @@ status_t StagefrightRecorder::setAudioEncoder(audio_encoder ae) {
ALOGV("setAudioEncoder: %d", ae);
if (ae < AUDIO_ENCODER_DEFAULT ||
ae >= AUDIO_ENCODER_LIST_END) {
- LOGE("Invalid audio encoder: %d", ae);
+ ALOGE("Invalid audio encoder: %d", ae);
return BAD_VALUE;
}
@@ -165,7 +165,7 @@ status_t StagefrightRecorder::setVideoEncoder(video_encoder ve) {
ALOGV("setVideoEncoder: %d", ve);
if (ve < VIDEO_ENCODER_DEFAULT ||
ve >= VIDEO_ENCODER_LIST_END) {
- LOGE("Invalid video encoder: %d", ve);
+ ALOGE("Invalid video encoder: %d", ve);
return BAD_VALUE;
}
@@ -181,7 +181,7 @@ status_t StagefrightRecorder::setVideoEncoder(video_encoder ve) {
status_t StagefrightRecorder::setVideoSize(int width, int height) {
ALOGV("setVideoSize: %dx%d", width, height);
if (width <= 0 || height <= 0) {
- LOGE("Invalid video size: %dx%d", width, height);
+ ALOGE("Invalid video size: %dx%d", width, height);
return BAD_VALUE;
}
@@ -196,7 +196,7 @@ status_t StagefrightRecorder::setVideoFrameRate(int frames_per_second) {
ALOGV("setVideoFrameRate: %d", frames_per_second);
if ((frames_per_second <= 0 && frames_per_second != -1) ||
frames_per_second > 120) {
- LOGE("Invalid video frame rate: %d", frames_per_second);
+ ALOGE("Invalid video frame rate: %d", frames_per_second);
return BAD_VALUE;
}
@@ -210,11 +210,11 @@ status_t StagefrightRecorder::setCamera(const sp<ICamera> &camera,
const sp<ICameraRecordingProxy> &proxy) {
ALOGV("setCamera");
if (camera == 0) {
- LOGE("camera is NULL");
+ ALOGE("camera is NULL");
return BAD_VALUE;
}
if (proxy == 0) {
- LOGE("camera proxy is NULL");
+ ALOGE("camera proxy is NULL");
return BAD_VALUE;
}
@@ -231,7 +231,7 @@ status_t StagefrightRecorder::setPreviewSurface(const sp<Surface> &surface) {
}
status_t StagefrightRecorder::setOutputFile(const char *path) {
- LOGE("setOutputFile(const char*) must not be called");
+ ALOGE("setOutputFile(const char*) must not be called");
// We don't actually support this at all, as the media_server process
// no longer has permissions to create files.
@@ -245,7 +245,7 @@ status_t StagefrightRecorder::setOutputFile(int fd, int64_t offset, int64_t leng
CHECK_EQ(length, 0);
if (fd < 0) {
- LOGE("Invalid file descriptor: %d", fd);
+ ALOGE("Invalid file descriptor: %d", fd);
return -EBADF;
}
@@ -315,7 +315,7 @@ static void TrimString(String8 *s) {
status_t StagefrightRecorder::setParamAudioSamplingRate(int32_t sampleRate) {
ALOGV("setParamAudioSamplingRate: %d", sampleRate);
if (sampleRate <= 0) {
- LOGE("Invalid audio sampling rate: %d", sampleRate);
+ ALOGE("Invalid audio sampling rate: %d", sampleRate);
return BAD_VALUE;
}
@@ -327,7 +327,7 @@ status_t StagefrightRecorder::setParamAudioSamplingRate(int32_t sampleRate) {
status_t StagefrightRecorder::setParamAudioNumberOfChannels(int32_t channels) {
ALOGV("setParamAudioNumberOfChannels: %d", channels);
if (channels <= 0 || channels >= 3) {
- LOGE("Invalid number of audio channels: %d", channels);
+ ALOGE("Invalid number of audio channels: %d", channels);
return BAD_VALUE;
}
@@ -339,7 +339,7 @@ status_t StagefrightRecorder::setParamAudioNumberOfChannels(int32_t channels) {
status_t StagefrightRecorder::setParamAudioEncodingBitRate(int32_t bitRate) {
ALOGV("setParamAudioEncodingBitRate: %d", bitRate);
if (bitRate <= 0) {
- LOGE("Invalid audio encoding bit rate: %d", bitRate);
+ ALOGE("Invalid audio encoding bit rate: %d", bitRate);
return BAD_VALUE;
}
@@ -354,7 +354,7 @@ status_t StagefrightRecorder::setParamAudioEncodingBitRate(int32_t bitRate) {
status_t StagefrightRecorder::setParamVideoEncodingBitRate(int32_t bitRate) {
ALOGV("setParamVideoEncodingBitRate: %d", bitRate);
if (bitRate <= 0) {
- LOGE("Invalid video encoding bit rate: %d", bitRate);
+ ALOGE("Invalid video encoding bit rate: %d", bitRate);
return BAD_VALUE;
}
@@ -370,7 +370,7 @@ status_t StagefrightRecorder::setParamVideoEncodingBitRate(int32_t bitRate) {
status_t StagefrightRecorder::setParamVideoRotation(int32_t degrees) {
ALOGV("setParamVideoRotation: %d", degrees);
if (degrees < 0 || degrees % 90 != 0) {
- LOGE("Unsupported video rotation angle: %d", degrees);
+ ALOGE("Unsupported video rotation angle: %d", degrees);
return BAD_VALUE;
}
mRotationDegrees = degrees % 360;
@@ -385,7 +385,7 @@ status_t StagefrightRecorder::setParamMaxFileDurationUs(int64_t timeUs) {
ALOGW("Max file duration is not positive: %lld us. Disabling duration limit.", timeUs);
timeUs = 0; // Disable the duration limit for zero or negative values.
} else if (timeUs <= 100000LL) { // XXX: 100 milli-seconds
- LOGE("Max file duration is too short: %lld us", timeUs);
+ ALOGE("Max file duration is too short: %lld us", timeUs);
return BAD_VALUE;
}
@@ -405,7 +405,7 @@ status_t StagefrightRecorder::setParamMaxFileSizeBytes(int64_t bytes) {
"Disabling file size limit.", bytes);
bytes = 0; // Disable the file size limit for zero or negative values.
} else if (bytes <= 1024) { // XXX: 1 kB
- LOGE("Max file size is too small: %lld bytes", bytes);
+ ALOGE("Max file size is too small: %lld bytes", bytes);
return BAD_VALUE;
}
@@ -423,13 +423,13 @@ status_t StagefrightRecorder::setParamInterleaveDuration(int32_t durationUs) {
// If interleave duration is too small, it is very inefficient to do
// interleaving since the metadata overhead will count for a significant
// portion of the saved contents
- LOGE("Audio/video interleave duration is too small: %d us", durationUs);
+ ALOGE("Audio/video interleave duration is too small: %d us", durationUs);
return BAD_VALUE;
} else if (durationUs >= 10000000) { // 10 seconds
// If interleaving duration is too large, it can cause the recording
// session to use too much memory since we have to save the output
// data before we write them out
- LOGE("Audio/video interleave duration is too large: %d us", durationUs);
+ ALOGE("Audio/video interleave duration is too large: %d us", durationUs);
return BAD_VALUE;
}
mInterleaveDurationUs = durationUs;
@@ -464,7 +464,7 @@ status_t StagefrightRecorder::setParamVideoCameraId(int32_t cameraId) {
status_t StagefrightRecorder::setParamTrackTimeStatus(int64_t timeDurationUs) {
ALOGV("setParamTrackTimeStatus: %lld", timeDurationUs);
if (timeDurationUs < 20000) { // Infeasible if shorter than 20 ms?
- LOGE("Tracking time duration too short: %lld us", timeDurationUs);
+ ALOGE("Tracking time duration too short: %lld us", timeDurationUs);
return BAD_VALUE;
}
mTrackEveryTimeDurationUs = timeDurationUs;
@@ -495,7 +495,7 @@ status_t StagefrightRecorder::setParamMovieTimeScale(int32_t timeScale) {
// The range is set to be the same as the audio's time scale range
// since audio's time scale has a wider range.
if (timeScale < 600 || timeScale > 96000) {
- LOGE("Time scale (%d) for movie is out of range [600, 96000]", timeScale);
+ ALOGE("Time scale (%d) for movie is out of range [600, 96000]", timeScale);
return BAD_VALUE;
}
mMovieTimeScale = timeScale;
@@ -508,7 +508,7 @@ status_t StagefrightRecorder::setParamVideoTimeScale(int32_t timeScale) {
// 60000 is chosen to make sure that each video frame from a 60-fps
// video has 1000 ticks.
if (timeScale < 600 || timeScale > 60000) {
- LOGE("Time scale (%d) for video is out of range [600, 60000]", timeScale);
+ ALOGE("Time scale (%d) for video is out of range [600, 60000]", timeScale);
return BAD_VALUE;
}
mVideoTimeScale = timeScale;
@@ -520,7 +520,7 @@ status_t StagefrightRecorder::setParamAudioTimeScale(int32_t timeScale) {
// 96000 Hz is the highest sampling rate support in AAC.
if (timeScale < 600 || timeScale > 96000) {
- LOGE("Time scale (%d) for audio is out of range [600, 96000]", timeScale);
+ ALOGE("Time scale (%d) for audio is out of range [600, 96000]", timeScale);
return BAD_VALUE;
}
mAudioTimeScale = timeScale;
@@ -545,7 +545,7 @@ status_t StagefrightRecorder::setParamTimeBetweenTimeLapseFrameCapture(int64_t t
// Not allowing time more than a day
if (timeUs <= 0 || timeUs > 86400*1E6) {
- LOGE("Time between time lapse frame capture (%lld) is out of range [0, 1 Day]", timeUs);
+ ALOGE("Time between time lapse frame capture (%lld) is out of range [0, 1 Day]", timeUs);
return BAD_VALUE;
}
@@ -683,7 +683,7 @@ status_t StagefrightRecorder::setParameter(
1000LL * timeBetweenTimeLapseFrameCaptureMs);
}
} else {
- LOGE("setParameter: failed to find key %s", key.string());
+ ALOGE("setParameter: failed to find key %s", key.string());
}
return BAD_VALUE;
}
@@ -695,13 +695,13 @@ status_t StagefrightRecorder::setParameters(const String8 &params) {
for (;;) {
const char *equal_pos = strchr(key_start, '=');
if (equal_pos == NULL) {
- LOGE("Parameters %s miss a value", cparams);
+ ALOGE("Parameters %s miss a value", cparams);
return BAD_VALUE;
}
String8 key(key_start, equal_pos - key_start);
TrimString(&key);
if (key.length() == 0) {
- LOGE("Parameters %s contains an empty key", cparams);
+ ALOGE("Parameters %s contains an empty key", cparams);
return BAD_VALUE;
}
const char *value_start = equal_pos + 1;
@@ -737,7 +737,7 @@ status_t StagefrightRecorder::start() {
CHECK(mOutputFd >= 0);
if (mWriter != NULL) {
- LOGE("File writer is not avaialble");
+ ALOGE("File writer is not avaialble");
return UNKNOWN_ERROR;
}
@@ -769,7 +769,7 @@ status_t StagefrightRecorder::start() {
break;
default:
- LOGE("Unsupported output file format: %d", mOutputFormat);
+ ALOGE("Unsupported output file format: %d", mOutputFormat);
status = UNKNOWN_ERROR;
break;
}
@@ -801,7 +801,7 @@ sp<MediaSource> StagefrightRecorder::createAudioSource() {
status_t err = audioSource->initCheck();
if (err != OK) {
- LOGE("audio source is not initialized");
+ ALOGE("audio source is not initialized");
return NULL;
}
@@ -819,7 +819,7 @@ sp<MediaSource> StagefrightRecorder::createAudioSource() {
mime = MEDIA_MIMETYPE_AUDIO_AAC;
break;
default:
- LOGE("Unknown audio encoder: %d", mAudioEncoder);
+ ALOGE("Unknown audio encoder: %d", mAudioEncoder);
return NULL;
}
encMeta->setCString(kKeyMIMEType, mime);
@@ -872,13 +872,13 @@ status_t StagefrightRecorder::startAMRRecording() {
if (mOutputFormat == OUTPUT_FORMAT_AMR_NB) {
if (mAudioEncoder != AUDIO_ENCODER_DEFAULT &&
mAudioEncoder != AUDIO_ENCODER_AMR_NB) {
- LOGE("Invalid encoder %d used for AMRNB recording",
+ ALOGE("Invalid encoder %d used for AMRNB recording",
mAudioEncoder);
return BAD_VALUE;
}
} else { // mOutputFormat must be OUTPUT_FORMAT_AMR_WB
if (mAudioEncoder != AUDIO_ENCODER_AMR_WB) {
- LOGE("Invlaid encoder %d used for AMRWB recording",
+ ALOGE("Invlaid encoder %d used for AMRWB recording",
mAudioEncoder);
return BAD_VALUE;
}
@@ -895,7 +895,7 @@ status_t StagefrightRecorder::startAMRRecording() {
status_t StagefrightRecorder::startRawAudioRecording() {
if (mAudioSource >= AUDIO_SOURCE_CNT) {
- LOGE("Invalid audio source: %d", mAudioSource);
+ ALOGE("Invalid audio source: %d", mAudioSource);
return BAD_VALUE;
}
@@ -1432,7 +1432,7 @@ status_t StagefrightRecorder::setupAudioEncoder(const sp<MediaWriter>& writer) {
break;
default:
- LOGE("Unsupported audio encoder: %d", mAudioEncoder);
+ ALOGE("Unsupported audio encoder: %d", mAudioEncoder);
return UNKNOWN_ERROR;
}
@@ -1667,7 +1667,7 @@ status_t StagefrightRecorder::getMaxAmplitude(int *max) {
ALOGV("getMaxAmplitude");
if (max == NULL) {
- LOGE("Null pointer argument");
+ ALOGE("Null pointer argument");
return BAD_VALUE;
}
diff --git a/media/libmediaplayerservice/TestPlayerStub.cpp b/media/libmediaplayerservice/TestPlayerStub.cpp
index 169e49a..0f0ff65 100644
--- a/media/libmediaplayerservice/TestPlayerStub.cpp
+++ b/media/libmediaplayerservice/TestPlayerStub.cpp
@@ -134,7 +134,7 @@ status_t TestPlayerStub::setDataSource(
// None of the entry points should be NULL.
mHandle = ::dlopen(mFilename, RTLD_NOW | RTLD_GLOBAL);
if (!mHandle) {
- LOGE("dlopen failed: %s", ::dlerror());
+ ALOGE("dlopen failed: %s", ::dlerror());
resetInternal();
return UNKNOWN_ERROR;
}
@@ -147,7 +147,7 @@ status_t TestPlayerStub::setDataSource(
if (err || mNewPlayer == NULL) {
// if err is NULL the string <null> is inserted in the logs =>
// mNewPlayer was NULL.
- LOGE("dlsym for newPlayer failed %s", err);
+ ALOGE("dlsym for newPlayer failed %s", err);
resetInternal();
return UNKNOWN_ERROR;
}
@@ -156,7 +156,7 @@ status_t TestPlayerStub::setDataSource(
"deletePlayer"));
err = ::dlerror();
if (err || mDeletePlayer == NULL) {
- LOGE("dlsym for deletePlayer failed %s", err);
+ ALOGE("dlsym for deletePlayer failed %s", err);
resetInternal();
return UNKNOWN_ERROR;
}
diff --git a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp
index 1612df0..22b8847 100644
--- a/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp
+++ b/media/libmediaplayerservice/nuplayer/HTTPLiveSource.cpp
@@ -131,7 +131,7 @@ status_t NuPlayer::HTTPLiveSource::feedMoreTSData() {
status_t err = mTSParser->feedTSPacket(buffer, sizeof(buffer));
if (err != OK) {
- LOGE("TS Parser returned error %d", err);
+ ALOGE("TS Parser returned error %d", err);
mTSParser->signalEOS(err);
mFinalResult = err;
break;
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index 7d69052..a00aaa5 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -383,7 +383,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
finishFlushIfPossible();
} else if (what == ACodec::kWhatError) {
- LOGE("Received error from %s decoder, aborting playback.",
+ ALOGE("Received error from %s decoder, aborting playback.",
audio ? "audio" : "video");
mRenderer->queueEOS(audio, UNKNOWN_ERROR);
@@ -417,7 +417,7 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
if (finalResult == ERROR_END_OF_STREAM) {
ALOGV("reached %s EOS", audio ? "audio" : "video");
} else {
- LOGE("%s track encountered an error (%d)",
+ ALOGE("%s track encountered an error (%d)",
audio ? "audio" : "video", finalResult);
notifyListener(
diff --git a/media/libmediaplayerservice/nuplayer/StreamingSource.cpp b/media/libmediaplayerservice/nuplayer/StreamingSource.cpp
index c997942..7c9bc5e 100644
--- a/media/libmediaplayerservice/nuplayer/StreamingSource.cpp
+++ b/media/libmediaplayerservice/nuplayer/StreamingSource.cpp
@@ -70,7 +70,7 @@ status_t NuPlayer::StreamingSource::feedMoreTSData() {
&& extra->findInt32(
IStreamListener::kKeyDiscontinuityMask, &mask)) {
if (mask == 0) {
- LOGE("Client specified an illegal discontinuity type.");
+ ALOGE("Client specified an illegal discontinuity type.");
return ERROR_UNSUPPORTED;
}
@@ -94,7 +94,7 @@ status_t NuPlayer::StreamingSource::feedMoreTSData() {
status_t err = mTSParser->feedTSPacket(buffer, sizeof(buffer));
if (err != OK) {
- LOGE("TS Parser returned error %d", err);
+ ALOGE("TS Parser returned error %d", err);
mTSParser->signalEOS(err);
mFinalResult = err;
diff --git a/media/libstagefright/AACWriter.cpp b/media/libstagefright/AACWriter.cpp
index 03fb33b..1673ccd 100644
--- a/media/libstagefright/AACWriter.cpp
+++ b/media/libstagefright/AACWriter.cpp
@@ -84,7 +84,7 @@ status_t AACWriter::addSource(const sp<MediaSource> &source) {
}
if (mSource != NULL) {
- LOGE("AAC files only support a single track of audio.");
+ ALOGE("AAC files only support a single track of audio.");
return UNKNOWN_ERROR;
}
@@ -216,7 +216,7 @@ static bool getSampleRateTableIndex(int sampleRate, uint8_t* tableIndex) {
}
}
- LOGE("Sampling rate %d bps is not supported", sampleRate);
+ ALOGE("Sampling rate %d bps is not supported", sampleRate);
return false;
}
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp
index 8ca37b8..ca44ea3 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -445,7 +445,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() {
def.format.video.eColorFormat);
if (err != 0) {
- LOGE("native_window_set_buffers_geometry failed: %s (%d)",
+ ALOGE("native_window_set_buffers_geometry failed: %s (%d)",
strerror(-err), -err);
return err;
}
@@ -464,7 +464,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() {
usage | GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_EXTERNAL_DISP);
if (err != 0) {
- LOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err);
+ ALOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err);
return err;
}
@@ -474,7 +474,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() {
&minUndequeuedBufs);
if (err != 0) {
- LOGE("NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS query failed: %s (%d)",
+ ALOGE("NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS query failed: %s (%d)",
strerror(-err), -err);
return err;
}
@@ -489,7 +489,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() {
mNode, OMX_IndexParamPortDefinition, &def, sizeof(def));
if (err != OK) {
- LOGE("[%s] setting nBufferCountActual to %lu failed: %d",
+ ALOGE("[%s] setting nBufferCountActual to %lu failed: %d",
mComponentName.c_str(), newBufferCount, err);
return err;
}
@@ -499,7 +499,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() {
mNativeWindow.get(), def.nBufferCountActual);
if (err != 0) {
- LOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err),
+ ALOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err),
-err);
return err;
}
@@ -513,7 +513,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() {
ANativeWindowBuffer *buf;
err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf);
if (err != 0) {
- LOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err);
+ ALOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err);
break;
}
@@ -528,7 +528,7 @@ status_t ACodec::allocateOutputBuffersFromNativeWindow() {
err = mOMX->useGraphicBuffer(mNode, kPortIndexOutput, graphicBuffer,
&bufferId);
if (err != 0) {
- LOGE("registering GraphicBuffer %lu with OMX IL component failed: "
+ ALOGE("registering GraphicBuffer %lu with OMX IL component failed: "
"%d", i, err);
break;
}
@@ -581,7 +581,7 @@ status_t ACodec::cancelBufferToNativeWindow(BufferInfo *info) {
ACodec::BufferInfo *ACodec::dequeueBufferFromNativeWindow() {
ANativeWindowBuffer *buf;
if (mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf) != 0) {
- LOGE("dequeueBuffer failed.");
+ ALOGE("dequeueBuffer failed.");
return NULL;
}
@@ -1367,7 +1367,7 @@ bool ACodec::BaseState::onOMXEvent(
return false;
}
- LOGE("[%s] ERROR(0x%08lx)", mCodec->mComponentName.c_str(), data1);
+ ALOGE("[%s] ERROR(0x%08lx)", mCodec->mComponentName.c_str(), data1);
mCodec->signalError((OMX_ERRORTYPE)data1);
@@ -1826,7 +1826,7 @@ void ACodec::UninitializedState::onSetup(
}
if (node == NULL) {
- LOGE("Unable to instantiate a decoder for type '%s'.", mime.c_str());
+ ALOGE("Unable to instantiate a decoder for type '%s'.", mime.c_str());
mCodec->signalError(OMX_ErrorComponentNotFound);
return;
@@ -1874,7 +1874,7 @@ void ACodec::LoadedToIdleState::stateEntered() {
status_t err;
if ((err = allocateBuffers()) != OK) {
- LOGE("Failed to allocate buffers after transitioning to IDLE state "
+ ALOGE("Failed to allocate buffers after transitioning to IDLE state "
"(error 0x%08x)",
err);
@@ -2198,7 +2198,7 @@ bool ACodec::OutputPortSettingsChangedState::onOMXEvent(
status_t err;
if ((err = mCodec->allocateBuffersOnPort(
kPortIndexOutput)) != OK) {
- LOGE("Failed to allocate output port buffers after "
+ ALOGE("Failed to allocate output port buffers after "
"port reconfiguration (error 0x%08x)",
err);
diff --git a/media/libstagefright/AMRExtractor.cpp b/media/libstagefright/AMRExtractor.cpp
index 7eca5e4..5a28347 100644
--- a/media/libstagefright/AMRExtractor.cpp
+++ b/media/libstagefright/AMRExtractor.cpp
@@ -85,7 +85,7 @@ static size_t getFrameSize(bool isWide, unsigned FT) {
};
if (FT > 15 || (isWide && FT > 9 && FT < 14) || (!isWide && FT > 11 && FT < 15)) {
- LOGE("illegal AMR frame type %d", FT);
+ ALOGE("illegal AMR frame type %d", FT);
return 0;
}
@@ -285,7 +285,7 @@ status_t AMRSource::read(
if (header & 0x83) {
// Padding bits must be 0.
- LOGE("padding bits must be 0, header is 0x%02x", header);
+ ALOGE("padding bits must be 0, header is 0x%02x", header);
return ERROR_MALFORMED;
}
diff --git a/media/libstagefright/AVIExtractor.cpp b/media/libstagefright/AVIExtractor.cpp
index 91555ba..a3187b7 100644
--- a/media/libstagefright/AVIExtractor.cpp
+++ b/media/libstagefright/AVIExtractor.cpp
@@ -1080,7 +1080,7 @@ status_t AVIExtractor::addH264CodecSpecificData(size_t trackIndex) {
sp<MetaData> meta = MakeAVCCodecSpecificData(buffer);
if (meta == NULL) {
- LOGE("Unable to extract AVC codec specific data");
+ ALOGE("Unable to extract AVC codec specific data");
return ERROR_MALFORMED;
}
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 6fce890..7a2d7b3 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -132,7 +132,7 @@ struct AwesomeNativeWindowRenderer : public AwesomeRenderer {
status_t err = mNativeWindow->queueBuffer(
mNativeWindow.get(), buffer->graphicBuffer().get());
if (err != 0) {
- LOGE("queueBuffer failed with error %s (%d)", strerror(-err),
+ ALOGE("queueBuffer failed with error %s (%d)", strerror(-err),
-err);
return;
}
@@ -1192,7 +1192,7 @@ status_t AwesomePlayer::setNativeWindow_l(const sp<ANativeWindow> &native) {
status_t err = initVideoDecoder();
if (err != OK) {
- LOGE("failed to reinstantiate video decoder after surface change.");
+ ALOGE("failed to reinstantiate video decoder after surface change.");
return err;
}
@@ -1683,7 +1683,7 @@ void AwesomePlayer::onVideoEvent() {
if (mAudioPlayer != NULL && !(mFlags & (AUDIO_RUNNING | SEEK_PREVIEW))) {
status_t err = startAudioPlayer_l();
if (err != OK) {
- LOGE("Starting the audio player failed w/ err %d", err);
+ ALOGE("Starting the audio player failed w/ err %d", err);
return;
}
}
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index 94d18fa..1850c9c 100755
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -111,7 +111,7 @@ static int32_t getColorFormat(const char* colorFormat) {
return OMX_TI_COLOR_FormatYUV420PackedSemiPlanar;
}
- LOGE("Uknown color format (%s), please add it to "
+ ALOGE("Uknown color format (%s), please add it to "
"CameraSource::getColorFormat", colorFormat);
CHECK_EQ(0, "Unknown color format");
@@ -301,7 +301,7 @@ status_t CameraSource::configureCamera(
bool isCameraParamChanged = false;
if (width != -1 && height != -1) {
if (!isVideoSizeSupported(width, height, sizes)) {
- LOGE("Video dimension (%dx%d) is unsupported", width, height);
+ ALOGE("Video dimension (%dx%d) is unsupported", width, height);
return BAD_VALUE;
}
if (isSetVideoSizeSupportedByCamera) {
@@ -314,7 +314,7 @@ status_t CameraSource::configureCamera(
(width != -1 && height == -1)) {
// If one and only one of the width and height is -1
// we reject such a request.
- LOGE("Requested video size (%dx%d) is not supported", width, height);
+ ALOGE("Requested video size (%dx%d) is not supported", width, height);
return BAD_VALUE;
} else { // width == -1 && height == -1
// Do not configure the camera.
@@ -330,7 +330,7 @@ status_t CameraSource::configureCamera(
char buf[4];
snprintf(buf, 4, "%d", frameRate);
if (strstr(supportedFrameRates, buf) == NULL) {
- LOGE("Requested frame rate (%d) is not supported: %s",
+ ALOGE("Requested frame rate (%d) is not supported: %s",
frameRate, supportedFrameRates);
return BAD_VALUE;
}
@@ -347,7 +347,7 @@ status_t CameraSource::configureCamera(
// Either frame rate or frame size needs to be changed.
String8 s = params->flatten();
if (OK != mCamera->setParameters(s)) {
- LOGE("Could not change settings."
+ ALOGE("Could not change settings."
" Someone else is using camera %p?", mCamera.get());
return -EBUSY;
}
@@ -387,7 +387,7 @@ status_t CameraSource::checkVideoSize(
params.getVideoSize(&frameWidthActual, &frameHeightActual);
}
if (frameWidthActual < 0 || frameHeightActual < 0) {
- LOGE("Failed to retrieve video frame size (%dx%d)",
+ ALOGE("Failed to retrieve video frame size (%dx%d)",
frameWidthActual, frameHeightActual);
return UNKNOWN_ERROR;
}
@@ -396,7 +396,7 @@ status_t CameraSource::checkVideoSize(
// video frame size.
if (width != -1 && height != -1) {
if (frameWidthActual != width || frameHeightActual != height) {
- LOGE("Failed to set video frame size to %dx%d. "
+ ALOGE("Failed to set video frame size to %dx%d. "
"The actual video size is %dx%d ", width, height,
frameWidthActual, frameHeightActual);
return UNKNOWN_ERROR;
@@ -425,14 +425,14 @@ status_t CameraSource::checkFrameRate(
ALOGV("checkFrameRate");
int32_t frameRateActual = params.getPreviewFrameRate();
if (frameRateActual < 0) {
- LOGE("Failed to retrieve preview frame rate (%d)", frameRateActual);
+ ALOGE("Failed to retrieve preview frame rate (%d)", frameRateActual);
return UNKNOWN_ERROR;
}
// Check the actual video frame rate against the target/requested
// video frame rate.
if (frameRate != -1 && (frameRateActual - frameRate) != 0) {
- LOGE("Failed to set preview frame rate to %d fps. The actual "
+ ALOGE("Failed to set preview frame rate to %d fps. The actual "
"frame rate is %d", frameRate, frameRateActual);
return UNKNOWN_ERROR;
}
@@ -489,7 +489,7 @@ status_t CameraSource::initWithCameraAccess(
status_t err = OK;
if ((err = isCameraAvailable(camera, proxy, cameraId)) != OK) {
- LOGE("Camera connection could not be established.");
+ ALOGE("Camera connection could not be established.");
return err;
}
CameraParameters params(mCamera->getParameters());
@@ -579,7 +579,7 @@ status_t CameraSource::start(MetaData *meta) {
ALOGV("start");
CHECK(!mStarted);
if (mInitCheck != OK) {
- LOGE("CameraSource is not initialized yet");
+ ALOGE("CameraSource is not initialized yet");
return mInitCheck;
}
diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp
index 8bf18b2..263ab50 100644
--- a/media/libstagefright/CameraSourceTimeLapse.cpp
+++ b/media/libstagefright/CameraSourceTimeLapse.cpp
@@ -140,7 +140,7 @@ bool CameraSourceTimeLapse::trySettingVideoSize(
if (mCamera->setParameters(params.flatten()) == OK) {
isSuccessful = true;
} else {
- LOGE("Failed to set preview size to %dx%d", width, height);
+ ALOGE("Failed to set preview size to %dx%d", width, height);
isSuccessful = false;
}
}
diff --git a/media/libstagefright/FLACExtractor.cpp b/media/libstagefright/FLACExtractor.cpp
index 381a2d1..668d7f7 100644
--- a/media/libstagefright/FLACExtractor.cpp
+++ b/media/libstagefright/FLACExtractor.cpp
@@ -327,7 +327,7 @@ FLAC__StreamDecoderWriteStatus FLACParser::writeCallback(
mWriteCompleted = true;
return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
} else {
- LOGE("FLACParser::writeCallback unexpected");
+ ALOGE("FLACParser::writeCallback unexpected");
return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT;
}
}
@@ -340,7 +340,7 @@ void FLACParser::metadataCallback(const FLAC__StreamMetadata *metadata)
mStreamInfo = metadata->data.stream_info;
mStreamInfoValid = true;
} else {
- LOGE("FLACParser::metadataCallback unexpected STREAMINFO");
+ ALOGE("FLACParser::metadataCallback unexpected STREAMINFO");
}
break;
case FLAC__METADATA_TYPE_VORBIS_COMMENT:
@@ -373,7 +373,7 @@ void FLACParser::metadataCallback(const FLAC__StreamMetadata *metadata)
void FLACParser::errorCallback(FLAC__StreamDecoderErrorStatus status)
{
- LOGE("FLACParser::errorCallback status=%d", status);
+ ALOGE("FLACParser::errorCallback status=%d", status);
mErrorStatus = status;
}
@@ -477,7 +477,7 @@ status_t FLACParser::init()
// The new should succeed, since probably all it does is a malloc
// that always succeeds in Android. But to avoid dependence on the
// libFLAC internals, we check and log here.
- LOGE("new failed");
+ ALOGE("new failed");
return NO_INIT;
}
FLAC__stream_decoder_set_md5_checking(mDecoder, false);
@@ -497,12 +497,12 @@ status_t FLACParser::init()
if (initStatus != FLAC__STREAM_DECODER_INIT_STATUS_OK) {
// A failure here probably indicates a programming error and so is
// unlikely to happen. But we check and log here similarly to above.
- LOGE("init_stream failed %d", initStatus);
+ ALOGE("init_stream failed %d", initStatus);
return NO_INIT;
}
// parse all metadata
if (!FLAC__stream_decoder_process_until_end_of_metadata(mDecoder)) {
- LOGE("end_of_metadata failed");
+ ALOGE("end_of_metadata failed");
return NO_INIT;
}
if (mStreamInfoValid) {
@@ -512,7 +512,7 @@ status_t FLACParser::init()
case 2:
break;
default:
- LOGE("unsupported channel count %u", getChannels());
+ ALOGE("unsupported channel count %u", getChannels());
return NO_INIT;
}
// check bit depth
@@ -522,7 +522,7 @@ status_t FLACParser::init()
case 24:
break;
default:
- LOGE("unsupported bits per sample %u", getBitsPerSample());
+ ALOGE("unsupported bits per sample %u", getBitsPerSample());
return NO_INIT;
}
// check sample rate
@@ -539,7 +539,7 @@ status_t FLACParser::init()
break;
default:
// 96000 would require a proper downsampler in AudioFlinger
- LOGE("unsupported sample rate %u", getSampleRate());
+ ALOGE("unsupported sample rate %u", getSampleRate());
return NO_INIT;
}
// configure the appropriate copy function, defaulting to trespass
@@ -572,7 +572,7 @@ status_t FLACParser::init()
(getTotalSamples() * 1000000LL) / getSampleRate());
}
} else {
- LOGE("missing STREAMINFO");
+ ALOGE("missing STREAMINFO");
return NO_INIT;
}
if (mFileMetadata != 0) {
@@ -603,13 +603,13 @@ MediaBuffer *FLACParser::readBuffer(bool doSeek, FLAC__uint64 sample)
if (doSeek) {
// We implement the seek callback, so this works without explicit flush
if (!FLAC__stream_decoder_seek_absolute(mDecoder, sample)) {
- LOGE("FLACParser::readBuffer seek to sample %llu failed", sample);
+ ALOGE("FLACParser::readBuffer seek to sample %llu failed", sample);
return NULL;
}
ALOGV("FLACParser::readBuffer seek to sample %llu succeeded", sample);
} else {
if (!FLAC__stream_decoder_process_single(mDecoder)) {
- LOGE("FLACParser::readBuffer process_single failed");
+ ALOGE("FLACParser::readBuffer process_single failed");
return NULL;
}
}
@@ -620,13 +620,13 @@ MediaBuffer *FLACParser::readBuffer(bool doSeek, FLAC__uint64 sample)
// verify that block header keeps the promises made by STREAMINFO
unsigned blocksize = mWriteHeader.blocksize;
if (blocksize == 0 || blocksize > getMaxBlockSize()) {
- LOGE("FLACParser::readBuffer write invalid blocksize %u", blocksize);
+ ALOGE("FLACParser::readBuffer write invalid blocksize %u", blocksize);
return NULL;
}
if (mWriteHeader.sample_rate != getSampleRate() ||
mWriteHeader.channels != getChannels() ||
mWriteHeader.bits_per_sample != getBitsPerSample()) {
- LOGE("FLACParser::readBuffer write changed parameters mid-stream");
+ ALOGE("FLACParser::readBuffer write changed parameters mid-stream");
}
// acquire a media buffer
CHECK(mGroup != NULL);
diff --git a/media/libstagefright/FileSource.cpp b/media/libstagefright/FileSource.cpp
index 0794f57..73cb48c 100644
--- a/media/libstagefright/FileSource.cpp
+++ b/media/libstagefright/FileSource.cpp
@@ -101,7 +101,7 @@ ssize_t FileSource::readAt(off64_t offset, void *data, size_t size) {
} else {
off64_t result = lseek64(mFd, offset + mOffset, SEEK_SET);
if (result == -1) {
- LOGE("seek to %lld failed", offset + mOffset);
+ ALOGE("seek to %lld failed", offset + mOffset);
return UNKNOWN_ERROR;
}
diff --git a/media/libstagefright/HTTPBase.cpp b/media/libstagefright/HTTPBase.cpp
index 5950b37..d7eea3f 100644
--- a/media/libstagefright/HTTPBase.cpp
+++ b/media/libstagefright/HTTPBase.cpp
@@ -111,7 +111,7 @@ status_t HTTPBase::setBandwidthStatCollectFreq(int32_t freqMs) {
if (freqMs < kMinBandwidthCollectFreqMs
|| freqMs > kMaxBandwidthCollectFreqMs) {
- LOGE("frequency (%d ms) is out of range [1000, 60000]", freqMs);
+ ALOGE("frequency (%d ms) is out of range [1000, 60000]", freqMs);
return BAD_VALUE;
}
@@ -139,7 +139,7 @@ bool HTTPBase::getUID(uid_t *uid) const {
void HTTPBase::RegisterSocketUserTag(int sockfd, uid_t uid, uint32_t kTag) {
int res = qtaguid_tagSocket(sockfd, kTag, uid);
if (res != 0) {
- LOGE("Failed tagging socket %d for uid %d (My UID=%d)", sockfd, uid, geteuid());
+ ALOGE("Failed tagging socket %d for uid %d (My UID=%d)", sockfd, uid, geteuid());
}
}
@@ -147,7 +147,7 @@ void HTTPBase::RegisterSocketUserTag(int sockfd, uid_t uid, uint32_t kTag) {
void HTTPBase::UnRegisterSocketUserTag(int sockfd) {
int res = qtaguid_untagSocket(sockfd);
if (res != 0) {
- LOGE("Failed untagging socket %d (My UID=%d)", sockfd, geteuid());
+ ALOGE("Failed untagging socket %d (My UID=%d)", sockfd, geteuid());
}
}
diff --git a/media/libstagefright/MP3Extractor.cpp b/media/libstagefright/MP3Extractor.cpp
index cb82deb..2215c07 100644
--- a/media/libstagefright/MP3Extractor.cpp
+++ b/media/libstagefright/MP3Extractor.cpp
@@ -487,7 +487,7 @@ status_t MP3Source::read(
off64_t pos = mCurrentPos;
if (!Resync(mDataSource, mFixedHeader, &pos, NULL, NULL)) {
- LOGE("Unable to resync. Signalling end of stream.");
+ ALOGE("Unable to resync. Signalling end of stream.");
buffer->release();
buffer = NULL;
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index 00f8718..22bdd95 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -1250,7 +1250,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
char buffer[23];
if (chunk_data_size != 7 &&
chunk_data_size != 23) {
- LOGE("Incorrect D263 box size %lld", chunk_data_size);
+ ALOGE("Incorrect D263 box size %lld", chunk_data_size);
return ERROR_MALFORMED;
}
@@ -1750,7 +1750,7 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio(
// The media subtype is MP3 audio
// Our software MP3 audio decoder may not be able to handle
// packetized MP3 audio; for now, lets just return ERROR_UNSUPPORTED
- LOGE("MP3 track in MP4/3GPP file is not supported");
+ ALOGE("MP3 track in MP4/3GPP file is not supported");
return ERROR_UNSUPPORTED;
}
@@ -2122,7 +2122,7 @@ status_t MPEG4Source::read(
size_t nal_size = parseNALSize(src);
if (mBuffer->range_length() < mNALLengthSize + nal_size) {
- LOGE("incomplete NAL unit.");
+ ALOGE("incomplete NAL unit.");
mBuffer->release();
mBuffer = NULL;
@@ -2186,7 +2186,7 @@ status_t MPEG4Source::read(
}
if (isMalFormed) {
- LOGE("Video is malformed");
+ ALOGE("Video is malformed");
mBuffer->release();
mBuffer = NULL;
return ERROR_MALFORMED;
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index 8b270cb..06dd875 100755
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -327,7 +327,7 @@ status_t MPEG4Writer::Track::dump(
status_t MPEG4Writer::addSource(const sp<MediaSource> &source) {
Mutex::Autolock l(mLock);
if (mStarted) {
- LOGE("Attempt to add source AFTER recording is started");
+ ALOGE("Attempt to add source AFTER recording is started");
return UNKNOWN_ERROR;
}
Track *track = new Track(this, source, mTracks.size());
@@ -1525,7 +1525,7 @@ status_t MPEG4Writer::Track::pause() {
status_t MPEG4Writer::Track::stop() {
ALOGD("Stopping %s track", mIsAudio? "Audio": "Video");
if (!mStarted) {
- LOGE("Stop() called but track is not started");
+ ALOGE("Stop() called but track is not started");
return ERROR_END_OF_STREAM;
}
@@ -1596,14 +1596,14 @@ const uint8_t *MPEG4Writer::Track::parseParamSet(
const uint8_t *nextStartCode = findNextStartCode(data, length);
*paramSetLen = nextStartCode - data;
if (*paramSetLen == 0) {
- LOGE("Param set is malformed, since its length is 0");
+ ALOGE("Param set is malformed, since its length is 0");
return NULL;
}
AVCParamSet paramSet(*paramSetLen, data);
if (type == kNalUnitTypeSeqParamSet) {
if (*paramSetLen < 4) {
- LOGE("Seq parameter set malformed");
+ ALOGE("Seq parameter set malformed");
return NULL;
}
if (mSeqParamSets.empty()) {
@@ -1614,7 +1614,7 @@ const uint8_t *MPEG4Writer::Track::parseParamSet(
if (mProfileIdc != data[1] ||
mProfileCompatible != data[2] ||
mLevelIdc != data[3]) {
- LOGE("Inconsistent profile/level found in seq parameter sets");
+ ALOGE("Inconsistent profile/level found in seq parameter sets");
return NULL;
}
}
@@ -1632,7 +1632,7 @@ status_t MPEG4Writer::Track::copyAVCCodecSpecificData(
// 2 bytes for each of the parameter set length field
// plus the 7 bytes for the header
if (size < 4 + 7) {
- LOGE("Codec specific data length too short: %d", size);
+ ALOGE("Codec specific data length too short: %d", size);
return ERROR_MALFORMED;
}
@@ -1661,7 +1661,7 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData(
getNalUnitType(*(tmp + 4), &type);
if (type == kNalUnitTypeSeqParamSet) {
if (gotPps) {
- LOGE("SPS must come before PPS");
+ ALOGE("SPS must come before PPS");
return ERROR_MALFORMED;
}
if (!gotSps) {
@@ -1670,7 +1670,7 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData(
nextStartCode = parseParamSet(tmp + 4, bytesLeft - 4, type, &paramSetLen);
} else if (type == kNalUnitTypePicParamSet) {
if (!gotSps) {
- LOGE("SPS must come before PPS");
+ ALOGE("SPS must come before PPS");
return ERROR_MALFORMED;
}
if (!gotPps) {
@@ -1678,7 +1678,7 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData(
}
nextStartCode = parseParamSet(tmp + 4, bytesLeft - 4, type, &paramSetLen);
} else {
- LOGE("Only SPS and PPS Nal units are expected");
+ ALOGE("Only SPS and PPS Nal units are expected");
return ERROR_MALFORMED;
}
@@ -1696,12 +1696,12 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData(
// Check on the number of seq parameter sets
size_t nSeqParamSets = mSeqParamSets.size();
if (nSeqParamSets == 0) {
- LOGE("Cound not find sequence parameter set");
+ ALOGE("Cound not find sequence parameter set");
return ERROR_MALFORMED;
}
if (nSeqParamSets > 0x1F) {
- LOGE("Too many seq parameter sets (%d) found", nSeqParamSets);
+ ALOGE("Too many seq parameter sets (%d) found", nSeqParamSets);
return ERROR_MALFORMED;
}
}
@@ -1710,11 +1710,11 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData(
// Check on the number of pic parameter sets
size_t nPicParamSets = mPicParamSets.size();
if (nPicParamSets == 0) {
- LOGE("Cound not find picture parameter set");
+ ALOGE("Cound not find picture parameter set");
return ERROR_MALFORMED;
}
if (nPicParamSets > 0xFF) {
- LOGE("Too many pic parameter sets (%d) found", nPicParamSets);
+ ALOGE("Too many pic parameter sets (%d) found", nPicParamSets);
return ERROR_MALFORMED;
}
}
@@ -1727,7 +1727,7 @@ status_t MPEG4Writer::Track::parseAVCCodecSpecificData(
// These profiles requires additional parameter set extensions
if (mProfileIdc == 100 || mProfileIdc == 110 ||
mProfileIdc == 122 || mProfileIdc == 144) {
- LOGE("Sorry, no support for profile_idc: %d!", mProfileIdc);
+ ALOGE("Sorry, no support for profile_idc: %d!", mProfileIdc);
return BAD_VALUE;
}
}
@@ -1739,12 +1739,12 @@ status_t MPEG4Writer::Track::makeAVCCodecSpecificData(
const uint8_t *data, size_t size) {
if (mCodecSpecificData != NULL) {
- LOGE("Already have codec specific data");
+ ALOGE("Already have codec specific data");
return ERROR_MALFORMED;
}
if (size < 4) {
- LOGE("Codec specific data length too short: %d", size);
+ ALOGE("Codec specific data length too short: %d", size);
return ERROR_MALFORMED;
}
@@ -2160,12 +2160,12 @@ status_t MPEG4Writer::Track::threadEntry() {
bool MPEG4Writer::Track::isTrackMalFormed() const {
if (mSampleSizes.empty()) { // no samples written
- LOGE("The number of recorded samples is 0");
+ ALOGE("The number of recorded samples is 0");
return true;
}
if (!mIsAudio && mNumStssTableEntries == 0) { // no sync frames for video
- LOGE("There are no sync frames for video track");
+ ALOGE("There are no sync frames for video track");
return true;
}
@@ -2308,13 +2308,13 @@ status_t MPEG4Writer::Track::checkCodecSpecificData() const {
!strcasecmp(MEDIA_MIMETYPE_VIDEO_AVC, mime)) {
if (!mCodecSpecificData ||
mCodecSpecificDataSize <= 0) {
- LOGE("Missing codec specific data");
+ ALOGE("Missing codec specific data");
return ERROR_MALFORMED;
}
} else {
if (mCodecSpecificData ||
mCodecSpecificDataSize > 0) {
- LOGE("Unexepected codec specific data found");
+ ALOGE("Unexepected codec specific data found");
return ERROR_MALFORMED;
}
}
@@ -2378,7 +2378,7 @@ void MPEG4Writer::Track::writeVideoFourCCBox() {
} else if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_AVC, mime)) {
mOwner->beginBox("avc1");
} else {
- LOGE("Unknown mime type '%s'.", mime);
+ ALOGE("Unknown mime type '%s'.", mime);
CHECK(!"should not be here, unknown mime type.");
}
@@ -2432,7 +2432,7 @@ void MPEG4Writer::Track::writeAudioFourCCBox() {
} else if (!strcasecmp(MEDIA_MIMETYPE_AUDIO_AAC, mime)) {
fourcc = "mp4a";
} else {
- LOGE("Unknown mime type '%s'.", mime);
+ ALOGE("Unknown mime type '%s'.", mime);
CHECK(!"should not be here, unknown mime type.");
}
diff --git a/media/libstagefright/MediaBuffer.cpp b/media/libstagefright/MediaBuffer.cpp
index 0b14f1e..96271e4 100644
--- a/media/libstagefright/MediaBuffer.cpp
+++ b/media/libstagefright/MediaBuffer.cpp
@@ -135,7 +135,7 @@ size_t MediaBuffer::range_length() const {
void MediaBuffer::set_range(size_t offset, size_t length) {
if ((mGraphicBuffer == NULL) && (offset + length > mSize)) {
- LOGE("offset = %d, length = %d, mSize = %d", offset, length, mSize);
+ ALOGE("offset = %d, length = %d, mSize = %d", offset, length, mSize);
}
CHECK((mGraphicBuffer != NULL) || (offset + length <= mSize));
diff --git a/media/libstagefright/NuCachedSource2.cpp b/media/libstagefright/NuCachedSource2.cpp
index 6e5f8ab..249c298 100644
--- a/media/libstagefright/NuCachedSource2.cpp
+++ b/media/libstagefright/NuCachedSource2.cpp
@@ -317,7 +317,7 @@ void NuCachedSource2::fetchInternal() {
Mutex::Autolock autoLock(mLock);
if (n < 0) {
- LOGE("source returned error %ld, %d retries left", n, mNumRetriesLeft);
+ ALOGE("source returned error %ld, %d retries left", n, mNumRetriesLeft);
mFinalStatus = n;
mCache->releasePage(page);
} else if (n == 0) {
@@ -634,7 +634,7 @@ void NuCachedSource2::updateCacheParamsFromString(const char *s) {
if (sscanf(s, "%ld/%ld/%d",
&lowwaterMarkKb, &highwaterMarkKb, &keepAliveSecs) != 3) {
- LOGE("Failed to parse cache parameters from '%s'.", s);
+ ALOGE("Failed to parse cache parameters from '%s'.", s);
return;
}
@@ -651,7 +651,7 @@ void NuCachedSource2::updateCacheParamsFromString(const char *s) {
}
if (mLowwaterThresholdBytes >= mHighwaterThresholdBytes) {
- LOGE("Illegal low/highwater marks specified, reverting to defaults.");
+ ALOGE("Illegal low/highwater marks specified, reverting to defaults.");
mLowwaterThresholdBytes = kDefaultLowWaterThreshold;
mHighwaterThresholdBytes = kDefaultHighWaterThreshold;
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp
index 2244c6d..60d9bb7 100755
--- a/media/libstagefright/OMXCodec.cpp
+++ b/media/libstagefright/OMXCodec.cpp
@@ -181,7 +181,7 @@ static const CodecInfo kEncoderInfo[] = {
#define CODEC_LOGI(x, ...) ALOGI("[%s] "x, mComponentName, ##__VA_ARGS__)
#define CODEC_LOGV(x, ...) ALOGV("[%s] "x, mComponentName, ##__VA_ARGS__)
-#define CODEC_LOGE(x, ...) LOGE("[%s] "x, mComponentName, ##__VA_ARGS__)
+#define CODEC_LOGE(x, ...) ALOGE("[%s] "x, mComponentName, ##__VA_ARGS__)
struct OMXCodecObserver : public BnOMXObserver {
OMXCodecObserver() {
@@ -625,7 +625,7 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) {
status_t err;
if ((err = parseAVCCodecSpecificData(
data, size, &profile, &level)) != OK) {
- LOGE("Malformed AVC codec specific data.");
+ ALOGE("Malformed AVC codec specific data.");
return err;
}
@@ -639,7 +639,7 @@ status_t OMXCodec::configureCodec(const sp<MetaData> &meta) {
// does not handle this gracefully and would clobber the heap
// and wreak havoc instead...
- LOGE("Profile and/or level exceed the decoder's capabilities.");
+ ALOGE("Profile and/or level exceed the decoder's capabilities.");
return ERROR_UNSUPPORTED;
}
} else if (meta->findData(kKeyVorbisInfo, &type, &data, &size)) {
@@ -981,7 +981,7 @@ void OMXCodec::setVideoInputFormat(
} else if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_H263, mime)) {
compressionFormat = OMX_VIDEO_CodingH263;
} else {
- LOGE("Not a supported video mime type: %s", mime);
+ ALOGE("Not a supported video mime type: %s", mime);
CHECK(!"Should not be here. Not a supported video mime type.");
}
@@ -1375,7 +1375,7 @@ status_t OMXCodec::setVideoOutputFormat(
} else if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_MPEG2, mime)) {
compressionFormat = OMX_VIDEO_CodingMPEG2;
} else {
- LOGE("Not a supported video mime type: %s", mime);
+ ALOGE("Not a supported video mime type: %s", mime);
CHECK(!"Should not be here. Not a supported video mime type.");
}
@@ -1664,7 +1664,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) {
}
if ((mFlags & kEnableGrallocUsageProtected) && portIndex == kPortIndexOutput) {
- LOGE("protected output buffers must be stent to an ANativeWindow");
+ ALOGE("protected output buffers must be stent to an ANativeWindow");
return PERMISSION_DENIED;
}
@@ -1673,7 +1673,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) {
&& portIndex == kPortIndexInput) {
err = mOMX->storeMetaDataInBuffers(mNode, kPortIndexInput, OMX_TRUE);
if (err != OK) {
- LOGE("Storing meta data in video buffers is not supported");
+ ALOGE("Storing meta data in video buffers is not supported");
return err;
}
}
@@ -1735,7 +1735,7 @@ status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) {
}
if (err != OK) {
- LOGE("allocate_buffer_with_backup failed");
+ ALOGE("allocate_buffer_with_backup failed");
return err;
}
@@ -1849,7 +1849,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
def.format.video.eColorFormat);
if (err != 0) {
- LOGE("native_window_set_buffers_geometry failed: %s (%d)",
+ ALOGE("native_window_set_buffers_geometry failed: %s (%d)",
strerror(-err), -err);
return err;
}
@@ -1881,11 +1881,11 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
mNativeWindow.get(), NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER,
&queuesToNativeWindow);
if (err != 0) {
- LOGE("error authenticating native window: %d", err);
+ ALOGE("error authenticating native window: %d", err);
return err;
}
if (queuesToNativeWindow != 1) {
- LOGE("native window could not be authenticated");
+ ALOGE("native window could not be authenticated");
return PERMISSION_DENIED;
}
}
@@ -1894,7 +1894,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
err = native_window_set_usage(
mNativeWindow.get(), usage | GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_EXTERNAL_DISP);
if (err != 0) {
- LOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err);
+ ALOGE("native_window_set_usage failed: %s (%d)", strerror(-err), -err);
return err;
}
@@ -1902,7 +1902,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
err = mNativeWindow->query(mNativeWindow.get(),
NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &minUndequeuedBufs);
if (err != 0) {
- LOGE("NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS query failed: %s (%d)",
+ ALOGE("NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS query failed: %s (%d)",
strerror(-err), -err);
return err;
}
@@ -1925,7 +1925,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
err = native_window_set_buffer_count(
mNativeWindow.get(), def.nBufferCountActual);
if (err != 0) {
- LOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err),
+ ALOGE("native_window_set_buffer_count failed: %s (%d)", strerror(-err),
-err);
return err;
}
@@ -1938,7 +1938,7 @@ status_t OMXCodec::allocateOutputBuffersFromNativeWindow() {
ANativeWindowBuffer* buf;
err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &buf);
if (err != 0) {
- LOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err);
+ ALOGE("dequeueBuffer failed: %s (%d)", strerror(-err), -err);
break;
}
@@ -2052,7 +2052,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = native_window_api_disconnect(mNativeWindow.get(),
NATIVE_WINDOW_API_MEDIA);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: api_disconnect failed: %s (%d)",
+ ALOGE("error pushing blank frames: api_disconnect failed: %s (%d)",
strerror(-err), -err);
return err;
}
@@ -2060,7 +2060,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = native_window_api_connect(mNativeWindow.get(),
NATIVE_WINDOW_API_CPU);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: api_connect failed: %s (%d)",
+ ALOGE("error pushing blank frames: api_connect failed: %s (%d)",
strerror(-err), -err);
return err;
}
@@ -2068,7 +2068,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = native_window_set_scaling_mode(mNativeWindow.get(),
NATIVE_WINDOW_SCALING_MODE_SCALE_TO_WINDOW);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: set_buffers_geometry failed: %s (%d)",
+ ALOGE("error pushing blank frames: set_buffers_geometry failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2076,7 +2076,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = native_window_set_buffers_geometry(mNativeWindow.get(), 1, 1,
HAL_PIXEL_FORMAT_RGBX_8888);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: set_buffers_geometry failed: %s (%d)",
+ ALOGE("error pushing blank frames: set_buffers_geometry failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2084,7 +2084,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = native_window_set_usage(mNativeWindow.get(),
GRALLOC_USAGE_SW_WRITE_OFTEN);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: set_usage failed: %s (%d)",
+ ALOGE("error pushing blank frames: set_usage failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2092,7 +2092,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = mNativeWindow->query(mNativeWindow.get(),
NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, &minUndequeuedBufs);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: MIN_UNDEQUEUED_BUFFERS query "
+ ALOGE("error pushing blank frames: MIN_UNDEQUEUED_BUFFERS query "
"failed: %s (%d)", strerror(-err), -err);
goto error;
}
@@ -2100,7 +2100,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
numBufs = minUndequeuedBufs + 1;
err = native_window_set_buffer_count(mNativeWindow.get(), numBufs);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: set_buffer_count failed: %s (%d)",
+ ALOGE("error pushing blank frames: set_buffer_count failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2112,7 +2112,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
for (int i = 0; i < numBufs + 1; i++) {
err = mNativeWindow->dequeueBuffer(mNativeWindow.get(), &anb);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: dequeueBuffer failed: %s (%d)",
+ ALOGE("error pushing blank frames: dequeueBuffer failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2121,7 +2121,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = mNativeWindow->lockBuffer(mNativeWindow.get(),
buf->getNativeBuffer());
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: lockBuffer failed: %s (%d)",
+ ALOGE("error pushing blank frames: lockBuffer failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2130,7 +2130,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
uint32_t* img = NULL;
err = buf->lock(GRALLOC_USAGE_SW_WRITE_OFTEN, (void**)(&img));
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: lock failed: %s (%d)",
+ ALOGE("error pushing blank frames: lock failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2139,7 +2139,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = buf->unlock();
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: unlock failed: %s (%d)",
+ ALOGE("error pushing blank frames: unlock failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2147,7 +2147,7 @@ status_t OMXCodec::pushBlankBuffersToNativeWindow() {
err = mNativeWindow->queueBuffer(mNativeWindow.get(),
buf->getNativeBuffer());
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: queueBuffer failed: %s (%d)",
+ ALOGE("error pushing blank frames: queueBuffer failed: %s (%d)",
strerror(-err), -err);
goto error;
}
@@ -2174,7 +2174,7 @@ error:
err = native_window_api_disconnect(mNativeWindow.get(),
NATIVE_WINDOW_API_CPU);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: api_disconnect failed: %s (%d)",
+ ALOGE("error pushing blank frames: api_disconnect failed: %s (%d)",
strerror(-err), -err);
return err;
}
@@ -2182,7 +2182,7 @@ error:
err = native_window_api_connect(mNativeWindow.get(),
NATIVE_WINDOW_API_MEDIA);
if (err != NO_ERROR) {
- LOGE("error pushing blank frames: api_connect failed: %s (%d)",
+ ALOGE("error pushing blank frames: api_connect failed: %s (%d)",
strerror(-err), -err);
return err;
}
diff --git a/media/libstagefright/OggExtractor.cpp b/media/libstagefright/OggExtractor.cpp
index b7a9faf..73efc27 100644
--- a/media/libstagefright/OggExtractor.cpp
+++ b/media/libstagefright/OggExtractor.cpp
@@ -899,7 +899,7 @@ static void extractAlbumArt(
uint8_t *flac = DecodeBase64((const char *)data, size, &flacSize);
if (flac == NULL) {
- LOGE("malformed base64 encoded data.");
+ ALOGE("malformed base64 encoded data.");
return;
}
diff --git a/media/libstagefright/SampleIterator.cpp b/media/libstagefright/SampleIterator.cpp
index 7b8e008..81ec5c1 100644
--- a/media/libstagefright/SampleIterator.cpp
+++ b/media/libstagefright/SampleIterator.cpp
@@ -77,7 +77,7 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) {
if (sampleIndex >= mStopChunkSampleIndex) {
status_t err;
if ((err = findChunkRange(sampleIndex)) != OK) {
- LOGE("findChunkRange failed");
+ ALOGE("findChunkRange failed");
return err;
}
}
@@ -93,7 +93,7 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) {
status_t err;
if ((err = getChunkOffset(chunk, &mCurrentChunkOffset)) != OK) {
- LOGE("getChunkOffset return error");
+ ALOGE("getChunkOffset return error");
return err;
}
@@ -107,7 +107,7 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) {
size_t sampleSize;
if ((err = getSampleSizeDirect(
firstChunkSampleIndex + i, &sampleSize)) != OK) {
- LOGE("getSampleSizeDirect return error");
+ ALOGE("getSampleSizeDirect return error");
return err;
}
@@ -134,7 +134,7 @@ status_t SampleIterator::seekTo(uint32_t sampleIndex) {
status_t err;
if ((err = findSampleTime(sampleIndex, &mCurrentSampleTime)) != OK) {
- LOGE("findSampleTime return error");
+ ALOGE("findSampleTime return error");
return err;
}
diff --git a/media/libstagefright/SampleTable.cpp b/media/libstagefright/SampleTable.cpp
index 59624d0..8d80d63 100644
--- a/media/libstagefright/SampleTable.cpp
+++ b/media/libstagefright/SampleTable.cpp
@@ -630,7 +630,7 @@ status_t SampleTable::findSyncSampleNear(
if (left == mNumSyncSamples) {
if (flags == kFlagAfter) {
- LOGE("tried to find a sync frame after the last one: %d", left);
+ ALOGE("tried to find a sync frame after the last one: %d", left);
return ERROR_OUT_OF_RANGE;
}
}
diff --git a/media/libstagefright/StagefrightMediaScanner.cpp b/media/libstagefright/StagefrightMediaScanner.cpp
index 4345184..bd7a226 100644
--- a/media/libstagefright/StagefrightMediaScanner.cpp
+++ b/media/libstagefright/StagefrightMediaScanner.cpp
@@ -57,7 +57,7 @@ static MediaScanResult HandleMIDI(
// get the library configuration and do sanity check
const S_EAS_LIB_CONFIG* pLibConfig = EAS_Config();
if ((pLibConfig == NULL) || (LIB_VERSION != pLibConfig->libVersion)) {
- LOGE("EAS library/header mismatch\n");
+ ALOGE("EAS library/header mismatch\n");
return MEDIA_SCAN_RESULT_ERROR;
}
EAS_I32 temp;
diff --git a/media/libstagefright/StagefrightMetadataRetriever.cpp b/media/libstagefright/StagefrightMetadataRetriever.cpp
index 8875af0..43bfd9e 100644
--- a/media/libstagefright/StagefrightMetadataRetriever.cpp
+++ b/media/libstagefright/StagefrightMetadataRetriever.cpp
@@ -138,7 +138,7 @@ static VideoFrame *extractVideoFrameWithCodecFlags(
if (seekMode < MediaSource::ReadOptions::SEEK_PREVIOUS_SYNC ||
seekMode > MediaSource::ReadOptions::SEEK_CLOSEST) {
- LOGE("Unknown seek mode: %d", seekMode);
+ ALOGE("Unknown seek mode: %d", seekMode);
return NULL;
}
@@ -264,7 +264,7 @@ static VideoFrame *extractVideoFrameWithCodecFlags(
decoder->stop();
if (err != OK) {
- LOGE("Colorconverter failed to convert frame.");
+ ALOGE("Colorconverter failed to convert frame.");
delete frame;
frame = NULL;
@@ -292,7 +292,7 @@ VideoFrame *StagefrightMetadataRetriever::getFrameAtTime(
int32_t drm = 0;
if (fileMeta->findInt32(kKeyIsDRM, &drm) && drm != 0) {
- LOGE("frame grab not allowed.");
+ ALOGE("frame grab not allowed.");
return NULL;
}
diff --git a/media/libstagefright/SurfaceMediaSource.cpp b/media/libstagefright/SurfaceMediaSource.cpp
index 9ab6552..48df058 100644
--- a/media/libstagefright/SurfaceMediaSource.cpp
+++ b/media/libstagefright/SurfaceMediaSource.cpp
@@ -110,7 +110,7 @@ status_t SurfaceMediaSource::setBufferCountServer(int bufferCount) {
status_t SurfaceMediaSource::setBufferCount(int bufferCount) {
ALOGV("SurfaceMediaSource::setBufferCount");
if (bufferCount > NUM_BUFFER_SLOTS) {
- LOGE("setBufferCount: bufferCount is larger than the number of buffer slots");
+ ALOGE("setBufferCount: bufferCount is larger than the number of buffer slots");
return BAD_VALUE;
}
@@ -118,7 +118,7 @@ status_t SurfaceMediaSource::setBufferCount(int bufferCount) {
// Error out if the user has dequeued buffers
for (int i = 0 ; i < mBufferCount ; i++) {
if (mSlots[i].mBufferState == BufferSlot::DEQUEUED) {
- LOGE("setBufferCount: client owns some buffers");
+ ALOGE("setBufferCount: client owns some buffers");
return INVALID_OPERATION;
}
}
@@ -153,7 +153,7 @@ status_t SurfaceMediaSource::requestBuffer(int slot, sp<GraphicBuffer>* buf) {
ALOGV("SurfaceMediaSource::requestBuffer");
Mutex::Autolock lock(mMutex);
if (slot < 0 || mBufferCount <= slot) {
- LOGE("requestBuffer: slot index out of range [0, %d]: %d",
+ ALOGE("requestBuffer: slot index out of range [0, %d]: %d",
mBufferCount, slot);
return BAD_VALUE;
}
@@ -181,7 +181,7 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
// we might declare mHeight and mWidth and check against those here.
if ((w != 0) || (h != 0)) {
if ((w != mDefaultWidth) || (h != mDefaultHeight)) {
- LOGE("dequeuebuffer: invalid buffer size! Req: %dx%d, Found: %dx%d",
+ ALOGE("dequeuebuffer: invalid buffer size! Req: %dx%d, Found: %dx%d",
mDefaultWidth, mDefaultHeight, w, h);
return BAD_VALUE;
}
@@ -282,7 +282,7 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
// than allowed.
const int avail = mBufferCount - (dequeuedCount+1);
if (avail < (MIN_UNDEQUEUED_BUFFERS-int(mSynchronousMode))) {
- LOGE("dequeueBuffer: MIN_UNDEQUEUED_BUFFERS=%d exceeded (dequeued=%d)",
+ ALOGE("dequeueBuffer: MIN_UNDEQUEUED_BUFFERS=%d exceeded (dequeued=%d)",
MIN_UNDEQUEUED_BUFFERS-int(mSynchronousMode),
dequeuedCount);
return -EBUSY;
@@ -344,7 +344,7 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
mGraphicBufferAlloc->createGraphicBuffer(
w, h, format, usage, &error));
if (graphicBuffer == 0) {
- LOGE("dequeueBuffer: SurfaceComposer::createGraphicBuffer failed");
+ ALOGE("dequeueBuffer: SurfaceComposer::createGraphicBuffer failed");
return error;
}
if (updateFormat) {
@@ -361,13 +361,13 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
status_t SurfaceMediaSource::setSynchronousMode(bool enabled) {
Mutex::Autolock lock(mMutex);
if (mStopped) {
- LOGE("setSynchronousMode: SurfaceMediaSource has been stopped!");
+ ALOGE("setSynchronousMode: SurfaceMediaSource has been stopped!");
return NO_INIT;
}
if (!enabled) {
// Async mode is not allowed
- LOGE("SurfaceMediaSource can be used only synchronous mode!");
+ ALOGE("SurfaceMediaSource can be used only synchronous mode!");
return INVALID_OPERATION;
}
@@ -388,7 +388,7 @@ status_t SurfaceMediaSource::connect(int api,
Mutex::Autolock lock(mMutex);
if (mStopped) {
- LOGE("Connect: SurfaceMediaSource has been stopped!");
+ ALOGE("Connect: SurfaceMediaSource has been stopped!");
return NO_INIT;
}
@@ -429,7 +429,7 @@ status_t SurfaceMediaSource::disconnect(int api) {
Mutex::Autolock lock(mMutex);
if (mStopped) {
- LOGE("disconnect: SurfaceMediaSoource is already stopped!");
+ ALOGE("disconnect: SurfaceMediaSoource is already stopped!");
return NO_INIT;
}
@@ -465,15 +465,15 @@ status_t SurfaceMediaSource::queueBuffer(int bufIndex, int64_t timestamp,
*outTransform = 0;
if (bufIndex < 0 || bufIndex >= mBufferCount) {
- LOGE("queueBuffer: slot index out of range [0, %d]: %d",
+ ALOGE("queueBuffer: slot index out of range [0, %d]: %d",
mBufferCount, bufIndex);
return -EINVAL;
} else if (mSlots[bufIndex].mBufferState != BufferSlot::DEQUEUED) {
- LOGE("queueBuffer: slot %d is not owned by the client (state=%d)",
+ ALOGE("queueBuffer: slot %d is not owned by the client (state=%d)",
bufIndex, mSlots[bufIndex].mBufferState);
return -EINVAL;
} else if (!mSlots[bufIndex].mRequestBufferCalled) {
- LOGE("queueBuffer: slot %d was enqueued without requesting a "
+ ALOGE("queueBuffer: slot %d was enqueued without requesting a "
"buffer", bufIndex);
return -EINVAL;
}
@@ -559,11 +559,11 @@ void SurfaceMediaSource::cancelBuffer(int bufIndex) {
ALOGV("SurfaceMediaSource::cancelBuffer");
Mutex::Autolock lock(mMutex);
if (bufIndex < 0 || bufIndex >= mBufferCount) {
- LOGE("cancelBuffer: slot index out of range [0, %d]: %d",
+ ALOGE("cancelBuffer: slot index out of range [0, %d]: %d",
mBufferCount, bufIndex);
return;
} else if (mSlots[bufIndex].mBufferState != BufferSlot::DEQUEUED) {
- LOGE("cancelBuffer: slot %d is not owned by the client (state=%d)",
+ ALOGE("cancelBuffer: slot %d is not owned by the client (state=%d)",
bufIndex, mSlots[bufIndex].mBufferState);
return;
}
@@ -812,7 +812,7 @@ void SurfaceMediaSource::passMetadataBufferLocked(MediaBuffer **buffer) {
new MediaBuffer(4 + sizeof(buffer_handle_t));
char *data = (char *)tempBuffer->data();
if (data == NULL) {
- LOGE("Cannot allocate memory for metadata buffer!");
+ ALOGE("Cannot allocate memory for metadata buffer!");
return;
}
OMX_U32 type = kMetadataBufferTypeGrallocSource;
diff --git a/media/libstagefright/WVMExtractor.cpp b/media/libstagefright/WVMExtractor.cpp
index 26eda0c..2092cb6 100644
--- a/media/libstagefright/WVMExtractor.cpp
+++ b/media/libstagefright/WVMExtractor.cpp
@@ -53,7 +53,7 @@ WVMExtractor::WVMExtractor(const sp<DataSource> &source)
}
if (gVendorLibHandle == NULL) {
- LOGE("Failed to open libwvm.so");
+ ALOGE("Failed to open libwvm.so");
return;
}
}
@@ -67,7 +67,7 @@ WVMExtractor::WVMExtractor(const sp<DataSource> &source)
mImpl = (*getInstanceFunc)(source);
CHECK(mImpl != NULL);
} else {
- LOGE("Failed to locate GetInstance in libwvm.so");
+ ALOGE("Failed to locate GetInstance in libwvm.so");
}
}
diff --git a/media/libstagefright/codecs/aacdec/SoftAAC.cpp b/media/libstagefright/codecs/aacdec/SoftAAC.cpp
index f3283a4..da9d280 100644
--- a/media/libstagefright/codecs/aacdec/SoftAAC.cpp
+++ b/media/libstagefright/codecs/aacdec/SoftAAC.cpp
@@ -116,7 +116,7 @@ status_t SoftAAC::initDecoder() {
Int err = PVMP4AudioDecoderInitLibrary(mConfig, mDecoderBuf);
if (err != MP4AUDEC_SUCCESS) {
- LOGE("Failed to initialize MP4 audio decoder");
+ ALOGE("Failed to initialize MP4 audio decoder");
return UNKNOWN_ERROR;
}
diff --git a/media/libstagefright/codecs/aacenc/AACEncoder.cpp b/media/libstagefright/codecs/aacenc/AACEncoder.cpp
index a94ccab..2b8633d 100644
--- a/media/libstagefright/codecs/aacenc/AACEncoder.cpp
+++ b/media/libstagefright/codecs/aacenc/AACEncoder.cpp
@@ -53,7 +53,7 @@ status_t AACEncoder::initCheck() {
CHECK(mApiHandle);
if (VO_ERR_NONE != voGetAACEncAPI(mApiHandle)) {
- LOGE("Failed to get api handle");
+ ALOGE("Failed to get api handle");
return UNKNOWN_ERROR;
}
@@ -70,11 +70,11 @@ status_t AACEncoder::initCheck() {
userData.memflag = VO_IMF_USERMEMOPERATOR;
userData.memData = (VO_PTR) mMemOperator;
if (VO_ERR_NONE != mApiHandle->Init(&mEncoderHandle, VO_AUDIO_CodingAAC, &userData)) {
- LOGE("Failed to init AAC encoder");
+ ALOGE("Failed to init AAC encoder");
return UNKNOWN_ERROR;
}
if (OK != setAudioSpecificConfigData()) {
- LOGE("Failed to configure AAC encoder");
+ ALOGE("Failed to configure AAC encoder");
return UNKNOWN_ERROR;
}
@@ -86,7 +86,7 @@ status_t AACEncoder::initCheck() {
params.nChannels = mChannels;
params.adtsUsed = 0; // We add adts header in the file writer if needed.
if (VO_ERR_NONE != mApiHandle->SetParam(mEncoderHandle, VO_PID_AAC_ENCPARAM, &params)) {
- LOGE("Failed to set AAC encoder parameters");
+ ALOGE("Failed to set AAC encoder parameters");
return UNKNOWN_ERROR;
}
@@ -106,7 +106,7 @@ static status_t getSampleRateTableIndex(int32_t sampleRate, int32_t &index) {
}
}
- LOGE("Sampling rate %d bps is not supported", sampleRate);
+ ALOGE("Sampling rate %d bps is not supported", sampleRate);
return UNKNOWN_ERROR;
}
@@ -117,7 +117,7 @@ status_t AACEncoder::setAudioSpecificConfigData() {
int32_t index;
CHECK_EQ(OK, getSampleRateTableIndex(mSampleRate, index));
if (mChannels > 2 || mChannels <= 0) {
- LOGE("Unsupported number of channels(%d)", mChannels);
+ ALOGE("Unsupported number of channels(%d)", mChannels);
return UNKNOWN_ERROR;
}
@@ -153,7 +153,7 @@ status_t AACEncoder::start(MetaData *params) {
status_t err = mSource->start(params);
if (err != OK) {
- LOGE("AudioSource is not available");
+ ALOGE("AudioSource is not available");
return err;
}
diff --git a/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp b/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp
index c0a588f..7602f2d 100644
--- a/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp
+++ b/media/libstagefright/codecs/amrnb/dec/SoftAMR.cpp
@@ -304,7 +304,7 @@ void SoftAMR::onQueueFilled(OMX_U32 portIndex) {
MIME_IETF);
if (numBytesRead == -1) {
- LOGE("PV AMR decoder AMRDecode() call failed");
+ ALOGE("PV AMR decoder AMRDecode() call failed");
notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL);
mSignalledError = true;
diff --git a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp
index 2f158b6..3afbc4f 100644
--- a/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp
+++ b/media/libstagefright/codecs/amrnb/enc/AMRNBEncoder.cpp
@@ -84,7 +84,7 @@ status_t AMRNBEncoder::start(MetaData *params) {
status_t err = mSource->start(params);
if (err != OK) {
- LOGE("AudioSource is not available");
+ ALOGE("AudioSource is not available");
return err;
}
diff --git a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp
index ebc2e5d..60b1163 100644
--- a/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp
+++ b/media/libstagefright/codecs/amrwbenc/AMRWBEncoder.cpp
@@ -80,7 +80,7 @@ status_t AMRWBEncoder::initCheck() {
CHECK(mApiHandle);
if (VO_ERR_NONE != voGetAMRWBEncAPI(mApiHandle)) {
- LOGE("Failed to get api handle");
+ ALOGE("Failed to get api handle");
return UNKNOWN_ERROR;
}
@@ -97,20 +97,20 @@ status_t AMRWBEncoder::initCheck() {
userData.memflag = VO_IMF_USERMEMOPERATOR;
userData.memData = (VO_PTR) mMemOperator;
if (VO_ERR_NONE != mApiHandle->Init(&mEncoderHandle, VO_AUDIO_CodingAMRWB, &userData)) {
- LOGE("Failed to init AMRWB encoder");
+ ALOGE("Failed to init AMRWB encoder");
return UNKNOWN_ERROR;
}
// Configure AMRWB encoder$
VOAMRWBMODE mode = pickModeFromBitRate(mBitRate);
if (VO_ERR_NONE != mApiHandle->SetParam(mEncoderHandle, VO_PID_AMRWB_MODE, &mode)) {
- LOGE("Failed to set AMRWB encoder mode to %d", mode);
+ ALOGE("Failed to set AMRWB encoder mode to %d", mode);
return UNKNOWN_ERROR;
}
VOAMRWBFRAMETYPE type = VOAMRWB_RFC3267;
if (VO_ERR_NONE != mApiHandle->SetParam(mEncoderHandle, VO_PID_AMRWB_FRAMETYPE, &type)) {
- LOGE("Failed to set AMRWB encoder frame type to %d", type);
+ ALOGE("Failed to set AMRWB encoder frame type to %d", type);
return UNKNOWN_ERROR;
}
@@ -140,7 +140,7 @@ status_t AMRWBEncoder::start(MetaData *params) {
status_t err = mSource->start(params);
if (err != OK) {
- LOGE("AudioSource is not available");
+ ALOGE("AudioSource is not available");
return err;
}
mStarted = true;
diff --git a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
index 40f6f1a..e202a2b 100644
--- a/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
+++ b/media/libstagefright/codecs/avc/enc/AVCEncoder.cpp
@@ -41,7 +41,7 @@ static status_t ConvertOmxAvcProfileToAvcSpecProfile(
*pvProfile = AVC_BASELINE;
return OK;
default:
- LOGE("Unsupported omx profile: %d", omxProfile);
+ ALOGE("Unsupported omx profile: %d", omxProfile);
}
return BAD_VALUE;
}
@@ -100,7 +100,7 @@ static status_t ConvertOmxAvcLevelToAvcSpecLevel(
level = AVC_LEVEL5_1;
break;
default:
- LOGE("Unknown omx level: %d", omxLevel);
+ ALOGE("Unknown omx level: %d", omxLevel);
return BAD_VALUE;
}
*pvLevel = level;
@@ -214,7 +214,7 @@ status_t AVCEncoder::initCheck(const sp<MetaData>& meta) {
CHECK(meta->findInt32(kKeyColorFormat, &mVideoColorFormat));
if (mVideoColorFormat != OMX_COLOR_FormatYUV420Planar) {
if (mVideoColorFormat != OMX_COLOR_FormatYUV420SemiPlanar) {
- LOGE("Color format %d is not supported", mVideoColorFormat);
+ ALOGE("Color format %d is not supported", mVideoColorFormat);
return BAD_VALUE;
}
// Allocate spare buffer only when color conversion is needed.
@@ -226,7 +226,7 @@ status_t AVCEncoder::initCheck(const sp<MetaData>& meta) {
// XXX: Remove this restriction
if (mVideoWidth % 16 != 0 || mVideoHeight % 16 != 0) {
- LOGE("Video frame size %dx%d must be a multiple of 16",
+ ALOGE("Video frame size %dx%d must be a multiple of 16",
mVideoWidth, mVideoHeight);
return BAD_VALUE;
}
@@ -343,7 +343,7 @@ status_t AVCEncoder::start(MetaData *params) {
AVCEnc_Status err;
err = PVAVCEncInitialize(mHandle, mEncParams, NULL, NULL);
if (err != AVCENC_SUCCESS) {
- LOGE("Failed to initialize the encoder: %d", err);
+ ALOGE("Failed to initialize the encoder: %d", err);
return UNKNOWN_ERROR;
}
@@ -461,7 +461,7 @@ status_t AVCEncoder::read(
*out = outputBuffer;
return OK;
default:
- LOGE("Nal type (%d) other than SPS/PPS is unexpected", type);
+ ALOGE("Nal type (%d) other than SPS/PPS is unexpected", type);
return UNKNOWN_ERROR;
}
}
@@ -476,7 +476,7 @@ status_t AVCEncoder::read(
status_t err = mSource->read(&mInputBuffer, options);
if (err != OK) {
if (err != ERROR_END_OF_STREAM) {
- LOGE("Failed to read input video frame: %d", err);
+ ALOGE("Failed to read input video frame: %d", err);
}
outputBuffer->release();
return err;
diff --git a/media/libstagefright/codecs/g711/dec/SoftG711.cpp b/media/libstagefright/codecs/g711/dec/SoftG711.cpp
index 15e2c26..32ef003 100644
--- a/media/libstagefright/codecs/g711/dec/SoftG711.cpp
+++ b/media/libstagefright/codecs/g711/dec/SoftG711.cpp
@@ -210,7 +210,7 @@ void SoftG711::onQueueFilled(OMX_U32 portIndex) {
}
if (inHeader->nFilledLen > kMaxNumSamplesPerFrame) {
- LOGE("input buffer too large (%ld).", inHeader->nFilledLen);
+ ALOGE("input buffer too large (%ld).", inHeader->nFilledLen);
notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL);
mSignalledError = true;
diff --git a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
index be669f2..a34a0ca 100644
--- a/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
+++ b/media/libstagefright/codecs/m4v_h263/dec/SoftMPEG4.cpp
@@ -207,7 +207,7 @@ OMX_ERRORTYPE SoftMPEG4::internalGetParameter(
(OMX_VIDEO_PARAM_PROFILELEVELTYPE *) params;
if (profileLevel->nPortIndex != 0) { // Input port only
- LOGE("Invalid port index: %ld", profileLevel->nPortIndex);
+ ALOGE("Invalid port index: %ld", profileLevel->nPortIndex);
return OMX_ErrorUnsupportedIndex;
}
@@ -430,7 +430,7 @@ void SoftMPEG4::onQueueFilled(OMX_U32 portIndex) {
mHandle, &bitstream, &timestamp, &tmp,
&useExtTimestamp,
outHeader->pBuffer) != PV_TRUE) {
- LOGE("failed to decode video frame.");
+ ALOGE("failed to decode video frame.");
notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL);
mSignalledError = true;
diff --git a/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp b/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp
index 2c4b63d..d538603 100644
--- a/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp
+++ b/media/libstagefright/codecs/m4v_h263/enc/M4vH263Encoder.cpp
@@ -43,7 +43,7 @@ static status_t ConvertOmxProfileLevel(
switch (omxProfile) {
case OMX_VIDEO_H263ProfileBaseline:
if (omxLevel > OMX_VIDEO_H263Level45) {
- LOGE("Unsupported level (%d) for H263", omxLevel);
+ ALOGE("Unsupported level (%d) for H263", omxLevel);
return BAD_VALUE;
} else {
ALOGW("PV does not support level configuration for H263");
@@ -52,7 +52,7 @@ static status_t ConvertOmxProfileLevel(
}
break;
default:
- LOGE("Unsupported profile (%d) for H263", omxProfile);
+ ALOGE("Unsupported profile (%d) for H263", omxProfile);
return BAD_VALUE;
}
} else { // MPEG4
@@ -72,7 +72,7 @@ static status_t ConvertOmxProfileLevel(
profileLevel = SIMPLE_PROFILE_LEVEL3;
break;
default:
- LOGE("Unsupported level (%d) for MPEG4 simple profile",
+ ALOGE("Unsupported level (%d) for MPEG4 simple profile",
omxLevel);
return BAD_VALUE;
}
@@ -89,7 +89,7 @@ static status_t ConvertOmxProfileLevel(
profileLevel = SIMPLE_SCALABLE_PROFILE_LEVEL2;
break;
default:
- LOGE("Unsupported level (%d) for MPEG4 simple "
+ ALOGE("Unsupported level (%d) for MPEG4 simple "
"scalable profile", omxLevel);
return BAD_VALUE;
}
@@ -103,7 +103,7 @@ static status_t ConvertOmxProfileLevel(
profileLevel = CORE_PROFILE_LEVEL2;
break;
default:
- LOGE("Unsupported level (%d) for MPEG4 core "
+ ALOGE("Unsupported level (%d) for MPEG4 core "
"profile", omxLevel);
return BAD_VALUE;
}
@@ -120,13 +120,13 @@ static status_t ConvertOmxProfileLevel(
profileLevel = CORE_SCALABLE_PROFILE_LEVEL3;
break;
default:
- LOGE("Unsupported level (%d) for MPEG4 core "
+ ALOGE("Unsupported level (%d) for MPEG4 core "
"scalable profile", omxLevel);
return BAD_VALUE;
}
break;
default:
- LOGE("Unsupported MPEG4 profile (%d)", omxProfile);
+ ALOGE("Unsupported MPEG4 profile (%d)", omxProfile);
return BAD_VALUE;
}
}
@@ -207,7 +207,7 @@ status_t M4vH263Encoder::initCheck(const sp<MetaData>& meta) {
CHECK(meta->findInt32(kKeyColorFormat, &mVideoColorFormat));
if (mVideoColorFormat != OMX_COLOR_FormatYUV420Planar) {
if (mVideoColorFormat != OMX_COLOR_FormatYUV420SemiPlanar) {
- LOGE("Color format %d is not supported", mVideoColorFormat);
+ ALOGE("Color format %d is not supported", mVideoColorFormat);
return BAD_VALUE;
}
// Allocate spare buffer only when color conversion is needed.
@@ -219,7 +219,7 @@ status_t M4vH263Encoder::initCheck(const sp<MetaData>& meta) {
// XXX: Remove this restriction
if (mVideoWidth % 16 != 0 || mVideoHeight % 16 != 0) {
- LOGE("Video frame size %dx%d must be a multiple of 16",
+ ALOGE("Video frame size %dx%d must be a multiple of 16",
mVideoWidth, mVideoHeight);
return BAD_VALUE;
}
@@ -227,7 +227,7 @@ status_t M4vH263Encoder::initCheck(const sp<MetaData>& meta) {
mEncParams = new tagvideoEncOptions;
memset(mEncParams, 0, sizeof(tagvideoEncOptions));
if (!PVGetDefaultEncOption(mEncParams, 0)) {
- LOGE("Failed to get default encoding parameters");
+ ALOGE("Failed to get default encoding parameters");
return BAD_VALUE;
}
@@ -319,7 +319,7 @@ status_t M4vH263Encoder::start(MetaData *params) {
}
if (!PVInitVideoEncoder(mHandle, mEncParams)) {
- LOGE("Failed to initialize the encoder");
+ ALOGE("Failed to initialize the encoder");
return UNKNOWN_ERROR;
}
@@ -386,7 +386,7 @@ status_t M4vH263Encoder::read(
// Output codec specific data
if (mNumInputFrames < 0) {
if (!PVGetVolHeader(mHandle, outPtr, &dataLength, 0)) {
- LOGE("Failed to get VOL header");
+ ALOGE("Failed to get VOL header");
return UNKNOWN_ERROR;
}
ALOGV("Output VOL header: %d bytes", dataLength);
@@ -401,7 +401,7 @@ status_t M4vH263Encoder::read(
status_t err = mSource->read(&mInputBuffer, options);
if (OK != err) {
if (err != ERROR_END_OF_STREAM) {
- LOGE("Failed to read from data source");
+ ALOGE("Failed to read from data source");
}
outputBuffer->release();
return err;
@@ -460,7 +460,7 @@ status_t M4vH263Encoder::read(
if (!PVEncodeVideoFrame(mHandle, &vin, &vout,
&modTimeMs, outPtr, &dataLength, &nLayer) ||
!PVGetHintTrack(mHandle, &hintTrack)) {
- LOGE("Failed to encode frame or get hink track at frame %lld",
+ ALOGE("Failed to encode frame or get hink track at frame %lld",
mNumInputFrames);
outputBuffer->release();
mInputBuffer->release();
diff --git a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp
index 43fb30a..ad55295 100644
--- a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp
+++ b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp
@@ -223,10 +223,10 @@ void SoftMP3::onQueueFilled(OMX_U32 portIndex) {
if (decoderErr != NO_ENOUGH_MAIN_DATA_ERROR ||
mConfig->outputFrameSize == 0) {
- LOGE("mp3 decoder returned error %d", decoderErr);
+ ALOGE("mp3 decoder returned error %d", decoderErr);
if (mConfig->outputFrameSize == 0) {
- LOGE("Output frame size is 0");
+ ALOGE("Output frame size is 0");
}
notify(OMX_EventError, OMX_ErrorUndefined, decoderErr, NULL);
diff --git a/media/libstagefright/codecs/on2/dec/SoftVPX.cpp b/media/libstagefright/codecs/on2/dec/SoftVPX.cpp
index c5fe199..bf9ab3a 100644
--- a/media/libstagefright/codecs/on2/dec/SoftVPX.cpp
+++ b/media/libstagefright/codecs/on2/dec/SoftVPX.cpp
@@ -138,7 +138,7 @@ status_t SoftVPX::initDecoder() {
cfg.threads = GetCPUCoreCount();
if ((vpx_err = vpx_codec_dec_init(
(vpx_codec_ctx_t *)mCtx, &vpx_codec_vp8_dx_algo, &cfg, 0))) {
- LOGE("on2 decoder failed to initialize. (%d)", vpx_err);
+ ALOGE("on2 decoder failed to initialize. (%d)", vpx_err);
return UNKNOWN_ERROR;
}
@@ -254,7 +254,7 @@ void SoftVPX::onQueueFilled(OMX_U32 portIndex) {
inHeader->nFilledLen,
NULL,
0)) {
- LOGE("on2 decoder failed to decode frame.");
+ ALOGE("on2 decoder failed to decode frame.");
notify(OMX_EventError, OMX_ErrorUndefined, 0, NULL);
return;
diff --git a/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp b/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp
index dede3ac..6c3f834 100644
--- a/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp
+++ b/media/libstagefright/codecs/on2/h264dec/SoftAVC.cpp
@@ -204,7 +204,7 @@ OMX_ERRORTYPE SoftAVC::internalGetParameter(
(OMX_VIDEO_PARAM_PROFILELEVELTYPE *) params;
if (profileLevel->nPortIndex != kInputPortIndex) {
- LOGE("Invalid port index: %ld", profileLevel->nPortIndex);
+ ALOGE("Invalid port index: %ld", profileLevel->nPortIndex);
return OMX_ErrorUnsupportedIndex;
}
@@ -371,7 +371,7 @@ void SoftAVC::onQueueFilled(OMX_U32 portIndex) {
}
inPicture.dataLen = 0;
if (ret < 0) {
- LOGE("Decoder failed: %d", ret);
+ ALOGE("Decoder failed: %d", ret);
notify(OMX_EventError, OMX_ErrorUndefined,
ERROR_MALFORMED, NULL);
diff --git a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp
index 74e893f..ac88107 100644
--- a/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp
+++ b/media/libstagefright/codecs/vorbis/dec/SoftVorbis.cpp
@@ -360,7 +360,7 @@ void SoftVorbis::onQueueFilled(OMX_U32 portIndex) {
kMaxNumSamplesPerBuffer);
if (numFrames < 0) {
- LOGE("vorbis_dsp_pcmout returned %d", numFrames);
+ ALOGE("vorbis_dsp_pcmout returned %d", numFrames);
numFrames = 0;
}
}
diff --git a/media/libstagefright/foundation/AMessage.cpp b/media/libstagefright/foundation/AMessage.cpp
index f039bc1..0a6776e 100644
--- a/media/libstagefright/foundation/AMessage.cpp
+++ b/media/libstagefright/foundation/AMessage.cpp
@@ -471,7 +471,7 @@ sp<AMessage> AMessage::FromParcel(const Parcel &parcel) {
default:
{
- LOGE("This type of object cannot cross process boundaries.");
+ ALOGE("This type of object cannot cross process boundaries.");
TRESPASS();
}
}
@@ -535,7 +535,7 @@ void AMessage::writeToParcel(Parcel *parcel) const {
default:
{
- LOGE("This type of object cannot cross process boundaries.");
+ ALOGE("This type of object cannot cross process boundaries.");
TRESPASS();
}
}
diff --git a/media/libstagefright/httplive/LiveDataSource.cpp b/media/libstagefright/httplive/LiveDataSource.cpp
index 5f5c6d4..7560642 100644
--- a/media/libstagefright/httplive/LiveDataSource.cpp
+++ b/media/libstagefright/httplive/LiveDataSource.cpp
@@ -59,7 +59,7 @@ ssize_t LiveDataSource::readAtNonBlocking(
Mutex::Autolock autoLock(mLock);
if (offset != mOffset) {
- LOGE("Attempt at reading non-sequentially from LiveDataSource.");
+ ALOGE("Attempt at reading non-sequentially from LiveDataSource.");
return -EPIPE;
}
@@ -89,7 +89,7 @@ ssize_t LiveDataSource::readAt(off64_t offset, void *data, size_t size) {
ssize_t LiveDataSource::readAt_l(off64_t offset, void *data, size_t size) {
if (offset != mOffset) {
- LOGE("Attempt at reading non-sequentially from LiveDataSource.");
+ ALOGE("Attempt at reading non-sequentially from LiveDataSource.");
return -EPIPE;
}
diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp
index d1d8eb2..0df66f1 100644
--- a/media/libstagefright/httplive/LiveSession.cpp
+++ b/media/libstagefright/httplive/LiveSession.cpp
@@ -179,7 +179,7 @@ void LiveSession::onConnect(const sp<AMessage> &msg) {
sp<M3UParser> playlist = fetchPlaylist(url.c_str(), &dummy);
if (playlist == NULL) {
- LOGE("unable to fetch master playlist '%s'.", url.c_str());
+ ALOGE("unable to fetch master playlist '%s'.", url.c_str());
mDataSource->queueEOS(ERROR_IO);
return;
@@ -336,7 +336,7 @@ sp<M3UParser> LiveSession::fetchPlaylist(const char *url, bool *unchanged) {
new M3UParser(url, buffer->data(), buffer->size());
if (playlist->initCheck() != OK) {
- LOGE("failed to parse .m3u8 playlist");
+ ALOGE("failed to parse .m3u8 playlist");
return NULL;
}
@@ -507,7 +507,7 @@ rinse_repeat:
// We succeeded in fetching the playlist, but it was
// unchanged from the last time we tried.
} else {
- LOGE("failed to load playlist at url '%s'", url.c_str());
+ ALOGE("failed to load playlist at url '%s'", url.c_str());
mDataSource->queueEOS(ERROR_IO);
return;
}
@@ -635,7 +635,7 @@ rinse_repeat:
// fall through
} else {
- LOGE("Cannot find sequence number %d in playlist "
+ ALOGE("Cannot find sequence number %d in playlist "
"(contains %d - %d)",
mSeqNumber, firstSeqNumberInPlaylist,
firstSeqNumberInPlaylist + mPlaylist->size() - 1);
@@ -662,7 +662,7 @@ rinse_repeat:
sp<ABuffer> buffer;
status_t err = fetchFile(uri.c_str(), &buffer);
if (err != OK) {
- LOGE("failed to fetch .ts segment at url '%s'", uri.c_str());
+ ALOGE("failed to fetch .ts segment at url '%s'", uri.c_str());
mDataSource->queueEOS(err);
return;
}
@@ -672,7 +672,7 @@ rinse_repeat:
err = decryptBuffer(mSeqNumber - firstSeqNumberInPlaylist, buffer);
if (err != OK) {
- LOGE("decryptBuffer failed w/ error %d", err);
+ ALOGE("decryptBuffer failed w/ error %d", err);
mDataSource->queueEOS(err);
return;
@@ -681,7 +681,7 @@ rinse_repeat:
if (buffer->size() == 0 || buffer->data()[0] != 0x47) {
// Not a transport stream???
- LOGE("This doesn't look like a transport stream...");
+ ALOGE("This doesn't look like a transport stream...");
mBandwidthItems.removeAt(bandwidthIndex);
@@ -765,13 +765,13 @@ status_t LiveSession::decryptBuffer(
if (method == "NONE") {
return OK;
} else if (!(method == "AES-128")) {
- LOGE("Unsupported cipher method '%s'", method.c_str());
+ ALOGE("Unsupported cipher method '%s'", method.c_str());
return ERROR_UNSUPPORTED;
}
AString keyURI;
if (!itemMeta->findString("cipher-uri", &keyURI)) {
- LOGE("Missing key uri");
+ ALOGE("Missing key uri");
return ERROR_MALFORMED;
}
@@ -813,7 +813,7 @@ status_t LiveSession::decryptBuffer(
}
if (err != OK) {
- LOGE("failed to fetch cipher key from '%s'.", keyURI.c_str());
+ ALOGE("failed to fetch cipher key from '%s'.", keyURI.c_str());
return ERROR_IO;
}
@@ -822,7 +822,7 @@ status_t LiveSession::decryptBuffer(
AES_KEY aes_key;
if (AES_set_decrypt_key(key->data(), 128, &aes_key) != 0) {
- LOGE("failed to set AES decryption key.");
+ ALOGE("failed to set AES decryption key.");
return UNKNOWN_ERROR;
}
@@ -832,7 +832,7 @@ status_t LiveSession::decryptBuffer(
if (itemMeta->findString("cipher-iv", &iv)) {
if ((!iv.startsWith("0x") && !iv.startsWith("0X"))
|| iv.size() != 16 * 2 + 2) {
- LOGE("malformed cipher IV '%s'.", iv.c_str());
+ ALOGE("malformed cipher IV '%s'.", iv.c_str());
return ERROR_MALFORMED;
}
@@ -841,7 +841,7 @@ status_t LiveSession::decryptBuffer(
char c1 = tolower(iv.c_str()[2 + 2 * i]);
char c2 = tolower(iv.c_str()[3 + 2 * i]);
if (!isxdigit(c1) || !isxdigit(c2)) {
- LOGE("malformed cipher IV '%s'.", iv.c_str());
+ ALOGE("malformed cipher IV '%s'.", iv.c_str());
return ERROR_MALFORMED;
}
uint8_t nibble1 = isdigit(c1) ? c1 - '0' : c1 - 'a' + 10;
diff --git a/media/libstagefright/httplive/M3UParser.cpp b/media/libstagefright/httplive/M3UParser.cpp
index 71f998c..5e30488 100644
--- a/media/libstagefright/httplive/M3UParser.cpp
+++ b/media/libstagefright/httplive/M3UParser.cpp
@@ -432,7 +432,7 @@ status_t M3UParser::parseCipherInfo(
if (MakeURL(baseURI.c_str(), val.c_str(), &absURI)) {
val = absURI;
} else {
- LOGE("failed to make absolute url for '%s'.",
+ ALOGE("failed to make absolute url for '%s'.",
val.c_str());
}
}
diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp
index 943a937..6dde9d8 100644
--- a/media/libstagefright/id3/ID3.cpp
+++ b/media/libstagefright/id3/ID3.cpp
@@ -129,7 +129,7 @@ struct id3_header {
}
if (size > kMaxMetadataSize) {
- LOGE("skipping huge ID3 metadata of size %d", size);
+ ALOGE("skipping huge ID3 metadata of size %d", size);
return false;
}
diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp
index f215f52..4fbf47e 100644
--- a/media/libstagefright/matroska/MatroskaExtractor.cpp
+++ b/media/libstagefright/matroska/MatroskaExtractor.cpp
@@ -245,7 +245,7 @@ void BlockIterator::advance_l() {
if (res < 0) {
// I/O error
- LOGE("Cluster::Parse returned result %ld", res);
+ ALOGE("Cluster::Parse returned result %ld", res);
mCluster = NULL;
break;
diff --git a/media/libstagefright/mpeg2ts/ATSParser.cpp b/media/libstagefright/mpeg2ts/ATSParser.cpp
index 576693a..3f4de1f 100644
--- a/media/libstagefright/mpeg2ts/ATSParser.cpp
+++ b/media/libstagefright/mpeg2ts/ATSParser.cpp
@@ -697,7 +697,7 @@ status_t ATSParser::Stream::parsePES(ABitReader *br) {
PES_packet_length - 3 - PES_header_data_length;
if (br->numBitsLeft() < dataLength * 8) {
- LOGE("PES packet does not carry enough data to contain "
+ ALOGE("PES packet does not carry enough data to contain "
"payload. (numBitsLeft = %d, required = %d)",
br->numBitsLeft(), dataLength * 8);
diff --git a/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp b/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp
index 727c931..dd714c9 100644
--- a/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp
+++ b/media/libstagefright/mpeg2ts/MPEG2PSExtractor.cpp
@@ -471,7 +471,7 @@ ssize_t MPEG2PSExtractor::dequeuePES() {
PES_packet_length - 3 - PES_header_data_length;
if (br.numBitsLeft() < dataLength * 8) {
- LOGE("PES packet does not carry enough data to contain "
+ ALOGE("PES packet does not carry enough data to contain "
"payload. (numBitsLeft = %d, required = %d)",
br.numBitsLeft(), dataLength * 8);
diff --git a/media/libstagefright/omx/OMXMaster.cpp b/media/libstagefright/omx/OMXMaster.cpp
index c8278ab..d698939 100644
--- a/media/libstagefright/omx/OMXMaster.cpp
+++ b/media/libstagefright/omx/OMXMaster.cpp
@@ -81,7 +81,7 @@ void OMXMaster::addPlugin(OMXPluginBase *plugin) {
String8 name8(name);
if (mPluginByComponentName.indexOfKey(name8) >= 0) {
- LOGE("A component of name '%s' already exists, ignoring this one.",
+ ALOGE("A component of name '%s' already exists, ignoring this one.",
name8.string());
continue;
@@ -91,7 +91,7 @@ void OMXMaster::addPlugin(OMXPluginBase *plugin) {
}
if (err != OMX_ErrorNoMore) {
- LOGE("OMX plugin failed w/ error 0x%08x after registering %d "
+ ALOGE("OMX plugin failed w/ error 0x%08x after registering %d "
"components", err, mPluginByComponentName.size());
}
}
diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp
index 31b1a2f..8938e33 100644
--- a/media/libstagefright/omx/OMXNodeInstance.cpp
+++ b/media/libstagefright/omx/OMXNodeInstance.cpp
@@ -150,7 +150,7 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) {
&& state != OMX_StateIdle
&& state != OMX_StateInvalid) {
if (++iteration > kMaxNumIterations) {
- LOGE("component failed to enter Idle state, aborting.");
+ ALOGE("component failed to enter Idle state, aborting.");
state = OMX_StateInvalid;
break;
}
@@ -179,7 +179,7 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) {
&& state != OMX_StateLoaded
&& state != OMX_StateInvalid) {
if (++iteration > kMaxNumIterations) {
- LOGE("component failed to enter Loaded state, aborting.");
+ ALOGE("component failed to enter Loaded state, aborting.");
state = OMX_StateInvalid;
break;
}
@@ -209,7 +209,7 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) {
mHandle = NULL;
if (err != OMX_ErrorNone) {
- LOGE("FreeHandle FAILED with error 0x%08x.", err);
+ ALOGE("FreeHandle FAILED with error 0x%08x.", err);
}
mOwner->invalidateNodeID(mNodeID);
@@ -285,7 +285,7 @@ status_t OMXNodeInstance::enableGraphicBuffers(
&index);
if (err != OMX_ErrorNone) {
- LOGE("OMX_GetExtensionIndex failed");
+ ALOGE("OMX_GetExtensionIndex failed");
return StatusFromOMXError(err);
}
@@ -302,7 +302,7 @@ status_t OMXNodeInstance::enableGraphicBuffers(
err = OMX_SetParameter(mHandle, index, &params);
if (err != OMX_ErrorNone) {
- LOGE("OMX_EnableAndroidNativeBuffers failed with error %d (0x%08x)",
+ ALOGE("OMX_EnableAndroidNativeBuffers failed with error %d (0x%08x)",
err, err);
return UNKNOWN_ERROR;
@@ -323,7 +323,7 @@ status_t OMXNodeInstance::getGraphicBufferUsage(
&index);
if (err != OMX_ErrorNone) {
- LOGE("OMX_GetExtensionIndex failed");
+ ALOGE("OMX_GetExtensionIndex failed");
return StatusFromOMXError(err);
}
@@ -340,7 +340,7 @@ status_t OMXNodeInstance::getGraphicBufferUsage(
err = OMX_GetParameter(mHandle, index, &params);
if (err != OMX_ErrorNone) {
- LOGE("OMX_GetAndroidNativeBufferUsage failed with error %d (0x%08x)",
+ ALOGE("OMX_GetAndroidNativeBufferUsage failed with error %d (0x%08x)",
err, err);
return UNKNOWN_ERROR;
}
@@ -361,7 +361,7 @@ status_t OMXNodeInstance::storeMetaDataInBuffers(
OMX_ERRORTYPE err = OMX_GetExtensionIndex(mHandle, name, &index);
if (err != OMX_ErrorNone) {
- LOGE("OMX_GetExtensionIndex %s failed", name);
+ ALOGE("OMX_GetExtensionIndex %s failed", name);
return StatusFromOMXError(err);
}
@@ -375,7 +375,7 @@ status_t OMXNodeInstance::storeMetaDataInBuffers(
params.nPortIndex = portIndex;
params.bStoreMetaData = enable;
if ((err = OMX_SetParameter(mHandle, index, &params)) != OMX_ErrorNone) {
- LOGE("OMX_SetParameter() failed for StoreMetaDataInBuffers: 0x%08x", err);
+ ALOGE("OMX_SetParameter() failed for StoreMetaDataInBuffers: 0x%08x", err);
return UNKNOWN_ERROR;
}
return err;
@@ -395,7 +395,7 @@ status_t OMXNodeInstance::useBuffer(
params->size(), static_cast<OMX_U8 *>(params->pointer()));
if (err != OMX_ErrorNone) {
- LOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err);
+ ALOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err);
delete buffer_meta;
buffer_meta = NULL;
@@ -429,7 +429,7 @@ status_t OMXNodeInstance::useGraphicBuffer2_l(
OMX_ERRORTYPE err = OMX_GetParameter(mHandle, OMX_IndexParamPortDefinition, &def);
if (err != OMX_ErrorNone)
{
- LOGE("%s::%d:Error getting OMX_IndexParamPortDefinition", __FUNCTION__, __LINE__);
+ ALOGE("%s::%d:Error getting OMX_IndexParamPortDefinition", __FUNCTION__, __LINE__);
return err;
}
@@ -448,7 +448,7 @@ status_t OMXNodeInstance::useGraphicBuffer2_l(
bufferHandle);
if (err != OMX_ErrorNone) {
- LOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err);
+ ALOGE("OMX_UseBuffer failed with error %d (0x%08x)", err, err);
delete bufferMeta;
bufferMeta = NULL;
*buffer = 0;
@@ -488,7 +488,7 @@ status_t OMXNodeInstance::useGraphicBuffer(
&index);
if (err != OMX_ErrorNone) {
- LOGE("OMX_GetExtensionIndex failed");
+ ALOGE("OMX_GetExtensionIndex failed");
return StatusFromOMXError(err);
}
@@ -510,7 +510,7 @@ status_t OMXNodeInstance::useGraphicBuffer(
err = OMX_SetParameter(mHandle, index, &params);
if (err != OMX_ErrorNone) {
- LOGE("OMX_UseAndroidNativeBuffer failed with error %d (0x%08x)", err,
+ ALOGE("OMX_UseAndroidNativeBuffer failed with error %d (0x%08x)", err,
err);
delete bufferMeta;
@@ -543,7 +543,7 @@ status_t OMXNodeInstance::allocateBuffer(
mHandle, &header, portIndex, buffer_meta, size);
if (err != OMX_ErrorNone) {
- LOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err);
+ ALOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err);
delete buffer_meta;
buffer_meta = NULL;
@@ -576,7 +576,7 @@ status_t OMXNodeInstance::allocateBufferWithBackup(
mHandle, &header, portIndex, buffer_meta, params->size());
if (err != OMX_ErrorNone) {
- LOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err);
+ ALOGE("OMX_AllocateBuffer failed with error %d (0x%08x)", err, err);
delete buffer_meta;
buffer_meta = NULL;
@@ -672,7 +672,7 @@ void OMXNodeInstance::onMessage(const omx_message &msg) {
}
void OMXNodeInstance::onObserverDied(OMXMaster *master) {
- LOGE("!!! Observer died. Quickly, do something, ... anything...");
+ ALOGE("!!! Observer died. Quickly, do something, ... anything...");
// Try to force shutdown of the node and hope for the best.
freeNode(master);
diff --git a/media/libstagefright/omx/SoftOMXPlugin.cpp b/media/libstagefright/omx/SoftOMXPlugin.cpp
index 8aeb763..da3ae42 100644
--- a/media/libstagefright/omx/SoftOMXPlugin.cpp
+++ b/media/libstagefright/omx/SoftOMXPlugin.cpp
@@ -72,7 +72,7 @@ OMX_ERRORTYPE SoftOMXPlugin::makeComponentInstance(
void *libHandle = dlopen(libName.c_str(), RTLD_NOW);
if (libHandle == NULL) {
- LOGE("unable to dlopen %s", libName.c_str());
+ ALOGE("unable to dlopen %s", libName.c_str());
return OMX_ErrorComponentNotFound;
}
diff --git a/media/libstagefright/omx/tests/OMXHarness.cpp b/media/libstagefright/omx/tests/OMXHarness.cpp
index 3a15a5e..8faf544 100644
--- a/media/libstagefright/omx/tests/OMXHarness.cpp
+++ b/media/libstagefright/omx/tests/OMXHarness.cpp
@@ -174,7 +174,7 @@ status_t Harness::getPortDefinition(
#define EXPECT(condition, info) \
if (!(condition)) { \
- LOGE(info); printf("\n * " info "\n"); return UNKNOWN_ERROR; \
+ ALOGE(info); printf("\n * " info "\n"); return UNKNOWN_ERROR; \
}
#define EXPECT_SUCCESS(err, info) \
diff --git a/media/libstagefright/rtsp/ARTPSession.cpp b/media/libstagefright/rtsp/ARTPSession.cpp
index 5783beb..7a05b88 100644
--- a/media/libstagefright/rtsp/ARTPSession.cpp
+++ b/media/libstagefright/rtsp/ARTPSession.cpp
@@ -53,24 +53,24 @@ status_t ARTPSession::setup(const sp<ASessionDescription> &desc) {
if (!mDesc->findAttribute(i, "c=", &connection)) {
// No per-stream connection information, try global fallback.
if (!mDesc->findAttribute(0, "c=", &connection)) {
- LOGE("Unable to find connection attribute.");
+ ALOGE("Unable to find connection attribute.");
return mInitCheck;
}
}
if (!(connection == "IN IP4 127.0.0.1")) {
- LOGE("We only support localhost connections for now.");
+ ALOGE("We only support localhost connections for now.");
return mInitCheck;
}
unsigned port;
if (!validateMediaFormat(i, &port) || (port & 1) != 0) {
- LOGE("Invalid media format.");
+ ALOGE("Invalid media format.");
return mInitCheck;
}
sp<APacketSource> source = new APacketSource(mDesc, i);
if (source->initCheck() != OK) {
- LOGE("Unsupported format.");
+ ALOGE("Unsupported format.");
return mInitCheck;
}
diff --git a/media/libstagefright/rtsp/ARTSPConnection.cpp b/media/libstagefright/rtsp/ARTSPConnection.cpp
index b5d2e9f..80a010e 100644
--- a/media/libstagefright/rtsp/ARTSPConnection.cpp
+++ b/media/libstagefright/rtsp/ARTSPConnection.cpp
@@ -55,7 +55,7 @@ ARTSPConnection::ARTSPConnection(bool uidValid, uid_t uid)
ARTSPConnection::~ARTSPConnection() {
if (mSocket >= 0) {
- LOGE("Connection is still open, closing the socket.");
+ ALOGE("Connection is still open, closing the socket.");
if (mUIDValid) {
HTTPBase::UnRegisterSocketUserTag(mSocket);
}
@@ -235,7 +235,7 @@ void ARTSPConnection::onConnect(const sp<AMessage> &msg) {
// right here, since we currently have no way of asking the user
// for this information.
- LOGE("Malformed rtsp url %s", url.c_str());
+ ALOGE("Malformed rtsp url %s", url.c_str());
reply->setInt32("result", ERROR_MALFORMED);
reply->post();
@@ -250,7 +250,7 @@ void ARTSPConnection::onConnect(const sp<AMessage> &msg) {
struct hostent *ent = gethostbyname(host.c_str());
if (ent == NULL) {
- LOGE("Unknown host %s", host.c_str());
+ ALOGE("Unknown host %s", host.c_str());
reply->setInt32("result", -ENOENT);
reply->post();
@@ -376,7 +376,7 @@ void ARTSPConnection::onCompleteConnection(const sp<AMessage> &msg) {
CHECK_EQ(optionLen, (socklen_t)sizeof(err));
if (err != 0) {
- LOGE("err = %d (%s)", err, strerror(err));
+ ALOGE("err = %d (%s)", err, strerror(err));
reply->setInt32("result", -err);
@@ -446,12 +446,12 @@ void ARTSPConnection::onSendRequest(const sp<AMessage> &msg) {
if (n == 0) {
// Server closed the connection.
- LOGE("Server unexpectedly closed the connection.");
+ ALOGE("Server unexpectedly closed the connection.");
reply->setInt32("result", ERROR_IO);
reply->post();
} else {
- LOGE("Error sending rtsp request. (%s)", strerror(errno));
+ ALOGE("Error sending rtsp request. (%s)", strerror(errno));
reply->setInt32("result", -errno);
reply->post();
}
@@ -536,10 +536,10 @@ status_t ARTSPConnection::receive(void *data, size_t size) {
if (n == 0) {
// Server closed the connection.
- LOGE("Server unexpectedly closed the connection.");
+ ALOGE("Server unexpectedly closed the connection.");
return ERROR_IO;
} else {
- LOGE("Error reading rtsp response. (%s)", strerror(errno));
+ ALOGE("Error reading rtsp response. (%s)", strerror(errno));
return -errno;
}
}
@@ -793,9 +793,9 @@ bool ARTSPConnection::handleServerRequest(const sp<ARTSPResponse> &request) {
if (n <= 0) {
if (n == 0) {
// Server closed the connection.
- LOGE("Server unexpectedly closed the connection.");
+ ALOGE("Server unexpectedly closed the connection.");
} else {
- LOGE("Error sending rtsp response (%s).", strerror(errno));
+ ALOGE("Error sending rtsp response (%s).", strerror(errno));
}
performDisconnect();
diff --git a/media/libstagefright/rtsp/MyHandler.h b/media/libstagefright/rtsp/MyHandler.h
index cda787e..2391c5c 100644
--- a/media/libstagefright/rtsp/MyHandler.h
+++ b/media/libstagefright/rtsp/MyHandler.h
@@ -269,7 +269,7 @@ struct MyHandler : public AHandler {
struct hostent *ent = gethostbyname(mSessionHost.c_str());
if (ent == NULL) {
- LOGE("Failed to look up address of session host '%s'",
+ ALOGE("Failed to look up address of session host '%s'",
mSessionHost.c_str());
return false;
@@ -292,7 +292,7 @@ struct MyHandler : public AHandler {
|| rtpPort <= 0 || rtpPort > 65535
|| rtcpPort <=0 || rtcpPort > 65535
|| rtcpPort != rtpPort + 1) {
- LOGE("Server picked invalid RTP/RTCP port pair %s,"
+ ALOGE("Server picked invalid RTP/RTCP port pair %s,"
" RTP port must be even, RTCP port must be one higher.",
server_port.c_str());
@@ -327,7 +327,7 @@ struct MyHandler : public AHandler {
(const sockaddr *)&addr, sizeof(addr));
if (n < (ssize_t)buf->size()) {
- LOGE("failed to poke a hole for RTP packets");
+ ALOGE("failed to poke a hole for RTP packets");
return false;
}
@@ -338,7 +338,7 @@ struct MyHandler : public AHandler {
(const sockaddr *)&addr, sizeof(addr));
if (n < (ssize_t)buf->size()) {
- LOGE("failed to poke a hole for RTCP packets");
+ ALOGE("failed to poke a hole for RTCP packets");
return false;
}
@@ -429,7 +429,7 @@ struct MyHandler : public AHandler {
response->mContent->size());
if (!mSessionDesc->isValid()) {
- LOGE("Failed to parse session description.");
+ ALOGE("Failed to parse session description.");
result = ERROR_MALFORMED;
} else {
ssize_t i = response->mHeaders.indexOfKey("content-base");
@@ -988,7 +988,7 @@ struct MyHandler : public AHandler {
}
if (result != OK) {
- LOGE("seek failed, aborting.");
+ ALOGE("seek failed, aborting.");
(new AMessage('abor', id()))->post();
}
diff --git a/media/libstagefright/rtsp/UDPPusher.cpp b/media/libstagefright/rtsp/UDPPusher.cpp
index 6a4c87b..47ea6f1 100644
--- a/media/libstagefright/rtsp/UDPPusher.cpp
+++ b/media/libstagefright/rtsp/UDPPusher.cpp
@@ -81,7 +81,7 @@ bool UDPPusher::onPush() {
sp<ABuffer> buffer = new ABuffer(length);
if (fread(buffer->data(), 1, length, mFile) < length) {
- LOGE("File truncated?.");
+ ALOGE("File truncated?.");
return false;
}
diff --git a/media/libstagefright/rtsp/rtp_test.cpp b/media/libstagefright/rtsp/rtp_test.cpp
index f0cb5a5..d43cd2a 100644
--- a/media/libstagefright/rtsp/rtp_test.cpp
+++ b/media/libstagefright/rtsp/rtp_test.cpp
@@ -204,7 +204,7 @@ int main(int argc, char **argv) {
continue;
}
- LOGE("decoder returned error 0x%08x", err);
+ ALOGE("decoder returned error 0x%08x", err);
break;
}
diff --git a/media/libstagefright/tests/DummyRecorder.cpp b/media/libstagefright/tests/DummyRecorder.cpp
index fbb606d..ac37b28 100644
--- a/media/libstagefright/tests/DummyRecorder.cpp
+++ b/media/libstagefright/tests/DummyRecorder.cpp
@@ -47,7 +47,7 @@ status_t DummyRecorder::start() {
pthread_attr_destroy(&attr);
if (err) {
- LOGE("Error creating thread!");
+ ALOGE("Error creating thread!");
return -ENODEV;
}
return OK;
diff --git a/media/libstagefright/tests/SurfaceMediaSource_test.cpp b/media/libstagefright/tests/SurfaceMediaSource_test.cpp
index 6be5e9a..76b507f 100644
--- a/media/libstagefright/tests/SurfaceMediaSource_test.cpp
+++ b/media/libstagefright/tests/SurfaceMediaSource_test.cpp
@@ -731,7 +731,7 @@ TEST_F(SurfaceMediaSourceTest, DISABLED_EncodingFromCpuYV12BufferNpotWriteMediaS
const char *fileName = "/sdcard/outputSurfEncMSource.mp4";
int fd = open(fileName, O_RDWR | O_CREAT, 0744);
if (fd < 0) {
- LOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd);
+ ALOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd);
}
CHECK(fd >= 0);
@@ -861,7 +861,7 @@ TEST_F(SurfaceMediaSourceGLTest, EncodingFromGLRgbaSameImageEachBufNpotWrite) {
const char *fileName = "/sdcard/outputSurfEncMSourceGL.mp4";
int fd = open(fileName, O_RDWR | O_CREAT, 0744);
if (fd < 0) {
- LOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd);
+ ALOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd);
}
CHECK(fd >= 0);
@@ -904,7 +904,7 @@ TEST_F(SurfaceMediaSourceGLTest, EncodingFromGLRgbaDiffImageEachBufNpotWrite) {
const char *fileName = "/sdcard/outputSurfEncMSourceGLDiff.mp4";
int fd = open(fileName, O_RDWR | O_CREAT, 0744);
if (fd < 0) {
- LOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd);
+ ALOGE("ERROR: Could not open the the file %s, fd = %d !!", fileName, fd);
}
CHECK(fd >= 0);
diff --git a/media/libstagefright/timedtext/TimedTextPlayer.cpp b/media/libstagefright/timedtext/TimedTextPlayer.cpp
index 7c8a747..3014b0b 100644
--- a/media/libstagefright/timedtext/TimedTextPlayer.cpp
+++ b/media/libstagefright/timedtext/TimedTextPlayer.cpp
@@ -91,7 +91,7 @@ status_t TimedTextPlayer::start(uint8_t index) {
if (index >=
mTextTrackVector.size() + mTextOutOfBandVector.size()) {
- LOGE("Incorrect text track index: %d", index);
+ ALOGE("Incorrect text track index: %d", index);
return BAD_VALUE;
}
diff --git a/media/libstagefright/yuv/YUVImage.cpp b/media/libstagefright/yuv/YUVImage.cpp
index b712062..0d67c96 100644
--- a/media/libstagefright/yuv/YUVImage.cpp
+++ b/media/libstagefright/yuv/YUVImage.cpp
@@ -54,7 +54,7 @@ size_t YUVImage::bufferSize(YUVFormat yuvFormat, int32_t width, int32_t height)
// Y takes numberOfPixels bytes and U/V take numberOfPixels/4 bytes each.
numberOfBytes = (size_t)(numberOfPixels + (numberOfPixels >> 1));
} else {
- LOGE("Format not supported");
+ ALOGE("Format not supported");
}
return numberOfBytes;
}
@@ -74,7 +74,7 @@ bool YUVImage::initializeYUVPointers() {
mVdata = mYdata + numberOfPixels;
mUdata = mVdata + 1;
} else {
- LOGE("Format not supported");
+ ALOGE("Format not supported");
return false;
}
return true;
@@ -98,7 +98,7 @@ bool YUVImage::getOffsets(int32_t x, int32_t y,
*uOffset = 2*uvOffset;
*vOffset = 2*uvOffset;
} else {
- LOGE("Format not supported");
+ ALOGE("Format not supported");
return false;
}
@@ -122,7 +122,7 @@ bool YUVImage::getOffsetIncrementsPerDataRow(
*uDataOffsetIncrement = 2*uvDataOffsetIncrement;
*vDataOffsetIncrement = 2*uvDataOffsetIncrement;
} else {
- LOGE("Format not supported");
+ ALOGE("Format not supported");
return false;
}
diff --git a/media/mtp/MtpDataPacket.cpp b/media/mtp/MtpDataPacket.cpp
index cfea7e8..930f0b0 100644
--- a/media/mtp/MtpDataPacket.cpp
+++ b/media/mtp/MtpDataPacket.cpp
@@ -418,7 +418,7 @@ int MtpDataPacket::readData(struct usb_request *request, void* buffer, int lengt
// Queue a read request. Call readDataWait to wait for result
int MtpDataPacket::readDataAsync(struct usb_request *req) {
if (usb_request_queue(req)) {
- LOGE("usb_endpoint_queue failed, errno: %d", errno);
+ ALOGE("usb_endpoint_queue failed, errno: %d", errno);
return -1;
}
return 0;
diff --git a/media/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp
index 2fc6ba8..bf7795c 100644
--- a/media/mtp/MtpDevice.cpp
+++ b/media/mtp/MtpDevice.cpp
@@ -53,7 +53,7 @@ static bool isMtpDevice(uint16_t vendor, uint16_t product) {
MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
struct usb_device *device = usb_device_new(deviceName, fd);
if (!device) {
- LOGE("usb_device_new failed for %s", deviceName);
+ ALOGE("usb_device_new failed for %s", deviceName);
return NULL;
}
@@ -134,7 +134,7 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
for (int i = 0; i < 3; i++) {
ep = (struct usb_endpoint_descriptor *)usb_descriptor_iter_next(&iter);
if (!ep || ep->bDescriptorType != USB_DT_ENDPOINT) {
- LOGE("endpoints not found\n");
+ ALOGE("endpoints not found\n");
usb_device_close(device);
return NULL;
}
@@ -149,13 +149,13 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
}
}
if (!ep_in_desc || !ep_out_desc || !ep_intr_desc) {
- LOGE("endpoints not found\n");
+ ALOGE("endpoints not found\n");
usb_device_close(device);
return NULL;
}
if (usb_device_claim_interface(device, interface->bInterfaceNumber)) {
- LOGE("usb_device_claim_interface failed errno: %d\n", errno);
+ ALOGE("usb_device_claim_interface failed errno: %d\n", errno);
usb_device_close(device);
return NULL;
}
@@ -168,7 +168,7 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
}
usb_device_close(device);
- LOGE("device not found");
+ ALOGE("device not found");
return NULL;
}
@@ -260,7 +260,7 @@ void MtpDevice::print() {
property->print();
delete property;
} else {
- LOGE("could not fetch property: %s",
+ ALOGE("could not fetch property: %s",
MtpDebug::getObjectPropCodeName(prop));
}
}
@@ -584,7 +584,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle,
&& mData.readDataHeader(mRequestIn1)) {
uint32_t length = mData.getContainerLength();
if (length - MTP_CONTAINER_HEADER_SIZE != objectSize) {
- LOGE("readObject error objectSize: %d, length: %d",
+ ALOGE("readObject error objectSize: %d, length: %d",
objectSize, length);
goto fail;
}
@@ -617,7 +617,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle,
// queue up a read request
req->buffer_length = (remaining > sizeof(buffer1) ? sizeof(buffer1) : remaining);
if (mData.readDataAsync(req)) {
- LOGE("readDataAsync failed");
+ ALOGE("readDataAsync failed");
goto fail;
}
} else {
@@ -627,7 +627,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle,
if (writeBuffer) {
// write previous buffer
if (!callback(writeBuffer, offset, writeLength, clientData)) {
- LOGE("write failed");
+ ALOGE("write failed");
// wait for pending read before failing
if (req)
mData.readDataWait(mDevice);
@@ -669,7 +669,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int gro
ALOGD("readObject: %s", destPath);
int fd = ::open(destPath, O_RDWR | O_CREAT | O_TRUNC);
if (fd < 0) {
- LOGE("open failed for %s", destPath);
+ ALOGE("open failed for %s", destPath);
return false;
}
@@ -718,7 +718,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int gro
// queue up a read request
req->buffer_length = (remaining > sizeof(buffer1) ? sizeof(buffer1) : remaining);
if (mData.readDataAsync(req)) {
- LOGE("readDataAsync failed");
+ ALOGE("readDataAsync failed");
goto fail;
}
} else {
@@ -728,7 +728,7 @@ bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int gro
if (writeBuffer) {
// write previous buffer
if (write(fd, writeBuffer, writeLength) != writeLength) {
- LOGE("write failed");
+ ALOGE("write failed");
// wait for pending read before failing
if (req)
mData.readDataWait(mDevice);
diff --git a/media/mtp/MtpPacket.cpp b/media/mtp/MtpPacket.cpp
index 39815d4..dd07843 100644
--- a/media/mtp/MtpPacket.cpp
+++ b/media/mtp/MtpPacket.cpp
@@ -36,7 +36,7 @@ MtpPacket::MtpPacket(int bufferSize)
{
mBuffer = (uint8_t *)malloc(bufferSize);
if (!mBuffer) {
- LOGE("out of memory!");
+ ALOGE("out of memory!");
abort();
}
}
@@ -57,7 +57,7 @@ void MtpPacket::allocate(int length) {
int newLength = length + mAllocationIncrement;
mBuffer = (uint8_t *)realloc(mBuffer, newLength);
if (!mBuffer) {
- LOGE("out of memory!");
+ ALOGE("out of memory!");
abort();
}
mBufferSize = newLength;
@@ -134,7 +134,7 @@ void MtpPacket::setTransactionID(MtpTransactionID id) {
uint32_t MtpPacket::getParameter(int index) const {
if (index < 1 || index > 5) {
- LOGE("index %d out of range in MtpPacket::getParameter", index);
+ ALOGE("index %d out of range in MtpPacket::getParameter", index);
return 0;
}
return getUInt32(MTP_CONTAINER_PARAMETER_OFFSET + (index - 1) * sizeof(uint32_t));
@@ -142,7 +142,7 @@ uint32_t MtpPacket::getParameter(int index) const {
void MtpPacket::setParameter(int index, uint32_t value) {
if (index < 1 || index > 5) {
- LOGE("index %d out of range in MtpPacket::setParameter", index);
+ ALOGE("index %d out of range in MtpPacket::setParameter", index);
return;
}
int offset = MTP_CONTAINER_PARAMETER_OFFSET + (index - 1) * sizeof(uint32_t);
diff --git a/media/mtp/MtpProperty.cpp b/media/mtp/MtpProperty.cpp
index d06f214..64dd45b 100644
--- a/media/mtp/MtpProperty.cpp
+++ b/media/mtp/MtpProperty.cpp
@@ -91,7 +91,7 @@ MtpProperty::MtpProperty(MtpPropertyCode propCode,
mDefaultValue.u.u64 = defaultValue;
break;
default:
- LOGE("unknown type %04X in MtpProperty::MtpProperty", type);
+ ALOGE("unknown type %04X in MtpProperty::MtpProperty", type);
}
}
}
@@ -267,7 +267,7 @@ void MtpProperty::setFormRange(int min, int max, int step) {
mStepSize.u.u64 = step;
break;
default:
- LOGE("unsupported type for MtpProperty::setRange");
+ ALOGE("unsupported type for MtpProperty::setRange");
break;
}
}
@@ -306,7 +306,7 @@ void MtpProperty::setFormEnum(const int* values, int count) {
mEnumValues[i].u.u64 = value;
break;
default:
- LOGE("unsupported type for MtpProperty::setEnum");
+ ALOGE("unsupported type for MtpProperty::setEnum");
break;
}
}
@@ -402,7 +402,7 @@ void MtpProperty::print(MtpPropertyValue& value, MtpString& buffer) {
buffer.appendFormat("%s", value.str);
break;
default:
- LOGE("unsupported type for MtpProperty::print\n");
+ ALOGE("unsupported type for MtpProperty::print\n");
break;
}
}
@@ -456,7 +456,7 @@ void MtpProperty::readValue(MtpDataPacket& packet, MtpPropertyValue& value) {
value.str = strdup(stringBuffer);
break;
default:
- LOGE("unknown type %04X in MtpProperty::readValue", mType);
+ ALOGE("unknown type %04X in MtpProperty::readValue", mType);
}
}
@@ -511,7 +511,7 @@ void MtpProperty::writeValue(MtpDataPacket& packet, MtpPropertyValue& value) {
packet.putEmptyString();
break;
default:
- LOGE("unknown type %04X in MtpProperty::writeValue", mType);
+ ALOGE("unknown type %04X in MtpProperty::writeValue", mType);
}
}
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp
index 838c13e..5606187 100644
--- a/media/mtp/MtpServer.cpp
+++ b/media/mtp/MtpServer.cpp
@@ -179,7 +179,7 @@ void MtpServer::run() {
if (dataIn) {
int ret = mData.read(fd);
if (ret < 0) {
- LOGE("data read returned %d, errno: %d", ret, errno);
+ ALOGE("data read returned %d, errno: %d", ret, errno);
if (errno == ECANCELED) {
// return to top of loop and wait for next command
continue;
@@ -200,7 +200,7 @@ void MtpServer::run() {
mData.dump();
ret = mData.write(fd);
if (ret < 0) {
- LOGE("request write returned %d, errno: %d", ret, errno);
+ ALOGE("request write returned %d, errno: %d", ret, errno);
if (errno == ECANCELED) {
// return to top of loop and wait for next command
continue;
@@ -214,7 +214,7 @@ void MtpServer::run() {
ret = mResponse.write(fd);
mResponse.dump();
if (ret < 0) {
- LOGE("request write returned %d, errno: %d", ret, errno);
+ ALOGE("request write returned %d, errno: %d", ret, errno);
if (errno == ECANCELED) {
// return to top of loop and wait for next command
continue;
@@ -296,7 +296,7 @@ void MtpServer::removeEditObject(MtpObjectHandle handle) {
return;
}
}
- LOGE("ObjectEdit not found in removeEditObject");
+ ALOGE("ObjectEdit not found in removeEditObject");
}
void MtpServer::commitEdit(ObjectEdit* edit) {
@@ -314,7 +314,7 @@ bool MtpServer::handleRequest() {
if (mSendObjectHandle != kInvalidObjectHandle && operation != MTP_OPERATION_SEND_OBJECT) {
// FIXME - need to delete mSendObjectHandle from the database
- LOGE("expected SendObject after SendObjectInfo");
+ ALOGE("expected SendObject after SendObjectInfo");
mSendObjectHandle = kInvalidObjectHandle;
}
@@ -408,7 +408,7 @@ bool MtpServer::handleRequest() {
response = doEndEditObject();
break;
default:
- LOGE("got unsupported command %s", MtpDebug::getOperationCodeName(operation));
+ ALOGE("got unsupported command %s", MtpDebug::getOperationCodeName(operation));
response = MTP_RESPONSE_OPERATION_NOT_SUPPORTED;
break;
}
@@ -917,7 +917,7 @@ MtpResponseCode MtpServer::doSendObject() {
int ret, initialData;
if (mSendObjectHandle == kInvalidObjectHandle) {
- LOGE("Expected SendObjectInfo before SendObject");
+ ALOGE("Expected SendObjectInfo before SendObject");
result = MTP_RESPONSE_NO_VALID_OBJECT_INFO;
goto done;
}
@@ -984,7 +984,7 @@ static void deleteRecursive(const char* path) {
char pathbuf[PATH_MAX];
int pathLength = strlen(path);
if (pathLength >= sizeof(pathbuf) - 1) {
- LOGE("path too long: %s\n", path);
+ ALOGE("path too long: %s\n", path);
}
strcpy(pathbuf, path);
if (pathbuf[pathLength - 1] != '/') {
@@ -995,7 +995,7 @@ static void deleteRecursive(const char* path) {
DIR* dir = opendir(path);
if (!dir) {
- LOGE("opendir %s failed: %s", path, strerror(errno));
+ ALOGE("opendir %s failed: %s", path, strerror(errno));
return;
}
@@ -1010,7 +1010,7 @@ static void deleteRecursive(const char* path) {
int nameLength = strlen(name);
if (nameLength > pathRemaining) {
- LOGE("path %s/%s too long\n", path, name);
+ ALOGE("path %s/%s too long\n", path, name);
continue;
}
strcpy(fileSpot, name);
@@ -1036,7 +1036,7 @@ static void deletePath(const char* path) {
unlink(path);
}
} else {
- LOGE("deletePath stat failed for %s: %s", path, strerror(errno));
+ ALOGE("deletePath stat failed for %s: %s", path, strerror(errno));
}
}
@@ -1098,7 +1098,7 @@ MtpResponseCode MtpServer::doSendPartialObject() {
ObjectEdit* edit = getEditObject(handle);
if (!edit) {
- LOGE("object not open for edit in doSendPartialObject");
+ ALOGE("object not open for edit in doSendPartialObject");
return MTP_RESPONSE_GENERAL_ERROR;
}
@@ -1155,7 +1155,7 @@ MtpResponseCode MtpServer::doTruncateObject() {
MtpObjectHandle handle = mRequest.getParameter(1);
ObjectEdit* edit = getEditObject(handle);
if (!edit) {
- LOGE("object not open for edit in doTruncateObject");
+ ALOGE("object not open for edit in doTruncateObject");
return MTP_RESPONSE_GENERAL_ERROR;
}
@@ -1173,7 +1173,7 @@ MtpResponseCode MtpServer::doTruncateObject() {
MtpResponseCode MtpServer::doBeginEditObject() {
MtpObjectHandle handle = mRequest.getParameter(1);
if (getEditObject(handle)) {
- LOGE("object already open for edit in doBeginEditObject");
+ ALOGE("object already open for edit in doBeginEditObject");
return MTP_RESPONSE_GENERAL_ERROR;
}
@@ -1186,7 +1186,7 @@ MtpResponseCode MtpServer::doBeginEditObject() {
int fd = open((const char *)path, O_RDWR | O_EXCL);
if (fd < 0) {
- LOGE("open failed for %s in doBeginEditObject (%d)", (const char *)path, errno);
+ ALOGE("open failed for %s in doBeginEditObject (%d)", (const char *)path, errno);
return MTP_RESPONSE_GENERAL_ERROR;
}
@@ -1198,7 +1198,7 @@ MtpResponseCode MtpServer::doEndEditObject() {
MtpObjectHandle handle = mRequest.getParameter(1);
ObjectEdit* edit = getEditObject(handle);
if (!edit) {
- LOGE("object not open for edit in doEndEditObject");
+ ALOGE("object not open for edit in doEndEditObject");
return MTP_RESPONSE_GENERAL_ERROR;
}
diff --git a/media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp b/media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp
index 2735a55..42df66c 100644
--- a/media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp
+++ b/media/tests/omxjpegdecoder/omx_jpeg_decoder.cpp
@@ -141,7 +141,7 @@ bool OmxJpegImageDecoder::decodeSource(sp<MediaSource> decoder,
const sp<MediaSource>& source, SkBitmap* bm) {
status_t rt = decoder->start();
if (rt != OK) {
- LOGE("Cannot start OMX Decoder!");
+ ALOGE("Cannot start OMX Decoder!");
return false;
}
int64_t startTime = getNowUs();
diff --git a/native/android/looper.cpp b/native/android/looper.cpp
index 615493f..455e950 100644
--- a/native/android/looper.cpp
+++ b/native/android/looper.cpp
@@ -44,7 +44,7 @@ void ALooper_release(ALooper* looper) {
int ALooper_pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outData) {
sp<Looper> looper = Looper::getForThread();
if (looper == NULL) {
- LOGE("ALooper_pollOnce: No looper for this thread!");
+ ALOGE("ALooper_pollOnce: No looper for this thread!");
return ALOOPER_POLL_ERROR;
}
@@ -55,7 +55,7 @@ int ALooper_pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outDa
int ALooper_pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outData) {
sp<Looper> looper = Looper::getForThread();
if (looper == NULL) {
- LOGE("ALooper_pollAll: No looper for this thread!");
+ ALOGE("ALooper_pollAll: No looper for this thread!");
return ALOOPER_POLL_ERROR;
}
diff --git a/native/android/storage_manager.cpp b/native/android/storage_manager.cpp
index 5e05045..f2f36b62 100644
--- a/native/android/storage_manager.cpp
+++ b/native/android/storage_manager.cpp
@@ -87,13 +87,13 @@ public:
bool initialize() {
sp<IServiceManager> sm = defaultServiceManager();
if (sm == NULL) {
- LOGE("Couldn't get default ServiceManager\n");
+ ALOGE("Couldn't get default ServiceManager\n");
return false;
}
mMountService = interface_cast<IMountService>(sm->getService(String16("mount")));
if (mMountService == NULL) {
- LOGE("Couldn't get connection to MountService\n");
+ ALOGE("Couldn't get connection to MountService\n");
return false;
}
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index 9ceb5e9..eb55bee 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -184,7 +184,7 @@ egl_surface_t::~egl_surface_t()
free(depth.data);
}
bool egl_surface_t::isValid() const {
- LOGE_IF(magic != MAGIC, "invalid EGLSurface (%p)", this);
+ ALOGE_IF(magic != MAGIC, "invalid EGLSurface (%p)", this);
return magic == MAGIC;
}
@@ -397,7 +397,7 @@ EGLBoolean egl_window_surface_v2_t::connect()
// pin the buffer down
if (lock(buffer, GRALLOC_USAGE_SW_READ_OFTEN |
GRALLOC_USAGE_SW_WRITE_OFTEN, &bits) != NO_ERROR) {
- LOGE("connect() failed to lock buffer %p (%ux%u)",
+ ALOGE("connect() failed to lock buffer %p (%ux%u)",
buffer, buffer->width, buffer->height);
return setError(EGL_BAD_ACCESS, EGL_FALSE);
// FIXME: we should make sure we're not accessing the buffer anymore
@@ -552,7 +552,7 @@ EGLBoolean egl_window_surface_v2_t::swapBuffers()
// finally pin the buffer down
if (lock(buffer, GRALLOC_USAGE_SW_READ_OFTEN |
GRALLOC_USAGE_SW_WRITE_OFTEN, &bits) != NO_ERROR) {
- LOGE("eglSwapBuffers() failed to lock buffer %p (%ux%u)",
+ ALOGE("eglSwapBuffers() failed to lock buffer %p (%ux%u)",
buffer, buffer->width, buffer->height);
return setError(EGL_BAD_ACCESS, EGL_FALSE);
// FIXME: we should make sure we're not accessing the buffer anymore
@@ -721,7 +721,7 @@ egl_pbuffer_surface_t::egl_pbuffer_surface_t(EGLDisplay dpy,
case GGL_PIXEL_FORMAT_RGBA_8888: size *= 4; break;
case GGL_PIXEL_FORMAT_RGBX_8888: size *= 4; break;
default:
- LOGE("incompatible pixel format for pbuffer (format=%d)", f);
+ ALOGE("incompatible pixel format for pbuffer (format=%d)", f);
pbuffer.data = 0;
break;
}
diff --git a/opengl/libagl/mipmap.cpp b/opengl/libagl/mipmap.cpp
index ccd77b7..e142a58 100644
--- a/opengl/libagl/mipmap.cpp
+++ b/opengl/libagl/mipmap.cpp
@@ -174,7 +174,7 @@ status_t buildAPyramid(ogles_context_t* c, EGLTextureObject* tex)
}
}
} else {
- LOGE("Unsupported format (%d)", base->format);
+ ALOGE("Unsupported format (%d)", base->format);
return BAD_TYPE;
}
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp
index a23955f..160abc2 100644
--- a/opengl/libs/EGL/Loader.cpp
+++ b/opengl/libs/EGL/Loader.cpp
@@ -278,7 +278,7 @@ void *Loader::load_driver(const char* kind, const char *tag,
void* dso = dlopen(driver_absolute_path, RTLD_NOW | RTLD_LOCAL);
if (dso == 0) {
const char* err = dlerror();
- LOGE("load_driver(%s): %s", driver_absolute_path, err?err:"unknown");
+ ALOGE("load_driver(%s): %s", driver_absolute_path, err?err:"unknown");
return 0;
}
@@ -287,7 +287,7 @@ void *Loader::load_driver(const char* kind, const char *tag,
if (mask & EGL) {
getProcAddress = (getProcAddressType)dlsym(dso, "eglGetProcAddress");
- LOGE_IF(!getProcAddress,
+ ALOGE_IF(!getProcAddress,
"can't find eglGetProcAddress() in %s", driver_absolute_path);
egl_t* egl = &cnx->egl;
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index e30e84a..60baeaa 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -146,7 +146,7 @@ void setGLHooksThreadSpecific(gl_hooks_t const *value) {
static int gl_no_context() {
if (egl_tls_t::logNoContextCall()) {
- LOGE("call to OpenGL ES API with no current context "
+ ALOGE("call to OpenGL ES API with no current context "
"(logged once per thread)");
char value[PROPERTY_VALUE_MAX];
property_get("debug.egl.callstack", value, "0");
@@ -292,7 +292,7 @@ EGLBoolean egl_init_drivers() {
}
void gl_unimplemented() {
- LOGE("called unimplemented OpenGL ES API");
+ ALOGE("called unimplemented OpenGL ES API");
}
// ----------------------------------------------------------------------------
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 2b0ed5d..d5e9cb8 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -353,7 +353,7 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config,
EGLint format;
if (native_window_api_connect(window, NATIVE_WINDOW_API_EGL) != OK) {
- LOGE("EGLNativeWindowType %p already connected to another API",
+ ALOGE("EGLNativeWindowType %p already connected to another API",
window);
return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
}
@@ -364,7 +364,7 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config,
if (format != 0) {
int err = native_window_set_buffers_format(window, format);
if (err != 0) {
- LOGE("error setting native window pixel format: %s (%d)",
+ ALOGE("error setting native window pixel format: %s (%d)",
strerror(-err), err);
native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL);
return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
@@ -670,7 +670,7 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw,
egl_tls_t::setContext(EGL_NO_CONTEXT);
}
} else {
- // this will LOGE the error
+ // this will ALOGE the error
result = setError(c->cnx->egl.eglGetError(), EGL_FALSE);
}
return result;
@@ -882,7 +882,7 @@ __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname)
addr = sGLExtentionMap.valueFor(name);
const int slot = sGLExtentionSlot;
- LOGE_IF(slot >= MAX_NUMBER_OF_GL_EXTENSIONS,
+ ALOGE_IF(slot >= MAX_NUMBER_OF_GL_EXTENSIONS,
"no more slots for eglGetProcAddress(\"%s\")",
procname);
diff --git a/opengl/libs/EGL/egl_cache.cpp b/opengl/libs/EGL/egl_cache.cpp
index ae314b4..7fd6519 100644
--- a/opengl/libs/EGL/egl_cache.cpp
+++ b/opengl/libs/EGL/egl_cache.cpp
@@ -101,7 +101,7 @@ void egl_cache_t::initialize(egl_display_t *display) {
cnx->egl.eglGetProcAddress(
"eglSetBlobCacheFuncsANDROID"));
if (eglSetBlobCacheFuncsANDROID == NULL) {
- LOGE("EGL_ANDROID_blob_cache advertised by display %d, "
+ ALOGE("EGL_ANDROID_blob_cache advertised by display %d, "
"but unable to get eglSetBlobCacheFuncsANDROID", i);
continue;
}
@@ -110,7 +110,7 @@ void egl_cache_t::initialize(egl_display_t *display) {
android::setBlob, android::getBlob);
EGLint err = cnx->egl.eglGetError();
if (err != EGL_SUCCESS) {
- LOGE("eglSetBlobCacheFuncsANDROID resulted in an error: "
+ ALOGE("eglSetBlobCacheFuncsANDROID resulted in an error: "
"%#x", err);
}
}
@@ -226,7 +226,7 @@ void egl_cache_t::saveBlobCacheLocked() {
// The file exists, delete it and try again.
if (unlink(fname) == -1) {
// No point in retrying if the unlink failed.
- LOGE("error unlinking cache file %s: %s (%d)", fname,
+ ALOGE("error unlinking cache file %s: %s (%d)", fname,
strerror(errno), errno);
return;
}
@@ -234,7 +234,7 @@ void egl_cache_t::saveBlobCacheLocked() {
fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0);
}
if (fd == -1) {
- LOGE("error creating cache file %s: %s (%d)", fname,
+ ALOGE("error creating cache file %s: %s (%d)", fname,
strerror(errno), errno);
return;
}
@@ -242,7 +242,7 @@ void egl_cache_t::saveBlobCacheLocked() {
size_t fileSize = headerSize + cacheSize;
if (ftruncate(fd, fileSize) == -1) {
- LOGE("error setting cache file size: %s (%d)", strerror(errno),
+ ALOGE("error setting cache file size: %s (%d)", strerror(errno),
errno);
close(fd);
unlink(fname);
@@ -252,7 +252,7 @@ void egl_cache_t::saveBlobCacheLocked() {
uint8_t* buf = reinterpret_cast<uint8_t*>(mmap(NULL, fileSize,
PROT_WRITE, MAP_SHARED, fd, 0));
if (buf == MAP_FAILED) {
- LOGE("error mmaping cache file: %s (%d)", strerror(errno),
+ ALOGE("error mmaping cache file: %s (%d)", strerror(errno),
errno);
close(fd);
unlink(fname);
@@ -262,7 +262,7 @@ void egl_cache_t::saveBlobCacheLocked() {
status_t err = mBlobCache->flatten(buf + headerSize, cacheSize, NULL,
0);
if (err != OK) {
- LOGE("error writing cache contents: %s (%d)", strerror(-err),
+ ALOGE("error writing cache contents: %s (%d)", strerror(-err),
-err);
munmap(buf, fileSize);
close(fd);
@@ -288,7 +288,7 @@ void egl_cache_t::loadBlobCacheLocked() {
int fd = open(mFilename.string(), O_RDONLY, 0);
if (fd == -1) {
if (errno != ENOENT) {
- LOGE("error opening cache file %s: %s (%d)", mFilename.string(),
+ ALOGE("error opening cache file %s: %s (%d)", mFilename.string(),
strerror(errno), errno);
}
return;
@@ -296,7 +296,7 @@ void egl_cache_t::loadBlobCacheLocked() {
struct stat statBuf;
if (fstat(fd, &statBuf) == -1) {
- LOGE("error stat'ing cache file: %s (%d)", strerror(errno), errno);
+ ALOGE("error stat'ing cache file: %s (%d)", strerror(errno), errno);
close(fd);
return;
}
@@ -304,7 +304,7 @@ void egl_cache_t::loadBlobCacheLocked() {
// Sanity check the size before trying to mmap it.
size_t fileSize = statBuf.st_size;
if (fileSize > maxTotalSize * 2) {
- LOGE("cache file is too large: %#llx", statBuf.st_size);
+ ALOGE("cache file is too large: %#llx", statBuf.st_size);
close(fd);
return;
}
@@ -312,7 +312,7 @@ void egl_cache_t::loadBlobCacheLocked() {
uint8_t* buf = reinterpret_cast<uint8_t*>(mmap(NULL, fileSize,
PROT_READ, MAP_PRIVATE, fd, 0));
if (buf == MAP_FAILED) {
- LOGE("error mmaping cache file: %s (%d)", strerror(errno),
+ ALOGE("error mmaping cache file: %s (%d)", strerror(errno),
errno);
close(fd);
return;
@@ -321,13 +321,13 @@ void egl_cache_t::loadBlobCacheLocked() {
// Check the file magic and CRC
size_t cacheSize = fileSize - headerSize;
if (memcmp(buf, cacheFileMagic, 4) != 0) {
- LOGE("cache file has bad mojo");
+ ALOGE("cache file has bad mojo");
close(fd);
return;
}
uint32_t* crc = reinterpret_cast<uint32_t*>(buf + 4);
if (crc32c(buf + headerSize, cacheSize) != *crc) {
- LOGE("cache file failed CRC check");
+ ALOGE("cache file failed CRC check");
close(fd);
return;
}
@@ -335,7 +335,7 @@ void egl_cache_t::loadBlobCacheLocked() {
status_t err = mBlobCache->unflatten(buf + headerSize, cacheSize, NULL,
0);
if (err != OK) {
- LOGE("error reading cache contents: %s (%d)", strerror(-err),
+ ALOGE("error reading cache contents: %s (%d)", strerror(-err),
-err);
munmap(buf, fileSize);
close(fd);
diff --git a/opengl/libs/EGL/egl_object.cpp b/opengl/libs/EGL/egl_object.cpp
index 20cdc7e..26e8c3e 100644
--- a/opengl/libs/EGL/egl_object.cpp
+++ b/opengl/libs/EGL/egl_object.cpp
@@ -45,7 +45,7 @@ void egl_object_t::terminate() {
display->removeObject(this);
if (decRef() == 1) {
// shouldn't happen because this is called from LocalRef
- LOGE("egl_object_t::terminate() removed the last reference!");
+ ALOGE("egl_object_t::terminate() removed the last reference!");
}
}
diff --git a/opengl/libs/EGL/egl_object.h b/opengl/libs/EGL/egl_object.h
index 64737c8..7106fa5 100644
--- a/opengl/libs/EGL/egl_object.h
+++ b/opengl/libs/EGL/egl_object.h
@@ -110,7 +110,7 @@ void egl_object_t::LocalRef<N,T>::release() const {
if (ref) {
if (ref->decRef() == 1) {
// shouldn't happen because this is called from LocalRef
- LOGE("LocalRef::release() removed the last reference!");
+ ALOGE("LocalRef::release() removed the last reference!");
}
}
}
diff --git a/opengl/libs/EGL/egl_tls.cpp b/opengl/libs/EGL/egl_tls.cpp
index b341ddb..cf144ce 100644
--- a/opengl/libs/EGL/egl_tls.cpp
+++ b/opengl/libs/EGL/egl_tls.cpp
@@ -73,7 +73,7 @@ void egl_tls_t::setErrorEtcImpl(
egl_tls_t* tls = getTLS();
if (tls->error != error) {
if (!quiet) {
- LOGE("%s:%d error %x (%s)",
+ ALOGE("%s:%d error %x (%s)",
caller, line, error, egl_strerror(error));
char value[PROPERTY_VALUE_MAX];
property_get("debug.egl.callstack", value, "0");
diff --git a/opengl/libs/GLES2_dbg/src/dbgcontext.cpp b/opengl/libs/GLES2_dbg/src/dbgcontext.cpp
index e525d02..7bbaa18 100644
--- a/opengl/libs/GLES2_dbg/src/dbgcontext.cpp
+++ b/opengl/libs/GLES2_dbg/src/dbgcontext.cpp
@@ -100,7 +100,7 @@ unsigned GetBytesPerPixel(const GLenum format, const GLenum type)
case GL_UNSIGNED_BYTE:
break;
default:
- LOGE("GetBytesPerPixel: unknown type %x", type);
+ ALOGE("GetBytesPerPixel: unknown type %x", type);
}
switch (format) {
@@ -115,7 +115,7 @@ unsigned GetBytesPerPixel(const GLenum format, const GLenum type)
case 0x80E1: // GL_BGRA_EXT
return 4;
default:
- LOGE("GetBytesPerPixel: unknown format %x", format);
+ ALOGE("GetBytesPerPixel: unknown format %x", format);
}
return 1; // in doubt...
diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp
index ee29f12..2d31a35 100644
--- a/opengl/libs/GLES_CM/gl.cpp
+++ b/opengl/libs/GLES_CM/gl.cpp
@@ -132,7 +132,7 @@ GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
#define CHECK_GL_ERRORS(_api) \
do { GLint err = glGetError(); \
- LOGE_IF(err != GL_NO_ERROR, "%s failed (0x%04X)", #_api, err); \
+ ALOGE_IF(err != GL_NO_ERROR, "%s failed (0x%04X)", #_api, err); \
} while(false);
#else
diff --git a/opengl/tests/gl2_jni/jni/gl_code.cpp b/opengl/tests/gl2_jni/jni/gl_code.cpp
index f7e7f8d..fa6bd93 100644
--- a/opengl/tests/gl2_jni/jni/gl_code.cpp
+++ b/opengl/tests/gl2_jni/jni/gl_code.cpp
@@ -48,7 +48,7 @@ GLuint loadShader(GLenum shaderType, const char* pSource) {
char* buf = (char*) malloc(infoLen);
if (buf) {
glGetShaderInfoLog(shader, infoLen, NULL, buf);
- LOGE("Could not compile shader %d:\n%s\n",
+ ALOGE("Could not compile shader %d:\n%s\n",
shaderType, buf);
free(buf);
}
@@ -87,7 +87,7 @@ GLuint createProgram(const char* pVertexSource, const char* pFragmentSource) {
char* buf = (char*) malloc(bufLength);
if (buf) {
glGetProgramInfoLog(program, bufLength, NULL, buf);
- LOGE("Could not link program:\n%s\n", buf);
+ ALOGE("Could not link program:\n%s\n", buf);
free(buf);
}
}
@@ -110,7 +110,7 @@ bool setupGraphics(int w, int h) {
ALOGI("setupGraphics(%d, %d)", w, h);
gProgram = createProgram(gVertexShader, gFragmentShader);
if (!gProgram) {
- LOGE("Could not create program.");
+ ALOGE("Could not create program.");
return false;
}
gvPositionHandle = glGetAttribLocation(gProgram, "vPosition");
diff --git a/opengl/tests/gl_perf/fill_common.cpp b/opengl/tests/gl_perf/fill_common.cpp
index 2a425f7..389381f 100644
--- a/opengl/tests/gl_perf/fill_common.cpp
+++ b/opengl/tests/gl_perf/fill_common.cpp
@@ -26,7 +26,7 @@ static uint32_t gHeight = 0;
static void checkGlError(const char* op) {
for (GLint error = glGetError(); error; error
= glGetError()) {
- LOGE("after %s() glError (0x%x)\n", op, error);
+ ALOGE("after %s() glError (0x%x)\n", op, error);
}
}
@@ -44,7 +44,7 @@ GLuint loadShader(GLenum shaderType, const char* pSource) {
char* buf = (char*) malloc(infoLen);
if (buf) {
glGetShaderInfoLog(shader, infoLen, NULL, buf);
- LOGE("Could not compile shader %d:\n%s\n", shaderType, buf);
+ ALOGE("Could not compile shader %d:\n%s\n", shaderType, buf);
free(buf);
}
glDeleteShader(shader);
@@ -94,7 +94,7 @@ GLuint createProgram(const char* pVertexSource, const char* pFragmentSource) {
char* buf = (char*) malloc(bufLength);
if (buf) {
glGetProgramInfoLog(program, bufLength, NULL, buf);
- LOGE("Could not link program:\n%s\n", buf);
+ ALOGE("Could not link program:\n%s\n", buf);
free(buf);
}
}
diff --git a/opengl/tests/gl_perfapp/jni/gl_code.cpp b/opengl/tests/gl_perfapp/jni/gl_code.cpp
index c8e4ad5..2f04183 100644
--- a/opengl/tests/gl_perfapp/jni/gl_code.cpp
+++ b/opengl/tests/gl_perfapp/jni/gl_code.cpp
@@ -81,7 +81,7 @@ JNIEXPORT void JNICALL Java_com_android_glperf_GLPerfLib_init(JNIEnv * env, jobj
ALOGI("Writing to: %s\n",fileName);
fOut = fopen(fileName, "w");
if (fOut == NULL) {
- LOGE("Could not open: %s\n", fileName);
+ ALOGE("Could not open: %s\n", fileName);
}
ALOGI("\nvarColor, texCount, modulate, extraMath, texSize, blend, Mpps, DC60\n");
diff --git a/opengl/tests/gldual/jni/gl_code.cpp b/opengl/tests/gldual/jni/gl_code.cpp
index 7ba0571..22867ed 100644
--- a/opengl/tests/gldual/jni/gl_code.cpp
+++ b/opengl/tests/gldual/jni/gl_code.cpp
@@ -48,7 +48,7 @@ GLuint loadShader(GLenum shaderType, const char* pSource) {
char* buf = (char*) malloc(infoLen);
if (buf) {
glGetShaderInfoLog(shader, infoLen, NULL, buf);
- LOGE("Could not compile shader %d:\n%s\n",
+ ALOGE("Could not compile shader %d:\n%s\n",
shaderType, buf);
free(buf);
}
@@ -87,7 +87,7 @@ GLuint createProgram(const char* pVertexSource, const char* pFragmentSource) {
char* buf = (char*) malloc(bufLength);
if (buf) {
glGetProgramInfoLog(program, bufLength, NULL, buf);
- LOGE("Could not link program:\n%s\n", buf);
+ ALOGE("Could not link program:\n%s\n", buf);
free(buf);
}
}
@@ -110,7 +110,7 @@ bool setupGraphics(int w, int h) {
ALOGI("setupGraphics(%d, %d)", w, h);
gProgram = createProgram(gVertexShader, gFragmentShader);
if (!gProgram) {
- LOGE("Could not create program.");
+ ALOGE("Could not create program.");
return false;
}
gvPositionHandle = glGetAttribLocation(gProgram, "vPosition");
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 132a922..30f8e12 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");
}
}
@@ -3224,7 +3224,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;
}
@@ -3318,7 +3318,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);
@@ -3354,7 +3354,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;
@@ -4366,7 +4366,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
@@ -4456,7 +4456,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;
}
@@ -4612,7 +4612,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
@@ -5531,7 +5531,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;
}
@@ -6814,7 +6814,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 1cbfac1..dcb0b13 100644
--- a/services/audioflinger/AudioMixer.cpp
+++ b/services/audioflinger/AudioMixer.cpp
@@ -1082,7 +1082,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 3e64db0..6333bd8 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;
}
@@ -112,7 +112,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);
}
}
@@ -148,13 +148,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;
}
@@ -192,7 +192,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;
}
@@ -263,7 +263,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;
}
@@ -298,7 +298,7 @@ MediaPlayer* CameraService::newMediaPlayer(const char *file) {
mp->setAudioStreamType(mAudioStreamType);
mp->prepare();
} else {
- LOGE("Failed to load CameraService sounds: %s", file);
+ ALOGE("Failed to load CameraService sounds: %s", file);
return NULL;
}
return mp;
@@ -399,7 +399,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;
@@ -429,7 +429,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;
@@ -536,7 +536,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;
}
@@ -634,7 +634,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();
@@ -686,7 +686,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;
}
@@ -780,7 +780,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;
}
@@ -841,7 +841,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;
}
}
@@ -936,12 +936,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;
}
@@ -999,7 +999,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;
}
@@ -1032,7 +1032,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;
}
@@ -1187,7 +1187,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;
}
@@ -1197,7 +1197,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;
}
@@ -1223,7 +1223,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;
diff --git a/tools/aapt/ZipFile.cpp b/tools/aapt/ZipFile.cpp
index 6428e9d..0705be3 100644
--- a/tools/aapt/ZipFile.cpp
+++ b/tools/aapt/ZipFile.cpp
@@ -780,7 +780,7 @@ status_t ZipFile::compressFpToFp(FILE* dstFp, FILE* srcFp,
if (zerr != Z_OK) {
result = UNKNOWN_ERROR;
if (zerr == Z_VERSION_ERROR) {
- LOGE("Installed zlib is not compatible with linked version (%s)\n",
+ ALOGE("Installed zlib is not compatible with linked version (%s)\n",
ZLIB_VERSION);
} else {
ALOGD("Call to deflateInit2 failed (zerr=%d)\n", zerr);
@@ -1019,7 +1019,7 @@ status_t ZipFile::crunchArchive(void)
pEntry->getLFHOffset(), span);
if (result != NO_ERROR) {
/* this is why you use a temp file */
- LOGE("error during crunch - archive is toast\n");
+ ALOGE("error during crunch - archive is toast\n");
return result;
}
diff --git a/voip/jni/rtp/AudioGroup.cpp b/voip/jni/rtp/AudioGroup.cpp
index 8f968ff..4db5738 100644
--- a/voip/jni/rtp/AudioGroup.cpp
+++ b/voip/jni/rtp/AudioGroup.cpp
@@ -510,7 +510,7 @@ private:
bool start()
{
if (run("Network", ANDROID_PRIORITY_AUDIO) != NO_ERROR) {
- LOGE("cannot start network thread");
+ ALOGE("cannot start network thread");
return false;
}
return true;
@@ -530,7 +530,7 @@ private:
bool start()
{
if (run("Device", ANDROID_PRIORITY_AUDIO) != NO_ERROR) {
- LOGE("cannot start device thread");
+ ALOGE("cannot start device thread");
return false;
}
return true;
@@ -573,7 +573,7 @@ bool AudioGroup::set(int sampleRate, int sampleCount)
{
mEventQueue = epoll_create(2);
if (mEventQueue == -1) {
- LOGE("epoll_create: %s", strerror(errno));
+ ALOGE("epoll_create: %s", strerror(errno));
return false;
}
@@ -583,7 +583,7 @@ bool AudioGroup::set(int sampleRate, int sampleCount)
// Create device socket.
int pair[2];
if (socketpair(AF_UNIX, SOCK_DGRAM, 0, pair)) {
- LOGE("socketpair: %s", strerror(errno));
+ ALOGE("socketpair: %s", strerror(errno));
return false;
}
mDeviceSocket = pair[0];
@@ -593,7 +593,7 @@ bool AudioGroup::set(int sampleRate, int sampleCount)
if (!mChain->set(AudioStream::NORMAL, pair[1], NULL, NULL,
sampleRate, sampleCount, -1, -1)) {
close(pair[1]);
- LOGE("cannot initialize device stream");
+ ALOGE("cannot initialize device stream");
return false;
}
@@ -602,7 +602,7 @@ bool AudioGroup::set(int sampleRate, int sampleCount)
tv.tv_sec = 0;
tv.tv_usec = 1000 * sampleCount / sampleRate * 500;
if (setsockopt(pair[0], SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv))) {
- LOGE("setsockopt: %s", strerror(errno));
+ ALOGE("setsockopt: %s", strerror(errno));
return false;
}
@@ -611,7 +611,7 @@ bool AudioGroup::set(int sampleRate, int sampleCount)
event.events = EPOLLIN;
event.data.ptr = mChain;
if (epoll_ctl(mEventQueue, EPOLL_CTL_ADD, pair[1], &event)) {
- LOGE("epoll_ctl: %s", strerror(errno));
+ ALOGE("epoll_ctl: %s", strerror(errno));
return false;
}
@@ -675,7 +675,7 @@ bool AudioGroup::add(AudioStream *stream)
event.events = EPOLLIN;
event.data.ptr = stream;
if (epoll_ctl(mEventQueue, EPOLL_CTL_ADD, stream->mSocket, &event)) {
- LOGE("epoll_ctl: %s", strerror(errno));
+ ALOGE("epoll_ctl: %s", strerror(errno));
return false;
}
@@ -699,7 +699,7 @@ bool AudioGroup::remove(int socket)
AudioStream *target = stream->mNext;
if (target->mSocket == socket) {
if (epoll_ctl(mEventQueue, EPOLL_CTL_DEL, socket, NULL)) {
- LOGE("epoll_ctl: %s", strerror(errno));
+ ALOGE("epoll_ctl: %s", strerror(errno));
return false;
}
stream->mNext = target->mNext;
@@ -749,7 +749,7 @@ bool AudioGroup::NetworkThread::threadLoop()
epoll_event events[count];
count = epoll_wait(mGroup->mEventQueue, events, count, deadline);
if (count == -1) {
- LOGE("epoll_wait: %s", strerror(errno));
+ ALOGE("epoll_wait: %s", strerror(errno));
return false;
}
for (int i = 0; i < count; ++i) {
@@ -792,7 +792,7 @@ bool AudioGroup::DeviceThread::threadLoop()
sampleRate) != NO_ERROR || output <= 0 ||
AudioRecord::getMinFrameCount(&input, sampleRate,
AUDIO_FORMAT_PCM_16_BIT, 1) != NO_ERROR || input <= 0) {
- LOGE("cannot compute frame count");
+ ALOGE("cannot compute frame count");
return false;
}
ALOGD("reported frame count: output %d, input %d", output, input);
@@ -812,7 +812,7 @@ bool AudioGroup::DeviceThread::threadLoop()
AUDIO_CHANNEL_OUT_MONO, output) != NO_ERROR || record.set(
AUDIO_SOURCE_VOICE_COMMUNICATION, sampleRate, AUDIO_FORMAT_PCM_16_BIT,
AUDIO_CHANNEL_IN_MONO, input) != NO_ERROR) {
- LOGE("cannot initialize audio device");
+ ALOGE("cannot initialize audio device");
return false;
}
ALOGD("latency: output %d, input %d", track.latency(), record.latency());
@@ -884,7 +884,7 @@ bool AudioGroup::DeviceThread::threadLoop()
toWrite -= buffer.frameCount;
track.releaseBuffer(&buffer);
} else if (status != TIMED_OUT && status != WOULD_BLOCK) {
- LOGE("cannot write to AudioTrack");
+ ALOGE("cannot write to AudioTrack");
goto exit;
}
}
@@ -900,7 +900,7 @@ bool AudioGroup::DeviceThread::threadLoop()
toRead -= buffer.frameCount;
record.releaseBuffer(&buffer);
} else if (status != TIMED_OUT && status != WOULD_BLOCK) {
- LOGE("cannot read from AudioRecord");
+ ALOGE("cannot read from AudioRecord");
goto exit;
}
}
@@ -1051,7 +1051,7 @@ int registerAudioGroup(JNIEnv *env)
{
gRandom = open("/dev/urandom", O_RDONLY);
if (gRandom == -1) {
- LOGE("urandom: %s", strerror(errno));
+ ALOGE("urandom: %s", strerror(errno));
return -1;
}
@@ -1060,7 +1060,7 @@ int registerAudioGroup(JNIEnv *env)
(gNative = env->GetFieldID(clazz, "mNative", "I")) == NULL ||
(gMode = env->GetFieldID(clazz, "mMode", "I")) == NULL ||
env->RegisterNatives(clazz, gMethods, NELEM(gMethods)) < 0) {
- LOGE("JNI registration failed");
+ ALOGE("JNI registration failed");
return -1;
}
return 0;
diff --git a/voip/jni/rtp/RtpStream.cpp b/voip/jni/rtp/RtpStream.cpp
index f5efc17..6540099 100644
--- a/voip/jni/rtp/RtpStream.cpp
+++ b/voip/jni/rtp/RtpStream.cpp
@@ -116,7 +116,7 @@ int registerRtpStream(JNIEnv *env)
if ((clazz = env->FindClass("android/net/rtp/RtpStream")) == NULL ||
(gNative = env->GetFieldID(clazz, "mNative", "I")) == NULL ||
env->RegisterNatives(clazz, gMethods, NELEM(gMethods)) < 0) {
- LOGE("JNI registration failed");
+ ALOGE("JNI registration failed");
return -1;
}
return 0;