CB-7172 Force window to have focus after resume

Workaround for some devices (Samsung Galaxy Note 3 at least)

github: close #108


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/7cb244e4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/7cb244e4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/7cb244e4

Branch: refs/heads/master
Commit: 7cb244e4bdbbcd965ba7eb6733a49e1767533be4
Parents: b535a74
Author: Andrey Kurdyumov <[email protected]>
Authored: Sun Jul 20 00:28:44 2014 +0600
Committer: Archana Naik <[email protected]>
Committed: Wed Jul 30 18:11:33 2014 -0700

----------------------------------------------------------------------
 framework/src/org/apache/cordova/CordovaActivity.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/7cb244e4/framework/src/org/apache/cordova/CordovaActivity.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaActivity.java 
b/framework/src/org/apache/cordova/CordovaActivity.java
index 7fdab2b..91c24d7 100755
--- a/framework/src/org/apache/cordova/CordovaActivity.java
+++ b/framework/src/org/apache/cordova/CordovaActivity.java
@@ -721,6 +721,9 @@ public class CordovaActivity extends Activity implements 
CordovaInterface {
         if (this.appView == null) {
             return;
         }
+        // Force window to have focus, so application always
+        // receive user input. Workaround for some devices (Samsung Galaxy 
Note 3 at least)
+        this.getWindow().getDecorView().requestFocus();
 
         this.appView.handleResume(this.keepRunning, 
this.activityResultKeepRunning);
 

Reply via email to