Handle assertion error while binding to keychain

Bug: 318087089
Test: NA
Change-Id: I6ffd20c669a2fa6c34410c9c8b1dd2e3c59bffcb
diff --git a/src/com/android/keychain/KeyChainActivity.java b/src/com/android/keychain/KeyChainActivity.java
index 6b09d78..5732be4 100644
--- a/src/com/android/keychain/KeyChainActivity.java
+++ b/src/com/android/keychain/KeyChainActivity.java
@@ -208,7 +208,7 @@
                     Log.e(TAG, "interrupted while checking if key is user-selectable", ignored);
                     Thread.currentThread().interrupt();
                     return false;
-                } catch (Exception ignored) {
+                } catch (Exception | AssertionError ignored) {
                     Log.e(TAG, "error while checking if key is user-selectable", ignored);
                     return false;
                 }
@@ -341,7 +341,7 @@
                     }
                 }
                 callback.alias(chosenAlias);
-            } catch (InterruptedException | RemoteException e) {
+            } catch (InterruptedException | RemoteException | AssertionError e) {
                 Log.e(TAG, "Unable to request find predefined alias from credential "
                         + "management app policy");
                 // Proceed without a suggested alias.