Skip to content

Commit

Permalink
Cleaning up code, because negating string comparisons is confusing if…
Browse files Browse the repository at this point in the history
… the string itself is called false. Also clarified the deprecation message to match the Cordova policy that we agreed on for deprecation changes
  • Loading branch information
infil00p committed Oct 23, 2012
1 parent e11bead commit 5f1cda0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions framework/src/org/apache/cordova/CordovaWebView.java
Original file line number Diff line number Diff line change
Expand Up @@ -730,13 +730,13 @@ else if (strNode.equals("preference")) {
}
}

// Init preferences
this.useBrowserHistory = !"false".equals(this.getProperty("useBrowserHistory", "true"));
if (!this.useBrowserHistory) {
// Deprecated in Cordova 2.2.0.
Log.w(TAG, "useBrowserHistory=false is deprecated. Use history.back() instead of navigator.app.backHistory().");
if("false".equals(this.getProperty("useBrowserHistory", "true")))
{
//Switch back to the old browser history and state the six month policy
this.useBrowserHistory = false;
Log.w(TAG, "useBrowserHistory=false is deprecated. We will be removing this feature entirely in six months. Please use the browser history and use history.back().");
}

if ("true".equals(this.getProperty("fullscreen", "false"))) {
this.cordova.getActivity().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
this.cordova.getActivity().getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
Expand Down

0 comments on commit 5f1cda0

Please sign in to comment.