Program: 2102
Project: 2102
Buggy source:
final boolean resumeTopActivityLocked(ActivityRecord prev,Bundle options){
  ActivityRecord next=topRunningActivityLocked(null);
  final boolean userLeaving=mStackSupervisor.mUserLeaving;
  mStackSupervisor.mUserLeaving=false;
  if (next == null) {
    ActivityOptions.abort(options);
    if (DEBUG_STACK)     mStackSupervisor.validateTopActivitiesLocked();
    return mStackSupervisor.resumeHomeActivity(prev);
  }
  next.delayedResume=false;
  if (mResumedActivity == next && next.state == ActivityState.RESUMED && mStackSupervisor.allResumedActivitiesComplete()) {
    mWindowManager.executeAppTransition();
    mNoAnimActivities.clear();
    ActivityOptions.abort(options);
    if (DEBUG_STACK)     mStackSupervisor.validateTopActivitiesLocked();
    return false;
  }
  if (prev != null && prev.mLaunchHomeTaskNext && prev.finishing && prev.frontOfTask) {
    if (DEBUG_STACK)     mStackSupervisor.validateTopActivitiesLocked();
    final TaskRecord task=prev.task;
    if (topTask() != task) {
      final int taskNdx=mTaskHistory.indexOf(task) + 1;
      mTaskHistory.get(taskNdx).mActivities.get(0).mLaunchHomeTaskNext=true;
    }
 else {
      return mStackSupervisor.resumeHomeActivity(prev);
    }
  }
  if ((mService.isSleepingOrShuttingDown()) && mLastPausedActivity == next && mStackSupervisor.allPausedActivitiesComplete()) {
    mWindowManager.executeAppTransition();
    mNoAnimActivities.clear();
    ActivityOptions.abort(options);
    if (DEBUG_STACK)     mStackSupervisor.validateTopActivitiesLocked();
    return false;
  }
  if (mService.mStartedUsers.get(next.userId) == null) {
    Slog.w(TAG,"String_Node_Str" + next + "String_Node_Str"+ next.userId+ "String_Node_Str");
    if (DEBUG_STACK)     mStackSupervisor.validateTopActivitiesLocked();
    return false;
  }
  mStackSupervisor.mStoppingActivities.remove(next);
  mGoingToSleepActivities.remove(next);
  next.sleeping=false;
  mStackSupervisor.mWaitingVisibleActivities.remove(next);
  next.updateOptionsLocked(options);
  if (DEBUG_SWITCH)   Slog.v(TAG,"String_Node_Str" + next);
  if (!mStackSupervisor.allPausedActivitiesComplete()) {
    if (DEBUG_SWITCH || DEBUG_PAUSE)     Slog.v(TAG,"String_Node_Str");
    if (DEBUG_STACK)     mStackSupervisor.validateTopActivitiesLocked();
    return false;
  }
  if (false) {
    if (mLastStartedActivity != null && !mLastStartedActivity.finishing) {
      long now=SystemClock.uptimeMillis();
      final boolean inTime=mLastStartedActivity.startTime != 0 && (mLastStartedActivity.startTime + START_WARN_TIME) >= now;
      final int lastUid=mLastStartedActivity.info.applicationInfo.uid;
      final int nextUid=next.info.applicationInfo.uid;
      if (inTime && lastUid != nextUid && lastUid != next.launchedFromUid && mService.checkPermission(android.Manifest.permission.STOP_APP_SWITCHES,-1,next.launchedFromUid) != PackageManager.PERMISSION_GRANTED) {
        mService.showLaunchWarningLocked(mLastStartedActivity,next);
      }
 else {
        next.startTime=now;
        mLastStartedActivity=next;
      }
    }
 else {
      next.startTime=SystemClock.uptimeMillis();
      mLastStartedActivity=next;
    }
  }
  boolean pausing=mStackSupervisor.pauseBackStacks(userLeaving);
  if (mResumedActivity != null) {
    pausing=true;
    startPausingLocked(userLeaving,false);
  }
  if (pausing) {
    if (DEBUG_SWITCH)     Slog.v(TAG,"String_Node_Str");
    if (next.app != null && next.app.thread != null) {
      mService.updateLruProcessLocked(next.app,false);
    }
    if (DEBUG_STACK)     mStackSupervisor.validateTopActivitiesLocked();
    return true;
  }
  final ActivityRecord last=mLastPausedActivity;
  if (mService.mSleeping && last != null && !last.finishing) {
    if ((last.intent.getFlags() & Intent.FLAG_ACTIVITY_NO_HISTORY) != 0 || (last.info.flags & ActivityInfo.FLAG_NO_HISTORY) != 0) {
      if (DEBUG_STATES) {
        Slog.d(TAG,"String_Node_Str" + last + "String_Node_Str");
      }
      requestFinishActivityLocked(last.appToken,Activity.RESULT_CANCELED,null,"String_Node_Str",false);
    }
  }
  if (prev != null && prev != next) {
    if (!prev.waitingVisible && next != null && !next.nowVisible) {
      prev.waitingVisible=true;
      mStackSupervisor.mWaitingVisibleActivities.add(prev);
      if (DEBUG_SWITCH)       Slog.v(TAG,"String_Node_Str" + prev);
    }
 else {
      if (prev.finishing) {
        mWindowManager.setAppVisibility(prev.appToken,false);
        if (DEBUG_SWITCH)         Slog.v(TAG,"String_Node_Str" + prev + "String_Node_Str"+ (prev != null ? prev.waitingVisible : null)+ "String_Node_Str"+ next.nowVisible);
      }
 else {
        if (DEBUG_SWITCH)         Slog.v(TAG,"String_Node_Str" + prev + "String_Node_Str"+ (prev != null ? prev.waitingVisible : null)+ "String_Node_Str"+ next.nowVisible);
      }
    }
  }
  try {
    AppGlobals.getPackageManager().setPackageStoppedState(next.packageName,false,next.userId);
  }
 catch (  RemoteException e1) {
  }
catch (  IllegalArgumentException e) {
    Slog.w(TAG,"String_Node_Str" + next.packageName + "String_Node_Str"+ e);
  }
  boolean noAnim=false;
  if (prev != null) {
    if (prev.finishing) {
      if (DEBUG_TRANSITION)       Slog.v(TAG,"String_Node_Str" + prev);
      if (mNoAnimActivities.contains(prev)) {
        noAnim=true;
        mWindowManager.prepareAppTransition(AppTransition.TRANSIT_NONE,false);
      }
 else {
        mWindowManager.prepareAppTransition(prev.task == next.task ? AppTransition.TRANSIT_ACTIVITY_CLOSE : AppTransition.TRANSIT_TASK_CLOSE,false);
      }
      mWindowManager.setAppWillBeHidden(prev.appToken);
      mWindowManager.setAppVisibility(prev.appToken,false);
    }
 else {
      if (DEBUG_TRANSITION)       Slog.v(TAG,"String_Node_Str" + prev);
      if (mNoAnimActivities.contains(next)) {
        noAnim=true;
        mWindowManager.prepareAppTransition(AppTransition.TRANSIT_NONE,false);
      }
 else {
        mWindowManager.prepareAppTransition(prev.task == next.task ? AppTransition.TRANSIT_ACTIVITY_OPEN : AppTransition.TRANSIT_TASK_OPEN,false);
      }
    }
    if (false) {
      mWindowManager.setAppWillBeHidden(prev.appToken);
      mWindowManager.setAppVisibility(prev.appToken,false);
    }
  }
 else {
    if (DEBUG_TRANSITION)     Slog.v(TAG,"String_Node_Str");
    if (mNoAnimActivities.contains(next)) {
      noAnim=true;
      mWindowManager.prepareAppTransition(AppTransition.TRANSIT_NONE,false);
    }
 else {
      mWindowManager.prepareAppTransition(AppTransition.TRANSIT_ACTIVITY_OPEN,false);
    }
  }
  if (!noAnim) {
    next.applyOptionsLocked();
  }
 else {
    next.clearOptionsLocked();
  }
  ActivityStack lastStack=mStackSupervisor.getLastStack();
  if (next.app != null && next.app.thread != null) {
    if (DEBUG_SWITCH)     Slog.v(TAG,"String_Node_Str" + next);
    mWindowManager.setAppVisibility(next.appToken,true);
    next.startLaunchTickingLocked();
    ActivityRecord lastResumedActivity=lastStack == null ? null : lastStack.mResumedActivity;
    ActivityState lastState=next.state;
    mService.updateCpuStats();
    if (DEBUG_STATES)     Slog.v(TAG,"String_Node_Str" + next + "String_Node_Str");
    next.state=ActivityState.RESUMED;
    mResumedActivity=next;
    next.task.touchActiveTime();
    mService.addRecentTaskLocked(next.task);
    mService.updateLruProcessLocked(next.app,true);
    updateLRUListLocked(next);
    boolean updated=false;
    if (mStackSupervisor.isFrontStack(this)) {
      Configuration config=mWindowManager.updateOrientationFromAppTokens(mService.mConfiguration,next.mayFreezeScreenLocked(next.app) ? next.appToken : null);
      if (config != null) {
        next.frozenBeforeDestroy=true;
      }
      updated=mService.updateConfigurationLocked(config,next,false,false);
    }
    if (!updated) {
      ActivityRecord nextNext=topRunningActivityLocked(null);
      if (DEBUG_SWITCH)       Slog.i(TAG,"String_Node_Str" + next + "String_Node_Str"+ nextNext);
      if (nextNext != next) {
        mHandler.sendEmptyMessage(RESUME_TOP_ACTIVITY_MSG);
      }
      if (mStackSupervisor.reportResumedActivityLocked(next)) {
        mNoAnimActivities.clear();
        if (DEBUG_STACK)         mStackSupervisor.validateTopActivitiesLocked();
        return true;
      }
      if (DEBUG_STACK)       mStackSupervisor.validateTopActivitiesLocked();
      return false;
    }
    try {
      ArrayList<ResultInfo> a=next.results;
      if (a != null) {
        final int N=a.size();
        if (!next.finishing && N > 0) {
          if (DEBUG_RESULTS)           Slog.v(TAG,"String_Node_Str" + next + "String_Node_Str"+ a);
          next.app.thread.scheduleSendResult(next.appToken,a);
        }
      }
      if (next.newIntents != null) {
        next.app.thread.scheduleNewIntent(next.newIntents,next.appToken);
      }
      EventLog.writeEvent(EventLogTags.AM_RESUME_ACTIVITY,next.userId,System.identityHashCode(next),next.task.taskId,next.shortComponentName);
      next.sleeping=false;
      mService.showAskCompatModeDialogLocked(next);
      next.app.pendingUiClean=true;
      next.app.thread.scheduleResumeActivity(next.appToken,mService.isNextTransitionForward());
      checkReadyForSleepLocked();
    }
 catch (    Exception e) {
      if (DEBUG_STATES)       Slog.v(TAG,"String_Node_Str" + lastState + "String_Node_Str"+ next);
      next.state=lastState;
      if (lastStack != null) {
        lastStack.mResumedActivity=lastResumedActivity;
      }
      Slog.i(TAG,"String_Node_Str" + next);
      if (!next.hasBeenLaunched) {
        next.hasBeenLaunched=true;
      }
 else       if (SHOW_APP_STARTING_PREVIEW && lastStack != null && mStackSupervisor.isFrontStack(lastStack)) {
        mWindowManager.setAppStartingWindow(next.appToken,next.packageName,next.theme,mService.compatibilityInfoForPackageLocked(next.info.applicationInfo),next.nonLocalizedLabel,next.labelRes,next.icon,next.windowFlags,null,true);
      }
      mStackSupervisor.startSpecificActivityLocked(next,true,false);
      if (DEBUG_STACK)       mStackSupervisor.validateTopActivitiesLocked();
      return true;
    }
    try {
      next.visible=true;
      completeResumeLocked(next);
    }
 catch (    Exception e) {
      Slog.w(TAG,"String_Node_Str" + next,e);
      requestFinishActivityLocked(next.appToken,Activity.RESULT_CANCELED,null,"String_Node_Str",true);
      if (DEBUG_STACK)       mStackSupervisor.validateTopActivitiesLocked();
      return true;
    }
    next.stopped=false;
  }
 else {
    if (!next.hasBeenLaunched) {
      next.hasBeenLaunched=true;
    }
 else {
      if (SHOW_APP_STARTING_PREVIEW) {
        mWindowManager.setAppStartingWindow(next.appToken,next.packageName,next.theme,mService.compatibilityInfoForPackageLocked(next.info.applicationInfo),next.nonLocalizedLabel,next.labelRes,next.icon,next.windowFlags,null,true);
      }
      if (DEBUG_SWITCH)       Slog.v(TAG,"String_Node_Str" + next);
    }
    mStackSupervisor.startSpecificActivityLocked(next,true,true);
  }
  if (DEBUG_STACK)   mStackSupervisor.validateTopActivitiesLocked();
  return true;
}

