Skip to content

Commit

Permalink
Clean up code and consolidate bindBrowser with init.
Browse files Browse the repository at this point in the history
  • Loading branch information
brycecurtis committed Sep 28, 2011
1 parent aa6e418 commit 336a58c
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions framework/src/com/phonegap/DroidGap.java
Expand Up @@ -263,8 +263,9 @@ public void init() {
// Enable built-in geolocation
WebViewReflect.setGeolocationEnabled(settings, true);

// Bind PhoneGap objects to JavaScript
this.bindBrowser(this.appView);
// Create callback server and plugin manager
this.callbackServer = new CallbackServer();
this.pluginManager = new PluginManager(this.appView, this);

// Add web view but make it invisible while loading URL
this.appView.setVisibility(View.INVISIBLE);
Expand All @@ -287,17 +288,6 @@ protected void setWebViewClient(WebView appView, WebViewClient client) {
appView.setWebViewClient(client);
}

/**
* Bind PhoneGap objects to JavaScript.
*
* @param appView
*/
private void bindBrowser(WebView appView) {
this.callbackServer = new CallbackServer();
this.pluginManager = new PluginManager(appView, this);

}

/**
* Look at activity parameters and process them.
* This must be called from the main UI thread.
Expand Down

0 comments on commit 336a58c

Please sign in to comment.