am f9eaab90: (-s ours) Import revised translations. DO NOT MERGE
Merge commit 'f9eaab90806775e2f83753289ea8e9665fd65d47' into eclair
* commit 'f9eaab90806775e2f83753289ea8e9665fd65d47':
Import revised translations. DO NOT MERGE
diff --git a/src/com/android/htmlviewer/HTMLViewerActivity.java b/src/com/android/htmlviewer/HTMLViewerActivity.java
index 152e2b3..b8a59d3 100644
--- a/src/com/android/htmlviewer/HTMLViewerActivity.java
+++ b/src/com/android/htmlviewer/HTMLViewerActivity.java
@@ -99,17 +99,14 @@
Intent intent = getIntent();
if (intent.getData() != null) {
Uri uri = intent.getData();
- if ("file".equals(uri.getScheme())) {
- String contentUri =
- FileContentProvider.BASE_URI +
- uri.getEncodedPath() +
- "?" +
- intent.getType();
- mWebView.loadUrl(contentUri);
- } else {
- mWebView.loadUrl(intent.getData().toString() +
- "?" + intent.getType());
+ String contentUri = "file".equals(uri.getScheme())
+ ? FileContentProvider.BASE_URI + uri.getEncodedPath()
+ : uri.toString();
+ String intentType = intent.getType();
+ if (intentType != null) {
+ contentUri += "?" + intentType;
}
+ mWebView.loadUrl(contentUri);
}
}
}