You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2013/06/24 20:32:04 UTC
[1/2] android commit: CB-3949: Adding code to mitigate broken intents
with the application installer
Updated Branches:
refs/heads/master 9cb14838e -> 7e15ff930
CB-3949: Adding code to mitigate broken intents with the application installer
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/b83610a6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/b83610a6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/b83610a6
Branch: refs/heads/master
Commit: b83610a6534d556c0378c634195197112baddcdd
Parents: b032dcc
Author: Joe Bowser <bo...@apache.org>
Authored: Mon Jun 24 11:31:32 2013 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Mon Jun 24 11:31:32 2013 -0700
----------------------------------------------------------------------
framework/src/org/apache/cordova/CordovaActivity.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/b83610a6/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 1b7ff5a..a68e546 100755
--- a/framework/src/org/apache/cordova/CordovaActivity.java
+++ b/framework/src/org/apache/cordova/CordovaActivity.java
@@ -250,6 +250,19 @@ public class CordovaActivity extends Activity implements CordovaInterface {
}
}
+ //CB-3949: Workaround for weird Android Launcher Bug!
+ private void checkIntents()
+ {
+ Intent intent = getIntent();
+ String intentAction = intent.getAction();
+ if (!isTaskRoot() && intent.hasCategory(Intent.CATEGORY_LAUNCHER) && intentAction != null) {
+ if(intentAction.equals(Intent.ACTION_MAIN)) {
+ Log.d("Cordova", "This isn't the root activity. Clearing it and returning to the root activity.");
+ finish();
+ return;
+ }
+ }
+ }
/**
* Called when the activity is first created.
*
@@ -258,6 +271,7 @@ public class CordovaActivity extends Activity implements CordovaInterface {
@SuppressWarnings("deprecation")
@Override
public void onCreate(Bundle savedInstanceState) {
+ checkIntents();
Config.init(this);
LOG.d(TAG, "CordovaActivity.onCreate()");
super.onCreate(savedInstanceState);
[2/2] android commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/cordova-android
Posted by bo...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-android
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/7e15ff93
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/7e15ff93
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/7e15ff93
Branch: refs/heads/master
Commit: 7e15ff930d7520b74a5e91f99b71d0e12be2d27e
Parents: b83610a 9cb1483
Author: Joe Bowser <bo...@apache.org>
Authored: Mon Jun 24 11:31:47 2013 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Mon Jun 24 11:31:47 2013 -0700
----------------------------------------------------------------------
bin/templates/cordova/run | 2 +-
.../src/org/apache/cordova/ExposedJsApi.java | 4 +-
.../src/org/apache/cordova/api/PluginEntry.java | 13 +++++
.../org/apache/cordova/api/PluginManager.java | 59 +++++++++++++++++---
4 files changed, 66 insertions(+), 12 deletions(-)
----------------------------------------------------------------------