Loading core/java/android/hardware/camera2/CameraManager.java +1 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.hardware.ICameraServiceListener; import android.hardware.IProCameraUser; import android.hardware.camera2.utils.CameraBinderDecorator; import android.hardware.camera2.utils.CameraRuntimeException; import android.os.Binder; import android.os.IBinder; import android.os.RemoteException; import android.os.ServiceManager; Loading Loading @@ -279,7 +278,7 @@ public final class CameraManager { // TODO: this class needs unit tests // TODO: extract class into top level private class CameraServiceListener extends Binder implements ICameraServiceListener { private class CameraServiceListener extends ICameraServiceListener.Stub { // Keep up-to-date with ICameraServiceListener.h Loading core/java/android/hardware/camera2/ICameraDeviceCallbacks.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -25,6 +25,6 @@ interface ICameraDeviceCallbacks * Keep up-to-date with frameworks/av/include/camera/camera2/ICameraDeviceCallbacks.h */ void notifyCallback(int msgType, int ext1, int ext2); void onResultReceived(int frameId, in CameraMetadata result); oneway void notifyCallback(int msgType, int ext1, int ext2); oneway void onResultReceived(int frameId, in CameraMetadata result); } core/java/android/hardware/camera2/impl/CameraDevice.java +12 −8 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import android.hardware.camera2.CameraAccessException; import android.hardware.camera2.CameraProperties; import android.hardware.camera2.CaptureRequest; import android.hardware.camera2.utils.CameraRuntimeException; import android.os.Binder; import android.os.IBinder; import android.os.RemoteException; import android.util.Log; Loading @@ -40,6 +39,7 @@ import java.util.Stack; public class CameraDevice implements android.hardware.camera2.CameraDevice { private final String TAG; private final boolean DEBUG; // TODO: guard every function with if (!mRemoteDevice) check (if it was closed) private ICameraDeviceUser mRemoteDevice; Loading @@ -59,6 +59,7 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice { public CameraDevice(String cameraId) { mCameraId = cameraId; TAG = String.format("CameraDevice-%s-JV", mCameraId); DEBUG = Log.isLoggable(TAG, Log.DEBUG); } public CameraDeviceCallbacks getCallbacks() { Loading Loading @@ -288,7 +289,7 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice { } // TODO: unit tests public class CameraDeviceCallbacks extends Binder implements ICameraDeviceCallbacks { public class CameraDeviceCallbacks extends ICameraDeviceCallbacks.Stub { @Override public IBinder asBinder() { Loading @@ -298,14 +299,17 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice { // TODO: consider rename to onMessageReceived @Override public void notifyCallback(int msgType, int ext1, int ext2) throws RemoteException { if (DEBUG) { Log.d(TAG, "Got message " + msgType + " ext1: " + ext1 + " , ext2: " + ext2); } // TODO implement rest } @Override public void onResultReceived(int frameId, CameraMetadata result) throws RemoteException { Log.d(TAG, "Received result for frameId " + frameId); public void onResultReceived(int requestId, CameraMetadata result) throws RemoteException { if (DEBUG) { Log.d(TAG, "Received result for id " + requestId); } CaptureListenerHolder holder; synchronized (mLock) { Loading @@ -313,7 +317,7 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice { // exposing the methods necessary like subscribeToRequest, unsubscribe.. // TODO: make class static class holder = CameraDevice.this.mCaptureListenerMap.get(frameId); holder = CameraDevice.this.mCaptureListenerMap.get(requestId); // Clean up listener once we no longer expect to see it. Loading @@ -321,7 +325,7 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice { // we probably want cancelRequest to return # of times it already enqueued and // keep a counter. if (holder != null && !holder.isRepeating()) { CameraDevice.this.mCaptureListenerMap.remove(frameId); CameraDevice.this.mCaptureListenerMap.remove(requestId); } } Loading Loading
core/java/android/hardware/camera2/CameraManager.java +1 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.hardware.ICameraServiceListener; import android.hardware.IProCameraUser; import android.hardware.camera2.utils.CameraBinderDecorator; import android.hardware.camera2.utils.CameraRuntimeException; import android.os.Binder; import android.os.IBinder; import android.os.RemoteException; import android.os.ServiceManager; Loading Loading @@ -279,7 +278,7 @@ public final class CameraManager { // TODO: this class needs unit tests // TODO: extract class into top level private class CameraServiceListener extends Binder implements ICameraServiceListener { private class CameraServiceListener extends ICameraServiceListener.Stub { // Keep up-to-date with ICameraServiceListener.h Loading
core/java/android/hardware/camera2/ICameraDeviceCallbacks.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -25,6 +25,6 @@ interface ICameraDeviceCallbacks * Keep up-to-date with frameworks/av/include/camera/camera2/ICameraDeviceCallbacks.h */ void notifyCallback(int msgType, int ext1, int ext2); void onResultReceived(int frameId, in CameraMetadata result); oneway void notifyCallback(int msgType, int ext1, int ext2); oneway void onResultReceived(int frameId, in CameraMetadata result); }
core/java/android/hardware/camera2/impl/CameraDevice.java +12 −8 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import android.hardware.camera2.CameraAccessException; import android.hardware.camera2.CameraProperties; import android.hardware.camera2.CaptureRequest; import android.hardware.camera2.utils.CameraRuntimeException; import android.os.Binder; import android.os.IBinder; import android.os.RemoteException; import android.util.Log; Loading @@ -40,6 +39,7 @@ import java.util.Stack; public class CameraDevice implements android.hardware.camera2.CameraDevice { private final String TAG; private final boolean DEBUG; // TODO: guard every function with if (!mRemoteDevice) check (if it was closed) private ICameraDeviceUser mRemoteDevice; Loading @@ -59,6 +59,7 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice { public CameraDevice(String cameraId) { mCameraId = cameraId; TAG = String.format("CameraDevice-%s-JV", mCameraId); DEBUG = Log.isLoggable(TAG, Log.DEBUG); } public CameraDeviceCallbacks getCallbacks() { Loading Loading @@ -288,7 +289,7 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice { } // TODO: unit tests public class CameraDeviceCallbacks extends Binder implements ICameraDeviceCallbacks { public class CameraDeviceCallbacks extends ICameraDeviceCallbacks.Stub { @Override public IBinder asBinder() { Loading @@ -298,14 +299,17 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice { // TODO: consider rename to onMessageReceived @Override public void notifyCallback(int msgType, int ext1, int ext2) throws RemoteException { if (DEBUG) { Log.d(TAG, "Got message " + msgType + " ext1: " + ext1 + " , ext2: " + ext2); } // TODO implement rest } @Override public void onResultReceived(int frameId, CameraMetadata result) throws RemoteException { Log.d(TAG, "Received result for frameId " + frameId); public void onResultReceived(int requestId, CameraMetadata result) throws RemoteException { if (DEBUG) { Log.d(TAG, "Received result for id " + requestId); } CaptureListenerHolder holder; synchronized (mLock) { Loading @@ -313,7 +317,7 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice { // exposing the methods necessary like subscribeToRequest, unsubscribe.. // TODO: make class static class holder = CameraDevice.this.mCaptureListenerMap.get(frameId); holder = CameraDevice.this.mCaptureListenerMap.get(requestId); // Clean up listener once we no longer expect to see it. Loading @@ -321,7 +325,7 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice { // we probably want cancelRequest to return # of times it already enqueued and // keep a counter. if (holder != null && !holder.isRepeating()) { CameraDevice.this.mCaptureListenerMap.remove(frameId); CameraDevice.this.mCaptureListenerMap.remove(requestId); } } Loading