Use emulator runner 2.2.0

pull/696/head
Mattia Iavarone 6 years ago
parent 639857eda6
commit 990b6754e6
  1. 24
      .github/workflows/build.yml
  2. 4
      .github/workflows/emulator_script.sh
  3. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/engine/Camera2Engine.java

@ -64,15 +64,31 @@ jobs:
with: with:
java-version: 1.8 java-version: 1.8
- name: Execute emulator tests - name: Execute emulator tests
timeout-minutes: 20 timeout-minutes: 16
uses: reactivecircus/android-emulator-runner@v2.0.0 uses: reactivecircus/android-emulator-runner@v2.2.0
with: with:
api-level: ${{ matrix.EMULATOR_API }} api-level: ${{ matrix.EMULATOR_API }}
arch: ${{ matrix.EMULATOR_ARCH }} arch: ${{ matrix.EMULATOR_ARCH }}
disable-animations: true disable-animations: true
profile: Nexus 5X profile: Nexus 5X
emulator-options: -no-snapshot -no-window -no-boot-anim -camera-back emulated -camera-front emulated emulator-options: -no-snapshot -no-window -no-boot-anim -camera-back emulated -camera-front emulated -gpu swiftshader_indirect
script: ./.github/workflows/emulator_script.sh emulator-build: 6031357
script: |
# Core
ADB_TAGS="CameraView:I CameraCallbacks:I CameraOrchestrator:I CameraEngine:I"
ADB_TAGS="$ADB_TAGS CameraUtils:I WorkerHandler:I"
# Recorders
ADB_TAGS="$ADB_TAGS VideoRecorder:I FullVideoRecorder:I SnapshotVideoRecorder:I"
ADB_TAGS="$ADB_TAGS FullPictureRecorder:I SnapshotPictureRecorder:I DeviceEncoders:I"
# Video encoders
ADB_TAGS="$ADB_TAGS MediaEncoderEngine:I MediaEncoder:I AudioMediaEncoder:I VideoMediaEncoder:I TextureMediaEncoder:I"
# Debugging
ADB_TAGS="$ADB_TAGS CameraIntegrationTest:I MessageQueue:W MPEG4Writer:I"
echo "Logcat tags: $ADB_TAGS"
adb logcat -c
adb logcat $ADB_TAGS *:E -v color &
emulator -version
./gradlew cameraview:connectedCheck
- name: Upload emulator tests artifact - name: Upload emulator tests artifact
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:

@ -1,4 +0,0 @@
#!/usr/bin/env bash
adb logcat -c
adb logcat CameraOrchestrator:I CameraEngine:I CameraView:I CameraCallbacks:I CameraIntegrationTest:I MediaEncoderEngine:I MediaEncoder:I AudioMediaEncoder:I VideoMediaEncoder:I TextureMediaEncoder:I VideoRecorder:I FullVideoRecorder:I SnapshotVideoRecorder:I CameraUtils:I MessageQueue:W WorkerHandler:I DeviceEncoders:I MPEG4Writer:I FullPictureRecorder:I SnapshotPictureRecorder:I *:E -v color &
./gradlew cameraview:connectedCheck

@ -638,6 +638,7 @@ public class Camera2Engine extends CameraEngine implements ImageReader.OnImageAv
if (hasFrameProcessors()) { if (hasFrameProcessors()) {
getFrameManager().release(); getFrameManager().release();
} }
if (false) {
try { try {
// Preferring this over stopRepeating() so we're sure that all in-flights operations // Preferring this over stopRepeating() so we're sure that all in-flights operations
// are discarded as fast as possible, which is exactly what we want. // are discarded as fast as possible, which is exactly what we want.
@ -657,6 +658,7 @@ public class Camera2Engine extends CameraEngine implements ImageReader.OnImageAv
// This tells us that the session was already closed. // This tells us that the session was already closed.
// Not sure if this can happen, but we can swallow it. // Not sure if this can happen, but we can swallow it.
} }
}
removeRepeatingRequestBuilderSurfaces(); removeRepeatingRequestBuilderSurfaces();
mLastRepeatingResult = null; mLastRepeatingResult = null;
LOG.i("onStopPreview:", "Returning."); LOG.i("onStopPreview:", "Returning.");

Loading…
Cancel
Save