Loading core/java/android/hardware/camera2/CameraManager.java +2 −3 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ import java.util.ArrayList; public final class CameraManager { private static final String TAG = "CameraManager"; private final boolean DEBUG; private final boolean DEBUG = false; private static final int USE_CALLING_UID = -1; Loading @@ -73,7 +73,6 @@ public final class CameraManager { * @hide */ public CameraManager(Context context) { DEBUG = Log.isLoggable(TAG, Log.DEBUG); synchronized(mLock) { mContext = context; } Loading Loading @@ -722,7 +721,7 @@ public final class CameraManager { implements IBinder.DeathRecipient { private static final String TAG = "CameraManagerGlobal"; private final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); private final boolean DEBUG = false; // Singleton instance private static final CameraManagerGlobal gCameraManager = Loading core/java/android/hardware/camera2/CameraMetadata.java +4 −4 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ import java.util.List; public abstract class CameraMetadata<TKey> { private static final String TAG = "CameraMetadataAb"; private static final boolean VERBOSE = Log.isLoggable(TAG, Log.VERBOSE); private static final boolean DEBUG = false; /** * Set a camera metadata field to a value. The field definitions can be Loading Loading @@ -131,7 +131,7 @@ public abstract class CameraMetadata<TKey> { CameraMetadata<TKey> instance, int[] filterTags) { if (VERBOSE) Log.v(TAG, "getKeysStatic for " + type); if (DEBUG) Log.v(TAG, "getKeysStatic for " + type); // TotalCaptureResult does not have any of the keys on it, use CaptureResult instead if (type.equals(TotalCaptureResult.class)) { Loading Loading @@ -163,10 +163,10 @@ public abstract class CameraMetadata<TKey> { if (shouldKeyBeAdded(key, field, filterTags)) { keyList.add(key); if (VERBOSE) { if (DEBUG) { Log.v(TAG, "getKeysStatic - key was added - " + key); } } else if (VERBOSE) { } else if (DEBUG) { Log.v(TAG, "getKeysStatic - key was filtered - " + key); } } Loading core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java +22 −22 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ import static com.android.internal.util.Preconditions.*; public class CameraCaptureSessionImpl extends CameraCaptureSession { private static final String TAG = "CameraCaptureSession"; private static final boolean VERBOSE = Log.isLoggable(TAG, Log.VERBOSE); private static final boolean DEBUG = false; /** Simple integer ID for session for debugging */ private final int mId; Loading Loading @@ -124,7 +124,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { if (configureSuccess) { mStateCallback.onConfigured(this); if (VERBOSE) Log.v(TAG, mIdString + "Created session successfully"); if (DEBUG) Log.v(TAG, mIdString + "Created session successfully"); mConfigureSuccess = true; } else { mStateCallback.onConfigureFailed(this); Loading Loading @@ -160,7 +160,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { handler = checkHandler(handler, callback); if (VERBOSE) { if (DEBUG) { Log.v(TAG, mIdString + "capture - request " + request + ", callback " + callback + " handler " + handler); } Loading Loading @@ -194,7 +194,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { handler = checkHandler(handler, callback); if (VERBOSE) { if (DEBUG) { CaptureRequest[] requestArray = requests.toArray(new CaptureRequest[0]); Log.v(TAG, mIdString + "captureBurst - requests " + Arrays.toString(requestArray) + ", callback " + callback + " handler " + handler); Loading @@ -218,7 +218,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { handler = checkHandler(handler, callback); if (VERBOSE) { if (DEBUG) { Log.v(TAG, mIdString + "setRepeatingRequest - request " + request + ", callback " + callback + " handler" + " " + handler); } Loading Loading @@ -247,7 +247,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { handler = checkHandler(handler, callback); if (VERBOSE) { if (DEBUG) { CaptureRequest[] requestArray = requests.toArray(new CaptureRequest[0]); Log.v(TAG, mIdString + "setRepeatingBurst - requests " + Arrays.toString(requestArray) + ", callback " + callback + " handler" + "" + handler); Loading @@ -261,7 +261,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { public synchronized void stopRepeating() throws CameraAccessException { checkNotClosed(); if (VERBOSE) { if (DEBUG) { Log.v(TAG, mIdString + "stopRepeating"); } Loading @@ -272,7 +272,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { public synchronized void abortCaptures() throws CameraAccessException { checkNotClosed(); if (VERBOSE) { if (DEBUG) { Log.v(TAG, mIdString + "abortCaptures"); } Loading Loading @@ -325,7 +325,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { * but this would introduce nondeterministic behavior. */ if (VERBOSE) Log.v(TAG, mIdString + "replaceSessionClose"); if (DEBUG) Log.v(TAG, mIdString + "replaceSessionClose"); // Set up fast shutdown. Possible alternative paths: // - This session is active, so close() below starts the shutdown drain Loading @@ -345,11 +345,11 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { public synchronized void close() { if (mClosed) { if (VERBOSE) Log.v(TAG, mIdString + "close - reentering"); if (DEBUG) Log.v(TAG, mIdString + "close - reentering"); return; } if (VERBOSE) Log.v(TAG, mIdString + "close - first time"); if (DEBUG) Log.v(TAG, mIdString + "close - first time"); mClosed = true; Loading Loading @@ -498,7 +498,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { @Override public void onDisconnected(CameraDevice camera) { if (VERBOSE) Log.v(TAG, mIdString + "onDisconnected"); if (DEBUG) Log.v(TAG, mIdString + "onDisconnected"); close(); } Loading @@ -513,14 +513,14 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { mIdleDrainer.taskStarted(); mActive = true; if (VERBOSE) Log.v(TAG, mIdString + "onActive"); if (DEBUG) Log.v(TAG, mIdString + "onActive"); mStateCallback.onActive(session); } @Override public void onIdle(CameraDevice camera) { boolean isAborting; if (VERBOSE) Log.v(TAG, mIdString + "onIdle"); if (DEBUG) Log.v(TAG, mIdString + "onIdle"); synchronized (session) { isAborting = mAborting; Loading Loading @@ -562,17 +562,17 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { // TODO: Queue captures during abort instead of failing them // since the app won't be able to distinguish the two actives // Don't signal the application since there's no clean mapping here if (VERBOSE) Log.v(TAG, mIdString + "onBusy"); if (DEBUG) Log.v(TAG, mIdString + "onBusy"); } @Override public void onUnconfigured(CameraDevice camera) { if (VERBOSE) Log.v(TAG, mIdString + "onUnconfigured"); if (DEBUG) Log.v(TAG, mIdString + "onUnconfigured"); } @Override public void onSurfacePrepared(Surface surface) { if (VERBOSE) Log.v(TAG, mIdString + "onPrepared"); if (DEBUG) Log.v(TAG, mIdString + "onPrepared"); mStateCallback.onSurfacePrepared(session, surface); } Loading Loading @@ -631,7 +631,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { * If the camera is already "IDLE" and no aborts are pending, * then the drain immediately finishes. */ if (VERBOSE) Log.v(TAG, mIdString + "onSequenceDrained"); if (DEBUG) Log.v(TAG, mIdString + "onSequenceDrained"); // Fire session close as soon as all sequences are complete. Loading @@ -652,7 +652,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { private class AbortDrainListener implements TaskDrainer.DrainListener { @Override public void onDrained() { if (VERBOSE) Log.v(TAG, mIdString + "onAbortDrained"); if (DEBUG) Log.v(TAG, mIdString + "onAbortDrained"); synchronized (CameraCaptureSessionImpl.this) { /* * Any queued aborts have now completed. Loading @@ -676,7 +676,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { private class IdleDrainListener implements TaskDrainer.DrainListener { @Override public void onDrained() { if (VERBOSE) Log.v(TAG, mIdString + "onIdleDrained"); if (DEBUG) Log.v(TAG, mIdString + "onIdleDrained"); // Take device lock before session lock so that we can call back into device // without causing a deadlock Loading @@ -690,7 +690,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { * * This operation is idempotent; a session will not be closed twice. */ if (VERBOSE) if (DEBUG) Log.v(TAG, mIdString + "Session drain complete, skip unconfigure: " + mSkipUnconfigure); Loading @@ -712,7 +712,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { // TODO: call onError instead of onClosed if this happens } catch (IllegalStateException e) { // Camera is already closed, so nothing left to do if (VERBOSE) Log.v(TAG, mIdString + if (DEBUG) Log.v(TAG, mIdString + "Camera was already closed or busy, skipping unconfigure"); } Loading core/java/android/hardware/camera2/impl/CameraDeviceImpl.java +1 −2 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ import java.util.TreeMap; */ public class CameraDeviceImpl extends CameraDevice { private final String TAG; private final boolean DEBUG; private final boolean DEBUG = false; private static final int REQUEST_ID_NONE = -1; Loading Loading @@ -240,7 +240,6 @@ public class CameraDeviceImpl extends CameraDevice { tag = tag.substring(0, MAX_TAG_LEN); } TAG = tag; DEBUG = Log.isLoggable(TAG, Log.DEBUG); Integer partialCount = mCharacteristics.get(CameraCharacteristics.REQUEST_PARTIAL_RESULT_COUNT); Loading core/java/android/hardware/camera2/impl/CameraMetadataNative.java +4 −3 Original line number Diff line number Diff line Loading @@ -222,7 +222,8 @@ public class CameraMetadataNative implements Parcelable { } private static final String TAG = "CameraMetadataJV"; private static final boolean VERBOSE = Log.isLoggable(TAG, Log.VERBOSE); private static final boolean DEBUG = false; // this should be in sync with HAL_PIXEL_FORMAT_BLOB defined in graphics.h public static final int NATIVE_JPEG_FORMAT = 0x21; Loading Loading @@ -1197,7 +1198,7 @@ public class CameraMetadataNative implements Parcelable { @SuppressWarnings({ "unchecked", "rawtypes" }) private static void registerAllMarshalers() { if (VERBOSE) { if (DEBUG) { Log.v(TAG, "Shall register metadata marshalers"); } Loading Loading @@ -1234,7 +1235,7 @@ public class CameraMetadataNative implements Parcelable { for (MarshalQueryable query : queryList) { MarshalRegistry.registerMarshalQueryable(query); } if (VERBOSE) { if (DEBUG) { Log.v(TAG, "Registered metadata marshalers"); } } Loading Loading
core/java/android/hardware/camera2/CameraManager.java +2 −3 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ import java.util.ArrayList; public final class CameraManager { private static final String TAG = "CameraManager"; private final boolean DEBUG; private final boolean DEBUG = false; private static final int USE_CALLING_UID = -1; Loading @@ -73,7 +73,6 @@ public final class CameraManager { * @hide */ public CameraManager(Context context) { DEBUG = Log.isLoggable(TAG, Log.DEBUG); synchronized(mLock) { mContext = context; } Loading Loading @@ -722,7 +721,7 @@ public final class CameraManager { implements IBinder.DeathRecipient { private static final String TAG = "CameraManagerGlobal"; private final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); private final boolean DEBUG = false; // Singleton instance private static final CameraManagerGlobal gCameraManager = Loading
core/java/android/hardware/camera2/CameraMetadata.java +4 −4 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ import java.util.List; public abstract class CameraMetadata<TKey> { private static final String TAG = "CameraMetadataAb"; private static final boolean VERBOSE = Log.isLoggable(TAG, Log.VERBOSE); private static final boolean DEBUG = false; /** * Set a camera metadata field to a value. The field definitions can be Loading Loading @@ -131,7 +131,7 @@ public abstract class CameraMetadata<TKey> { CameraMetadata<TKey> instance, int[] filterTags) { if (VERBOSE) Log.v(TAG, "getKeysStatic for " + type); if (DEBUG) Log.v(TAG, "getKeysStatic for " + type); // TotalCaptureResult does not have any of the keys on it, use CaptureResult instead if (type.equals(TotalCaptureResult.class)) { Loading Loading @@ -163,10 +163,10 @@ public abstract class CameraMetadata<TKey> { if (shouldKeyBeAdded(key, field, filterTags)) { keyList.add(key); if (VERBOSE) { if (DEBUG) { Log.v(TAG, "getKeysStatic - key was added - " + key); } } else if (VERBOSE) { } else if (DEBUG) { Log.v(TAG, "getKeysStatic - key was filtered - " + key); } } Loading
core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java +22 −22 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ import static com.android.internal.util.Preconditions.*; public class CameraCaptureSessionImpl extends CameraCaptureSession { private static final String TAG = "CameraCaptureSession"; private static final boolean VERBOSE = Log.isLoggable(TAG, Log.VERBOSE); private static final boolean DEBUG = false; /** Simple integer ID for session for debugging */ private final int mId; Loading Loading @@ -124,7 +124,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { if (configureSuccess) { mStateCallback.onConfigured(this); if (VERBOSE) Log.v(TAG, mIdString + "Created session successfully"); if (DEBUG) Log.v(TAG, mIdString + "Created session successfully"); mConfigureSuccess = true; } else { mStateCallback.onConfigureFailed(this); Loading Loading @@ -160,7 +160,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { handler = checkHandler(handler, callback); if (VERBOSE) { if (DEBUG) { Log.v(TAG, mIdString + "capture - request " + request + ", callback " + callback + " handler " + handler); } Loading Loading @@ -194,7 +194,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { handler = checkHandler(handler, callback); if (VERBOSE) { if (DEBUG) { CaptureRequest[] requestArray = requests.toArray(new CaptureRequest[0]); Log.v(TAG, mIdString + "captureBurst - requests " + Arrays.toString(requestArray) + ", callback " + callback + " handler " + handler); Loading @@ -218,7 +218,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { handler = checkHandler(handler, callback); if (VERBOSE) { if (DEBUG) { Log.v(TAG, mIdString + "setRepeatingRequest - request " + request + ", callback " + callback + " handler" + " " + handler); } Loading Loading @@ -247,7 +247,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { handler = checkHandler(handler, callback); if (VERBOSE) { if (DEBUG) { CaptureRequest[] requestArray = requests.toArray(new CaptureRequest[0]); Log.v(TAG, mIdString + "setRepeatingBurst - requests " + Arrays.toString(requestArray) + ", callback " + callback + " handler" + "" + handler); Loading @@ -261,7 +261,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { public synchronized void stopRepeating() throws CameraAccessException { checkNotClosed(); if (VERBOSE) { if (DEBUG) { Log.v(TAG, mIdString + "stopRepeating"); } Loading @@ -272,7 +272,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { public synchronized void abortCaptures() throws CameraAccessException { checkNotClosed(); if (VERBOSE) { if (DEBUG) { Log.v(TAG, mIdString + "abortCaptures"); } Loading Loading @@ -325,7 +325,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { * but this would introduce nondeterministic behavior. */ if (VERBOSE) Log.v(TAG, mIdString + "replaceSessionClose"); if (DEBUG) Log.v(TAG, mIdString + "replaceSessionClose"); // Set up fast shutdown. Possible alternative paths: // - This session is active, so close() below starts the shutdown drain Loading @@ -345,11 +345,11 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { public synchronized void close() { if (mClosed) { if (VERBOSE) Log.v(TAG, mIdString + "close - reentering"); if (DEBUG) Log.v(TAG, mIdString + "close - reentering"); return; } if (VERBOSE) Log.v(TAG, mIdString + "close - first time"); if (DEBUG) Log.v(TAG, mIdString + "close - first time"); mClosed = true; Loading Loading @@ -498,7 +498,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { @Override public void onDisconnected(CameraDevice camera) { if (VERBOSE) Log.v(TAG, mIdString + "onDisconnected"); if (DEBUG) Log.v(TAG, mIdString + "onDisconnected"); close(); } Loading @@ -513,14 +513,14 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { mIdleDrainer.taskStarted(); mActive = true; if (VERBOSE) Log.v(TAG, mIdString + "onActive"); if (DEBUG) Log.v(TAG, mIdString + "onActive"); mStateCallback.onActive(session); } @Override public void onIdle(CameraDevice camera) { boolean isAborting; if (VERBOSE) Log.v(TAG, mIdString + "onIdle"); if (DEBUG) Log.v(TAG, mIdString + "onIdle"); synchronized (session) { isAborting = mAborting; Loading Loading @@ -562,17 +562,17 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { // TODO: Queue captures during abort instead of failing them // since the app won't be able to distinguish the two actives // Don't signal the application since there's no clean mapping here if (VERBOSE) Log.v(TAG, mIdString + "onBusy"); if (DEBUG) Log.v(TAG, mIdString + "onBusy"); } @Override public void onUnconfigured(CameraDevice camera) { if (VERBOSE) Log.v(TAG, mIdString + "onUnconfigured"); if (DEBUG) Log.v(TAG, mIdString + "onUnconfigured"); } @Override public void onSurfacePrepared(Surface surface) { if (VERBOSE) Log.v(TAG, mIdString + "onPrepared"); if (DEBUG) Log.v(TAG, mIdString + "onPrepared"); mStateCallback.onSurfacePrepared(session, surface); } Loading Loading @@ -631,7 +631,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { * If the camera is already "IDLE" and no aborts are pending, * then the drain immediately finishes. */ if (VERBOSE) Log.v(TAG, mIdString + "onSequenceDrained"); if (DEBUG) Log.v(TAG, mIdString + "onSequenceDrained"); // Fire session close as soon as all sequences are complete. Loading @@ -652,7 +652,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { private class AbortDrainListener implements TaskDrainer.DrainListener { @Override public void onDrained() { if (VERBOSE) Log.v(TAG, mIdString + "onAbortDrained"); if (DEBUG) Log.v(TAG, mIdString + "onAbortDrained"); synchronized (CameraCaptureSessionImpl.this) { /* * Any queued aborts have now completed. Loading @@ -676,7 +676,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { private class IdleDrainListener implements TaskDrainer.DrainListener { @Override public void onDrained() { if (VERBOSE) Log.v(TAG, mIdString + "onIdleDrained"); if (DEBUG) Log.v(TAG, mIdString + "onIdleDrained"); // Take device lock before session lock so that we can call back into device // without causing a deadlock Loading @@ -690,7 +690,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { * * This operation is idempotent; a session will not be closed twice. */ if (VERBOSE) if (DEBUG) Log.v(TAG, mIdString + "Session drain complete, skip unconfigure: " + mSkipUnconfigure); Loading @@ -712,7 +712,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { // TODO: call onError instead of onClosed if this happens } catch (IllegalStateException e) { // Camera is already closed, so nothing left to do if (VERBOSE) Log.v(TAG, mIdString + if (DEBUG) Log.v(TAG, mIdString + "Camera was already closed or busy, skipping unconfigure"); } Loading
core/java/android/hardware/camera2/impl/CameraDeviceImpl.java +1 −2 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ import java.util.TreeMap; */ public class CameraDeviceImpl extends CameraDevice { private final String TAG; private final boolean DEBUG; private final boolean DEBUG = false; private static final int REQUEST_ID_NONE = -1; Loading Loading @@ -240,7 +240,6 @@ public class CameraDeviceImpl extends CameraDevice { tag = tag.substring(0, MAX_TAG_LEN); } TAG = tag; DEBUG = Log.isLoggable(TAG, Log.DEBUG); Integer partialCount = mCharacteristics.get(CameraCharacteristics.REQUEST_PARTIAL_RESULT_COUNT); Loading
core/java/android/hardware/camera2/impl/CameraMetadataNative.java +4 −3 Original line number Diff line number Diff line Loading @@ -222,7 +222,8 @@ public class CameraMetadataNative implements Parcelable { } private static final String TAG = "CameraMetadataJV"; private static final boolean VERBOSE = Log.isLoggable(TAG, Log.VERBOSE); private static final boolean DEBUG = false; // this should be in sync with HAL_PIXEL_FORMAT_BLOB defined in graphics.h public static final int NATIVE_JPEG_FORMAT = 0x21; Loading Loading @@ -1197,7 +1198,7 @@ public class CameraMetadataNative implements Parcelable { @SuppressWarnings({ "unchecked", "rawtypes" }) private static void registerAllMarshalers() { if (VERBOSE) { if (DEBUG) { Log.v(TAG, "Shall register metadata marshalers"); } Loading Loading @@ -1234,7 +1235,7 @@ public class CameraMetadataNative implements Parcelable { for (MarshalQueryable query : queryList) { MarshalRegistry.registerMarshalQueryable(query); } if (VERBOSE) { if (DEBUG) { Log.v(TAG, "Registered metadata marshalers"); } } Loading