Loading services/core/java/com/android/server/wm/Task.java +2 −2 Original line number Diff line number Diff line Loading @@ -1451,11 +1451,11 @@ class Task extends TaskFragment { } /** Called when an {@link ActivityRecord} is added as a descendant */ void onDescendantActivityAdded(boolean hadChild, int activityType, ActivityRecord r) { void onDescendantActivityAdded(boolean hadActivity, int activityType, ActivityRecord r) { warnForNonLeafTask("onDescendantActivityAdded"); // Only set this based on the first activity if (!hadChild) { if (!hadActivity) { if (r.getActivityType() == ACTIVITY_TYPE_UNDEFINED) { // Normally non-standard activity type for the activity record will be set when the // object is created, however we delay setting the standard application type until Loading services/core/java/com/android/server/wm/TaskFragment.java +4 −3 Original line number Diff line number Diff line Loading @@ -102,6 +102,7 @@ import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.function.Consumer; import java.util.function.Function; Loading Loading @@ -1670,8 +1671,8 @@ class TaskFragment extends WindowContainer<WindowContainer> { boolean isAddingActivity = child.asActivityRecord() != null; final Task task = isAddingActivity ? getTask() : null; // If this task had any child before we added this one. boolean taskHadChild = task != null && task.hasChild(); // If this task had any activity before we added this one. boolean taskHadActivity = task != null && task.getActivity(Objects::nonNull) != null; // getActivityType() looks at the top child, so we need to read the type before adding // a new child in case the new child is on top and UNDEFINED. final int activityType = task != null ? task.getActivityType() : ACTIVITY_TYPE_UNDEFINED; Loading @@ -1680,7 +1681,7 @@ class TaskFragment extends WindowContainer<WindowContainer> { if (isAddingActivity && task != null) { child.asActivityRecord().inHistory = true; task.onDescendantActivityAdded(taskHadChild, activityType, child.asActivityRecord()); task.onDescendantActivityAdded(taskHadActivity, activityType, child.asActivityRecord()); } } Loading Loading
services/core/java/com/android/server/wm/Task.java +2 −2 Original line number Diff line number Diff line Loading @@ -1451,11 +1451,11 @@ class Task extends TaskFragment { } /** Called when an {@link ActivityRecord} is added as a descendant */ void onDescendantActivityAdded(boolean hadChild, int activityType, ActivityRecord r) { void onDescendantActivityAdded(boolean hadActivity, int activityType, ActivityRecord r) { warnForNonLeafTask("onDescendantActivityAdded"); // Only set this based on the first activity if (!hadChild) { if (!hadActivity) { if (r.getActivityType() == ACTIVITY_TYPE_UNDEFINED) { // Normally non-standard activity type for the activity record will be set when the // object is created, however we delay setting the standard application type until Loading
services/core/java/com/android/server/wm/TaskFragment.java +4 −3 Original line number Diff line number Diff line Loading @@ -102,6 +102,7 @@ import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.function.Consumer; import java.util.function.Function; Loading Loading @@ -1670,8 +1671,8 @@ class TaskFragment extends WindowContainer<WindowContainer> { boolean isAddingActivity = child.asActivityRecord() != null; final Task task = isAddingActivity ? getTask() : null; // If this task had any child before we added this one. boolean taskHadChild = task != null && task.hasChild(); // If this task had any activity before we added this one. boolean taskHadActivity = task != null && task.getActivity(Objects::nonNull) != null; // getActivityType() looks at the top child, so we need to read the type before adding // a new child in case the new child is on top and UNDEFINED. final int activityType = task != null ? task.getActivityType() : ACTIVITY_TYPE_UNDEFINED; Loading @@ -1680,7 +1681,7 @@ class TaskFragment extends WindowContainer<WindowContainer> { if (isAddingActivity && task != null) { child.asActivityRecord().inHistory = true; task.onDescendantActivityAdded(taskHadChild, activityType, child.asActivityRecord()); task.onDescendantActivityAdded(taskHadActivity, activityType, child.asActivityRecord()); } } Loading