[am] catch IllegalArgumentException from getHarmfulAppWarning

A missing package should not cause system_server crash.

BUG: 253989182
Test: builds
Merged-In: I55fd685280ea6a3d08b9c838b2245ed6dec0aa56
Change-Id: I55fd685280ea6a3d08b9c838b2245ed6dec0aa56
(cherry picked from commit 20e4747134)
This commit is contained in:
Songchun Fan
2022-10-24 16:33:11 -07:00
committed by Song Chun Fan
parent 95d5281307
commit a27749f9d6

View File

@@ -424,7 +424,7 @@ class ActivityStartInterceptor {
try {
harmfulAppWarning = mService.getPackageManager()
.getHarmfulAppWarning(mAInfo.packageName, mUserId);
} catch (RemoteException ex) {
} catch (RemoteException | IllegalArgumentException ex) {
return false;
}