diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2014-09-18 23:57:49 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-18 23:57:49 +0000 |
commit | 0fb7b51f6e2a123b2414f4a4daf73ce465c9d8b6 (patch) | |
tree | 224d0538153288daa1f26badb411b48694ded3ef /services | |
parent | c0651e858ae4ef4c9a2df2e4506b4093b6666ae9 (diff) | |
parent | 67489d2f5668441a36cb1f1157e80ec8684023bf (diff) | |
download | frameworks_av-0fb7b51f6e2a123b2414f4a4daf73ce465c9d8b6.zip frameworks_av-0fb7b51f6e2a123b2414f4a4daf73ce465c9d8b6.tar.gz frameworks_av-0fb7b51f6e2a123b2414f4a4daf73ce465c9d8b6.tar.bz2 |
Merge "CameraService: Fix dump methods for two clients" into lmp-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/camera/libcameraservice/api2/CameraDeviceClient.cpp | 22 | ||||
-rw-r--r-- | services/camera/libcameraservice/api_pro/ProCamera2Client.cpp | 4 |
2 files changed, 19 insertions, 7 deletions
diff --git a/services/camera/libcameraservice/api2/CameraDeviceClient.cpp b/services/camera/libcameraservice/api2/CameraDeviceClient.cpp index 80c797a..e3301aa 100644 --- a/services/camera/libcameraservice/api2/CameraDeviceClient.cpp +++ b/services/camera/libcameraservice/api2/CameraDeviceClient.cpp @@ -512,12 +512,24 @@ status_t CameraDeviceClient::flush(int64_t* lastFrameNumber) { status_t CameraDeviceClient::dump(int fd, const Vector<String16>& args) { String8 result; - result.appendFormat("CameraDeviceClient[%d] (%p) PID: %d, dump:\n", + result.appendFormat("CameraDeviceClient[%d] (%p) dump:\n", mCameraId, - getRemoteCallback()->asBinder().get(), - mClientPid); - result.append(" State: "); - + getRemoteCallback()->asBinder().get()); + result.appendFormat(" Current client: %s (PID %d, UID %u)\n", + String8(mClientPackageName).string(), + mClientPid, mClientUid); + + result.append(" State:\n"); + result.appendFormat(" Request ID counter: %d\n", mRequestIdCounter); + if (!mStreamMap.isEmpty()) { + result.append(" Current stream IDs:\n"); + for (size_t i = 0; i < mStreamMap.size(); i++) { + result.appendFormat(" Stream %d\n", mStreamMap.valueAt(i)); + } + } else { + result.append(" No streams configured.\n"); + } + write(fd, result.string(), result.size()); // TODO: print dynamic/request section from most recent requests mFrameProcessor->dump(fd, args); diff --git a/services/camera/libcameraservice/api_pro/ProCamera2Client.cpp b/services/camera/libcameraservice/api_pro/ProCamera2Client.cpp index f8823a3..2ea460f 100644 --- a/services/camera/libcameraservice/api_pro/ProCamera2Client.cpp +++ b/services/camera/libcameraservice/api_pro/ProCamera2Client.cpp @@ -336,11 +336,11 @@ status_t ProCamera2Client::dump(int fd, const Vector<String16>& args) { mCameraId, getRemoteCallback()->asBinder().get(), mClientPid); - result.append(" State: "); + result.append(" State:\n"); + write(fd, result.string(), result.size()); // TODO: print dynamic/request section from most recent requests mFrameProcessor->dump(fd, args); - return dumpDevice(fd, args); } |