コード例 #1
0
 /** Stops the background thread and its {@link Handler}. */
 private void stopBackgroundThread() {
   mBackgroundThread.quitSafely();
   try {
     mBackgroundThread.join();
     mBackgroundThread = null;
     mBackgroundHandler = null;
   } catch (InterruptedException e) {
     e.printStackTrace();
   }
 }
コード例 #2
0
 private void closeBackgroundThread() {
   backHandlerThread.quitSafely();
   try {
     backHandlerThread.join();
     backHandlerThread = null;
     mHandler = null;
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
コード例 #3
0
 /** Stops the background thread and its {@link Handler}. */
 private void stopBackgroundThread() {
   backgroundThread.quitSafely();
   try {
     backgroundThread.join();
     backgroundThread = null;
     backgroundHandler = null;
   } catch (final InterruptedException e) {
     LOGGER.e(e, "Exception!");
   }
 }
コード例 #4
0
 private final void stopChoreographerThread() {
   if (null != mChoreographerThread) {
     Choreographer.getInstance().removeFrameCallback(mFrameCallback);
     mChoreographerThread.quitSafely();
     try {
       mChoreographerThread.join();
     } catch (final Exception ignored) {
     } finally {
       mChoreographerThread = null;
     }
   }
 }
コード例 #5
0
 private void stopDraw() {
   if (handler != null) {
     handler.quit();
     handler = null;
   }
   if (mDrawThread != null) {
     try {
       mDrawThread.join();
     } catch (InterruptedException e) {
       e.printStackTrace();
     }
     mDrawThread.quit();
     mDrawThread = null;
   }
 }
コード例 #6
0
 public void end() {
   mEndFlag = true;
   synchronized (mDrawingNotify) {
     mDrawingNotify.notifyAll();
   }
   if (mHandler != null) {
     mHandler.pause();
     mHandler = null;
   }
   if (mThread != null) {
     try {
       mThread.join();
     } catch (InterruptedException e) {
       e.printStackTrace();
     }
     mThread.quit();
     mThread = null;
   }
 }