Fix use of WebView.loadData() to avoid passing invalid encoding

No change in behavior, as invalid encodings have always been ignored.

Bug: 5125738
Change-Id: Ice8ccc2b82e3c5d28169788321dfbbfadb29b392
This commit is contained in:
Steve Block
2011-06-14 21:38:24 +01:00
parent 5430301164
commit aa29f342e5
3 changed files with 13 additions and 14 deletions

View File

@@ -95,12 +95,12 @@ public class MyRssReader5 extends Activity implements OnItemSelectedListener {
mLogger.warning("MyRssReader5.onItemSelected() couldn't get the content" +
"from the cursor " + e.getMessage());
}
mWebView.loadData(content, "text/html", "utf-8");
mWebView.loadData(content, "text/html", null);
}
//END_INCLUDE(5_4)
public void onNothingSelected(AdapterView parent){
mWebView.loadData("<html><body><p>No selection chosen</p></body></html>", "text/html", "utf-8");
mWebView.loadData("<html><body><p>No selection chosen</p></body></html>", "text/html", null);
}
// Store our state before we are potentially bumped from memory.