summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhijun He <zhijunhe@google.com>2020-11-08 08:18:29 -0800
committerZhijun He <zhijunhe@google.com>2020-11-08 08:23:57 -0800
commit94b79bf9a27689cef7183a00b26bd3c3f5659ff3 (patch)
tree76733d11b73bd236f19615ef13968dafed7f3a61
parentfc3170d2e097b9844a682f54d55c58faac75a97a (diff)
downloadCamera2-94b79bf9a27689cef7183a00b26bd3c3f5659ff3.tar.gz
Revert "Camera2: add prop to support no audio camera recording"
This reverts commit 74a9d8bc41cead9a89c479a24e8af5cac92de60a. Test: Build Bug: 172748069 Change-Id: I76090e9d2527abdd395bcedff81d7f30e56764ab
-rw-r--r--Android.mk2
-rw-r--r--src/com/android/camera/VideoModule.java13
-rw-r--r--src/com/android/camera/debug/DebugPropertyHelper.java7
3 files changed, 4 insertions, 18 deletions
diff --git a/Android.mk b/Android.mk
index 68c9cec12..b24a2df57 100644
--- a/Android.mk
+++ b/Android.mk
@@ -34,7 +34,7 @@ LOCAL_USE_AAPT2 := true
LOCAL_PACKAGE_NAME := Camera2
-LOCAL_SDK_VERSION := system_current
+LOCAL_SDK_VERSION := current
LOCAL_PRODUCT_MODULE := true
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 427ad3543..6c9752e6e 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -56,7 +56,6 @@ import com.android.camera.app.MemoryManager;
import com.android.camera.app.MemoryManager.MemoryListener;
import com.android.camera.app.OrientationManager;
import com.android.camera.debug.Log;
-import com.android.camera.debug.DebugPropertyHelper;
import com.android.camera.exif.ExifInterface;
import com.android.camera.hardware.HardwareSpec;
import com.android.camera.hardware.HardwareSpecImpl;
@@ -1142,17 +1141,9 @@ public class VideoModule extends CameraModule
}
mMediaRecorder.setCamera(camera);
+ mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
- if (DebugPropertyHelper.isAudioDisabled()) {
- mMediaRecorder.setOutputFormat(mProfile.fileFormat);
- mMediaRecorder.setVideoFrameRate(mProfile.videoFrameRate);
- mMediaRecorder.setVideoEncodingBitRate(mProfile.videoBitRate);
- mMediaRecorder.setVideoEncoder(mProfile.videoCodec);
- Log.w(TAG, "Audio is disabled");
- } else {
- mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
- mMediaRecorder.setProfile(mProfile);
- }
+ mMediaRecorder.setProfile(mProfile);
mMediaRecorder.setVideoSize(mProfile.videoFrameWidth, mProfile.videoFrameHeight);
mMediaRecorder.setMaxDuration(mMaxVideoDurationInMs);
diff --git a/src/com/android/camera/debug/DebugPropertyHelper.java b/src/com/android/camera/debug/DebugPropertyHelper.java
index cc8d2fb1d..66ccaafee 100644
--- a/src/com/android/camera/debug/DebugPropertyHelper.java
+++ b/src/com/android/camera/debug/DebugPropertyHelper.java
@@ -16,7 +16,7 @@
package com.android.camera.debug;
-import android.os.SystemProperties;
+import com.android.camera.util.SystemProperties;
public class DebugPropertyHelper {
private static final String OFF_VALUE = "0";
@@ -38,8 +38,6 @@ public class DebugPropertyHelper {
private static final String PROP_WRITE_CAPTURE_DATA = PREFIX + ".capture_write";
/** Is RAW support enabled. */
private static final String PROP_CAPTURE_DNG = PREFIX + ".capture_dng";
- /** Is audio disabled. */
- private static final String PROP_DISABLE_AUDIO = PREFIX + ".disable_audio";
private static boolean isPropertyOn(String property) {
return ON_VALUE.equals(SystemProperties.get(property, OFF_VALUE));
@@ -60,7 +58,4 @@ public class DebugPropertyHelper {
public static boolean isCaptureDngEnabled() {
return isPropertyOn(PROP_CAPTURE_DNG);
}
- public static boolean isAudioDisabled() {
- return isPropertyOn(PROP_DISABLE_AUDIO);
- }
}