-Privacy Browser
\ No newline at end of file
+PrivacyBrowser
\ No newline at end of file
+++ /dev/null
-<component name="ProjectDictionaryState">
- <dictionary name="soren">
- <words>
- <w>affero</w>
- <w>creativecommons</w>
- <w>duckduckgo</w>
- <w>homescreen</w>
- <w>lgpl</w>
- <w>licensors</w>
- <w>mailto</w>
- <w>mimetype</w>
- <w>noncommercially</w>
- <w>privacybrowser</w>
- <w>recents</w>
- <w>rehide</w>
- <w>rehides</w>
- <w>relicensing</w>
- <w>soren</w>
- <w>stoutner</w>
- <w>sublicenses</w>
- <w>sublicensing</w>
- <w>webpage</w>
- <w>webview</w>
- <w>wipo</w>
- </words>
- </dictionary>
-</component>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Encoding">
+ <file url="PROJECT" charset="UTF-8" />
+ </component>
+</project>
\ No newline at end of file
<GradleProjectSettings>
<option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
- <option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.8" />
+ <option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.10" />
<option name="gradleJvm" value="1.7" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$/app" />
</set>
</option>
+ <option name="myModules">
+ <set>
+ <option value="$PROJECT_DIR$" />
+ <option value="$PROJECT_DIR$/app" />
+ </set>
+ </option>
</GradleProjectSettings>
</option>
</component>
buildTypes {
release {
- minifyEnabled false
+ minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
standard {
applicationId "com.stoutner.privacybrowser.standard"
- versionName "1.1-standard"
+ versionName "1.2-standard"
}
free {
applicationId "com.stoutner.privacybrowser.free"
- versionName "1.1-free"
+ versionName "1.2-free"
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
- compile 'com.android.support:appcompat-v7:23.2.1'
- compile 'com.android.support:design:23.2.1'
- compile 'com.android.support:support-v4:23.2.1'
+ compile 'com.android.support:design:23.3.0'
// Only compile com.google.android.gms:play-services-ads for the free version so that the standard version can build of F-Droid.
freeCompile 'com.google.android.gms:play-services-ads:8.4.0'
}
which is part of the Android Material icon set. It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>.
Modifications were made by Soren Stoutner in 2016.</p>
-<p>/app.src/main/res/drawable/world.xml is part of the Android Material icon set, where it is named ic_language.
+<p>app/src/main/res/drawable/world.xml is part of the Android Material icon set, where it is named ic_language.
It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>. Changes to fill color and size were made by Soren Stoutner in 2016.</p>
+<p>app/src/main/res/drawable/back.xml is part of the Android Material icon set, where it is named ic_arrow_back.
+ It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>.</p>
+
+<p>app/src/main/res/drawable/forward.xml is part of the Android Material icon set, where it is named ic_arrow_forward.
+ It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>.</p>
+
+<p>app/src/main/res/drawable/settings.xml is part of the Android Material icon set, where it is named ic_settings.
+ It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>.</p>
+
+<p>app/src/main/res/drawable/downloads.xml is part of the Android Material icon set, where it is named ic_file_download.
+ It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>.</p>
+
+<p>app/src/main/res/drawable/exit.xml is part of the Android Material icon set, where it is named ic_exit_to_app.
+ It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>.</p>
+
+<p>app/src/main/res/drawable/about.xml is part of the Android Material icon set, where it is named ic_info.
+ It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>.</p>
+
<br/>
<hr/>
<br/>
import android.app.DownloadManager;
import android.content.Intent;
import android.content.SharedPreferences;
+import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
+import android.support.design.widget.NavigationView;
import android.support.design.widget.Snackbar;
import android.support.v4.app.DialogFragment;
+import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.ActionBar;
import java.net.URLEncoder;
// We need to use AppCompatActivity from android.support.v7.app.AppCompatActivity to have access to the SupportActionBar until the minimum API is >= 21.
-public class MainWebViewActivity extends AppCompatActivity implements CreateHomeScreenShortcut.CreateHomeScreenSchortcutListener {
+public class MainWebViewActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener, CreateHomeScreenShortcut.CreateHomeScreenSchortcutListener {
// favoriteIcon is public static so it can be accessed from CreateHomeScreenShortcut.
public static Bitmap favoriteIcon;
- // mainWebView is public static so it can be accessed from AboutDialog. It is also used in onCreate(), onOptionsItemSelected(), and loadUrlFromTextBox().
+ // mainWebView is public static so it can be accessed from AboutDialog. It is also used in onCreate(), onOptionsItemSelected(), onNavigationItemSelected(), and loadUrlFromTextBox().
public static WebView mainWebView;
- // DrawerTottle is use in onCrate() and onPostCreate().
+ // drawerToggle is used in onCreate(), onPostCreate(), onConfigurationChanged(), onNewIntent(), and onNavigationItemSelected().
private ActionBarDrawerToggle drawerToggle;
+ // drawerLayout is used in onCreate(), onNewIntent(), and onBackPressed().
+ private DrawerLayout drawerLayout;
// mainMenu is used in onCreateOptionsMenu() and onOptionsItemSelected().
private Menu mainMenu;
// formattedUrlString is used in onCreate(), onOptionsItemSelected(), onCreateHomeScreenShortcutCreate(), and loadUrlFromTextBox().
private boolean saveFormDataEnabled;
*/
- // cookieManager is used in onCreate() and onOptionsItemSelected().
+ // cookieManager is used in onCreate(), onOptionsItemSelected(), and onNavigationItemSelected().
private CookieManager cookieManager;
// cookiesEnabled is used in onCreate(), onCreateOptionsMenu(), and onOptionsItemSelected().
private boolean cookiesEnabled;
});
}
- DrawerLayout drawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);
+ // Create the navigation drawer.
+ drawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);
+ // The DrawerTitle identifies the drawer in accessibility mode.
+ drawerLayout.setDrawerTitle(GravityCompat.START, getString(R.string.navigation_drawer));
+
+ // Listen for touches on the navigation menu.
+ final NavigationView navigationView = (NavigationView) findViewById(R.id.navigationView);
+ navigationView.setNavigationItemSelectedListener(this);
+
+ // drawerToggle creates the hamburger icon at the start of the AppBar.
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, supportAppBar, R.string.open_navigation, R.string.close_navigation);
mainWebView.setWebViewClient(new WebViewClient() {
formattedUrlString = intentUriData.toString();
}
+ // Close the navigation drawer if it is open.
+ if (drawerLayout.isDrawerVisible(GravityCompat.START)) {
+ drawerLayout.closeDrawer(GravityCompat.START);
+ }
+
// Load the website.
mainWebView.loadUrl(formattedUrlString);
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
- getMenuInflater().inflate(R.menu.menu_webview, menu);
+ getMenuInflater().inflate(R.menu.menu_options, menu);
// Set mainMenu so it can be used by onOptionsItemSelected.
mainMenu = menu;
MenuItem clearCookies = menu.findItem(R.id.clearCookies);
clearCookies.setEnabled(cookieManager.hasCookies());
- // Enable Back if canGoBack().
- MenuItem back = menu.findItem(R.id.back);
- back.setEnabled(mainWebView.canGoBack());
-
- // Enable forward if canGoForward().
- MenuItem forward = menu.findItem(R.id.forward);
- forward.setEnabled(mainWebView.canGoForward());
-
// Run all the other default commands.
super.onPrepareOptionsMenu(menu);
Snackbar.make(findViewById(R.id.mainWebView), R.string.cookies_deleted, Snackbar.LENGTH_SHORT).show();
return true;
+ case R.id.share:
+ Intent shareIntent = new Intent();
+ shareIntent.setAction(Intent.ACTION_SEND);
+ shareIntent.putExtra(Intent.EXTRA_TEXT, urlTextBox.getText().toString());
+ shareIntent.setType("text/plain");
+ startActivity(Intent.createChooser(shareIntent, "Share URL"));
+ return true;
+
case R.id.addToHomescreen:
// Show the CreateHomeScreenShortcut AlertDialog and name this instance createShortcut.
AppCompatDialogFragment shortcutDialog = new CreateHomeScreenShortcut();
//Everything else will be handled by CreateHomeScreenShortcut and the associated listeners below.
return true;
- case R.id.downloads:
- // Launch the system Download Manager.
- Intent downloadManagerIntent = new Intent(DownloadManager.ACTION_VIEW_DOWNLOADS);
-
- // Launch as a new task so that Download Manager and Privacy Browser show as separate windows in the recent tasks list.
- downloadManagerIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ default:
+ return super.onOptionsItemSelected(menuItem);
+ }
+ }
- startActivity(downloadManagerIntent);
- return true;
+ @Override
+ // removeAllCookies is deprecated, but it is required for API < 21.
+ @SuppressWarnings("deprecation")
+ public boolean onNavigationItemSelected(MenuItem menuItem) {
+ int menuItemId = menuItem.getItemId();
+ switch (menuItemId) {
case R.id.home:
mainWebView.loadUrl(homepage);
- return true;
+ break;
case R.id.back:
- mainWebView.goBack();
- return true;
+ if (mainWebView.canGoBack()) {
+ mainWebView.goBack();
+ }
+ break;
case R.id.forward:
- mainWebView.goForward();
- return true;
+ if (mainWebView.canGoForward()) {
+ mainWebView.goForward();
+ }
+ break;
- case R.id.share:
- Intent shareIntent = new Intent();
- shareIntent.setAction(Intent.ACTION_SEND);
- shareIntent.putExtra(Intent.EXTRA_TEXT, urlTextBox.getText().toString());
- shareIntent.setType("text/plain");
- startActivity(Intent.createChooser(shareIntent, "Share URL"));
- return true;
+ case R.id.downloads:
+ // Launch the system Download Manager.
+ Intent downloadManagerIntent = new Intent(DownloadManager.ACTION_VIEW_DOWNLOADS);
+
+ // Launch as a new task so that Download Manager and Privacy Browser show as separate windows in the recent tasks list.
+ downloadManagerIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+
+ startActivity(downloadManagerIntent);
+ break;
case R.id.settings:
// Launch SettingsActivity.
Intent intent = new Intent(this, SettingsActivity.class);
startActivity(intent);
- return true;
+ break;
case R.id.about:
// Show the AboutDialog AlertDialog and name this instance aboutDialog.
AppCompatDialogFragment aboutDialog = new AboutDialog();
aboutDialog.show(getSupportFragmentManager(), "aboutDialog");
- return true;
+ break;
case R.id.clearAndExit:
// Clear DOM storage.
} else {
finish();
}
- return true;
+ break;
default:
- return super.onOptionsItemSelected(menuItem);
+ break;
}
+
+ // Close the navigation drawer.
+ drawerLayout.closeDrawer(GravityCompat.START);
+ return true;
}
@Override
drawerToggle.syncState();
}
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+
+ // Update the status of the drawerToggle icon.
+ drawerToggle.onConfigurationChanged(newConfig);
+ }
+
@Override
public void onCreateHomeScreenShortcutCancel(DialogFragment dialog) {
// Do nothing because the user selected "Cancel".
sendBroadcast(placeBookmarkShortcut);
}
- // Override onBackPressed so that if mainWebView can go back it does when the system back button is pressed.
+ // Override onBackPressed to handle the navigation drawer and mainWebView.
@Override
public void onBackPressed() {
final WebView mainWebView = (WebView) findViewById(R.id.mainWebView);
- if (mainWebView.canGoBack()) {
- mainWebView.goBack();
+ // Close the navigation drawer if it is available. GravityCompat.START is the drawer on the left on Left-to-Right layout text.
+ if (drawerLayout.isDrawerVisible(GravityCompat.START)) {
+ drawerLayout.closeDrawer(GravityCompat.START);
} else {
- super.onBackPressed();
+ // Load the previous URL if available.
+ if (mainWebView.canGoBack()) {
+ mainWebView.goBack();
+ } else {
+ // Pass onBackPressed to the system.
+ super.onBackPressed();
+ }
}
}
--- /dev/null
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zm1,15h-2v-6h2v6zm0,-8h-2V7h2v2z"/>
+</vector>
--- /dev/null
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
+</vector>
--- /dev/null
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z"/>
+</vector>
--- /dev/null
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M10.09,15.59L11.5,17l5,-5 -5,-5 -1.41,1.41L12.67,11H3v2h9.67l-2.58,2.59zM19,3H5c-1.11,0 -2,0.9 -2,2v4h2V5h14v14H5v-4H3v4c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2V5c0,-1.1 -0.9,-2 -2,-2z"/>
+</vector>
--- /dev/null
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M12,4l-1.41,1.41L16.17,11H4v2h12.17l-5.58,5.59L12,20l8,-8z"/>
+</vector>
--- /dev/null
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z"/>
+</vector>
--- /dev/null
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z"/>
+</vector>
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawerLayout"
android:layout_height="match_parent"
- android:layout_width="match_parent" >
+ android:layout_width="match_parent">
<!-- The main content view. -->
<!-- android:fitsSystemWindows="true" moves rootCoordinatorLayout below the system status bar. -->
</android.support.design.widget.CoordinatorLayout>
<!-- The navigation drawer. -->
- <ListView
- android:id="@+id/navigationDrawer"
- android:layout_width="240dp"
+ <android.support.design.widget.NavigationView
+ android:id="@+id/navigationView"
+ android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
- android:choiceMode="singleChoice"
- android:background="@color/white"/>
+ app:headerLayout="@layout/navigation_header"
+ app:menu="@menu/menu_navigation"/>
</android.support.v4.widget.DrawerLayout>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Copyright 2016 Soren Stoutner <soren@stoutner.com>.
+
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+ Privacy Browser is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Privacy Browser is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- We can remove android:paddingLeft and android:PaddingRight once API >=17. -->
+<TextView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/navigationText"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/navigation"
+ android:paddingTop="60dp"
+ android:paddingBottom="8dp"
+ android:paddingLeft="15dp"
+ android:paddingRight="15dp"
+ android:paddingStart="15dp"
+ android:textStyle="bold"
+ android:textSize="20sp"
+ android:background="@color/blue"
+ android:textColor="@color/white" />
+
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Copyright 2016 Soren Stoutner <soren@stoutner.com>.
+
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+ Privacy Browser is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Privacy Browser is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
+
+<menu
+ xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/home"
+ android:title="@string/home"
+ android:icon="@drawable/home"
+ android:orderInCategory="11" />
+
+ <item
+ android:id="@+id/back"
+ android:title="@string/back"
+ android:icon="@drawable/back"
+ android:orderInCategory="12" />
+
+ <item
+ android:id="@+id/forward"
+ android:title="@string/forward"
+ android:icon="@drawable/forward"
+ android:orderInCategory="13" />
+
+ <!-- If a group has an id, a line is drawn above it in the navigation view. -->
+ <group
+ android:id="@+id/navigationGroup1" >
+ <item
+ android:id="@+id/downloads"
+ android:title="@string/downloads"
+ android:icon="@drawable/downloads"
+ android:orderInCategory="20" />
+
+ <item
+ android:id="@+id/settings"
+ android:title="@string/settings"
+ android:icon="@drawable/settings"
+ android:orderInCategory="30" />
+
+ <item
+ android:id="@+id/about"
+ android:title="@string/about"
+ android:icon="@drawable/about"
+ android:orderInCategory="40" />
+ </group>
+
+ <!-- If a group has an id, a line is drawn above it in the navigation view. -->
+ <group
+ android:id="@+id/navigationGroup2" >
+ <item
+ android:id="@+id/clearAndExit"
+ android:title="@string/clear_and_exit"
+ android:icon="@drawable/exit"
+ android:orderInCategory="50" />
+ </group>
+</menu>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Copyright 2015-2016 Soren Stoutner <soren@stoutner.com>.
+
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+ Privacy Browser is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Privacy Browser is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
+
+<menu
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ tools:context=".MainWebViewActivity">
+
+ <item
+ android:id="@+id/toggleJavaScript"
+ android:title="@string/javascript"
+ android:orderInCategory="10"
+ app:showAsAction="always" />
+
+ <item
+ android:id="@+id/toggleDomStorage"
+ android:title="@string/dom_storage"
+ android:orderInCategory="20"
+ android:checkable="true"
+ app:showAsAction="never" />
+
+ <!-- toggleSaveFormData does nothing until database storage is implemented
+ <item
+ android:id="@+id/toggleSaveFormData"
+ android:title="@string/saveFormData"
+ android:orderInCategory="30"
+ android:checkable="true"
+ app:showAsAction="never" />
+ -->
+
+ <item
+ android:id="@+id/toggleCookies"
+ android:title="@string/cookies"
+ android:orderInCategory="40"
+ android:checkable="true"
+ app:showAsAction="never" />
+
+ <item
+ android:id="@+id/clearDomStorage"
+ android:title="@string/clear_dom_storage"
+ android:orderInCategory="50"
+ app:showAsAction="never" />
+
+ <item
+ android:id="@+id/clearCookies"
+ android:title="@string/clear_cookies"
+ android:orderInCategory="60"
+ app:showAsAction="never" />
+
+ <item
+ android:id="@+id/share"
+ android:title="@string/share"
+ android:orderInCategory="70"
+ app:showAsAction="never" />
+
+ <item
+ android:id="@+id/addToHomescreen"
+ android:title="@string/add_to_home_screen"
+ android:orderInCategory="80"
+ app:showAsAction="never" />
+</menu>
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- Copyright 2015-2016 Soren Stoutner <soren@stoutner.com>.
-
- This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
- Privacy Browser is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Privacy Browser is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
-
-<menu
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- tools:context=".MainWebViewActivity">
-
- <item
- android:id="@+id/toggleJavaScript"
- android:title="@string/javascript"
- android:orderInCategory="10"
- app:showAsAction="always" />
-
- <item
- android:id="@+id/toggleDomStorage"
- android:title="@string/dom_storage"
- android:orderInCategory="20"
- android:checkable="true"
- app:showAsAction="never" />
-
- <!-- toggleSaveFormData does nothing until database storage is implemented
- <item
- android:id="@+id/toggleSaveFormData"
- android:title="@string/saveFormData"
- android:orderInCategory="30"
- android:checkable="true"
- app:showAsAction="never" />
- -->
-
- <item
- android:id="@+id/toggleCookies"
- android:title="@string/cookies"
- android:orderInCategory="40"
- android:checkable="true"
- app:showAsAction="never" />
-
- <item
- android:id="@+id/clearDomStorage"
- android:title="@string/clear_dom_storage"
- android:orderInCategory="50"
- app:showAsAction="never" />
-
- <item
- android:id="@+id/clearCookies"
- android:title="@string/clear_cookies"
- android:orderInCategory="60"
- app:showAsAction="never" />
-
- <item
- android:id="@+id/addToHomescreen"
- android:title="@string/add_to_home_screen"
- android:orderInCategory="70"
- app:showAsAction="never" />
-
- <item
- android:id="@+id/downloads"
- android:title="@string/downloads"
- android:orderInCategory="80"
- app:showAsAction="never" />
-
- <item
- android:id="@+id/navigation"
- android:title="@string/navigation"
- android:orderInCategory="90"
- app:showAsAction="never" >
- <menu>
- <item
- android:id="@+id/home"
- android:title="@string/home"
- android:orderInCategory="91"
- app:showAsAction="never" />
-
- <item
- android:id="@+id/back"
- android:title="@string/back"
- android:orderInCategory="92"
- app:showAsAction="never" />
-
- <item
- android:id="@+id/forward"
- android:title="@string/forward"
- android:orderInCategory="93"
- app:showAsAction="never" />
- </menu>
- </item>
-
- <item
- android:id="@+id/share"
- android:title="@string/share"
- android:orderInCategory="100"
- app:showAsAction="never" />
-
- <item
- android:id="@+id/settings"
- android:title="@string/settings"
- android:orderInCategory="110"
- app:showAsAction="never" />
-
- <item
- android:id="@+id/about"
- android:title="@string/about"
- android:orderInCategory="120"
- app:showAsAction="never" />
-
- <item
- android:id="@+id/clearAndExit"
- android:title="@string/clear_and_exit"
- android:orderInCategory="130"
- app:showAsAction="never" />
-</menu>
<!-- Custom App Bar. -->
<string name="favorite_icon">Favorite Icon</string>
- <!-- Menu. -->
- <string name="javascript">JavaScript</string>
- <string name="dom_storage">DOM Storage</string>
- <string name="cookies">Cookies</string>
- <string name="clear_dom_storage">Clear DOM Storage</string>
- <string name="clear_cookies">Clear Cookies</string>
- <string name="add_to_home_screen">Add to Home Screen</string>
- <string name="downloads">Downloads</string>
+ <!-- Navigation Drawer. -->
+ <string name="navigation_drawer">Navigation Drawer</string>
<string name="navigation">Navigation</string>
<string name="home">Home</string>
<string name="back">Back</string>
<string name="forward">Forward</string>
- <string name="share">Share</string>
+ <string name="downloads">Downloads</string>
<string name="settings">Settings</string>
<string name="about">About</string>
<string name="clear_and_exit">Clear and Exit</string>
+ <!-- Menu. -->
+ <string name="javascript">JavaScript</string>
+ <string name="dom_storage">DOM Storage</string>
+ <string name="cookies">Cookies</string>
+ <string name="clear_dom_storage">Clear DOM Storage</string>
+ <string name="clear_cookies">Clear Cookies</string>
+ <string name="share">Share</string>
+ <string name="add_to_home_screen">Add to Home Screen</string>
+
<!-- Create Home Screen Shortcut Alert Dialog. -->
<string name="shortcut_name">Shortcut name</string>
<string name="cancel">Cancel</string>
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.5.0'
+ classpath 'com.android.tools.build:gradle:2.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
-#Wed Apr 10 15:27:10 PDT 2013
+#Thu Apr 07 11:52:03 MST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip