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/01/11 19:25:01 UTC
[2/10] android commit: Merge commit and hacking on CordovaWebView
Merge commit and hacking on CordovaWebView
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/a0d2b96d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/a0d2b96d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/a0d2b96d
Branch: refs/heads/master
Commit: a0d2b96de6c13dc61cbe4701c8fbf10350a41845
Parents: 5ca2337 2c202b8
Author: Joe Bowser <bo...@apache.org>
Authored: Wed Nov 28 15:10:36 2012 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Nov 28 15:10:36 2012 -0800
----------------------------------------------------------------------
.gitignore | 19 +-
VERSION | 2 +-
bin/create | 8 +-
bin/create.js | 5 +-
bin/templates/cordova/BOOM | 24 -
bin/templates/cordova/BOOM.bat | 18 -
bin/templates/cordova/build | 24 +
bin/templates/cordova/build.bat | 18 +
bin/templates/cordova/cordova | 89 ++-
bin/templates/cordova/cordova.js | 46 +-
bin/templates/cordova/debug | 24 -
bin/templates/cordova/debug.bat | 18 -
bin/templates/cordova/emulate | 24 -
bin/templates/cordova/emulate.bat | 1 -
bin/templates/cordova/release | 24 +
bin/templates/cordova/run | 24 +
bin/templates/cordova/run.bat | 1 +
bin/templates/project/assets/www/index.html | 2 +-
framework/assets/js/cordova.android.js | 618 ++++++---------
framework/assets/www/index.html | 2 +-
framework/project.properties | 2 +-
framework/res/xml/config.xml | 1 +
framework/src/org/apache/cordova/App.java | 22 +-
.../src/org/apache/cordova/CameraLauncher.java | 14 +
framework/src/org/apache/cordova/Capture.java | 2 +-
.../org/apache/cordova/ContactAccessorSdk5.java | 2 +-
.../src/org/apache/cordova/CordovaWebView.java | 197 +++---
framework/src/org/apache/cordova/Device.java | 6 +-
framework/src/org/apache/cordova/DroidGap.java | 8 +-
framework/src/org/apache/cordova/ExposedJsApi.java | 4 +
framework/src/org/apache/cordova/FileUtils.java | 20 +-
framework/src/org/apache/cordova/InAppBrowser.java | 513 ++++++++++++
.../src/org/apache/cordova/NetworkManager.java | 24 +-
test/AndroidManifest.xml | 10 +
.../cordova/test/BackButtonMultiPageTest.java | 49 ++
test/src/org/apache/cordova/test/CordovaTest.java | 2 +
.../test/actions/CordovaWebViewTestActivity.java | 22 +-
37 files changed, 1236 insertions(+), 653 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/a0d2b96d/framework/src/org/apache/cordova/CordovaWebView.java
----------------------------------------------------------------------
diff --cc framework/src/org/apache/cordova/CordovaWebView.java
index a2b6566,4777f25..336cf52
--- a/framework/src/org/apache/cordova/CordovaWebView.java
+++ b/framework/src/org/apache/cordova/CordovaWebView.java
@@@ -1036,59 -1035,46 +1053,59 @@@ public class CordovaWebView extends Web
}
// Store the view and its callback for later (to kill it properly)
- mCustomView = view;
- mCustomViewCallback = callback;
-
+ mCustomView = view;
+ mCustomViewCallback = callback;
+
// Add the custom view to its container.
- ViewGroup parent = (ViewGroup) this.getParent();
- parent.addView(view, COVER_SCREEN_GRAVITY_CENTER);
-
- // Hide the content view.
- this.setVisibility(View.GONE);
-
- // Finally show the custom view container.
- parent.setVisibility(View.VISIBLE);
- parent.bringToFront();
+ ViewGroup parent = (ViewGroup) this.getParent();
+ parent.addView(view, COVER_SCREEN_GRAVITY_CENTER);
+
+ // Hide the content view.
+ this.setVisibility(View.GONE);
+
+ // Finally show the custom view container.
+ parent.setVisibility(View.VISIBLE);
+ parent.bringToFront();
}
- public void hideCustomView() {
- // This code is adapted from the original Android Browser code, licensed under the Apache License, Version 2.0
- Log.d(TAG, "Hidding Custom View");
- if (mCustomView == null) return;
-
- // Hide the custom view.
- mCustomView.setVisibility(View.GONE);
-
- // Remove the custom view from its container.
- ViewGroup parent = (ViewGroup) this.getParent();
- parent.removeView(mCustomView);
- mCustomView = null;
- mCustomViewCallback.onCustomViewHidden();
-
+ public void hideCustomView() {
+ // This code is adapted from the original Android Browser code, licensed under the Apache License, Version 2.0
+ Log.d(TAG, "Hidding Custom View");
+ if (mCustomView == null) return;
+
+ // Hide the custom view.
+ mCustomView.setVisibility(View.GONE);
+
+ // Remove the custom view from its container.
+ ViewGroup parent = (ViewGroup) this.getParent();
+ parent.removeView(mCustomView);
+ mCustomView = null;
+ mCustomViewCallback.onCustomViewHidden();
+
// Show the content view.
this.setVisibility(View.VISIBLE);
- }
-
- /**
- * if the video overlay is showing then we need to know
- * as it effects back button handling
- *
- * @return
- */
- public boolean isCustomViewShowing() {
- return mCustomView != null;
- }
-
- public WebBackForwardList restoreState(Bundle savedInstanceState)
- {
- WebBackForwardList myList = super.restoreState(savedInstanceState);
- Log.d(TAG, "WebView restoration crew now restoring!");
- //Initialize the plugin manager once more
- this.pluginManager.init();
- return myList;
- }
+ }
+
+ /**
+ * if the video overlay is showing then we need to know
+ * as it effects back button handling
+ *
+ * @return
+ */
+ public boolean isCustomViewShowing() {
+ return mCustomView != null;
+ }
++
++ public WebBackForwardList restoreState(Bundle savedInstanceState)
++ {
++ WebBackForwardList myList = super.restoreState(savedInstanceState);
++ Log.d(TAG, "WebView restoration crew now restoring!");
++ //Initialize the plugin manager once more
++ this.pluginManager.init();
++ return myList;
++ }
+
+ public void storeResult(int requestCode, int resultCode, Intent intent) {
+ mResult = new ActivityResult(requestCode, resultCode, intent);
+ }
}
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/a0d2b96d/framework/src/org/apache/cordova/DroidGap.java
----------------------------------------------------------------------