[am] catch IllegalArgumentException from getHarmfulAppWarning

A missing package should not cause system_server crash.

BUG: 253989182
Test: builds
Change-Id: I55fd685280ea6a3d08b9c838b2245ed6dec0aa56
This commit is contained in:
Songchun Fan
2022-10-24 16:33:11 -07:00
committed by Song Chun Fan
parent 2b830b1e11
commit 20e4747134

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;
}