private Intent[] startActivitiesProcess(int userId, Intent[] intents, ActivityInfo[] infos, ActivityRecord resultTo) { Intent[] destIntents = new Intent[intents.length]; for (int i = 0; i < intents.length; i++) { destIntents[i] = startActivityProcess(userId, resultTo, intents[i], infos[i]); } return destIntents; }
private void startActivityFromSourceTask(TaskRecord task, Intent intent, ActivityInfo info, String resultWho, int requestCode, Bundle options) { ActivityRecord top = task.activities.isEmpty() ? null : task.activities.get(task.activities.size() - 1); if (top != null) { if (startActivityProcess(task.userId, top, intent, info) != null) { realStartActivityLocked(top.token, intent, resultWho, requestCode, options); } } }
private void startActivityInNewTaskLocked(int userId, Intent intent, ActivityInfo info, Bundle options) { Intent destIntent = startActivityProcess(userId, null, intent, info); if (destIntent != null) { destIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); destIntent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK); destIntent.addFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { // noinspection deprecation destIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); } else { destIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { VirtualCore.get().getContext().startActivity(destIntent, options); } else { VirtualCore.get().getContext().startActivity(destIntent); } } }
destIntent = startActivityProcess(userId, sourceRecord, intent, info); if (destIntent != null) { startActivityFromSourceTask(reuseTask, destIntent, info, resultWho, requestCode, options);
private Intent[] startActivitiesProcess(int userId, Intent[] intents, ActivityInfo[] infos, ActivityRecord resultTo) { Intent[] destIntents = new Intent[intents.length]; for (int i = 0; i < intents.length; i++) { destIntents[i] = startActivityProcess(userId, resultTo, intents[i], infos[i]); } return destIntents; }
private Intent[] startActivitiesProcess(int userId, Intent[] intents, ActivityInfo[] infos, ActivityRecord resultTo) { Intent[] destIntents = new Intent[intents.length]; for (int i = 0; i < intents.length; i++) { destIntents[i] = startActivityProcess(userId, resultTo, intents[i], infos[i]); } return destIntents; }
private void startActivityFromSourceTask(TaskRecord task, Intent intent, ActivityInfo info, String resultWho, int requestCode, Bundle options) { ActivityRecord top = task.activities.isEmpty() ? null : task.activities.get(task.activities.size() - 1); if (top != null) { if (startActivityProcess(task.userId, top, intent, info) != null) { realStartActivityLocked(top.token, intent, resultWho, requestCode, options); } } }
private void startActivityFromSourceTask(TaskRecord task, Intent intent, ActivityInfo info, String resultWho, int requestCode, Bundle options) { ActivityRecord top = task.activities.isEmpty() ? null : task.activities.get(task.activities.size() - 1); if (top != null) { if (startActivityProcess(task.userId, top, intent, info) != null) { realStartActivityLocked(top.token, intent, resultWho, requestCode, options); } } }
private void startActivityInNewTaskLocked(int userId, Intent intent, ActivityInfo info, Bundle options) { Intent destIntent = startActivityProcess(userId, null, intent, info); if (destIntent != null) { destIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); destIntent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK); destIntent.addFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { // noinspection deprecation destIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); } else { destIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { VirtualCore.get().getContext().startActivity(destIntent, options); } else { VirtualCore.get().getContext().startActivity(destIntent); } } }
private void startActivityInNewTaskLocked(int userId, Intent intent, ActivityInfo info, Bundle options) { Intent destIntent = startActivityProcess(userId, null, intent, info); if (destIntent != null) { destIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); destIntent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK); destIntent.addFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { // noinspection deprecation destIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); } else { destIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { VirtualCore.get().getContext().startActivity(destIntent, options); } else { VirtualCore.get().getContext().startActivity(destIntent); } } }
destIntent = startActivityProcess(userId, sourceRecord, intent, info); if (destIntent != null) { startActivityFromSourceTask(reuseTask, destIntent, info, resultWho, requestCode, options);
destIntent = startActivityProcess(userId, sourceRecord, intent, info); if (destIntent != null) { startActivityFromSourceTask(reuseTask, destIntent, info, resultWho, requestCode, options);