Bug 1173228 - Suppress SetJavaScriptEnabled linter warning. r=margaret
authorMichael Comella <michael.l.comella@gmail.com>
Tue, 09 Jun 2015 18:52:12 -0700
changeset 267032 12ab70b3668555fbea5037906733a1fc1bd496f8
parent 267031 547e848ba27a83023d594471f9c7b96632c9d96d
child 267033 cf876b6ac84324ed182b221b4f6425c10a3ce099
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-esr52@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs1173228
milestone41.0a1
Bug 1173228 - Suppress SetJavaScriptEnabled linter warning. r=margaret The function is required for a greasemonkey script and the code is expected to be secure.
mobile/android/search/java/org/mozilla/search/PostSearchFragment.java
--- a/mobile/android/search/java/org/mozilla/search/PostSearchFragment.java
+++ b/mobile/android/search/java/org/mozilla/search/PostSearchFragment.java
@@ -9,16 +9,17 @@ import java.net.URISyntaxException;
 import java.net.URL;
 
 import org.mozilla.gecko.AppConstants;
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.Telemetry;
 import org.mozilla.gecko.TelemetryContract;
 import org.mozilla.search.providers.SearchEngine;
 
+import android.annotation.SuppressLint;
 import android.content.Intent;
 import android.graphics.Bitmap;
 import android.os.Bundle;
 import android.provider.Settings;
 import android.support.v4.app.Fragment;
 import android.text.TextUtils;
 import android.util.Log;
 import android.view.LayoutInflater;
@@ -39,16 +40,17 @@ public class PostSearchFragment extends 
     private SearchEngine engine;
 
     private ProgressBar progressBar;
     private WebView webview;
     private View errorView;
 
     private String resultsPageHost;
 
+    @SuppressLint("SetJavaScriptEnabled")
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container,
                              Bundle savedInstanceState) {
         View mainView = inflater.inflate(R.layout.search_fragment_post_search, container, false);
 
         progressBar = (ProgressBar) mainView.findViewById(R.id.progress_bar);
 
         webview = (WebView) mainView.findViewById(R.id.webview);