Camera2: Improve error checking and debug logs.

Bug: 6243944
Change-Id: Ie61d89b733af7d1f653443bf64b767456127a455
diff --git a/services/camera/libcameraservice/Camera2Client.h b/services/camera/libcameraservice/Camera2Client.h
index 5457343..791c5e1 100644
--- a/services/camera/libcameraservice/Camera2Client.h
+++ b/services/camera/libcameraservice/Camera2Client.h
@@ -70,7 +70,7 @@
     virtual status_t dump(int fd, const Vector<String16>& args);
 
 private:
-    enum {
+    enum State {
         NOT_INITIALIZED,
         STOPPED,
         WAITING_FOR_PREVIEW_WINDOW,
@@ -80,6 +80,8 @@
         VIDEO_SNAPSHOT
     } mState;
 
+    static const char *getStateName(State state);
+
     /** ICamera interface-related private members */
 
     // Mutex that must be locked by methods implementing the ICamera interface.