Hi,
Firstly, thank you for the great apps (I use it on various devices).
Now on to my problem, I am an android developer and I am using the Enpass android app on my main phone, because that is where one would need a password manager. I happened to install an app that I am developing on my main phone to test while I was away from my desk and I got a crash in said app. I have tracked down the cause of the crash to the Enpass autofill accessibility setting. If I disable Enpass in the accessibility settings then the crash no longer occurs.
Essentially, in order to cause the crash I tap on an item in a recycler view list to switch to another activity (a detail view of the tapped item) and then push the device's back button to return to the recycler view list. In order for the crash to occur this needs to happen at least twice and in quick succession. So, tap item, tap back, tap item, tap back (not allowing the loading on each activity to finish).
Device: LG G5 (H850)
Android 7.0
Enpass 5.4.8
Enpass Autofill Service and Notification are enabled. Enpass Keyboard is not enabled.
The Enpass notification does not show while I am switching between the views mentioned above. It does show when I am on the app's login screen though.
Below is the stack trace of the crash in my app:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: [My App's Package Name], PID: 1318
java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.view.ViewParent.requestSendAccessibilityEvent(android.view.View, android.view.accessibility.AccessibilityEvent)' on a null object reference
at android.view.View.sendAccessibilityEventUncheckedInternal(View.java:6309)
at android.view.View.sendAccessibilityEventUnchecked(View.java:6288)
at android.view.View$SendViewStateChangedAccessibilityEvent.run(View.java:23713)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6247)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
I had a look at the source code for the View class and the method that is throwing the exception is requestSendAccessibilityEvent()
The below code is from the API 25 source code, View.java:
public void announceForAccessibility(CharSequence text) {
if (AccessibilityManager.getInstance(mContext).isEnabled() && mParent != null) {
AccessibilityEvent event = AccessibilityEvent.obtain(
AccessibilityEvent.TYPE_ANNOUNCEMENT);
onInitializeAccessibilityEvent(event);
event.getText().add(text);
event.setContentDescription(null);
mParent.requestSendAccessibilityEvent(this, event);
}
}
The exception happens because mParent is null, and that code should not run/execute if the mParent object is null. So something is changing the mParent object to null after the if statement has done the check.
Now because the exception occurs in the android system code, there is not much I can do to catch the error. Perhaps there is an update you guys can make to your app? Are you guys calling the announceForAccessibility() method in the Enpass android app anywhere?