Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76ab53a3 authored by Tony Huang's avatar Tony Huang
Browse files

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
parent b89627e9
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -259,9 +259,6 @@ class StageTaskListener implements ShellTaskOrganizer.TaskListener {
                return;
            }
            sendStatusChanged();
        } else {
            throw new IllegalArgumentException(this + "\n Unknown task: " + taskInfo
                    + "\n mRootTaskInfo: " + mRootTaskInfo);
        }
    }

+0 −6
Original line number Diff line number Diff line
@@ -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.