Fixes for 1599-qrd browser to work with 1857 swe engine
Fix provider issue by providing custom class with authority string.
Comment out clear password feature.
Change-Id: Icab6cf7d3bbd71a14fad337ef01f0c53fcaf2fdf
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 000cf9d..826d140 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -18,8 +18,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.browser">
- <original-package android:name="com.android.browser" />
-
<permission android:name="com.android.browser.permission.PRELOAD"
android:label="@string/permission_preload_label"
android:protectionLevel="signatureOrSystem" />
@@ -57,17 +55,17 @@
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<application android:name="Browser"
- android:label="@string/application_name"
- android:icon="@mipmap/ic_launcher_browser"
+ android:label="@string/application_name_swe"
+ android:icon="@mipmap/ic_launcher_browser_swe"
android:backupAgent=".BrowserBackupAgent"
android:hardwareAccelerated="true"
- android:taskAffinity="android.task.browser" >
+ android:taskAffinity="android.task.swe.browser" >
<uses-library android:name="com.qrd.useragent"
android:required="false" />
<provider android:name=".provider.BrowserProvider2"
- android:authorities="com.android.browser;browser"
+ android:authorities="com.android.swe.browser;swe.browser"
android:multiprocess="false"
android:exported="true"
android:readPermission="com.android.browser.permission.READ_HISTORY_BOOKMARKS"
@@ -79,7 +77,7 @@
android:writePermission="com.android.browser.permission.WRITE_HOMEPAGE" />
</provider>
<activity android:name="BrowserActivity"
- android:label="@string/application_name"
+ android:label="@string/application_name_swe"
android:launchMode="singleTask"
android:alwaysRetainTaskState="true"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
@@ -278,7 +276,7 @@
<!-- For custom home pages (like most visited) -->
<provider
android:name=".homepages.HomeProvider"
- android:authorities="com.android.browser.home"
+ android:authorities="com.android.swe.browser.home"
android:grantUriPermissions="true"
android:readPermission="com.android.browser.permission.READ_HISTORY_BOOKMARKS"
android:exported="false" />
@@ -304,11 +302,11 @@
</receiver>
<provider android:name=".provider.SnapshotProvider"
- android:authorities="com.android.browser.snapshots"
+ android:authorities="com.android.swe.browser.snapshots"
android:exported="false" />
<provider
android:name=".provider.MyNavigationProvider"
- android:authorities="com.android.browser.mynavigation"
+ android:authorities="com.android.swe.browser.mynavigation"
android:exported="false" />
<service android:name="org.chromium.content.app.SandboxedProcessService0"
diff --git a/res/mipmap-hdpi/ic_launcher_browser_swe.png b/res/mipmap-hdpi/ic_launcher_browser_swe.png
new file mode 100644
index 0000000..47f21f4
--- /dev/null
+++ b/res/mipmap-hdpi/ic_launcher_browser_swe.png
Binary files differ
diff --git a/res/mipmap-mdpi/ic_launcher_browser_swe.png b/res/mipmap-mdpi/ic_launcher_browser_swe.png
new file mode 100644
index 0000000..ed2fc3b
--- /dev/null
+++ b/res/mipmap-mdpi/ic_launcher_browser_swe.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_browser_swe.png b/res/mipmap-xhdpi/ic_launcher_browser_swe.png
new file mode 100644
index 0000000..c712cd6
--- /dev/null
+++ b/res/mipmap-xhdpi/ic_launcher_browser_swe.png
Binary files differ
diff --git a/res/mipmap-xxhdpi/ic_launcher_browser_swe.png b/res/mipmap-xxhdpi/ic_launcher_browser_swe.png
new file mode 100644
index 0000000..516d7be
--- /dev/null
+++ b/res/mipmap-xxhdpi/ic_launcher_browser_swe.png
Binary files differ
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 4c8033f..eae9ac6 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -19,6 +19,8 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- The name of the application. -->
<string name="application_name">Browser</string>
+ <!-- The name of standalone application. -->
+ <string name="application_name_swe">SWE Android Browser</string>
<!-- Displayed with a file picker to choose a file to upload -->
<string name="choose_upload">Choose file for upload</string>
<!-- Toast to show the user after they try to open the file picker but no apps on the
@@ -1107,4 +1109,4 @@
<string name="ssl_certificate">Security certificate</string>
<string name="ssl_certificate_is_valid">This certificate is valid.</string>
<string name="version">Version</string>
-</resources>
\ No newline at end of file
+</resources>
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 1ace9fd..dd17141 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -19,10 +19,8 @@
import android.app.Activity;
import android.app.AlertDialog;
import android.app.KeyguardManager;
-import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
-import android.content.IntentFilter;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.Handler;
@@ -46,19 +44,15 @@
import com.android.browser.search.SearchEngine;
import com.android.browser.stub.NullController;
-import org.chromium.content.browser.TracingIntentHandler;
import org.codeaurora.swe.WebSettings;
import org.codeaurora.swe.WebView;
+import org.chromium.content.browser.TracingControllerAndroid;
public class BrowserActivity extends Activity {
public static final String ACTION_SHOW_BOOKMARKS = "show_bookmarks";
public static final String ACTION_SHOW_BROWSER = "show_browser";
public static final String ACTION_RESTART = "--restart--";
- private static final String ACTION_START_TRACE =
- "org.chromium.content_shell.action.PROFILE_START";
- private static final String ACTION_STOP_TRACE =
- "org.chromium.content_shell.action.PROFILE_STOP";
private static final String EXTRA_STATE = "state";
public static final String EXTRA_DISABLE_URL_OVERRIDE = "disable_url_override";
@@ -67,6 +61,7 @@
private final static boolean LOGV_ENABLED = Browser.LOGV_ENABLED;
private ActivityController mController = NullController.INSTANCE;
+ private TracingControllerAndroid mTracingController;
private Handler mHandler = new Handler();
@@ -85,8 +80,12 @@
}
};
- private BroadcastReceiver mReceiver;
-
+ private TracingControllerAndroid getTracingController() {
+ if (mTracingController == null) {
+ mTracingController = new TracingControllerAndroid(this);
+ }
+ return mTracingController;
+ }
@Override
public void onCreate(Bundle icicle) {
@@ -185,27 +184,8 @@
Log.v(LOGTAG, "BrowserActivity.onResume: this=" + this);
}
mController.onResume();
- IntentFilter intentFilter = new IntentFilter(ACTION_START_TRACE);
- intentFilter.addAction(ACTION_STOP_TRACE);
- mReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- String action = intent.getAction();
- String extra = intent.getStringExtra("file");
- if (ACTION_START_TRACE.equals(action)) {
- if (extra.isEmpty()) {
- Log.e(LOGTAG, "Can not start tracing without specifing saving location");
- } else {
- TracingIntentHandler.beginTracing(extra);
- Log.i(LOGTAG, "start tracing");
- }
- } else if (ACTION_STOP_TRACE.equals(action)) {
- Log.i(LOGTAG, "stop tracing");
- TracingIntentHandler.endTracing();
- }
- }
- };
- registerReceiver(mReceiver, intentFilter);
+
+ getTracingController().registerReceiver(this);
}
@Override
@@ -244,6 +224,7 @@
protected void onPause() {
mController.onPause();
super.onPause();
+ getTracingController().unregisterReceiver(this);
}
@Override
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index 0281167..26f14bb 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -541,13 +541,8 @@
}
}
if (settings != null) {
- settings.clearPasswords();
+ //settings.clearPasswords();
}
-
- // Clear passwords in WebView database
- WebViewDatabase db = WebViewDatabase.getInstance(mContext);
- db.clearUsernamePassword();
- db.clearHttpAuthUsernamePassword();
}
public void clearDatabases() {
diff --git a/src/com/android/browser/homepages/HomeProvider.java b/src/com/android/browser/homepages/HomeProvider.java
index 045cdb8..291348d 100644
--- a/src/com/android/browser/homepages/HomeProvider.java
+++ b/src/com/android/browser/homepages/HomeProvider.java
@@ -26,8 +26,10 @@
import android.util.Log;
import android.webkit.WebResourceResponse;
+import com.android.browser.BrowserConfig;
import com.android.browser.BrowserSettings;
+
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -37,7 +39,7 @@
public class HomeProvider extends ContentProvider {
private static final String TAG = "HomeProvider";
- public static final String AUTHORITY = "com.android.browser.home";
+ public static final String AUTHORITY = BrowserConfig.AUTHORITY + ".home";
public static final String MOST_VISITED = "content://" + AUTHORITY + "/index";
@Override
@@ -121,4 +123,4 @@
return true;
}
-}
\ No newline at end of file
+}
diff --git a/src/com/android/browser/mynavigation/MyNavigationUtil.java b/src/com/android/browser/mynavigation/MyNavigationUtil.java
index 3b1836d..1874c3f 100755
--- a/src/com/android/browser/mynavigation/MyNavigationUtil.java
+++ b/src/com/android/browser/mynavigation/MyNavigationUtil.java
@@ -37,6 +37,8 @@
import android.net.Uri;
import android.util.Log;
+import com.android.browser.BrowserConfig;
+
public class MyNavigationUtil {
public static final String ID = "_id";
@@ -48,10 +50,9 @@
public static final String THUMBNAIL = "thumbnail";
public static final int WEBSITE_NUMBER = 12;
- public static final String AUTHORITY = "com.android.browser.mynavigation";
+ public static final String AUTHORITY = BrowserConfig.AUTHORITY + ".mynavigation";
public static final String MY_NAVIGATION = "content://" + AUTHORITY + "/" + "websites";
- public static final Uri MY_NAVIGATION_URI = Uri
- .parse("content://com.android.browser.mynavigation/websites");
+ public static final Uri MY_NAVIGATION_URI = Uri.parse(MY_NAVIGATION);
public static final String DEFAULT_THUMB = "default_thumb";
public static final String LOGTAG = "MyNavigationUtil";
diff --git a/src/com/android/browser/platformsupport/BrowserContract.java b/src/com/android/browser/platformsupport/BrowserContract.java
index 755e6a3..79bdfb8 100644
--- a/src/com/android/browser/platformsupport/BrowserContract.java
+++ b/src/com/android/browser/platformsupport/BrowserContract.java
@@ -30,6 +30,8 @@
import android.os.RemoteException;
import android.util.Pair;
import android.provider.SyncStateContract;
+
+import com.android.browser.BrowserConfig;
/**
* <p>
* The contract between the browser provider and applications. Contains the definition
@@ -44,7 +46,7 @@
*/
public class BrowserContract {
/** The authority for the browser provider */
- public static final String AUTHORITY = "com.android.browser";
+ public static final String AUTHORITY = BrowserConfig.AUTHORITY;
/** A content:// style uri to the authority for the browser provider */
public static final Uri AUTHORITY_URI = Uri.parse("content://" + AUTHORITY);
diff --git a/src/com/android/browser/provider/SnapshotProvider.java b/src/com/android/browser/provider/SnapshotProvider.java
index 3226c11..923613c 100644
--- a/src/com/android/browser/provider/SnapshotProvider.java
+++ b/src/com/android/browser/provider/SnapshotProvider.java
@@ -27,6 +27,7 @@
import android.database.sqlite.SQLiteQueryBuilder;
import android.net.Uri;
+import com.android.browser.BrowserConfig;
import com.android.browser.platformsupport.BrowserContract;
import android.text.TextUtils;
@@ -55,7 +56,7 @@
public static final String VIEWSTATE_SIZE = "viewstate_size";
}
- public static final String AUTHORITY = "com.android.browser.snapshots";
+ public static final String AUTHORITY = BrowserConfig.AUTHORITY + ".snapshots";
public static final Uri AUTHORITY_URI = Uri.parse("content://" + AUTHORITY);
static final String TABLE_SNAPSHOTS = "snapshots";
diff --git a/src/com/android/browser/widget/BookmarkThumbnailWidgetProvider.java b/src/com/android/browser/widget/BookmarkThumbnailWidgetProvider.java
index f3d2675..4b3ae96 100644
--- a/src/com/android/browser/widget/BookmarkThumbnailWidgetProvider.java
+++ b/src/com/android/browser/widget/BookmarkThumbnailWidgetProvider.java
@@ -26,6 +26,7 @@
import android.widget.RemoteViews;
import com.android.browser.BrowserActivity;
+import com.android.browser.BrowserConfig;
import com.android.browser.R;
/**
@@ -33,7 +34,7 @@
*/
public class BookmarkThumbnailWidgetProvider extends AppWidgetProvider {
public static final String ACTION_BOOKMARK_APPWIDGET_UPDATE =
- "com.android.browser.BOOKMARK_APPWIDGET_UPDATE";
+ BrowserConfig.AUTHORITY +".BOOKMARK_APPWIDGET_UPDATE";
@Override
public void onReceive(Context context, Intent intent) {
diff --git a/src/com/android/browser/widget/BookmarkThumbnailWidgetService.java b/src/com/android/browser/widget/BookmarkThumbnailWidgetService.java
index 6f5e3b2..6c80695 100644
--- a/src/com/android/browser/widget/BookmarkThumbnailWidgetService.java
+++ b/src/com/android/browser/widget/BookmarkThumbnailWidgetService.java
@@ -35,6 +35,7 @@
import android.widget.RemoteViewsService;
import com.android.browser.BrowserActivity;
+import com.android.browser.BrowserConfig;
import com.android.browser.R;
import com.android.browser.platformsupport.BrowserContract;
import com.android.browser.platformsupport.BrowserContract.Bookmarks;
@@ -49,7 +50,7 @@
public class BookmarkThumbnailWidgetService extends RemoteViewsService {
static final String TAG = "BookmarkThumbnailWidgetService";
- static final String ACTION_CHANGE_FOLDER = "com.android.browser.widget.CHANGE_FOLDER";
+ static final String ACTION_CHANGE_FOLDER = BrowserConfig.AUTHORITY+ ".widget.CHANGE_FOLDER";
static final String STATE_CURRENT_FOLDER = "current_folder";
static final String STATE_ROOT_FOLDER = "root_folder";
diff --git a/src_standalone/com/android/browser/BrowserConfig.java b/src_standalone/com/android/browser/BrowserConfig.java
new file mode 100644
index 0000000..6dce1e2
--- /dev/null
+++ b/src_standalone/com/android/browser/BrowserConfig.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+
+package com.android.browser;
+
+public class BrowserConfig {
+
+ //Authority string used by different providers
+ public final static String AUTHORITY = "com.android.swe.browser";
+
+}
+
diff --git a/src_system/AndroidManifest.xml b/src_system/AndroidManifest.xml
new file mode 100644
index 0000000..000cf9d
--- /dev/null
+++ b/src_system/AndroidManifest.xml
@@ -0,0 +1,391 @@
+<!--
+/*
+ * Copyright 2006, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.browser">
+
+ <original-package android:name="com.android.browser" />
+
+ <permission android:name="com.android.browser.permission.PRELOAD"
+ android:label="@string/permission_preload_label"
+ android:protectionLevel="signatureOrSystem" />
+ <permission android:name="com.android.browser.permission.INITIALIZE_DATABASE"
+ android:protectionLevel="signatureOrSystem" />
+ <permission android:name="org.chromium.content_shell.permission.SANDBOX"
+ android:protectionLevel="signatureOrSystem" />
+
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
+ <uses-permission android:name="android.permission.ACCESS_DOWNLOAD_MANAGER"/>
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
+ <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
+ <uses-permission android:name="android.permission.INTERNET" />
+ <uses-permission android:name="android.permission.NFC" />
+ <uses-permission android:name="android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS" />
+ <uses-permission android:name="android.permission.SET_WALLPAPER" />
+ <uses-permission android:name="android.permission.WAKE_LOCK"/>
+ <uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" />
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+ <uses-permission android:name="android.permission.WRITE_SETTINGS" />
+ <uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
+ <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
+ <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
+ <uses-permission android:name="android.permission.READ_PROFILE" />
+ <uses-permission android:name="android.permission.READ_CONTACTS" />
+ <uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"/>
+ <uses-permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"/>
+ <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
+ <uses-permission android:name="com.android.browser.permission.READ_HOMEPAGE" />
+ <uses-permission android:name="com.android.browser.permission.WRITE_HOMEPAGE" />
+ <uses-permission android:name="com.android.browser.permission.INITIALIZE_DATABASE"/>
+ <uses-permission android:name="android.permission.VIBRATE"/>
+ <uses-permission android:name="android.permission.RECORD_AUDIO"/>
+ <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
+
+ <application android:name="Browser"
+ android:label="@string/application_name"
+ android:icon="@mipmap/ic_launcher_browser"
+ android:backupAgent=".BrowserBackupAgent"
+ android:hardwareAccelerated="true"
+ android:taskAffinity="android.task.browser" >
+
+ <uses-library android:name="com.qrd.useragent"
+ android:required="false" />
+
+ <provider android:name=".provider.BrowserProvider2"
+ android:authorities="com.android.browser;browser"
+ android:multiprocess="false"
+ android:exported="true"
+ android:readPermission="com.android.browser.permission.READ_HISTORY_BOOKMARKS"
+ android:writePermission="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS">
+ <path-permission android:path="/bookmarks/search_suggest_query"
+ android:readPermission="android.permission.GLOBAL_SEARCH" />
+ <path-permission android:path="/homepage"
+ android:readPermission="com.android.browser.permission.READ_HOMEPAGE"
+ android:writePermission="com.android.browser.permission.WRITE_HOMEPAGE" />
+ </provider>
+ <activity android:name="BrowserActivity"
+ android:label="@string/application_name"
+ android:launchMode="singleTask"
+ android:alwaysRetainTaskState="true"
+ android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
+ android:theme="@style/BrowserTheme"
+ android:windowSoftInputMode="adjustResize" >
+ <intent-filter>
+ <action android:name="android.speech.action.VOICE_SEARCH_RESULTS" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <!-- For these schemes were not particular MIME type has been
+ supplied, we are a good candidate. -->
+ <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:scheme="http" />
+ <data android:scheme="https" />
+ <data android:scheme="about" />
+ <data android:scheme="javascript" />
+ </intent-filter>
+ <!-- For these schemes where any of these particular MIME types
+ have been supplied, we are a good candidate. -->
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.BROWSABLE" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:scheme="http" />
+ <data android:scheme="https" />
+ <data android:scheme="inline" />
+ <data android:mimeType="text/html"/>
+ <data android:mimeType="text/plain"/>
+ <data android:mimeType="application/xhtml+xml"/>
+ <data android:mimeType="application/vnd.wap.xhtml+xml"/>
+ </intent-filter>
+ <!-- For viewing saved web archives. -->
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.BROWSABLE" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:scheme="http" />
+ <data android:scheme="https" />
+ <data android:scheme="file" />
+ <data android:mimeType="application/x-webarchive-xml"/>
+ </intent-filter>
+ <!-- Accept inbound NFC URLs at a low priority -->
+ <intent-filter android:priority="-101">
+ <action android:name="android.nfc.action.NDEF_DISCOVERED" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:scheme="http" />
+ <data android:scheme="https" />
+ </intent-filter>
+ <!-- We are also the main entry point of the browser. -->
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ <category android:name="android.intent.category.BROWSABLE" />
+ <category android:name="android.intent.category.APP_BROWSER" />
+ </intent-filter>
+ <!-- The maps app is a much better experience, so it's not
+ worth having this at all... especially for a demo!
+ <intent-filter android:label="Map In Browser">
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:mimeType="vnd.android.cursor.item/postal-address" />
+ </intent-filter>
+ -->
+ <intent-filter>
+ <action android:name="android.intent.action.WEB_SEARCH" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.BROWSABLE" />
+ <data android:scheme="" />
+ <data android:scheme="http" />
+ <data android:scheme="https" />
+ </intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.MEDIA_SEARCH" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.SEARCH" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <meta-data android:name="android.app.searchable"
+ android:resource="@xml/searchable" />
+ </activity>
+
+ <activity android:name="ShortcutActivity"
+ android:theme="@style/ShortcutTheme"
+ android:label="@string/shortcut_bookmark"
+ android:icon="@mipmap/ic_launcher_shortcut_browser_bookmark">
+ <intent-filter>
+ <action android:name="android.intent.action.CREATE_SHORTCUT" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+
+ <activity android:name="BrowserPreferencesPage" android:label="@string/menu_preferences">
+ <intent-filter>
+ <action android:name="android.intent.action.MANAGE_NETWORK_USAGE" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+
+ <activity android:name="BookmarkSearch"
+ android:label="@string/bookmarks_search"
+ android:stateNotNeeded="true"
+ android:theme="@android:style/Theme.NoDisplay"
+ android:excludeFromRecents="true">
+ <intent-filter>
+ <action android:name="android.intent.action.SEARCH" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <meta-data android:name="android.app.searchable"
+ android:resource="@xml/bookmarks_searchable" />
+ </activity>
+
+ <activity android:name="AddBookmarkPage" android:label="@string/bookmarks_add_page"
+ android:theme="@style/DialogWhenLarge"
+ android:configChanges="orientation|keyboardHidden|screenSize"
+ android:windowSoftInputMode="adjustResize">
+ <intent-filter>
+ <action android:name="android.intent.action.INSERT" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:mimeType="vnd.android.cursor.dir/bookmark"/>
+ </intent-filter>
+ </activity>
+
+ <activity android:name="DownloadSettings" android:label="@string/download_settings_title"
+ android:theme="@style/DialogWhenLarge"
+ android:launchMode="singleTask"
+ android:configChanges="orientation|keyboardHidden|screenSize"
+ android:windowSoftInputMode="adjustResize">
+ <intent-filter>
+ <action android:name="android.intent.action.BROWSERDOWNLOAD" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+
+ <!-- For creating new folder in bookmarks page -->
+ <activity android:name="AddBookmarkFolder" android:label="@string/save_bookmark_folder"
+ android:theme="@style/DialogWhenLarge"
+ android:configChanges="orientation|keyboardHidden|screenSize">
+ <intent-filter>
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:mimeType="vnd.android.cursor.dir/bookmark"/>
+ </intent-filter>
+ </activity>
+
+ <activity android:name="ComboViewActivity">
+ </activity>
+
+ <!-- Bookmark thumbnail homescreen widget -->
+ <receiver
+ android:name=".widget.BookmarkThumbnailWidgetProvider"
+ android:label="@string/bookmarks">
+ <intent-filter>
+ <action
+ android:name="android.appwidget.action.APPWIDGET_UPDATE" />
+ <action
+ android:name="com.android.browser.BOOKMARK_APPWIDGET_UPDATE" />
+ </intent-filter>
+ <meta-data
+ android:name="android.appwidget.provider"
+ android:resource="@xml/bookmarkthumbnailwidget_info" />
+ </receiver>
+ <service
+ android:name=".widget.BookmarkThumbnailWidgetService"
+ android:permission="android.permission.BIND_REMOTEVIEWS"
+ android:exported="false" />
+ <receiver
+ android:name=".widget.BookmarkWidgetProxy"
+ android:exported="false" />
+ <activity android:name=".widget.BookmarkWidgetConfigure"
+ android:theme="@android:style/Theme.Holo.DialogWhenLarge">
+ <intent-filter>
+ <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/>
+ </intent-filter>
+ </activity>
+ <!-- add or edit my navigation activity -->
+ <activity android:name=".mynavigation.AddMyNavigationPage"
+ android:label="@string/my_navigation_page_title"
+ android:configChanges="orientation|keyboardHidden"
+ android:windowSoftInputMode="stateHidden">
+ </activity>
+
+ <!-- Makes .BrowserActivity the search target for any activity in Browser -->
+ <meta-data android:name="android.app.default_searchable" android:value=".BrowserActivity" />
+
+ <receiver android:name=".OpenDownloadReceiver">
+ <intent-filter>
+ <action android:name="android.intent.action.DOWNLOAD_NOTIFICATION_CLICKED"/>
+ </intent-filter>
+ </receiver>
+
+ <!-- For custom home pages (like most visited) -->
+ <provider
+ android:name=".homepages.HomeProvider"
+ android:authorities="com.android.browser.home"
+ android:grantUriPermissions="true"
+ android:readPermission="com.android.browser.permission.READ_HISTORY_BOOKMARKS"
+ android:exported="false" />
+
+ <receiver android:name=".AccountsChangedReceiver">
+ <intent-filter>
+ <action android:name="android.accounts.LOGIN_ACCOUNTS_CHANGED" />
+ </intent-filter>
+ </receiver>
+
+ <receiver android:name=".MessagesReceiver">
+ <intent-filter>
+ <action android:name="com.android.mms.transaction.MESSAGE_RECEIVED" />
+ </intent-filter>
+ </receiver>
+
+ <receiver android:name=".PreloadRequestReceiver"
+ android:permission="com.android.browser.permission.PRELOAD" >
+ <intent-filter>
+ <action android:name="android.intent.action.PRELOAD"/>
+ <data android:scheme="http" />
+ </intent-filter>
+ </receiver>
+
+ <provider android:name=".provider.SnapshotProvider"
+ android:authorities="com.android.browser.snapshots"
+ android:exported="false" />
+ <provider
+ android:name=".provider.MyNavigationProvider"
+ android:authorities="com.android.browser.mynavigation"
+ android:exported="false" />
+
+ <service android:name="org.chromium.content.app.SandboxedProcessService0"
+ android:process=":sandboxed_process0"
+ android:permission="org.chromium.content_shell.permission.SANDBOX"
+ android:isolatedProcess="true"
+ android:exported="false" />
+ <service android:name="org.chromium.content.app.SandboxedProcessService1"
+ android:process=":sandboxed_process1"
+ android:permission="org.chromium.content_shell.permission.SANDBOX"
+ android:isolatedProcess="true"
+ android:exported="false" />
+ <service android:name="org.chromium.content.app.SandboxedProcessService2"
+ android:process=":sandboxed_process2"
+ android:permission="org.chromium.content_shell.permission.SANDBOX"
+ android:isolatedProcess="true"
+ android:exported="false" />
+ <service android:name="org.chromium.content.app.SandboxedProcessService3"
+ android:process=":sandboxed_process3"
+ android:permission="org.chromium.content_shell.permission.SANDBOX"
+ android:isolatedProcess="true"
+ android:exported="false" />
+ <service android:name="org.chromium.content.app.SandboxedProcessService4"
+ android:process=":sandboxed_process4"
+ android:permission="org.chromium.content_shell.permission.SANDBOX"
+ android:isolatedProcess="true"
+ android:exported="false" />
+ <service android:name="org.chromium.content.app.SandboxedProcessService5"
+ android:process=":sandboxed_process5"
+ android:permission="org.chromium.content_shell.permission.SANDBOX"
+ android:isolatedProcess="true"
+ android:exported="false" />
+ <service android:name="org.chromium.content.app.SandboxedProcessService6"
+ android:process=":sandboxed_process6"
+ android:permission="org.chromium.content_shell.permission.SANDBOX"
+ android:isolatedProcess="true"
+ android:exported="false" />
+ <service android:name="org.chromium.content.app.SandboxedProcessService7"
+ android:process=":sandboxed_process7"
+ android:permission="org.chromium.content_shell.permission.SANDBOX"
+ android:isolatedProcess="true"
+ android:exported="false" />
+ <service android:name="org.chromium.content.app.SandboxedProcessService8"
+ android:process=":sandboxed_process8"
+ android:permission="org.chromium.content_shell.permission.SANDBOX"
+ android:isolatedProcess="true"
+ android:exported="false" />
+ <service android:name="org.chromium.content.app.SandboxedProcessService9"
+ android:process=":sandboxed_process9"
+ android:permission="org.chromium.content_shell.permission.SANDBOX"
+ android:isolatedProcess="true"
+ android:exported="false" />
+ <service android:name="org.chromium.content.app.SandboxedProcessService10"
+ android:process=":sandboxed_process10"
+ android:permission="org.chromium.content_shell.permission.SANDBOX"
+ android:isolatedProcess="true"
+ android:exported="false" />
+ <service android:name="org.chromium.content.app.SandboxedProcessService11"
+ android:process=":sandboxed_process11"
+ android:permission="org.chromium.content_shell.permission.SANDBOX"
+ android:isolatedProcess="true"
+ android:exported="false" />
+ <service android:name="org.chromium.content.app.SandboxedProcessService12"
+ android:process=":sandboxed_process12"
+ android:permission="org.chromium.content_shell.permission.SANDBOX"
+ android:isolatedProcess="true"
+ android:exported="false" />
+ <service android:name="org.chromium.content.app.SandboxedProcessService13"
+ android:process=":sandboxed_process13"
+ android:permission="org.chromium.content_shell.permission.SANDBOX"
+ android:isolatedProcess="true"
+ android:exported="false" />
+ </application>
+
+ <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="16" />
+
+ <uses-feature android:name="android.hardware.location.gps" android:required="false" />
+
+</manifest>
+
diff --git a/src_system/com/android/browser/BrowserConfig.java b/src_system/com/android/browser/BrowserConfig.java
new file mode 100644
index 0000000..59d907c
--- /dev/null
+++ b/src_system/com/android/browser/BrowserConfig.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+package com.android.browser;
+
+public class BrowserConfig {
+
+ public final static String AUTHORITY = "com.android.browser";
+
+}
+
diff --git a/swe_android_browser.gypi b/swe_android_browser.gypi
index 1c23785..0c9c485 100644
--- a/swe_android_browser.gypi
+++ b/swe_android_browser.gypi
@@ -6,7 +6,9 @@
'dependencies': [
'swe_engine_java',
'android-support-v13',
+ 'fast_webview_java',
'<@(libnetxt_dependencies)',
+ '<@(libsweadrenoext_dependencies)',
],
'variables': {
'apk_name': 'SWE_AndroidBrowser',
@@ -18,7 +20,10 @@
'assets_dir': '../../swe/browser/assets',
'native_lib_target': 'libswewebviewchromium',
'additional_input_paths': ['<(PRODUCT_DIR)/android_webview_apk/assets/webviewchromium.pak'],
- 'additional_native_libs': ['<@(libnetxt_native_libs)']
+ 'additional_native_libs': ['<@(libnetxt_native_libs)', '<@(libsweadrenoext_native_libs)'],
+ 'override_package_name': 'com.android.swe.browser',
+ 'android_manifest_path': '../../swe/browser/AndroidManifest.xml',
+ 'additional_src_dirs': ['<(DEPTH)/swe/browser/src_standalone/com/android/browser'],
},
'copies': [
{
@@ -38,5 +43,13 @@
],
'includes': [ '../../build/java_apk.gypi' ],
},
+ {
+ 'target_name': 'swe_android_browser_apk_java',
+ 'type': 'none',
+ 'dependencies': [
+ 'swe_android_browser_apk',
+ ],
+ 'includes': [ '../../build/apk_fake_jar.gypi' ],
+ },
],
}