OSDN Git Service

Don't crash if KeyChain can't be bound to.
authorKenny Guy <kennyguy@google.com>
Mon, 7 Mar 2016 13:59:56 +0000 (13:59 +0000)
committerKenny Guy <kennyguy@google.com>
Mon, 7 Mar 2016 13:59:56 +0000 (13:59 +0000)
KeyChain can throw an assertion error if
is not around, don't allow that to take down
system.

Bug: 27518175
Change-Id: I99418dfb65c58d3e07cbda91860cdb493b96a836

services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java

index ce86b2c..d979675 100644 (file)
@@ -2638,7 +2638,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                 }
             } catch (InterruptedException e) {
                 Thread.currentThread().interrupt();
-            } catch (RuntimeException e) {
+            } catch (RuntimeException | AssertionError e) {
                 Log.e(LOG_TAG, "Could not connect to KeyChain service", e);
             }
             if (!hasCert) {