Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically unlock device screen when possible #2789

Merged
merged 1 commit into from
Jun 3, 2019

Conversation

hevrard
Copy link
Contributor

@hevrard hevrard commented May 30, 2019

This is a refactor of the device screen unlock logic, to simplify it down to two functions:

  • UnlockScreen() which tries to get the screen on and unlocked

  • IsScreenUnlocked() which returns true if the screen is on and unlocked

When the screen cannot be automatically unlocked, the new error message clearly tells the user to unlock the device screen.

Along the way, this removes the feature of putting back the screen off if it was off before tracing. I argue this was hardly desirable in any case.

Fixes #2747

@hevrard
Copy link
Contributor Author

hevrard commented May 30, 2019

Arguably fix #2747

gapis/perfetto/android/trace.go Outdated Show resolved Hide resolved
gapii/client/adb.go Outdated Show resolved Hide resolved
core/os/android/adb/screen.go Outdated Show resolved Hide resolved
This is a refactor of the device screen unlock logic, to simplify it
down to UnlockScreen() which tries to get the screen on and unlocked,
and reports whether it succeeded.

When the screen cannot be automatically unlocked, the new error
message clearly tells the user to unlock the device screen.

Along the way, this removes the feature of putting back the screen off
if it was off before tracing. I argue this was hardly desirable in any
case.
@hevrard hevrard merged commit 7020fd4 into google:master Jun 3, 2019
@hevrard hevrard deleted the adb-unlock branch June 3, 2019 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracing Failed Cause: Could not start trace Cause: Cannot trace app on locked device
3 participants