From 022ad453d84f9cfa62cec2c9e3d18b99e122ca59 Mon Sep 17 00:00:00 2001 From: Muhammad Hasan Khan Date: Mon, 15 Mar 2021 14:11:02 -0700 Subject: [PATCH] auth: do not wtf on IllegalArgumentException IllegalArgumentException suggests that the client did not call the service properly and therefore it is not a problem in the server or called method. Do not create crash and let the client handle this. Bug: 181876140 Test: m Change-Id: I6136e9bc88aa2c789079042b5c4efdd9d8453b36 (cherry picked from commit 42b22e54c087ee7c8db01f7502d2808c5f7d72c9) --- .../java/com/android/server/accounts/AccountManagerService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java index 73755231c3bef..c360190d58a34 100644 --- a/services/core/java/com/android/server/accounts/AccountManagerService.java +++ b/services/core/java/com/android/server/accounts/AccountManagerService.java @@ -1076,7 +1076,7 @@ public class AccountManagerService } catch (RuntimeException e) { // The account manager only throws security exceptions, so let's // log all others. - if (!(e instanceof SecurityException)) { + if (!(e instanceof SecurityException || e instanceof IllegalArgumentException)) { Slog.wtf(TAG, "Account Manager Crash", e); } throw e;