cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [01/10] android commit: CB-7172 Force window to have focus after resume
Date Thu, 14 Aug 2014 21:21:09 GMT
Repository: cordova-android
Updated Branches:
  refs/heads/4.0.x f9b8f9a45 -> a7ccb9243


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-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/c2cafb4b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/c2cafb4b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/c2cafb4b

Branch: refs/heads/4.0.x
Commit: c2cafb4b45fcbb307a113828dfc9f723f8a6433b
Parents: 67f474e
Author: Andrey Kurdyumov <kant2002@gmail.com>
Authored: Sun Jul 20 00:28:44 2014 +0600
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Tue Jul 22 22:33:53 2014 -0400

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


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/c2cafb4b/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 4a46c80..2fdb9a7 100755
--- a/framework/src/org/apache/cordova/CordovaActivity.java
+++ b/framework/src/org/apache/cordova/CordovaActivity.java
@@ -604,6 +604,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);
 


Mime
View raw message