Catch IllegalArgumentException from startActivityFromRecents.

This may happen when the task id doesn't exist.

Bug: 197273843
Test: none
Change-Id: I1900b93bbf091379264f1136d4c67f0b462664a7
This commit is contained in:
yzj
2021-10-04 18:38:36 +00:00
committed by Josh Yang
parent f7c19ae4cc
commit d7f4972ad5

View File

@@ -1358,7 +1358,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
try {
ActivityManager.getService().startActivityFromRecents(targetTask.persistentId, null);
} catch (RemoteException e) {
} catch (RemoteException | IllegalArgumentException e) {
Slog.e(TAG, "Failed to start task " + targetTask.persistentId + " from recents", e);
}
}