Should not decode Wi-Fi QR code after onPause

Bug: 130141694
Test: manual
      atest WifiDppQrCodeScannerFragmentTest

Change-Id: I412fb7c06220c23bddc7b3c448fcc72a00bdecc3
This commit is contained in:
Arc Wang
2019-04-08 19:22:44 +08:00
parent c11f792795
commit e2b4bccbf1
3 changed files with 59 additions and 0 deletions

View File

@@ -401,4 +401,14 @@ public class QrCamera extends Handler {
mScannerCallback.handleSuccessfulResult(qrCode.getText());
}
}
/**
* After {@link #start(SurfaceTexture)}, DecodingTask runs continuously to capture images and
* decode QR code. DecodingTask become null After {@link #stop()}.
*
* Uses this method in test case to prevent power consumption problem.
*/
public boolean isDecodeTaskAlive() {
return mDecodeTask != null;
}
}