Loading Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ LOCAL_SRC_FILES += \ core/java/android/app/IWallpaperService.aidl \ core/java/android/app/IWallpaperServiceCallback.aidl \ core/java/android/backup/IBackupManager.aidl \ core/java/android/backup/IRestoreObserver.aidl \ core/java/android/backup/IRestoreSession.aidl \ core/java/android/bluetooth/IBluetoothA2dp.aidl \ core/java/android/bluetooth/IBluetoothDevice.aidl \ Loading api/current.xml +311 −100 Original line number Diff line number Diff line Loading @@ -3496,72 +3496,6 @@ visibility="public" > </field> <field name="donut_resource_pad23" type="int" transient="false" volatile="false" value="16843401" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad24" type="int" transient="false" volatile="false" value="16843400" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad25" type="int" transient="false" volatile="false" value="16843399" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad26" type="int" transient="false" volatile="false" value="16843398" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad27" type="int" transient="false" volatile="false" value="16843397" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad28" type="int" transient="false" volatile="false" value="16843396" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad3" type="int" transient="false" Loading Loading @@ -5388,6 +5322,17 @@ visibility="public" > </field> <field name="largeScreens" type="int" transient="false" volatile="false" value="16843398" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="launchMode" type="int" transient="false" Loading Loading @@ -6268,6 +6213,17 @@ visibility="public" > </field> <field name="normalScreens" type="int" transient="false" volatile="false" value="16843397" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="numColumns" type="int" transient="false" Loading Loading @@ -6818,6 +6774,17 @@ visibility="public" > </field> <field name="progressBarStyleInverse" type="int" transient="false" volatile="false" value="16843399" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="progressBarStyleLarge" type="int" transient="false" Loading @@ -6829,6 +6796,17 @@ visibility="public" > </field> <field name="progressBarStyleLargeInverse" type="int" transient="false" volatile="false" value="16843401" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="progressBarStyleSmall" type="int" transient="false" Loading @@ -6840,6 +6818,17 @@ visibility="public" > </field> <field name="progressBarStyleSmallInverse" type="int" transient="false" volatile="false" value="16843400" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="progressBarStyleSmallTitle" type="int" transient="false" Loading Loading @@ -7654,6 +7643,17 @@ visibility="public" > </field> <field name="smallScreens" type="int" transient="false" volatile="false" value="16843396" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="smoothScrollbar" type="int" transient="false" Loading Loading @@ -15255,6 +15255,17 @@ visibility="public" > </field> <field name="Widget_ProgressBar_Inverse" type="int" transient="false" volatile="false" value="16973915" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="Widget_ProgressBar_Large" type="int" transient="false" Loading @@ -15266,6 +15277,17 @@ visibility="public" > </field> <field name="Widget_ProgressBar_Large_Inverse" type="int" transient="false" volatile="false" value="16973916" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="Widget_ProgressBar_Small" type="int" transient="false" Loading @@ -15277,6 +15299,17 @@ visibility="public" > </field> <field name="Widget_ProgressBar_Small_Inverse" type="int" transient="false" volatile="false" value="16973917" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="Widget_RatingBar" type="int" transient="false" Loading Loading @@ -15508,39 +15541,6 @@ visibility="public" > </field> <field name="donut_resource_pad20" type="int" transient="false" volatile="false" value="16973917" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad21" type="int" transient="false" volatile="false" value="16973916" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad22" type="int" transient="false" volatile="false" value="16973915" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad3" type="int" transient="false" Loading Loading @@ -17313,6 +17313,17 @@ visibility="public" > </field> <field name="ERROR_CODE_BAD_REQUEST" type="int" transient="false" volatile="false" value="8" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="ERROR_CODE_CANCELED" type="int" transient="false" Loading Loading @@ -24301,6 +24312,19 @@ <parameter name="position" type="int"> </parameter> </method> <method name="itemForPosition" return="android.app.LauncherActivity.ListItem" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="protected" > <parameter name="position" type="int"> </parameter> </method> <method name="makeListItems" return="java.util.List<android.app.LauncherActivity.ListItem>" abstract="false" Loading Loading @@ -24409,6 +24433,16 @@ visibility="public" > </field> <field name="resolveInfo" type="android.content.pm.ResolveInfo" transient="false" volatile="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </field> </class> <class name="ListActivity" extends="android.app.Activity" Loading Loading @@ -38400,6 +38434,17 @@ visibility="public" > </field> <field name="CONFIG_SCREEN_LAYOUT" type="int" transient="false" volatile="false" value="256" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="CONFIG_TOUCHSCREEN" type="int" transient="false" Loading Loading @@ -38865,6 +38910,28 @@ > </field> <field name="FLAG_SUPPORTS_LARGE_SCREENS" type="int" transient="false" volatile="false" value="2048" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="FLAG_SUPPORTS_NORMAL_SCREENS" type="int" transient="false" volatile="false" value="1024" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="FLAG_SUPPORTS_SMALL_SCREENS" type="int" transient="false" volatile="false" Loading Loading @@ -43080,6 +43147,50 @@ visibility="public" > </field> <field name="SCREENLAYOUT_LARGE" type="int" transient="false" volatile="false" value="3" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="SCREENLAYOUT_NORMAL" type="int" transient="false" volatile="false" value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="SCREENLAYOUT_SMALL" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="SCREENLAYOUT_UNDEFINED" type="int" transient="false" volatile="false" value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TOUCHSCREEN_FINGER" type="int" transient="false" Loading Loading @@ -43214,6 +43325,16 @@ visibility="public" > </field> <field name="screenLayout" type="int" transient="false" volatile="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </field> <field name="touchscreen" type="int" transient="false" Loading Loading @@ -60282,6 +60403,47 @@ </package> <package name="android.graphics.drawable" > <interface name="Animatable" abstract="true" static="false" final="false" deprecated="not deprecated" visibility="public" > <method name="isRunning" return="boolean" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="start" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="stop" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> </interface> <class name="AnimationDrawable" extends="android.graphics.drawable.DrawableContainer" abstract="false" Loading @@ -60290,6 +60452,8 @@ deprecated="not deprecated" visibility="public" > <implements name="android.graphics.drawable.Animatable"> </implements> <implements name="java.lang.Runnable"> </implements> <constructor name="AnimationDrawable" Loading Loading @@ -126444,6 +126608,27 @@ <parameter name="flags" type="int"> </parameter> </method> <method name="formatDateRange" return="java.util.Formatter" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="context" type="android.content.Context"> </parameter> <parameter name="formatter" type="java.util.Formatter"> </parameter> <parameter name="startMillis" type="long"> </parameter> <parameter name="endMillis" type="long"> </parameter> <parameter name="flags" type="int"> </parameter> </method> <method name="formatDateTime" return="java.lang.String" abstract="false" Loading Loading @@ -143174,6 +143359,19 @@ visibility="public" > </method> <method name="buildDrawingCache" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="autoScale" type="boolean"> </parameter> </method> <method name="cancelLongPress" return="void" abstract="false" Loading Loading @@ -143750,6 +143948,19 @@ visibility="public" > </method> <method name="getDrawingCache" return="android.graphics.Bitmap" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="autoScale" type="boolean"> </parameter> </method> <method name="getDrawingCacheBackgroundColor" return="int" abstract="false" Loading Loading @@ -184646,7 +184857,7 @@ <method name="startMethodTracing" return="void" abstract="false" native="true" native="false" synchronized="false" static="true" final="false" camera/libcameraservice/CameraService.cpp +99 −60 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ sp<ICamera> CameraService::connect(const sp<ICameraClient>& cameraClient) LOGD("CameraService::connect E (pid %d, client %p)", callingPid, cameraClient->asBinder().get()); Mutex::Autolock lock(mLock); Mutex::Autolock lock(mServiceLock); sp<Client> client; if (mClient != 0) { sp<Client> currentClient = mClient.promote(); Loading @@ -125,12 +125,13 @@ sp<ICamera> CameraService::connect(const sp<ICameraClient>& cameraClient) LOGD("New client (pid %d) connecting, old reference was dangling...", callingPid); mClient.clear(); } } if (mUsers > 0) { LOGD("Still have client, rejected"); return client; } } } // create a new Client object client = new Client(this, cameraClient, callingPid); Loading @@ -152,7 +153,7 @@ void CameraService::removeClient(const sp<ICameraClient>& cameraClient) // destructor won't be called with the lock held. sp<Client> client; Mutex::Autolock lock(mLock); Mutex::Autolock lock(mServiceLock); if (mClient == 0) { // This happens when we have already disconnected. Loading Loading @@ -390,8 +391,6 @@ void CameraService::Client::disconnect() // from the user directly, or called by the destructor. if (mHardware == 0) return; mCameraService->removeClient(mCameraClient); LOGD("hardware teardown"); // Before destroying mHardware, we must make sure it's in the // idle state. Loading @@ -402,6 +401,7 @@ void CameraService::Client::disconnect() mHardware->release(); mHardware.clear(); mCameraService->removeClient(mCameraClient); mCameraService->decUsers(); LOGD("Client::disconnect() X (pid %d)", callingPid); Loading @@ -410,11 +410,14 @@ void CameraService::Client::disconnect() // pass the buffered ISurface to the camera service status_t CameraService::Client::setPreviewDisplay(const sp<ISurface>& surface) { LOGD("setPreviewDisplay(%p) (pid %d)", surface.get(), getCallingPid()); LOGD("setPreviewDisplay(%p) (pid %d)", ((surface == NULL) ? NULL : surface.get()), getCallingPid()); Mutex::Autolock lock(mLock); status_t result = checkPid(); if (result != NO_ERROR) return result; Mutex::Autolock surfaceLock(mSurfaceLock); result = NO_ERROR; // asBinder() is safe on NULL (returns NULL) if (surface->asBinder() != mSurface->asBinder()) { if (mSurface != 0 && !mUseOverlay) { Loading @@ -422,8 +425,17 @@ status_t CameraService::Client::setPreviewDisplay(const sp<ISurface>& surface) mSurface->unregisterBuffers(); } mSurface = surface; // If preview has been already started, set overlay or register preview // buffers now. if (mHardware->previewEnabled()) { if (mUseOverlay) { result = setOverlay(); } else if (mSurface != 0) { result = registerPreviewBuffers(); } } return NO_ERROR; } return result; } // set the preview callback flag to affect how the received frames from Loading @@ -436,7 +448,7 @@ void CameraService::Client::setPreviewCallbackFlag(int callback_flag) mPreviewCallbackFlag = callback_flag; } // start preview mode, must call setPreviewDisplay first // start preview mode status_t CameraService::Client::startCameraMode(camera_mode mode) { int callingPid = getCallingPid(); Loading @@ -456,16 +468,18 @@ status_t CameraService::Client::startCameraMode(camera_mode mode) return INVALID_OPERATION; } switch(mode) { case CAMERA_RECORDING_MODE: if (mSurface == 0) { LOGE("setPreviewDisplay must be called before startCameraMode!"); LOGE("setPreviewDisplay must be called before startRecordingMode."); return INVALID_OPERATION; } switch(mode) { case CAMERA_RECORDING_MODE: return startRecordingMode(); default: // CAMERA_PREVIEW_MODE if (mSurface == 0) { LOGD("mSurface is not set yet."); } return startPreviewMode(); } } Loading Loading @@ -498,28 +512,15 @@ status_t CameraService::Client::startRecordingMode() return ret; } status_t CameraService::Client::startPreviewMode() status_t CameraService::Client::setOverlay() { LOGD("startPreviewMode (pid %d)", getCallingPid()); // if preview has been enabled, nothing needs to be done if (mHardware->previewEnabled()) { return NO_ERROR; } // start preview mode #if DEBUG_DUMP_PREVIEW_FRAME_TO_FILE debug_frame_cnt = 0; #endif status_t ret = UNKNOWN_ERROR; LOGD("setOverlay"); int w, h; CameraParameters params(mHardware->getParameters()); params.getPreviewSize(&w, &h); if (mUseOverlay) { const char *format = params.getPreviewFormat(); int fmt; LOGD("Use Overlays"); if (!strcmp(format, "yuv422i")) fmt = OVERLAY_FORMAT_YCbCr_422_I; else if (!strcmp(format, "rgb565")) Loading @@ -528,22 +529,25 @@ status_t CameraService::Client::startPreviewMode() LOGE("Invalid preview format for overlays"); return -EINVAL; } status_t ret = NO_ERROR; if (mSurface != 0) { sp<OverlayRef> ref = mSurface->createOverlay(w, h, fmt); ret = mHardware->setOverlay(new Overlay(ref)); } else { ret = mHardware->setOverlay(NULL); } if (ret != NO_ERROR) { LOGE("mHardware->setOverlay() failed with status %d\n", ret); } return ret; } ret = mHardware->startPreview(NULL, mCameraService.get()); if (ret != NO_ERROR) LOGE("mHardware->startPreview() failed with status %d\n", ret); } else { ret = mHardware->startPreview(previewCallback, mCameraService.get()); if (ret == NO_ERROR) { mSurface->unregisterBuffers(); status_t CameraService::Client::registerPreviewBuffers() { int w, h; CameraParameters params(mHardware->getParameters()); params.getPreviewSize(&w, &h); uint32_t transform = 0; if (params.getOrientation() == Loading @@ -557,9 +561,44 @@ status_t CameraService::Client::startPreviewMode() 0, mHardware->getPreviewHeap()); mSurface->registerBuffers(buffers); status_t ret = mSurface->registerBuffers(buffers); if (ret != NO_ERROR) { LOGE("registerBuffers failed with status %d", ret); } return ret; } status_t CameraService::Client::startPreviewMode() { LOGD("startPreviewMode (pid %d)", getCallingPid()); // if preview has been enabled, nothing needs to be done if (mHardware->previewEnabled()) { return NO_ERROR; } // start preview mode #if DEBUG_DUMP_PREVIEW_FRAME_TO_FILE debug_frame_cnt = 0; #endif status_t ret = NO_ERROR; if (mUseOverlay) { // If preview display has been set, set overlay now. if (mSurface != 0) { ret = setOverlay(); } if (ret != NO_ERROR) return ret; ret = mHardware->startPreview(NULL, mCameraService.get()); } else { LOGE("mHardware->startPreview() failed with status %d", ret); ret = mHardware->startPreview(previewCallback, mCameraService.get()); if (ret != NO_ERROR) return ret; // If preview display has been set, register preview buffers now. if (mSurface != 0) { // Unregister here because the surface registered with raw heap. mSurface->unregisterBuffers(); ret = registerPreviewBuffers(); } } return ret; Loading Loading @@ -661,7 +700,7 @@ sp<CameraService::Client> CameraService::Client::getClientFromCookie(void* user) sp<Client> client = 0; CameraService *service = static_cast<CameraService*>(user); if (service != NULL) { Mutex::Autolock ourLock(service->mLock); Mutex::Autolock ourLock(service->mServiceLock); if (service->mClient != 0) { client = service->mClient.promote(); if (client == 0) { Loading Loading @@ -1104,7 +1143,7 @@ status_t CameraService::dump(int fd, const Vector<String16>& args) result.append(buffer); write(fd, result.string(), result.size()); } else { AutoMutex lock(&mLock); AutoMutex lock(&mServiceLock); if (mClient != 0) { sp<Client> currentClient = mClient.promote(); sprintf(buffer, "Client (%p) PID: %d\n", Loading camera/libcameraservice/CameraService.h +3 −1 Original line number Diff line number Diff line Loading @@ -157,6 +157,8 @@ private: status_t startCameraMode(camera_mode mode); status_t startPreviewMode(); status_t startRecordingMode(); status_t setOverlay(); status_t registerPreviewBuffers(); // Ensures atomicity among the public methods mutable Mutex mLock; Loading Loading @@ -199,7 +201,7 @@ private: virtual void incUsers(); virtual void decUsers(); mutable Mutex mLock; mutable Mutex mServiceLock; wp<Client> mClient; #if DEBUG_HEAP_LEAKS Loading cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java +163 −18 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ LOCAL_SRC_FILES += \ core/java/android/app/IWallpaperService.aidl \ core/java/android/app/IWallpaperServiceCallback.aidl \ core/java/android/backup/IBackupManager.aidl \ core/java/android/backup/IRestoreObserver.aidl \ core/java/android/backup/IRestoreSession.aidl \ core/java/android/bluetooth/IBluetoothA2dp.aidl \ core/java/android/bluetooth/IBluetoothDevice.aidl \ Loading
api/current.xml +311 −100 Original line number Diff line number Diff line Loading @@ -3496,72 +3496,6 @@ visibility="public" > </field> <field name="donut_resource_pad23" type="int" transient="false" volatile="false" value="16843401" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad24" type="int" transient="false" volatile="false" value="16843400" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad25" type="int" transient="false" volatile="false" value="16843399" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad26" type="int" transient="false" volatile="false" value="16843398" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad27" type="int" transient="false" volatile="false" value="16843397" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad28" type="int" transient="false" volatile="false" value="16843396" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad3" type="int" transient="false" Loading Loading @@ -5388,6 +5322,17 @@ visibility="public" > </field> <field name="largeScreens" type="int" transient="false" volatile="false" value="16843398" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="launchMode" type="int" transient="false" Loading Loading @@ -6268,6 +6213,17 @@ visibility="public" > </field> <field name="normalScreens" type="int" transient="false" volatile="false" value="16843397" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="numColumns" type="int" transient="false" Loading Loading @@ -6818,6 +6774,17 @@ visibility="public" > </field> <field name="progressBarStyleInverse" type="int" transient="false" volatile="false" value="16843399" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="progressBarStyleLarge" type="int" transient="false" Loading @@ -6829,6 +6796,17 @@ visibility="public" > </field> <field name="progressBarStyleLargeInverse" type="int" transient="false" volatile="false" value="16843401" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="progressBarStyleSmall" type="int" transient="false" Loading @@ -6840,6 +6818,17 @@ visibility="public" > </field> <field name="progressBarStyleSmallInverse" type="int" transient="false" volatile="false" value="16843400" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="progressBarStyleSmallTitle" type="int" transient="false" Loading Loading @@ -7654,6 +7643,17 @@ visibility="public" > </field> <field name="smallScreens" type="int" transient="false" volatile="false" value="16843396" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="smoothScrollbar" type="int" transient="false" Loading Loading @@ -15255,6 +15255,17 @@ visibility="public" > </field> <field name="Widget_ProgressBar_Inverse" type="int" transient="false" volatile="false" value="16973915" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="Widget_ProgressBar_Large" type="int" transient="false" Loading @@ -15266,6 +15277,17 @@ visibility="public" > </field> <field name="Widget_ProgressBar_Large_Inverse" type="int" transient="false" volatile="false" value="16973916" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="Widget_ProgressBar_Small" type="int" transient="false" Loading @@ -15277,6 +15299,17 @@ visibility="public" > </field> <field name="Widget_ProgressBar_Small_Inverse" type="int" transient="false" volatile="false" value="16973917" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="Widget_RatingBar" type="int" transient="false" Loading Loading @@ -15508,39 +15541,6 @@ visibility="public" > </field> <field name="donut_resource_pad20" type="int" transient="false" volatile="false" value="16973917" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad21" type="int" transient="false" volatile="false" value="16973916" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad22" type="int" transient="false" volatile="false" value="16973915" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="donut_resource_pad3" type="int" transient="false" Loading Loading @@ -17313,6 +17313,17 @@ visibility="public" > </field> <field name="ERROR_CODE_BAD_REQUEST" type="int" transient="false" volatile="false" value="8" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="ERROR_CODE_CANCELED" type="int" transient="false" Loading Loading @@ -24301,6 +24312,19 @@ <parameter name="position" type="int"> </parameter> </method> <method name="itemForPosition" return="android.app.LauncherActivity.ListItem" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="protected" > <parameter name="position" type="int"> </parameter> </method> <method name="makeListItems" return="java.util.List<android.app.LauncherActivity.ListItem>" abstract="false" Loading Loading @@ -24409,6 +24433,16 @@ visibility="public" > </field> <field name="resolveInfo" type="android.content.pm.ResolveInfo" transient="false" volatile="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </field> </class> <class name="ListActivity" extends="android.app.Activity" Loading Loading @@ -38400,6 +38434,17 @@ visibility="public" > </field> <field name="CONFIG_SCREEN_LAYOUT" type="int" transient="false" volatile="false" value="256" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="CONFIG_TOUCHSCREEN" type="int" transient="false" Loading Loading @@ -38865,6 +38910,28 @@ > </field> <field name="FLAG_SUPPORTS_LARGE_SCREENS" type="int" transient="false" volatile="false" value="2048" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="FLAG_SUPPORTS_NORMAL_SCREENS" type="int" transient="false" volatile="false" value="1024" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="FLAG_SUPPORTS_SMALL_SCREENS" type="int" transient="false" volatile="false" Loading Loading @@ -43080,6 +43147,50 @@ visibility="public" > </field> <field name="SCREENLAYOUT_LARGE" type="int" transient="false" volatile="false" value="3" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="SCREENLAYOUT_NORMAL" type="int" transient="false" volatile="false" value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="SCREENLAYOUT_SMALL" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="SCREENLAYOUT_UNDEFINED" type="int" transient="false" volatile="false" value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="TOUCHSCREEN_FINGER" type="int" transient="false" Loading Loading @@ -43214,6 +43325,16 @@ visibility="public" > </field> <field name="screenLayout" type="int" transient="false" volatile="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </field> <field name="touchscreen" type="int" transient="false" Loading Loading @@ -60282,6 +60403,47 @@ </package> <package name="android.graphics.drawable" > <interface name="Animatable" abstract="true" static="false" final="false" deprecated="not deprecated" visibility="public" > <method name="isRunning" return="boolean" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="start" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="stop" return="void" abstract="true" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> </interface> <class name="AnimationDrawable" extends="android.graphics.drawable.DrawableContainer" abstract="false" Loading @@ -60290,6 +60452,8 @@ deprecated="not deprecated" visibility="public" > <implements name="android.graphics.drawable.Animatable"> </implements> <implements name="java.lang.Runnable"> </implements> <constructor name="AnimationDrawable" Loading Loading @@ -126444,6 +126608,27 @@ <parameter name="flags" type="int"> </parameter> </method> <method name="formatDateRange" return="java.util.Formatter" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="context" type="android.content.Context"> </parameter> <parameter name="formatter" type="java.util.Formatter"> </parameter> <parameter name="startMillis" type="long"> </parameter> <parameter name="endMillis" type="long"> </parameter> <parameter name="flags" type="int"> </parameter> </method> <method name="formatDateTime" return="java.lang.String" abstract="false" Loading Loading @@ -143174,6 +143359,19 @@ visibility="public" > </method> <method name="buildDrawingCache" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="autoScale" type="boolean"> </parameter> </method> <method name="cancelLongPress" return="void" abstract="false" Loading Loading @@ -143750,6 +143948,19 @@ visibility="public" > </method> <method name="getDrawingCache" return="android.graphics.Bitmap" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="autoScale" type="boolean"> </parameter> </method> <method name="getDrawingCacheBackgroundColor" return="int" abstract="false" Loading Loading @@ -184646,7 +184857,7 @@ <method name="startMethodTracing" return="void" abstract="false" native="true" native="false" synchronized="false" static="true" final="false"
camera/libcameraservice/CameraService.cpp +99 −60 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ sp<ICamera> CameraService::connect(const sp<ICameraClient>& cameraClient) LOGD("CameraService::connect E (pid %d, client %p)", callingPid, cameraClient->asBinder().get()); Mutex::Autolock lock(mLock); Mutex::Autolock lock(mServiceLock); sp<Client> client; if (mClient != 0) { sp<Client> currentClient = mClient.promote(); Loading @@ -125,12 +125,13 @@ sp<ICamera> CameraService::connect(const sp<ICameraClient>& cameraClient) LOGD("New client (pid %d) connecting, old reference was dangling...", callingPid); mClient.clear(); } } if (mUsers > 0) { LOGD("Still have client, rejected"); return client; } } } // create a new Client object client = new Client(this, cameraClient, callingPid); Loading @@ -152,7 +153,7 @@ void CameraService::removeClient(const sp<ICameraClient>& cameraClient) // destructor won't be called with the lock held. sp<Client> client; Mutex::Autolock lock(mLock); Mutex::Autolock lock(mServiceLock); if (mClient == 0) { // This happens when we have already disconnected. Loading Loading @@ -390,8 +391,6 @@ void CameraService::Client::disconnect() // from the user directly, or called by the destructor. if (mHardware == 0) return; mCameraService->removeClient(mCameraClient); LOGD("hardware teardown"); // Before destroying mHardware, we must make sure it's in the // idle state. Loading @@ -402,6 +401,7 @@ void CameraService::Client::disconnect() mHardware->release(); mHardware.clear(); mCameraService->removeClient(mCameraClient); mCameraService->decUsers(); LOGD("Client::disconnect() X (pid %d)", callingPid); Loading @@ -410,11 +410,14 @@ void CameraService::Client::disconnect() // pass the buffered ISurface to the camera service status_t CameraService::Client::setPreviewDisplay(const sp<ISurface>& surface) { LOGD("setPreviewDisplay(%p) (pid %d)", surface.get(), getCallingPid()); LOGD("setPreviewDisplay(%p) (pid %d)", ((surface == NULL) ? NULL : surface.get()), getCallingPid()); Mutex::Autolock lock(mLock); status_t result = checkPid(); if (result != NO_ERROR) return result; Mutex::Autolock surfaceLock(mSurfaceLock); result = NO_ERROR; // asBinder() is safe on NULL (returns NULL) if (surface->asBinder() != mSurface->asBinder()) { if (mSurface != 0 && !mUseOverlay) { Loading @@ -422,8 +425,17 @@ status_t CameraService::Client::setPreviewDisplay(const sp<ISurface>& surface) mSurface->unregisterBuffers(); } mSurface = surface; // If preview has been already started, set overlay or register preview // buffers now. if (mHardware->previewEnabled()) { if (mUseOverlay) { result = setOverlay(); } else if (mSurface != 0) { result = registerPreviewBuffers(); } } return NO_ERROR; } return result; } // set the preview callback flag to affect how the received frames from Loading @@ -436,7 +448,7 @@ void CameraService::Client::setPreviewCallbackFlag(int callback_flag) mPreviewCallbackFlag = callback_flag; } // start preview mode, must call setPreviewDisplay first // start preview mode status_t CameraService::Client::startCameraMode(camera_mode mode) { int callingPid = getCallingPid(); Loading @@ -456,16 +468,18 @@ status_t CameraService::Client::startCameraMode(camera_mode mode) return INVALID_OPERATION; } switch(mode) { case CAMERA_RECORDING_MODE: if (mSurface == 0) { LOGE("setPreviewDisplay must be called before startCameraMode!"); LOGE("setPreviewDisplay must be called before startRecordingMode."); return INVALID_OPERATION; } switch(mode) { case CAMERA_RECORDING_MODE: return startRecordingMode(); default: // CAMERA_PREVIEW_MODE if (mSurface == 0) { LOGD("mSurface is not set yet."); } return startPreviewMode(); } } Loading Loading @@ -498,28 +512,15 @@ status_t CameraService::Client::startRecordingMode() return ret; } status_t CameraService::Client::startPreviewMode() status_t CameraService::Client::setOverlay() { LOGD("startPreviewMode (pid %d)", getCallingPid()); // if preview has been enabled, nothing needs to be done if (mHardware->previewEnabled()) { return NO_ERROR; } // start preview mode #if DEBUG_DUMP_PREVIEW_FRAME_TO_FILE debug_frame_cnt = 0; #endif status_t ret = UNKNOWN_ERROR; LOGD("setOverlay"); int w, h; CameraParameters params(mHardware->getParameters()); params.getPreviewSize(&w, &h); if (mUseOverlay) { const char *format = params.getPreviewFormat(); int fmt; LOGD("Use Overlays"); if (!strcmp(format, "yuv422i")) fmt = OVERLAY_FORMAT_YCbCr_422_I; else if (!strcmp(format, "rgb565")) Loading @@ -528,22 +529,25 @@ status_t CameraService::Client::startPreviewMode() LOGE("Invalid preview format for overlays"); return -EINVAL; } status_t ret = NO_ERROR; if (mSurface != 0) { sp<OverlayRef> ref = mSurface->createOverlay(w, h, fmt); ret = mHardware->setOverlay(new Overlay(ref)); } else { ret = mHardware->setOverlay(NULL); } if (ret != NO_ERROR) { LOGE("mHardware->setOverlay() failed with status %d\n", ret); } return ret; } ret = mHardware->startPreview(NULL, mCameraService.get()); if (ret != NO_ERROR) LOGE("mHardware->startPreview() failed with status %d\n", ret); } else { ret = mHardware->startPreview(previewCallback, mCameraService.get()); if (ret == NO_ERROR) { mSurface->unregisterBuffers(); status_t CameraService::Client::registerPreviewBuffers() { int w, h; CameraParameters params(mHardware->getParameters()); params.getPreviewSize(&w, &h); uint32_t transform = 0; if (params.getOrientation() == Loading @@ -557,9 +561,44 @@ status_t CameraService::Client::startPreviewMode() 0, mHardware->getPreviewHeap()); mSurface->registerBuffers(buffers); status_t ret = mSurface->registerBuffers(buffers); if (ret != NO_ERROR) { LOGE("registerBuffers failed with status %d", ret); } return ret; } status_t CameraService::Client::startPreviewMode() { LOGD("startPreviewMode (pid %d)", getCallingPid()); // if preview has been enabled, nothing needs to be done if (mHardware->previewEnabled()) { return NO_ERROR; } // start preview mode #if DEBUG_DUMP_PREVIEW_FRAME_TO_FILE debug_frame_cnt = 0; #endif status_t ret = NO_ERROR; if (mUseOverlay) { // If preview display has been set, set overlay now. if (mSurface != 0) { ret = setOverlay(); } if (ret != NO_ERROR) return ret; ret = mHardware->startPreview(NULL, mCameraService.get()); } else { LOGE("mHardware->startPreview() failed with status %d", ret); ret = mHardware->startPreview(previewCallback, mCameraService.get()); if (ret != NO_ERROR) return ret; // If preview display has been set, register preview buffers now. if (mSurface != 0) { // Unregister here because the surface registered with raw heap. mSurface->unregisterBuffers(); ret = registerPreviewBuffers(); } } return ret; Loading Loading @@ -661,7 +700,7 @@ sp<CameraService::Client> CameraService::Client::getClientFromCookie(void* user) sp<Client> client = 0; CameraService *service = static_cast<CameraService*>(user); if (service != NULL) { Mutex::Autolock ourLock(service->mLock); Mutex::Autolock ourLock(service->mServiceLock); if (service->mClient != 0) { client = service->mClient.promote(); if (client == 0) { Loading Loading @@ -1104,7 +1143,7 @@ status_t CameraService::dump(int fd, const Vector<String16>& args) result.append(buffer); write(fd, result.string(), result.size()); } else { AutoMutex lock(&mLock); AutoMutex lock(&mServiceLock); if (mClient != 0) { sp<Client> currentClient = mClient.promote(); sprintf(buffer, "Client (%p) PID: %d\n", Loading
camera/libcameraservice/CameraService.h +3 −1 Original line number Diff line number Diff line Loading @@ -157,6 +157,8 @@ private: status_t startCameraMode(camera_mode mode); status_t startPreviewMode(); status_t startRecordingMode(); status_t setOverlay(); status_t registerPreviewBuffers(); // Ensures atomicity among the public methods mutable Mutex mLock; Loading Loading @@ -199,7 +201,7 @@ private: virtual void incUsers(); virtual void decUsers(); mutable Mutex mLock; mutable Mutex mServiceLock; wp<Client> mClient; #if DEBUG_HEAP_LEAKS Loading
cmds/bmgr/src/com/android/commands/bmgr/Bmgr.java +163 −18 File changed.Preview size limit exceeded, changes collapsed. Show changes