Skip to content

Commit

Permalink
Remove incorrect assert from Vision CameraSource.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 350430296
Change-Id: Ifdb97b92fec9906b469788d39df3feb34654499d
  • Loading branch information
Google ML Kit authored and zhouyiself committed Jan 6, 2021
1 parent 91764e9 commit 2606a61
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import com.google.android.gms.common.images.Size;
import com.google.mlkit.vision.demo.preference.PreferenceUtils;
import java.io.IOException;
import java.lang.Thread.State;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.IdentityHashMap;
Expand Down Expand Up @@ -128,7 +127,6 @@ public CameraSource(Activity activity, GraphicOverlay overlay) {
public void release() {
synchronized (processorLock) {
stop();
processingRunnable.release();
cleanScreen();

if (frameProcessor != null) {
Expand Down Expand Up @@ -595,15 +593,6 @@ private class FrameProcessingRunnable implements Runnable {

FrameProcessingRunnable() {}

/**
* Releases the underlying receiver. This is only safe to do after the associated thread has
* completed, which is managed in camera source's release method above.
*/
@SuppressLint("Assert")
void release() {
assert (processingThread.getState() == State.TERMINATED);
}

/** Marks the runnable as active/not active. Signals any blocked threads to continue. */
void setActive(boolean active) {
synchronized (lock) {
Expand Down

0 comments on commit 2606a61

Please sign in to comment.