public void handleStop() { if (timer != null) { timer.cancel(); } animating.set(false); isStopping.set(true); if (loaderThread != null) { try { loaderThread.join(); } catch (InterruptedException e) { Log.e(LCAT, "loaderThread termination interrupted"); } loaderThread = null; } if (loader != null) { synchronized (loader) { loader.notify(); } } loader = null; timer = null; animator = null; paused = false; fireStop(); }
public void resume() { paused = false; if (loader != null) { synchronized (loader) { loader.notify(); } } }
@Override public void release() { super.release(); if (loader != null) { synchronized (loader) { loader.notify(); } loader = null; } animating.set(false); isStopping.set(true); synchronized (releasedLock) { if (imageSources != null) { imageSources.clear(); imageSources = null; } } if (timer != null) { timer.cancel(); timer = null; } defaultImageSource = null; }