Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae2ce358 authored by Robin Lee's avatar Robin Lee Committed by android-build-merger
Browse files

Merge "Guard against null component when binding KeyChain" into nyc-dev am: 7854d583

am: 23faeb04

* commit '23faeb04':
  Guard against null component when binding KeyChain
parents 981250bf 23faeb04
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -547,11 +547,8 @@ public final class KeyChain {
        Intent intent = new Intent(IKeyChainService.class.getName());
        ComponentName comp = intent.resolveSystemService(context.getPackageManager(), 0);
        intent.setComponent(comp);
        boolean isBound = context.bindServiceAsUser(intent,
                                                    keyChainServiceConnection,
                                                    Context.BIND_AUTO_CREATE,
                                                    user);
        if (!isBound) {
        if (comp == null || !context.bindServiceAsUser(
                intent, keyChainServiceConnection, Context.BIND_AUTO_CREATE, user)) {
            throw new AssertionError("could not bind to KeyChainService");
        }
        return new KeyChainConnection(context, keyChainServiceConnection, q.take());