Fixed version (ground truth):
final boolean resumeTopActivityLocked(ActivityRecord prev,Bundle options){
  ActivityRecord next=topRunningActivityLocked(null);
  final boolean userLeaving=mStackSupervisor.mUserLeaving;
  mStackSupervisor.mUserLeaving=false;
  if (next == null) {
    ActivityOptions.abort(options);
    if (DEBUG_STACK)     mStackSupervisor.validateTopActivitiesLocked();
    return mStackSupervisor.resumeHomeActivity(prev);
  }
  next.delayedResume=false;
  if (mResumedActivity == next && next.state == ActivityState.RESUMED && mStackSupervisor.allResumedActivitiesComplete()) {
    mWindowManager.executeAppTransition();
    mNoAnimActivities.clear();
    ActivityOptions.abort(options);
    if (DEBUG_STACK)     mStackSupervisor.validateTopActivitiesLocked();
    return false;
  }
  if (prev != null && prev.mLaunchHomeTaskNext && prev.finishing && prev.frontOfTask) {
    if (DEBUG_STACK)     mStackSupervisor.validateTopActivitiesLocked();
    final TaskRecord task=prev.task;
    if (topTask() != task) {
      final int taskNdx=mTaskHistory.indexOf(task) + 1;
      mTaskHistory.get(taskNdx).mActivities.get(0).mLaunchHomeTaskNext=true;
    }
 else {
      return mStackSupervisor.resumeHomeActivity(prev);
    }
  }
  if ((mService.isSleepingOrShuttingDown()) && mLastPausedActivity == next && mStackSupervisor.allPausedActivitiesComplete()) {
    mWindowManager.executeAppTransition();
    mNoAnimActivities.clear();
    ActivityOptions.abort(options);
    if (DEBUG_STACK)     mStackSupervisor.validateTopActivitiesLocked();
    return false;
  }
  if (mService.mStartedUsers.get(next.userId) == null) {
    Slog.w(TAG,"String_Node_Str" + next + "String_Node_Str"+ next.userId+ "String_Node_Str");
    if (DEBUG_STACK)     mStackSupervisor.validateTopActivitiesLocked();
    return false;
  }
  mStackSupervisor.mStoppingActivities.remove(next);
  mGoingToSleepActivities.remove(next);
  next.sleeping=false;
  mStackSupervisor.mWaitingVisibleActivities.remove(next);
  next.updateOptionsLocked(options);
  if (DEBUG_SWITCH)   Slog.v(TAG,"String_Node_Str" + next);
  if (!mStackSupervisor.allPausedActivitiesComplete()) {
    if (DEBUG_SWITCH || DEBUG_PAUSE)     Slog.v(TAG,"String_Node_Str");
    if (DEBUG_STACK)     mStackSupervisor.validateTopActivitiesLocked();
    return false;
  }
  if (false) {
    if (mLastStartedActivity != null && !mLastStartedActivity.finishing) {
      long now=SystemClock.uptimeMillis();
      final boolean inTime=mLastStartedActivity.startTime != 0 && (mLastStartedActivity.startTime + START_WARN_TIME) >= now;
      final int lastUid=mLastStartedActivity.info.applicationInfo.uid;
      final int nextUid=next.info.applicationInfo.uid;
      if (inTime && lastUid != nextUid && lastUid != next.launchedFromUid && mService.checkPermission(android.Manifest.permission.STOP_APP_SWITCHES,-1,next.launchedFromUid) != PackageManager.PERMISSION_GRANTED) {
        mService.showLaunchWarningLocked(mLastStartedActivity,next);
      }
 else {
        next.startTime=now;
        mLastStartedActivity=next;
      }
    }
 else {
      next.startTime=SystemClock.uptimeMillis();
      mLastStartedActivity=next;
    }
  }
  boolean pausing=mStackSupervisor.pauseBackStacks(userLeaving);
  if (mResumedActivity != null) {
    pausing=true;
    startPausingLocked(userLeaving,false);
  }
  if (pausing) {
    if (DEBUG_SWITCH)     Slog.v(TAG,"String_Node_Str");
    if (next.app != null && next.app.thread != null) {
      mService.updateLruProcessLocked(next.app,false);
    }
    if (DEBUG_STACK)     mStackSupervisor.validateTopActivitiesLocked();
    return true;
  }
  final ActivityRecord last=mLastPausedActivity;
  if (mService.mSleeping && last != null && !last.finishing) {
    if ((last.intent.getFlags() & Intent.FLAG_ACTIVITY_NO_HISTORY) != 0 || (last.info.flags & ActivityInfo.FLAG_NO_HISTORY) != 0) {
      if (DEBUG_STATES) {
        Slog.d(TAG,"String_Node_Str" + last + "String_Node_Str");
      }
      requestFinishActivityLocked(last.appToken,Activity.RESULT_CANCELED,null,"String_Node_Str",false);
    }
  }
  if (prev != null && prev != next) {
    if (!prev.waitingVisible && next != null && !next.nowVisible) {
      prev.waitingVisible=true;
      mStackSupervisor.mWaitingVisibleActivities.add(prev);
      if (DEBUG_SWITCH)       Slog.v(TAG,"String_Node_Str" + prev);
    }
 else {
      if (prev.finishing) {
        mWindowManager.setAppVisibility(prev.appToken,false);
        if (DEBUG_SWITCH)         Slog.v(TAG,"String_Node_Str" + prev + "String_Node_Str"+ (prev != null ? prev.waitingVisible : null)+ "String_Node_Str"+ next.nowVisible);
      }
 else {
        if (DEBUG_SWITCH)         Slog.v(TAG,"String_Node_Str" + prev + "String_Node_Str"+ (prev != null ? prev.waitingVisible : null)+ "String_Node_Str"+ next.nowVisible);
      }
    }
  }
  try {
    AppGlobals.getPackageManager().setPackageStoppedState(next.packageName,false,next.userId);
  }
 catch (  RemoteException e1) {
  }
catch (  IllegalArgumentException e) {
    Slog.w(TAG,"String_Node_Str" + next.packageName + "String_Node_Str"+ e);
  }
  boolean noAnim=false;
  if (prev != null) {
    if (prev.finishing) {
      if (DEBUG_TRANSITION)       Slog.v(TAG,"String_Node_Str" + prev);
      if (mNoAnimActivities.contains(prev)) {
        noAnim=true;
        mWindowManager.prepareAppTransition(AppTransition.TRANSIT_NONE,false);
      }
 else {
        mWindowManager.prepareAppTransition(prev.task == next.task ? AppTransition.TRANSIT_ACTIVITY_CLOSE : AppTransition.TRANSIT_TASK_CLOSE,false);
      }
      mWindowManager.setAppWillBeHidden(prev.appToken);
      mWindowManager.setAppVisibility(prev.appToken,false);
    }
 else {
      if (DEBUG_TRANSITION)       Slog.v(TAG,"String_Node_Str" + prev);
      if (mNoAnimActivities.contains(next)) {
        noAnim=true;
        mWindowManager.prepareAppTransition(AppTransition.TRANSIT_NONE,false);
      }
 else {
        mWindowManager.prepareAppTransition(prev.task == next.task ? AppTransition.TRANSIT_ACTIVITY_OPEN : AppTransition.TRANSIT_TASK_OPEN,false);
      }
    }
    if (false) {
      mWindowManager.setAppWillBeHidden(prev.appToken);
      mWindowManager.setAppVisibility(prev.appToken,false);
    }
  }
 else {
    if (DEBUG_TRANSITION)     Slog.v(TAG,"String_Node_Str");
    if (mNoAnimActivities.contains(next)) {
      noAnim=true;
      mWindowManager.prepareAppTransition(AppTransition.TRANSIT_NONE,false);
    }
 else {
      mWindowManager.prepareAppTransition(AppTransition.TRANSIT_ACTIVITY_OPEN,false);
    }
  }
  if (!noAnim) {
    next.applyOptionsLocked();
  }
 else {
    next.clearOptionsLocked();
  }
  ActivityStack lastStack=mStackSupervisor.getLastStack();
  if (next.app != null && next.app.thread != null) {
    if (DEBUG_SWITCH)     Slog.v(TAG,"String_Node_Str" + next);
    mWindowManager.setAppVisibility(next.appToken,true);
    next.startLaunchTickingLocked();
    ActivityRecord lastResumedActivity=lastStack == null ? null : lastStack.mResumedActivity;
    ActivityState lastState=next.state;
    mService.updateCpuStats();
    if (DEBUG_STATES)     Slog.v(TAG,"String_Node_Str" + next + "String_Node_Str");
    next.state=ActivityState.RESUMED;
    mResumedActivity=next;
    next.task.touchActiveTime();
    mService.addRecentTaskLocked(next.task);
    mService.updateLruProcessLocked(next.app,true);
    updateLRUListLocked(next);
    boolean updated=false;
    if (mStackSupervisor.isFrontStack(this)) {
      Configuration config=mWindowManager.updateOrientationFromAppTokens(mService.mConfiguration,next.mayFreezeScreenLocked(next.app) ? next.appToken : null);
      if (config != null) {
        next.frozenBeforeDestroy=true;
      }
      updated=mService.updateConfigurationLocked(config,next,false,false);
    }
    if (!updated) {
      ActivityRecord nextNext=topRunningActivityLocked(null);
      if (DEBUG_SWITCH)       Slog.i(TAG,"String_Node_Str" + next + "String_Node_Str"+ nextNext);
      if (nextNext != next) {
        mStackSupervisor.scheduleResumeTopActivities();
      }
      if (mStackSupervisor.reportResumedActivityLocked(next)) {
        mNoAnimActivities.clear();
        if (DEBUG_STACK)         mStackSupervisor.validateTopActivitiesLocked();
        return true;
      }
      if (DEBUG_STACK)       mStackSupervisor.validateTopActivitiesLocked();
      return false;
    }
    try {
      ArrayList<ResultInfo> a=next.results;
      if (a != null) {
        final int N=a.size();
        if (!next.finishing && N > 0) {
          if (DEBUG_RESULTS)           Slog.v(TAG,"String_Node_Str" + next + "String_Node_Str"+ a);
          next.app.thread.scheduleSendResult(next.appToken,a);
        }
      }
      if (next.newIntents != null) {
        next.app.thread.scheduleNewIntent(next.newIntents,next.appToken);
      }
      EventLog.writeEvent(EventLogTags.AM_RESUME_ACTIVITY,next.userId,System.identityHashCode(next),next.task.taskId,next.shortComponentName);
      next.sleeping=false;
      mService.showAskCompatModeDialogLocked(next);
      next.app.pendingUiClean=true;
      next.app.thread.scheduleResumeActivity(next.appToken,mService.isNextTransitionForward());
      checkReadyForSleepLocked();
    }
 catch (    Exception e) {
      if (DEBUG_STATES)       Slog.v(TAG,"String_Node_Str" + lastState + "String_Node_Str"+ next);
      next.state=lastState;
      if (lastStack != null) {
        lastStack.mResumedActivity=lastResumedActivity;
      }
      Slog.i(TAG,"String_Node_Str" + next);
      if (!next.hasBeenLaunched) {
        next.hasBeenLaunched=true;
      }
 else       if (SHOW_APP_STARTING_PREVIEW && lastStack != null && mStackSupervisor.isFrontStack(lastStack)) {
        mWindowManager.setAppStartingWindow(next.appToken,next.packageName,next.theme,mService.compatibilityInfoForPackageLocked(next.info.applicationInfo),next.nonLocalizedLabel,next.labelRes,next.icon,next.windowFlags,null,true);
      }
      mStackSupervisor.startSpecificActivityLocked(next,true,false);
      if (DEBUG_STACK)       mStackSupervisor.validateTopActivitiesLocked();
      return true;
    }
    try {
      next.visible=true;
      completeResumeLocked(next);
    }
 catch (    Exception e) {
      Slog.w(TAG,"String_Node_Str" + next,e);
      requestFinishActivityLocked(next.appToken,Activity.RESULT_CANCELED,null,"String_Node_Str",true);
      if (DEBUG_STACK)       mStackSupervisor.validateTopActivitiesLocked();
      return true;
    }
    next.stopped=false;
  }
 else {
    if (!next.hasBeenLaunched) {
      next.hasBeenLaunched=true;
    }
 else {
      if (SHOW_APP_STARTING_PREVIEW) {
        mWindowManager.setAppStartingWindow(next.appToken,next.packageName,next.theme,mService.compatibilityInfoForPackageLocked(next.info.applicationInfo),next.nonLocalizedLabel,next.labelRes,next.icon,next.windowFlags,null,true);
      }
      if (DEBUG_SWITCH)       Slog.v(TAG,"String_Node_Str" + next);
    }
    mStackSupervisor.startSpecificActivityLocked(next,true,true);
  }
  if (DEBUG_STACK)   mStackSupervisor.validateTopActivitiesLocked();
  return true;
}