From 5f7d5b854b966a9901e0fbc36dec7234b4ba9220 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sun, 13 May 2012 20:20:50 +0200 Subject: [PATCH] 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 --- android/src/org/rockbox/RockboxActivity.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/android/src/org/rockbox/RockboxActivity.java b/android/src/org/rockbox/RockboxActivity.java index 0e2daa76fb..a6604418ed 100644 --- a/android/src/org/rockbox/RockboxActivity.java +++ b/android/src/org/rockbox/RockboxActivity.java @@ -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: