From 3fe79781422ce4c70d30ab34a3c76a3e54d6574a Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Wed, 28 Oct 2015 13:30:44 -0400 Subject: Try to address #142 --- app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/src') diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java index 877a09da..1cba6c9d 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java @@ -228,6 +228,10 @@ public class AutofillService extends AccessibilityService { } ByteArrayOutputStream os = new ByteArrayOutputStream(); + // the service was disconnected, need to bind again + if (serviceConnection.getService() == null) { + serviceConnection.bindToService(); + } OpenPgpApi api = new OpenPgpApi(AutofillService.this, serviceConnection.getService()); Intent result = api.executeApi(data, is, os); switch (result.getIntExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_ERROR)) { -- cgit v1.2.3