forked from len0rd/rockbox
Android: Use wakeup objects instead of polling for the dialog results in the keyboard and yesno dialog, allowing a lot of code to be removed.
First part of FS#11708 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28512 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
be51be6a99
commit
988bdc1cc4
5 changed files with 74 additions and 81 deletions
|
@ -43,21 +43,13 @@ public class RockboxKeyboardInput
|
|||
{
|
||||
public void onComplete(int resultCode, Intent data)
|
||||
{
|
||||
if (resultCode == Activity.RESULT_OK)
|
||||
{
|
||||
result = data.getStringExtra("value");
|
||||
}
|
||||
else {
|
||||
result = "";
|
||||
}
|
||||
put_result(resultCode == Activity.RESULT_OK,
|
||||
data.getStringExtra("value"));
|
||||
}
|
||||
});
|
||||
}
|
||||
public String get_result()
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
private native void put_result(boolean accepted, String new_string);
|
||||
public boolean is_usable()
|
||||
{
|
||||
return RockboxService.get_instance().get_activity() != null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue