question: private void doWatchdogCheck ( ) { mHaveWatchdogScheduled = false ; if ( ! mIsRunning ) { return ; } long now = mMonotonicClock . now ( ) ; boolean hasNotDrawnWithinTimeout = mWaitingForDraw && now - mLastInvalidateTimeMs > WATCH_DOG_TIMER_MIN_TIMEOUT_MS ; boolean hasNotAdvancedFrameWithinTimeout = mNextFrameTaskMs != - 1 && now - mNextFrameTaskMs > WATCH_DOG_TIMER_MIN_TIMEOUT_MS ; if ( hasNotDrawnWithinTimeout || hasNotAdvancedFrameWithinTimeout ) { dropCaches ( ) ; doInvalidateSelf ( ) ; } else { mScheduledExecutorServiceForUiThread . schedule ( mWatchdogTask , WATCH_DOG_TIMER_POLL_INTERVAL_MS , TimeUnit . MILLISECONDS ) ; mHaveWatchdogScheduled = true ; } }
target:  Checks to make sure we drop our caches if we haven't drawn in a while. There's no reliable way for a Drawable to determine if it's still actively part of a View, so we use a heuristic instead.