From ce2a762db27be2453241f25291e4cd3e1808ee97 Mon Sep 17 00:00:00 2001
From: str4d <str4d@mail.i2p>
Date: Tue, 4 Mar 2014 03:00:13 +0000
Subject: [PATCH] Temporarily enable inbuilt browser until an alternative is
 ready

---
 AndroidManifest.xml.in                                 |  2 +-
 .../router/addressbook/AddressbookActivity.java        | 10 ++++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/AndroidManifest.xml.in b/AndroidManifest.xml.in
index c033ba129..4d65c1f4f 100644
--- a/AndroidManifest.xml.in
+++ b/AndroidManifest.xml.in
@@ -44,13 +44,13 @@
                   android:label="I2P Web Browser"
                   android:configChanges="orientation|keyboardHidden" >
             <!-- Disabled, this browser is not very secure
+            Temporarily enabled until an alternative browser is ready -->
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <category android:name="android.intent.category.BROWSABLE" />
                 <data android:host="*.i2p" android:scheme="http" />
             </intent-filter>
-            -->
         </activity>
         <activity android:name=".SettingsActivity"
                   android:label="I2P Settings"
diff --git a/src/net/i2p/android/router/addressbook/AddressbookActivity.java b/src/net/i2p/android/router/addressbook/AddressbookActivity.java
index 8a6050e30..32528791b 100644
--- a/src/net/i2p/android/router/addressbook/AddressbookActivity.java
+++ b/src/net/i2p/android/router/addressbook/AddressbookActivity.java
@@ -2,6 +2,8 @@ package net.i2p.android.router.addressbook;
 
 import net.i2p.android.router.I2PActivityBase;
 import net.i2p.android.router.R;
+import net.i2p.android.router.web.WebActivity;
+import net.i2p.android.router.web.WebFragment;
 import android.app.Activity;
 import android.app.SearchManager;
 import android.content.Context;
@@ -103,8 +105,12 @@ public class AddressbookActivity extends I2PActivityBase
             setResult(Activity.RESULT_OK, result);
             finish();
         } else {
-            Intent i = new Intent(Intent.ACTION_VIEW);
-            i.setData(Uri.parse("http://" + host));
+            //Intent i = new Intent(Intent.ACTION_VIEW);
+            //i.setData(Uri.parse("http://" + host));
+            // XXX: Temporarily reverting to inbuilt browser
+            // until an alternative browser is ready.
+            Intent i = new Intent(this, WebActivity.class);
+            i.putExtra(WebFragment.HTML_URI, "http://" + host + '/');
             startActivity(i);
         }
     }
-- 
GitLab