Loading core/java/android/app/ITaskStackListener.aidl +11 −0 Original line number Original line Diff line number Diff line Loading @@ -205,4 +205,15 @@ oneway interface ITaskStackListener { * @param {@code true} if the task got focus, {@code false} if it lost it. * @param {@code true} if the task got focus, {@code false} if it lost it. */ */ void onTaskFocusChanged(int taskId, boolean focused); void onTaskFocusChanged(int taskId, boolean focused); /** * Called when a task changes its requested orientation. It is different from {@link * #onActivityRequestedOrientationChanged(int, int)} in the sense that this method is called * when a task changes requested orientation due to activity launch, dimiss or reparenting. * * @param taskId id of the task. * @param requestedOrientation the new requested orientation of this task as screen orientations * in {@link android.content.pm.ActivityInfo}. */ void onTaskRequestedOrientationChanged(int taskId, int requestedOrientation); } } core/java/android/app/TaskStackListener.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -195,4 +195,8 @@ public abstract class TaskStackListener extends ITaskStackListener.Stub { @Override @Override public void onTaskFocusChanged(int taskId, boolean focused) { public void onTaskFocusChanged(int taskId, boolean focused) { } } @Override public void onTaskRequestedOrientationChanged(int taskId, int requestedOrientation) { } } } services/core/java/com/android/server/wm/ActivityStack.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -2957,8 +2957,8 @@ class ActivityStack extends Task { final int taskId = activity != null final int taskId = activity != null ? mStackSupervisor.getNextTaskIdForUser(activity.mUserId) ? mStackSupervisor.getNextTaskIdForUser(activity.mUserId) : mStackSupervisor.getNextTaskIdForUser(); : mStackSupervisor.getNextTaskIdForUser(); task = Task.create( task = new ActivityStack(mAtmService, taskId, info, intent, voiceSession, mAtmService, taskId, info, intent, voiceSession, voiceInteractor, this); voiceInteractor, null /* taskDescription */, this); // add the task to stack first, mTaskPositioner might need the stack association // add the task to stack first, mTaskPositioner might need the stack association addChild(task, toTop, (info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0); addChild(task, toTop, (info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0); Loading services/core/java/com/android/server/wm/DisplayContent.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -1393,6 +1393,13 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo final WindowContainer orientationSource = getLastOrientationSource(); final WindowContainer orientationSource = getLastOrientationSource(); final ActivityRecord r = final ActivityRecord r = orientationSource != null ? orientationSource.asActivityRecord() : null; orientationSource != null ? orientationSource.asActivityRecord() : null; if (r != null && r.getTask() != null && orientation != r.getTask().mLastReportedRequestedOrientation) { final Task task = r.getTask(); task.mLastReportedRequestedOrientation = orientation; mAtmService.getTaskChangeNotificationController() .notifyTaskRequestedOrientationChanged(task.mTaskId, orientation); } // Currently there is no use case from non-activity. // Currently there is no use case from non-activity. if (r != null && handleTopActivityLaunchingInDifferentOrientation(r)) { if (r != null && handleTopActivityLaunchingInDifferentOrientation(r)) { // Display orientation should be deferred until the top fixed rotation is finished. // Display orientation should be deferred until the top fixed rotation is finished. Loading services/core/java/com/android/server/wm/Task.java +226 −300 Original line number Original line Diff line number Diff line Loading @@ -232,11 +232,6 @@ class Task extends WindowContainer<WindowContainer> { // Do not move the stack as a part of reparenting // Do not move the stack as a part of reparenting static final int REPARENT_LEAVE_STACK_IN_PLACE = 2; static final int REPARENT_LEAVE_STACK_IN_PLACE = 2; /** * The factory used to create {@link Task}. This allows OEM subclass {@link Task}. */ private static TaskFactory sTaskFactory; String affinity; // The affinity name for this task, or null; may change identity. String affinity; // The affinity name for this task, or null; may change identity. String rootAffinity; // Initial base affinity, or null; does not change from initial root. String rootAffinity; // Initial base affinity, or null; does not change from initial root. String mWindowLayoutAffinity; // Launch param affinity of this task or null. Used when saving String mWindowLayoutAffinity; // Launch param affinity of this task or null. Used when saving Loading Loading @@ -368,6 +363,14 @@ class Task extends WindowContainer<WindowContainer> { @Surface.Rotation @Surface.Rotation private int mRotation; private int mRotation; /** * Last requested orientation reported to DisplayContent. This is different from {@link * #mOrientation} in the sense that this takes activities' requested orientation into * account. Start with {@link ActivityInfo#SCREEN_ORIENTATION_UNSPECIFIED} so that we don't need * to notify for activities that don't specify any orientation. */ int mLastReportedRequestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; // For comparison with DisplayContent bounds. // For comparison with DisplayContent bounds. private Rect mTmpRect = new Rect(); private Rect mTmpRect = new Rect(); // For handling display rotations. // For handling display rotations. Loading Loading @@ -4061,81 +4064,8 @@ class Task extends WindowContainer<WindowContainer> { } } } } @VisibleForTesting static TaskFactory getTaskFactory() { if (sTaskFactory == null) { setTaskFactory(new TaskFactory()); } return sTaskFactory; } static void setTaskFactory(TaskFactory factory) { sTaskFactory = factory; } static Task create(ActivityTaskManagerService service, int taskId, int activityType, ActivityInfo info, Intent intent, boolean createdByOrganizer) { return getTaskFactory().create(service, taskId, activityType, info, intent, createdByOrganizer); } static Task create(ActivityTaskManagerService service, int taskId, ActivityInfo info, Intent intent, IVoiceInteractionSession voiceSession, IVoiceInteractor voiceInteractor, ActivityStack stack) { return getTaskFactory().create( service, taskId, info, intent, voiceSession, voiceInteractor, stack); } static Task restoreFromXml(XmlPullParser in, ActivityStackSupervisor stackSupervisor) static Task restoreFromXml(XmlPullParser in, ActivityStackSupervisor stackSupervisor) throws IOException, XmlPullParserException { throws IOException, XmlPullParserException { return getTaskFactory().restoreFromXml(in, stackSupervisor); } /** * A factory class used to create {@link Task} or its subclass if any. This can be * specified when system boots by setting it with * {@link #setTaskFactory(TaskFactory)}. */ static class TaskFactory { Task create(ActivityTaskManagerService service, int taskId, int activityType, ActivityInfo info, Intent intent, boolean createdByOrganizer) { return new ActivityStack(service, taskId, activityType, info, intent, createdByOrganizer); } Task create(ActivityTaskManagerService service, int taskId, ActivityInfo info, Intent intent, IVoiceInteractionSession voiceSession, IVoiceInteractor voiceInteractor, ActivityStack stack) { return new ActivityStack(service, taskId, info, intent, voiceSession, voiceInteractor, null /*taskDescription*/, stack); } /** * Should only be used when we're restoring {@link Task} from storage. */ Task create(ActivityTaskManagerService service, int taskId, Intent intent, Intent affinityIntent, String affinity, String rootAffinity, ComponentName realActivity, ComponentName origActivity, boolean rootWasReset, boolean autoRemoveRecents, boolean askedCompatMode, int userId, int effectiveUid, String lastDescription, long lastTimeMoved, boolean neverRelinquishIdentity, TaskDescription lastTaskDescription, int taskAffiliation, int prevTaskId, int nextTaskId, int taskAffiliationColor, int callingUid, String callingPackage, @Nullable String callingFeatureId, int resizeMode, boolean supportsPictureInPicture, boolean realActivitySuspended, boolean userSetupComplete, int minWidth, int minHeight, ActivityStack stack) { return new ActivityStack(service, taskId, intent, affinityIntent, affinity, rootAffinity, realActivity, origActivity, rootWasReset, autoRemoveRecents, askedCompatMode, userId, effectiveUid, lastDescription, lastTimeMoved, neverRelinquishIdentity, lastTaskDescription, taskAffiliation, prevTaskId, nextTaskId, taskAffiliationColor, callingUid, callingPackage, callingFeatureId, resizeMode, supportsPictureInPicture, realActivitySuspended, userSetupComplete, minWidth, minHeight, null /*ActivityInfo*/, null /*_voiceSession*/, null /*_voiceInteractor*/, stack); } Task restoreFromXml(XmlPullParser in, ActivityStackSupervisor stackSupervisor) throws IOException, XmlPullParserException { Intent intent = null; Intent intent = null; Intent affinityIntent = null; Intent affinityIntent = null; ArrayList<ActivityRecord> activities = new ArrayList<>(); ArrayList<ActivityRecord> activities = new ArrayList<>(); Loading Loading @@ -4176,8 +4106,10 @@ class Task extends WindowContainer<WindowContainer> { for (int attrNdx = in.getAttributeCount() - 1; attrNdx >= 0; --attrNdx) { for (int attrNdx = in.getAttributeCount() - 1; attrNdx >= 0; --attrNdx) { final String attrName = in.getAttributeName(attrNdx); final String attrName = in.getAttributeName(attrNdx); final String attrValue = in.getAttributeValue(attrNdx); final String attrValue = in.getAttributeValue(attrNdx); if (TaskPersister.DEBUG) Slog.d(TaskPersister.TAG, "Task: attribute name=" if (TaskPersister.DEBUG) { + attrName + " value=" + attrValue); Slog.d(TaskPersister.TAG, "Task: attribute name=" + attrName + " value=" + attrValue); } switch (attrName) { switch (attrName) { case ATTR_TASKID: case ATTR_TASKID: if (taskId == INVALID_TASK_ID) taskId = Integer.parseInt(attrValue); if (taskId == INVALID_TASK_ID) taskId = Integer.parseInt(attrValue); Loading Loading @@ -4283,8 +4215,7 @@ class Task extends WindowContainer<WindowContainer> { && (event != XmlPullParser.END_TAG || in.getDepth() >= outerDepth)) { && (event != XmlPullParser.END_TAG || in.getDepth() >= outerDepth)) { if (event == XmlPullParser.START_TAG) { if (event == XmlPullParser.START_TAG) { final String name = in.getName(); final String name = in.getName(); if (TaskPersister.DEBUG) Slog.d(TaskPersister.TAG, if (TaskPersister.DEBUG) Slog.d(TaskPersister.TAG, "Task: START_TAG name=" + name); "Task: START_TAG name=" + name); if (TAG_AFFINITYINTENT.equals(name)) { if (TAG_AFFINITYINTENT.equals(name)) { affinityIntent = Intent.restoreFromXml(in); affinityIntent = Intent.restoreFromXml(in); } else if (TAG_INTENT.equals(name)) { } else if (TAG_INTENT.equals(name)) { Loading @@ -4292,13 +4223,15 @@ class Task extends WindowContainer<WindowContainer> { } else if (TAG_ACTIVITY.equals(name)) { } else if (TAG_ACTIVITY.equals(name)) { ActivityRecord activity = ActivityRecord activity = ActivityRecord.restoreFromXml(in, stackSupervisor); ActivityRecord.restoreFromXml(in, stackSupervisor); if (TaskPersister.DEBUG) Slog.d(TaskPersister.TAG, "Task: activity=" if (TaskPersister.DEBUG) { + activity); Slog.d(TaskPersister.TAG, "Task: activity=" + activity); } if (activity != null) { if (activity != null) { activities.add(activity); activities.add(activity); } } } else { } else { handleUnknownTag(name, in); Slog.e(TAG, "restoreTask: Unexpected name=" + name); XmlUtils.skipCurrentTag(in); } } } } } } Loading Loading @@ -4346,14 +4279,14 @@ class Task extends WindowContainer<WindowContainer> { } } } } final Task task = create(stackSupervisor.mService, final Task task = new ActivityStack(stackSupervisor.mService, taskId, intent, taskId, intent, affinityIntent, affinityIntent, affinity, rootAffinity, realActivity, origActivity, rootHasReset, affinity, rootAffinity, realActivity, origActivity, rootHasReset, autoRemoveRecents, askedCompatMode, userId, effectiveUid, lastDescription, autoRemoveRecents, askedCompatMode, userId, effectiveUid, lastDescription, lastTimeOnTop, neverRelinquishIdentity, taskDescription, lastTimeOnTop, neverRelinquishIdentity, taskDescription, taskAffiliation, taskAffiliation, prevTaskId, nextTaskId, taskAffiliationColor, callingUid, prevTaskId, nextTaskId, taskAffiliationColor, callingUid, callingPackage, callingPackage, callingFeatureId, resizeMode, supportsPictureInPicture, callingFeatureId, resizeMode, supportsPictureInPicture, realActivitySuspended, realActivitySuspended, userSetupComplete, minWidth, minHeight, null /*stack*/); userSetupComplete, minWidth, minHeight, null /*ActivityInfo*/, null /*_voiceSession*/, null /*_voiceInteractor*/, null /* stack */); task.mLastNonFullscreenBounds = lastNonFullscreenBounds; task.mLastNonFullscreenBounds = lastNonFullscreenBounds; task.setBounds(lastNonFullscreenBounds); task.setBounds(lastNonFullscreenBounds); task.mWindowLayoutAffinity = windowLayoutAffinity; task.mWindowLayoutAffinity = windowLayoutAffinity; Loading @@ -4366,13 +4299,6 @@ class Task extends WindowContainer<WindowContainer> { return task; return task; } } void handleUnknownTag(String name, XmlPullParser in) throws IOException, XmlPullParserException { Slog.e(TAG, "restoreTask: Unexpected name=" + name); XmlUtils.skipCurrentTag(in); } } @Override @Override boolean isOrganized() { boolean isOrganized() { return mTaskOrganizer != null; return mTaskOrganizer != null; Loading Loading
core/java/android/app/ITaskStackListener.aidl +11 −0 Original line number Original line Diff line number Diff line Loading @@ -205,4 +205,15 @@ oneway interface ITaskStackListener { * @param {@code true} if the task got focus, {@code false} if it lost it. * @param {@code true} if the task got focus, {@code false} if it lost it. */ */ void onTaskFocusChanged(int taskId, boolean focused); void onTaskFocusChanged(int taskId, boolean focused); /** * Called when a task changes its requested orientation. It is different from {@link * #onActivityRequestedOrientationChanged(int, int)} in the sense that this method is called * when a task changes requested orientation due to activity launch, dimiss or reparenting. * * @param taskId id of the task. * @param requestedOrientation the new requested orientation of this task as screen orientations * in {@link android.content.pm.ActivityInfo}. */ void onTaskRequestedOrientationChanged(int taskId, int requestedOrientation); } }
core/java/android/app/TaskStackListener.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -195,4 +195,8 @@ public abstract class TaskStackListener extends ITaskStackListener.Stub { @Override @Override public void onTaskFocusChanged(int taskId, boolean focused) { public void onTaskFocusChanged(int taskId, boolean focused) { } } @Override public void onTaskRequestedOrientationChanged(int taskId, int requestedOrientation) { } } }
services/core/java/com/android/server/wm/ActivityStack.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -2957,8 +2957,8 @@ class ActivityStack extends Task { final int taskId = activity != null final int taskId = activity != null ? mStackSupervisor.getNextTaskIdForUser(activity.mUserId) ? mStackSupervisor.getNextTaskIdForUser(activity.mUserId) : mStackSupervisor.getNextTaskIdForUser(); : mStackSupervisor.getNextTaskIdForUser(); task = Task.create( task = new ActivityStack(mAtmService, taskId, info, intent, voiceSession, mAtmService, taskId, info, intent, voiceSession, voiceInteractor, this); voiceInteractor, null /* taskDescription */, this); // add the task to stack first, mTaskPositioner might need the stack association // add the task to stack first, mTaskPositioner might need the stack association addChild(task, toTop, (info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0); addChild(task, toTop, (info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0); Loading
services/core/java/com/android/server/wm/DisplayContent.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -1393,6 +1393,13 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo final WindowContainer orientationSource = getLastOrientationSource(); final WindowContainer orientationSource = getLastOrientationSource(); final ActivityRecord r = final ActivityRecord r = orientationSource != null ? orientationSource.asActivityRecord() : null; orientationSource != null ? orientationSource.asActivityRecord() : null; if (r != null && r.getTask() != null && orientation != r.getTask().mLastReportedRequestedOrientation) { final Task task = r.getTask(); task.mLastReportedRequestedOrientation = orientation; mAtmService.getTaskChangeNotificationController() .notifyTaskRequestedOrientationChanged(task.mTaskId, orientation); } // Currently there is no use case from non-activity. // Currently there is no use case from non-activity. if (r != null && handleTopActivityLaunchingInDifferentOrientation(r)) { if (r != null && handleTopActivityLaunchingInDifferentOrientation(r)) { // Display orientation should be deferred until the top fixed rotation is finished. // Display orientation should be deferred until the top fixed rotation is finished. Loading
services/core/java/com/android/server/wm/Task.java +226 −300 Original line number Original line Diff line number Diff line Loading @@ -232,11 +232,6 @@ class Task extends WindowContainer<WindowContainer> { // Do not move the stack as a part of reparenting // Do not move the stack as a part of reparenting static final int REPARENT_LEAVE_STACK_IN_PLACE = 2; static final int REPARENT_LEAVE_STACK_IN_PLACE = 2; /** * The factory used to create {@link Task}. This allows OEM subclass {@link Task}. */ private static TaskFactory sTaskFactory; String affinity; // The affinity name for this task, or null; may change identity. String affinity; // The affinity name for this task, or null; may change identity. String rootAffinity; // Initial base affinity, or null; does not change from initial root. String rootAffinity; // Initial base affinity, or null; does not change from initial root. String mWindowLayoutAffinity; // Launch param affinity of this task or null. Used when saving String mWindowLayoutAffinity; // Launch param affinity of this task or null. Used when saving Loading Loading @@ -368,6 +363,14 @@ class Task extends WindowContainer<WindowContainer> { @Surface.Rotation @Surface.Rotation private int mRotation; private int mRotation; /** * Last requested orientation reported to DisplayContent. This is different from {@link * #mOrientation} in the sense that this takes activities' requested orientation into * account. Start with {@link ActivityInfo#SCREEN_ORIENTATION_UNSPECIFIED} so that we don't need * to notify for activities that don't specify any orientation. */ int mLastReportedRequestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; // For comparison with DisplayContent bounds. // For comparison with DisplayContent bounds. private Rect mTmpRect = new Rect(); private Rect mTmpRect = new Rect(); // For handling display rotations. // For handling display rotations. Loading Loading @@ -4061,81 +4064,8 @@ class Task extends WindowContainer<WindowContainer> { } } } } @VisibleForTesting static TaskFactory getTaskFactory() { if (sTaskFactory == null) { setTaskFactory(new TaskFactory()); } return sTaskFactory; } static void setTaskFactory(TaskFactory factory) { sTaskFactory = factory; } static Task create(ActivityTaskManagerService service, int taskId, int activityType, ActivityInfo info, Intent intent, boolean createdByOrganizer) { return getTaskFactory().create(service, taskId, activityType, info, intent, createdByOrganizer); } static Task create(ActivityTaskManagerService service, int taskId, ActivityInfo info, Intent intent, IVoiceInteractionSession voiceSession, IVoiceInteractor voiceInteractor, ActivityStack stack) { return getTaskFactory().create( service, taskId, info, intent, voiceSession, voiceInteractor, stack); } static Task restoreFromXml(XmlPullParser in, ActivityStackSupervisor stackSupervisor) static Task restoreFromXml(XmlPullParser in, ActivityStackSupervisor stackSupervisor) throws IOException, XmlPullParserException { throws IOException, XmlPullParserException { return getTaskFactory().restoreFromXml(in, stackSupervisor); } /** * A factory class used to create {@link Task} or its subclass if any. This can be * specified when system boots by setting it with * {@link #setTaskFactory(TaskFactory)}. */ static class TaskFactory { Task create(ActivityTaskManagerService service, int taskId, int activityType, ActivityInfo info, Intent intent, boolean createdByOrganizer) { return new ActivityStack(service, taskId, activityType, info, intent, createdByOrganizer); } Task create(ActivityTaskManagerService service, int taskId, ActivityInfo info, Intent intent, IVoiceInteractionSession voiceSession, IVoiceInteractor voiceInteractor, ActivityStack stack) { return new ActivityStack(service, taskId, info, intent, voiceSession, voiceInteractor, null /*taskDescription*/, stack); } /** * Should only be used when we're restoring {@link Task} from storage. */ Task create(ActivityTaskManagerService service, int taskId, Intent intent, Intent affinityIntent, String affinity, String rootAffinity, ComponentName realActivity, ComponentName origActivity, boolean rootWasReset, boolean autoRemoveRecents, boolean askedCompatMode, int userId, int effectiveUid, String lastDescription, long lastTimeMoved, boolean neverRelinquishIdentity, TaskDescription lastTaskDescription, int taskAffiliation, int prevTaskId, int nextTaskId, int taskAffiliationColor, int callingUid, String callingPackage, @Nullable String callingFeatureId, int resizeMode, boolean supportsPictureInPicture, boolean realActivitySuspended, boolean userSetupComplete, int minWidth, int minHeight, ActivityStack stack) { return new ActivityStack(service, taskId, intent, affinityIntent, affinity, rootAffinity, realActivity, origActivity, rootWasReset, autoRemoveRecents, askedCompatMode, userId, effectiveUid, lastDescription, lastTimeMoved, neverRelinquishIdentity, lastTaskDescription, taskAffiliation, prevTaskId, nextTaskId, taskAffiliationColor, callingUid, callingPackage, callingFeatureId, resizeMode, supportsPictureInPicture, realActivitySuspended, userSetupComplete, minWidth, minHeight, null /*ActivityInfo*/, null /*_voiceSession*/, null /*_voiceInteractor*/, stack); } Task restoreFromXml(XmlPullParser in, ActivityStackSupervisor stackSupervisor) throws IOException, XmlPullParserException { Intent intent = null; Intent intent = null; Intent affinityIntent = null; Intent affinityIntent = null; ArrayList<ActivityRecord> activities = new ArrayList<>(); ArrayList<ActivityRecord> activities = new ArrayList<>(); Loading Loading @@ -4176,8 +4106,10 @@ class Task extends WindowContainer<WindowContainer> { for (int attrNdx = in.getAttributeCount() - 1; attrNdx >= 0; --attrNdx) { for (int attrNdx = in.getAttributeCount() - 1; attrNdx >= 0; --attrNdx) { final String attrName = in.getAttributeName(attrNdx); final String attrName = in.getAttributeName(attrNdx); final String attrValue = in.getAttributeValue(attrNdx); final String attrValue = in.getAttributeValue(attrNdx); if (TaskPersister.DEBUG) Slog.d(TaskPersister.TAG, "Task: attribute name=" if (TaskPersister.DEBUG) { + attrName + " value=" + attrValue); Slog.d(TaskPersister.TAG, "Task: attribute name=" + attrName + " value=" + attrValue); } switch (attrName) { switch (attrName) { case ATTR_TASKID: case ATTR_TASKID: if (taskId == INVALID_TASK_ID) taskId = Integer.parseInt(attrValue); if (taskId == INVALID_TASK_ID) taskId = Integer.parseInt(attrValue); Loading Loading @@ -4283,8 +4215,7 @@ class Task extends WindowContainer<WindowContainer> { && (event != XmlPullParser.END_TAG || in.getDepth() >= outerDepth)) { && (event != XmlPullParser.END_TAG || in.getDepth() >= outerDepth)) { if (event == XmlPullParser.START_TAG) { if (event == XmlPullParser.START_TAG) { final String name = in.getName(); final String name = in.getName(); if (TaskPersister.DEBUG) Slog.d(TaskPersister.TAG, if (TaskPersister.DEBUG) Slog.d(TaskPersister.TAG, "Task: START_TAG name=" + name); "Task: START_TAG name=" + name); if (TAG_AFFINITYINTENT.equals(name)) { if (TAG_AFFINITYINTENT.equals(name)) { affinityIntent = Intent.restoreFromXml(in); affinityIntent = Intent.restoreFromXml(in); } else if (TAG_INTENT.equals(name)) { } else if (TAG_INTENT.equals(name)) { Loading @@ -4292,13 +4223,15 @@ class Task extends WindowContainer<WindowContainer> { } else if (TAG_ACTIVITY.equals(name)) { } else if (TAG_ACTIVITY.equals(name)) { ActivityRecord activity = ActivityRecord activity = ActivityRecord.restoreFromXml(in, stackSupervisor); ActivityRecord.restoreFromXml(in, stackSupervisor); if (TaskPersister.DEBUG) Slog.d(TaskPersister.TAG, "Task: activity=" if (TaskPersister.DEBUG) { + activity); Slog.d(TaskPersister.TAG, "Task: activity=" + activity); } if (activity != null) { if (activity != null) { activities.add(activity); activities.add(activity); } } } else { } else { handleUnknownTag(name, in); Slog.e(TAG, "restoreTask: Unexpected name=" + name); XmlUtils.skipCurrentTag(in); } } } } } } Loading Loading @@ -4346,14 +4279,14 @@ class Task extends WindowContainer<WindowContainer> { } } } } final Task task = create(stackSupervisor.mService, final Task task = new ActivityStack(stackSupervisor.mService, taskId, intent, taskId, intent, affinityIntent, affinityIntent, affinity, rootAffinity, realActivity, origActivity, rootHasReset, affinity, rootAffinity, realActivity, origActivity, rootHasReset, autoRemoveRecents, askedCompatMode, userId, effectiveUid, lastDescription, autoRemoveRecents, askedCompatMode, userId, effectiveUid, lastDescription, lastTimeOnTop, neverRelinquishIdentity, taskDescription, lastTimeOnTop, neverRelinquishIdentity, taskDescription, taskAffiliation, taskAffiliation, prevTaskId, nextTaskId, taskAffiliationColor, callingUid, prevTaskId, nextTaskId, taskAffiliationColor, callingUid, callingPackage, callingPackage, callingFeatureId, resizeMode, supportsPictureInPicture, callingFeatureId, resizeMode, supportsPictureInPicture, realActivitySuspended, realActivitySuspended, userSetupComplete, minWidth, minHeight, null /*stack*/); userSetupComplete, minWidth, minHeight, null /*ActivityInfo*/, null /*_voiceSession*/, null /*_voiceInteractor*/, null /* stack */); task.mLastNonFullscreenBounds = lastNonFullscreenBounds; task.mLastNonFullscreenBounds = lastNonFullscreenBounds; task.setBounds(lastNonFullscreenBounds); task.setBounds(lastNonFullscreenBounds); task.mWindowLayoutAffinity = windowLayoutAffinity; task.mWindowLayoutAffinity = windowLayoutAffinity; Loading @@ -4366,13 +4299,6 @@ class Task extends WindowContainer<WindowContainer> { return task; return task; } } void handleUnknownTag(String name, XmlPullParser in) throws IOException, XmlPullParserException { Slog.e(TAG, "restoreTask: Unexpected name=" + name); XmlUtils.skipCurrentTag(in); } } @Override @Override boolean isOrganized() { boolean isOrganized() { return mTaskOrganizer != null; return mTaskOrganizer != null; Loading