diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:06:01 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:06:01 -0800 |
commit | abc48f80d8747b4fc051b7dd364355ee667a9bac (patch) | |
tree | 31ae577fe29d75963b071e738703e4db83ad6580 /src/com/android/settings/SettingsLicenseActivity.java | |
parent | de2d9f5f109265873196f1615e1f3546b114aaa7 (diff) | |
download | packages_apps_Settings-abc48f80d8747b4fc051b7dd364355ee667a9bac.zip packages_apps_Settings-abc48f80d8747b4fc051b7dd364355ee667a9bac.tar.gz packages_apps_Settings-abc48f80d8747b4fc051b7dd364355ee667a9bac.tar.bz2 |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'src/com/android/settings/SettingsLicenseActivity.java')
-rw-r--r-- | src/com/android/settings/SettingsLicenseActivity.java | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/com/android/settings/SettingsLicenseActivity.java b/src/com/android/settings/SettingsLicenseActivity.java index 82eadca..c40dd07 100644 --- a/src/com/android/settings/SettingsLicenseActivity.java +++ b/src/com/android/settings/SettingsLicenseActivity.java @@ -28,13 +28,10 @@ import android.widget.Toast; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; -import java.io.UnsupportedEncodingException; import com.android.internal.app.AlertActivity; import com.android.internal.app.AlertController; -import org.apache.commons.codec.binary.Base64; - /** * The "dialog" that shows from "License" in the Settings app. */ @@ -92,27 +89,8 @@ public class SettingsLicenseActivity extends AlertActivity { WebView webView = new WebView(this); - if (LOGV) Log.v(TAG, "Started encode at " + System.currentTimeMillis()); - // Need to encode to base64 for WebView to load the contents properly - String dataStr; - try { - byte[] base64Bytes = Base64.encodeBase64(data.toString().getBytes("ISO8859_1")); - dataStr = new String(base64Bytes); - } catch (UnsupportedEncodingException e) { - Log.e(TAG, "Could not convert to base64", e); - showErrorAndFinish(); - return; - } - if (LOGV) Log.v(TAG, "Ended encode at " + System.currentTimeMillis()); - if (LOGV) { - Log.v(TAG, "Started test decode at " + System.currentTimeMillis()); - Base64.decodeBase64(dataStr.getBytes()); - Log.v(TAG, "Ended decode at " + System.currentTimeMillis()); - } - - // Begin the loading. This will be done in a separate thread in WebView. - webView.loadData(dataStr, "text/html", "base64"); + webView.loadDataWithBaseURL(null, data.toString(), "text/html", "utf-8", null); webView.setWebViewClient(new WebViewClient() { @Override public void onPageFinished(WebView view, String url) { |