summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/api1
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2014-11-11 00:07:16 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-11 00:07:16 +0000
commit6e48af3d909568ed2f07b79369d52f9415100208 (patch)
tree5b12cc93d48574361df9b3d2867135333694674c /services/camera/libcameraservice/api1
parentaa97f7093c8bb99ad5f86294fef7a070be0e206f (diff)
parent7b28e4e709fcc90f9ca5ca987e2d4e8c05d1a731 (diff)
downloadframeworks_av-6e48af3d909568ed2f07b79369d52f9415100208.zip
frameworks_av-6e48af3d909568ed2f07b79369d52f9415100208.tar.gz
frameworks_av-6e48af3d909568ed2f07b79369d52f9415100208.tar.bz2
am 7b28e4e7: am 9527a598: Merge "Camera: Guard against asBinder() calls on NULL interfaces"
* commit '7b28e4e709fcc90f9ca5ca987e2d4e8c05d1a731': Camera: Guard against asBinder() calls on NULL interfaces
Diffstat (limited to 'services/camera/libcameraservice/api1')
-rw-r--r--services/camera/libcameraservice/api1/Camera2Client.cpp3
-rw-r--r--services/camera/libcameraservice/api1/CameraClient.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/services/camera/libcameraservice/api1/Camera2Client.cpp b/services/camera/libcameraservice/api1/Camera2Client.cpp
index f3a88a1..8e40534 100644
--- a/services/camera/libcameraservice/api1/Camera2Client.cpp
+++ b/services/camera/libcameraservice/api1/Camera2Client.cpp
@@ -165,7 +165,8 @@ status_t Camera2Client::dump(int fd, const Vector<String16>& args) {
String8 result;
result.appendFormat("Client2[%d] (%p) Client: %s PID: %d, dump:\n",
mCameraId,
- getRemoteCallback()->asBinder().get(),
+ (getRemoteCallback() != NULL ?
+ getRemoteCallback()->asBinder().get() : NULL),
String8(mClientPackageName).string(),
mClientPid);
result.append(" State: ");
diff --git a/services/camera/libcameraservice/api1/CameraClient.cpp b/services/camera/libcameraservice/api1/CameraClient.cpp
index 1a4d9a6..2b17028 100644
--- a/services/camera/libcameraservice/api1/CameraClient.cpp
+++ b/services/camera/libcameraservice/api1/CameraClient.cpp
@@ -118,7 +118,8 @@ status_t CameraClient::dump(int fd, const Vector<String16>& args) {
size_t len = snprintf(buffer, SIZE, "Client[%d] (%p) PID: %d\n",
mCameraId,
- getRemoteCallback()->asBinder().get(),
+ (getRemoteCallback() != NULL ?
+ getRemoteCallback()->asBinder().get() : NULL),
mClientPid);
len = (len > SIZE - 1) ? SIZE - 1 : len;
write(fd, buffer, len);