commit | 20e4747134c49501e67a1b0df1fe17f350937787 | [log] [tgz] |
---|---|---|
author | Songchun Fan <schfan@google.com> | Mon Oct 24 16:33:11 2022 -0700 |
committer | Song Chun Fan <schfan@google.com> | Mon Oct 24 23:36:42 2022 +0000 |
tree | a42a238356417580d2caa4dc257021a35e73d127 | |
parent | 2b830b1e117c61ef9b1ef7e2ac485af58dcec5e9 [diff] |
[am] catch IllegalArgumentException from getHarmfulAppWarning A missing package should not cause system_server crash. BUG: 253989182 Test: builds Change-Id: I55fd685280ea6a3d08b9c838b2245ed6dec0aa56
diff --git a/services/core/java/com/android/server/wm/ActivityStartInterceptor.java b/services/core/java/com/android/server/wm/ActivityStartInterceptor.java index 7d84bdf..d7c5e93 100644 --- a/services/core/java/com/android/server/wm/ActivityStartInterceptor.java +++ b/services/core/java/com/android/server/wm/ActivityStartInterceptor.java
@@ -424,7 +424,7 @@ try { harmfulAppWarning = mService.getPackageManager() .getHarmfulAppWarning(mAInfo.packageName, mUserId); - } catch (RemoteException ex) { + } catch (RemoteException | IllegalArgumentException ex) { return false; }