question: public boolean isTabAssociatedWithNonDestroyedActivity ( boolean isIncognito , int tabId ) { List < WeakReference < Activity > > activities = ApplicationStatus . getRunningActivities ( ) ; for ( WeakReference < Activity > ref : activities ) { Activity activity = ref . get ( ) ; if ( activity != null && isValidActivity ( isIncognito , activity . getIntent ( ) ) && getTabIdFromIntent ( activity . getIntent ( ) ) == tabId && ! isActivityDestroyed ( activity ) ) { return true ; } } return false ; }
target:  Check if the Tab is associated with an Activity that hasn't been destroyed. This catches situations where a DocumentActivity is no longer listed in Android's Recents list, but is not dead yet.