diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-09-07 19:34:08 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-09-07 19:34:08 -0700 |
| commit | fcab608fbee1ec72bacde7d1940233b4c82ebd34 (patch) | |
| tree | 7940baba2429d602df22b08977eae5169c6f7a8d /src/com/android/camera/CaptureModule.java | |
| parent | 8a64bd9b0ca29a4eadebc81fa97d20b12738010b (diff) | |
| parent | 65e092eaddc521328152ece8643c674a925fdf76 (diff) | |
Merge "SnapdragonCamera: Use resume/start based on the SDK version for cam2" into camera.lnx.1.0-dev.1.0
Diffstat (limited to 'src/com/android/camera/CaptureModule.java')
| -rw-r--r-- | src/com/android/camera/CaptureModule.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 91358de3d..bf194f011 100644 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -89,6 +89,7 @@ import com.android.camera.ui.TrackingFocusRenderer; import com.android.camera.util.CameraUtil; import com.android.camera.util.PersistUtil; import com.android.camera.util.SettingTranslation; +import com.android.camera.util.ApiHelper; import com.android.internal.util.MemInfoReader; import org.codeaurora.snapcam.R; @@ -105,6 +106,7 @@ import java.util.LinkedList; import java.util.List; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; +import java.lang.reflect.Method; public class CaptureModule implements CameraModule, PhotoController, MediaSaveService.Listener, ClearSightImageProcessor.Callback, @@ -2552,7 +2554,16 @@ public class CaptureModule implements CameraModule, PhotoController, mMediaRecorderPausing = false; mRecordingStartTime = SystemClock.uptimeMillis(); updateRecordingTime(); - mMediaRecorder.start(); + if (!ApiHelper.HAS_RESUME_SUPPORTED){ + mMediaRecorder.start(); + } else { + try { + Method resumeRec = Class.forName("android.media.MediaRecorder").getMethod("resume"); + resumeRec.invoke(mMediaRecorder); + } catch (Exception e) { + Log.v(TAG, "resume method not implemented"); + } + } } public void onButtonPause() { |
