Camera: Disallow dumping clients directly
Camera service dumps should only be initiated through
ICameraService::dump.
Bug: 26265403
Change-Id: If3ca4718ed74bf33ad8a416192689203029e2803
diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h
index ad6a582..7f3691a 100644
--- a/services/camera/libcameraservice/CameraService.h
+++ b/services/camera/libcameraservice/CameraService.h
@@ -55,6 +55,9 @@
class Client;
class BasicClient;
+ // Event log ID
+ static const int SN_EVENT_LOG_ID = 0x534e4554;
+
// Implementation of BinderService<T>
static char const* getServiceName() { return "media.camera"; }
@@ -144,7 +147,10 @@
return mRemoteBinder;
}
- virtual status_t dump(int fd, const Vector<String16>& args) = 0;
+ // Disallows dumping over binder interface
+ virtual status_t dump(int fd, const Vector<String16>& args);
+ // Internal dump method to be called by CameraService
+ virtual status_t dumpClient(int fd, const Vector<String16>& args) = 0;
protected:
BasicClient(const sp<CameraService>& cameraService,