test-butler icon indicating copy to clipboard operation
test-butler copied to clipboard

Support for Android Q (API 29)

Open jenzz opened this issue 6 years ago • 5 comments

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)

jenzz avatar Jun 13 '19 09:06 jenzz

Thanks for the report! We'll take a look and get back to you.

jasmsu avatar Jun 13 '19 17:06 jasmsu

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!

kkoser avatar Jul 10 '19 00:07 kkoser

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

kkoser avatar Jul 11 '19 23:07 kkoser

#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

kkoser avatar Jul 31 '19 18:07 kkoser

Ugh, Google closed the related issue as obsolete.

TWiStErRob avatar Oct 14 '21 14:10 TWiStErRob