diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2014-09-19 18:30:13 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-19 18:30:14 +0000 |
commit | 4f62441d36ad9e9e3f993b6f03ce68fcecf4f83b (patch) | |
tree | 1b7bd5a36471ba053aaa402de200ae6c2df46bfb /services | |
parent | dfc34daba6d6cb923683d96689a0cb7c7006eee5 (diff) | |
parent | b9d2f3333369183344aa89c7be1e643a44296d48 (diff) | |
download | frameworks_av-4f62441d36ad9e9e3f993b6f03ce68fcecf4f83b.zip frameworks_av-4f62441d36ad9e9e3f993b6f03ce68fcecf4f83b.tar.gz frameworks_av-4f62441d36ad9e9e3f993b6f03ce68fcecf4f83b.tar.bz2 |
Merge "CameraService: Add client name/pid to device open/close logging." into lmp-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/camera/libcameraservice/common/Camera2ClientBase.cpp | 9 | ||||
-rw-r--r-- | services/camera/libcameraservice/common/Camera2ClientBase.h | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/services/camera/libcameraservice/common/Camera2ClientBase.cpp b/services/camera/libcameraservice/common/Camera2ClientBase.cpp index 24d173c..d6db151 100644 --- a/services/camera/libcameraservice/common/Camera2ClientBase.cpp +++ b/services/camera/libcameraservice/common/Camera2ClientBase.cpp @@ -57,8 +57,10 @@ Camera2ClientBase<TClientBase>::Camera2ClientBase( mSharedCameraCallbacks(remoteCallback), mDeviceVersion(cameraService->getDeviceVersion(cameraId)) { - ALOGI("Camera %d: Opened", cameraId); + ALOGI("Camera %d: Opened. Client: %s (PID %d, UID %d)", cameraId, + String8(clientPackageName).string(), clientPid, clientUid); + mInitialClientPid = clientPid; mDevice = CameraDeviceFactory::createDevice(cameraId); LOG_ALWAYS_FATAL_IF(mDevice == 0, "Device should never be NULL here."); } @@ -114,7 +116,10 @@ Camera2ClientBase<TClientBase>::~Camera2ClientBase() { disconnect(); - ALOGI("Closed Camera %d", TClientBase::mCameraId); + ALOGI("Closed Camera %d. Client was: %s (PID %d, UID %u)", + TClientBase::mCameraId, + String8(TClientBase::mClientPackageName).string(), + mInitialClientPid, TClientBase::mClientUid); } template <typename TClientBase> diff --git a/services/camera/libcameraservice/common/Camera2ClientBase.h b/services/camera/libcameraservice/common/Camera2ClientBase.h index f57d204..d198e4e 100644 --- a/services/camera/libcameraservice/common/Camera2ClientBase.h +++ b/services/camera/libcameraservice/common/Camera2ClientBase.h @@ -107,6 +107,9 @@ public: protected: + // The PID provided in the constructor call + pid_t mInitialClientPid; + virtual sp<IBinder> asBinderWrapper() { return IInterface::asBinder(); } |