test-butler
test-butler copied to clipboard
Support for Android Q (API 29)
TestButler 2.0.0 crashes with the following stacktrace when using it on the latest Android Q Beta (API 29):
2019-06-13 09:31:47.989 3682-3682/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.linkedin.android.testbutler, PID: 3682 java.lang.RuntimeException: Unable to create service com.linkedin.android.testbutler.ButlerService: java.lang.UnsupportedOperationException: Only apps can use the KeyguardLock API at android.app.ActivityThread.handleCreateService(ActivityThread.java:3950) at android.app.ActivityThread.access$1500(ActivityThread.java:220) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1868) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7319) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:934)
Thanks for the report! We'll take a look and get back to you.
Hi @jenzz , sorry for the delay we were closed for the 4th of july break. I've replicated this issue, and while its still a little unclear why this restriction was introduced in Q, it appears to be here to stay. I'm investigating some new ways to help avoid any impact from the lock screen currently. Note that Q is also affecting our wifi locks as well, which are now a no-op, so I'm investigating that as well. I should have a PR for you by EOW. Sorry for the delay!
I've opened https://issuetracker.google.com/issues/137254871 to get google's opinion on the best way to prevent lock screens in testing given this new restriction
#90 is a work around for now to allow you to use test butler on Q devices, albeit without the keyguard functionality it provides at other API levels. I'm going to leave this issue open while we wait to hear back from Google so we can take followup action as necessary
Ugh, Google closed the related issue as obsolete.