android: Fix FS#12670, regressed back button behavior.

3f4be75 introduced this regression where the back button stopped working
as intended. Explicitely request the focus on the RockboxFramebuffer
object to fix.

Change-Id: Ibc67e3d02e076674a086d43c5967370c4524fd14
This commit is contained in:
Thomas Martitz 2012-05-13 20:20:50 +02:00
parent 8689bcc186
commit 5f7d5b854b

View file

@ -60,11 +60,14 @@ public class RockboxActivity extends Activity
@Override
protected void onReceiveResult(final int resultCode, final Bundle resultData)
{
RockboxFramebuffer fb;
switch (resultCode) {
case RockboxService.RESULT_INVOKING_MAIN:
if (loadingdialog != null)
loadingdialog.dismiss();
setContentView(new RockboxFramebuffer(RockboxActivity.this));
fb = new RockboxFramebuffer(RockboxActivity.this);
setContentView(fb);
fb.requestFocus();
break;
case RockboxService.RESULT_LIB_LOAD_PROGRESS:
if (loadingdialog == null)
@ -78,7 +81,11 @@ public class RockboxActivity extends Activity
break;
case RockboxService.RESULT_SERVICE_RUNNING:
if (!unzip) /* defer to RESULT_INVOKING_MAIN */
setContentView(new RockboxFramebuffer(RockboxActivity.this));
{
fb = new RockboxFramebuffer(RockboxActivity.this);
setContentView(fb);
fb.requestFocus();
}
setServiceActivity(true);
break;
case RockboxService.RESULT_ERROR_OCCURED: