Beispiel #1
0
 private void StopBackgroundThread()
 {
     thread.QuitSafely();
     try
     {
         thread.Join();
         thread            = null;
         backgroundHandler = null;
     } catch (InterruptedException e)
     {
         e.PrintStackTrace();
     }
 }
Beispiel #2
0
 private void StopBackgroundThread()
 {
     mBackgroundThread.QuitSafely();
     try
     {
         mBackgroundThread.Join();
         mBackgroundThread  = null;
         mBackgroundHandler = null;
     }
     catch
     {
     }
 }
Beispiel #3
0
 // Stops the background thread and its {@link Handler}.
 public void Stop()
 {
     _backgroundThread.QuitSafely();
     try
     {
         _backgroundThread.Join();
         _backgroundThread = null;
         Handler           = null;
     }
     catch (InterruptedException e)
     {
         Debug.WriteLine(e);
     }
 }
Beispiel #4
0
 private void Stopbackgroundthread()
 {
     Thread.QuitSafely();
     try
     {
         Thread.Join();
         Thread  = null;
         Handler = null;
     }
     catch
     {
     }
     //throw new NotImplementedException();
 }
Beispiel #5
0
 /// <summary>
 /// Close the camera thread.
 /// </summary>
 public void StopCameraThread()
 {
     mCameraThread.QuitSafely();
     try
     {
         mCameraThread.Join();
         mCameraThread  = null;
         mCameraHandler = null;
     }
     catch (System.Exception e)
     {
         Log.Debug(TAG, "StopCameraThread error");
     }
 }
Beispiel #6
0
 // Stops the background thread and its {@link Handler}.
 public void StopBackgroundThread()
 {
     mBackgroundThread?.QuitSafely();
     try
     {
         mBackgroundThread?.Join();
         mBackgroundThread  = null;
         mBackgroundHandler = null;
     }
     catch (InterruptedException e)
     {
         Crashes.TrackError(e);
         e.PrintStackTrace();
     }
 }
Beispiel #7
0
 /// <summary>
 /// Stops the background thread and its {@link Handler}.
 /// </summary>
 void StopBackgroundThread()
 {
     mBackgroundThread.QuitSafely();
     try
     {
         mBackgroundThread.Join();
         mBackgroundThread = null;
         lock (mCameraStateLock)
         {
             mBackgroundHandler = null;
         }
     }
     catch (Java.Lang.InterruptedException e)
     {
         e.PrintStackTrace();
     }
 }
 /// <summary>
 /// Stops the background thread and its {@link Handler}.
 /// </summary>
 public void StopBackgroundThread()
 {
     if (backgroundThread != null)
     {
         backgroundThread.QuitSafely();
         try
         {
             backgroundThread.Join();
             backgroundThread  = null;
             backgroundHandler = null;
         }
         catch (InterruptedException e)
         {
             e.PrintStackTrace();
         }
     }
 }
 /** Stops the background thread and its {@link Handler}. */
 private void stopBackgroundThread()
 {
     backgroundThread.QuitSafely();
     try
     {
         backgroundThread.Join();
         backgroundThread  = null;
         backgroundHandler = null;
         lock (@lock)
         {
             runClassifier = false;
         }
     }
     catch (Java.Lang.InterruptedException e)
     {
         Log.Error(TAG, "Interrupted when stopping background thread", e);
     }
 }
        // Stops the background thread and its {@link Handler}.
        private void StopBackgroundThread()
        {
            if (mBackgroundThread == null)
            {
                return;
            }

            mBackgroundThread.QuitSafely();
            try
            {
                mBackgroundThread.Join();
                mBackgroundThread = null;
                BackgroundHandler = null;
            }
            catch (InterruptedException e)
            {
                e.PrintStackTrace();
            }
        }
Beispiel #11
0
        private void StopBackgroundThread()
        {
            if (backgroundThread == null)
            {
                return;
            }

            backgroundThread.QuitSafely();
            try
            {
                backgroundThread.Join();
                backgroundThread  = null;
                backgroundHandler = null;
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine($"{e.Message} {e.StackTrace}");
            }
        }
Beispiel #12
0
        private void StopBackgroundThread()
        {
            if (_backgroundThread == null)
            {
                return;
            }

            _backgroundThread.QuitSafely();
            try
            {
                _backgroundThread.Join();
                _backgroundThread      = null;
                this.BackgroundHandler = null;
            }
            catch (InterruptedException ex)
            {
                ex.PrintStackTrace();
            }
        }
        // Stops the background thread and its {@link Handler}.
        protected void StopBackgroundThread()
        {
            if (_backgroundThread == null)
            {
                return;
            }

            _backgroundThread.QuitSafely();
            try
            {
                _backgroundThread.Join();
                _backgroundThread = null;
                BackgroundHandler = null;
            }
            catch (InterruptedException ex)
            {
#if DEBUG
                ex.PrintStackTrace();
#endif
            }
        }
        /// <summary>
        /// Stops the background thread and its {@link Handler}.
        /// </summary>
        public void StopBackgroundThread()
        {
            try
            {
                if (_backgroundThread != null)
                {
                    _backgroundThread.QuitSafely();
                    _backgroundThread.Join();
                    _backgroundThread = null;
                }

                lock (_cameraStateLock)
                {
                    _backgroundHandler = null;
                }
            }
            catch (Java.Lang.InterruptedException e)
            {
                e.PrintStackTrace();
            }
        }
Beispiel #15
0
        public static void StopCapture()
        {
            if (_camera != null)
            {
                _camera.Close();
                _camera = null;
            }

            if (_captureSession != null)
            {
                _captureSession.Close();
                _captureSession = null;
            }

            if (_backgroundThread != null)
            {
                _backgroundThread.QuitSafely();
                _backgroundThread.Join();
                _backgroundThread  = null;
                _backgroundHandler = null;
            }
        }