@TargetApi(Build.VERSION_CODES.LOLLIPOP) private static boolean relaunchTask(int tabId){
  if (tabId == Tab.INVALID_TAB_ID)   return false;
  Context context=ApplicationStatus.getApplicationContext();
  ActivityManager manager=(ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE);
  for (  AppTask task : manager.getAppTasks()) {
    RecentTaskInfo info=DocumentUtils.getTaskInfoFromTask(task);
    if (info == null)     continue;
    int id=ActivityDelegate.getTabIdFromIntent(info.baseIntent);
    if (id != tabId)     continue;
    DocumentTabModelSelector.setPrioritizedTabId(id);
    if (!moveToFront(task))     continue;
    return true;
  }
  return false;
}

@ TargetApi ( Build . VERSION_CODES . LOLLIPOP ) private static boolean relaunchTask ( int tabId ) { if ( tabId == Tab . INVALID_TAB_ID ) return false ; Context context = ApplicationStatus . getApplicationContext ( ) ; ActivityManager manager = ( ActivityManager ) context . getSystemService ( Context . ACTIVITY_SERVICE ) ; for ( AppTask task : manager . getAppTasks ( ) ) { RecentTaskInfo info = DocumentUtils . getTaskInfoFromTask ( task ) ; if ( info == null ) continue ; int id = ActivityDelegate . getTabIdFromIntent ( info . baseIntent ) ; if ( id != tabId ) continue ; DocumentTabModelSelector . setPrioritizedTabId ( id ) ; if ( ! moveToFront ( task ) ) continue ; return true ; } return false ; }
bring the task matching the given tab id to the front .
