Do not throw exception on task vanished
Becasue ag/22162082 make children task info might remove on task info changed, it might cause we throw exception on task vanished due to the children task remove from list early. We should remove it. Fix: 275022724 Test: manual Test: pass existing tests Change-Id: I92f034564d89fef4cf9af4172d64db7630adee42
This commit is contained in:
@@ -259,9 +259,6 @@ class StageTaskListener implements ShellTaskOrganizer.TaskListener {
|
||||
return;
|
||||
}
|
||||
sendStatusChanged();
|
||||
} else {
|
||||
throw new IllegalArgumentException(this + "\n Unknown task: " + taskInfo
|
||||
+ "\n mRootTaskInfo: " + mRootTaskInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -126,12 +126,6 @@ public final class StageTaskListenerTests extends ShellTestCase {
|
||||
verify(mCallbacks).onStatusChanged(eq(mRootTask.isVisible), eq(true));
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testUnknownTaskVanished() {
|
||||
final ActivityManager.RunningTaskInfo task = new TestRunningTaskInfoBuilder().build();
|
||||
mStageTaskListener.onTaskVanished(task);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTaskVanished() {
|
||||
// With shell transitions, the transition manages status changes, so skip this test.
|
||||
|
||||
Reference in New Issue
Block a user