File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
app/src/main/java/com/fpvout/digiview Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ public void usbDeviceApproved(UsbDevice device) {
246246 public void usbDeviceDetached () {
247247 Log .i (TAG , "USB - usbDevice detached" );
248248 showOverlay (R .string .usb_device_detached_waiting , OverlayStatus .Disconnected );
249- this . onStop ();
249+ disconnect ();
250250 }
251251
252252 private boolean searchDevice () {
@@ -339,14 +339,17 @@ private void hideOverlay() {
339339 autoHideSettingsButton ();
340340 }
341341
342+ private void disconnect () {
343+ mUsbMaskConnection .stop ();
344+ mVideoReader .stop ();
345+ usbConnected = false ;
346+ }
347+
342348 @ Override
343349 protected void onStop () {
344350 super .onStop ();
345351 Log .d (TAG , "APP - On Stop" );
346-
347- mUsbMaskConnection .stop ();
348- mVideoReader .stop ();
349- usbConnected = false ;
352+ disconnect ();
350353 }
351354
352355 @ Override
You can’t perform that action at this time.
0 commit comments