forked from len0rd/rockbox
Clean up r28408 coding style a bit to follow our guidelines with regard to
brace placement, tabs and 80 char line width. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28410 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cc758e42b9
commit
2d05d2f9da
5 changed files with 78 additions and 69 deletions
|
@ -22,48 +22,43 @@
|
|||
package org.rockbox;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
public class RockboxKeyboardInput
|
||||
{
|
||||
private BroadcastReceiver b;
|
||||
private String result;
|
||||
|
||||
public RockboxKeyboardInput()
|
||||
{
|
||||
result = null;
|
||||
result = null;
|
||||
}
|
||||
|
||||
public void kbd_input(String text)
|
||||
{
|
||||
RockboxActivity a = (RockboxActivity) RockboxService.get_instance().get_activity();
|
||||
Intent kbd = new Intent(a, KeyboardActivity.class);
|
||||
kbd.putExtra("value", text);
|
||||
a.waitForActivity(kbd, new HostCallback(){
|
||||
|
||||
@Override
|
||||
public void onComplete(int resultCode, Intent data) {
|
||||
if (resultCode == Activity.RESULT_OK)
|
||||
{
|
||||
result = data.getStringExtra("value");
|
||||
}
|
||||
else {
|
||||
result = "";
|
||||
}
|
||||
}
|
||||
});
|
||||
RockboxActivity a = (RockboxActivity) RockboxService.get_instance().get_activity();
|
||||
Intent kbd = new Intent(a, KeyboardActivity.class);
|
||||
kbd.putExtra("value", text);
|
||||
a.waitForActivity(kbd, new HostCallback()
|
||||
{
|
||||
public void onComplete(int resultCode, Intent data)
|
||||
{
|
||||
if (resultCode == Activity.RESULT_OK)
|
||||
{
|
||||
result = data.getStringExtra("value");
|
||||
}
|
||||
else {
|
||||
result = "";
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
public String get_result()
|
||||
public String get_result()
|
||||
{
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
|
||||
public boolean is_usable()
|
||||
{
|
||||
return RockboxService.get_instance().get_activity() != null;
|
||||
}
|
||||
|
||||
|
||||
public boolean is_usable()
|
||||
{
|
||||
return RockboxService.get_instance().get_activity() != null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue