From 9c582d802e641b2b6d27271310fc16898020b470 Mon Sep 17 00:00:00 2001
From: Soren Stoutner
Date: Wed, 29 Jun 2016 22:02:37 -0700
Subject: [PATCH] Initial bookmarks implementation. Fix for Custom User Agent
not working. https://redmine.stoutner.com/issues/40
---
.idea/dictionaries/soren.xml | 9 +
app/src/main/AndroidManifest.xml | 20 ++-
app/src/main/assets/about_license.html | 8 +-
app/src/main/assets/guide_clear_and_exit.html | 1 +
app/src/main/assets/guide_javascript.html | 2 +-
app/src/main/assets/guide_overview.html | 8 +-
.../main/assets/guide_planned_features.html | 2 +-
app/src/main/assets/images/advertising_id.png | Bin 0 -> 137060 bytes
.../main/assets/images/ic_bookmark_border.png | Bin 0 -> 1139 bytes
app/src/main/assets/images/panopticlick.png | Bin 0 -> 203856 bytes
app/src/main/assets/images/user_agent.png | Bin 0 -> 154194 bytes
app/src/main/assets/images/webkay.png | Bin 0 -> 295937 bytes
.../privacybrowser/AboutActivity.java | 4 +-
.../privacybrowser/BookmarksActivity.java | 157 ++++++++++++++++++
.../BookmarksDatabaseHandler.java | 120 +++++++++++++
.../privacybrowser/CreateBookmark.java | 150 +++++++++++++++++
.../CreateHomeScreenShortcut.java | 82 ++++-----
.../privacybrowser/GuideActivity.java | 4 +-
.../privacybrowser/MainWebViewActivity.java | 73 +++++---
.../privacybrowser/SettingsFragment.java | 2 +-
app/src/main/res/drawable/add.xml | 14 ++
app/src/main/res/drawable/bookmarks.xml | 14 ++
.../res/layout/about_coordinatorlayout.xml | 4 +-
.../layout/bookmarks_coordinatorlayout.xml | 67 ++++++++
.../layout/bookmarks_item_linearlayout.xml | 45 +++++
.../res/layout/create_bookmark_dialog.xml | 56 +++++++
.../create_home_screen_shortcut_dialog.xml | 14 +-
app/src/main/res/menu/menu_navigation.xml | 27 ++-
app/src/main/res/values-v19/styles.xml | 2 +-
app/src/main/res/values/strings.xml | 9 +-
app/src/main/res/values/styles.xml | 6 +-
31 files changed, 805 insertions(+), 95 deletions(-)
create mode 100644 app/src/main/assets/images/advertising_id.png
create mode 100644 app/src/main/assets/images/ic_bookmark_border.png
create mode 100644 app/src/main/assets/images/panopticlick.png
create mode 100644 app/src/main/assets/images/user_agent.png
create mode 100644 app/src/main/assets/images/webkay.png
create mode 100644 app/src/main/java/com/stoutner/privacybrowser/BookmarksActivity.java
create mode 100644 app/src/main/java/com/stoutner/privacybrowser/BookmarksDatabaseHandler.java
create mode 100644 app/src/main/java/com/stoutner/privacybrowser/CreateBookmark.java
create mode 100644 app/src/main/res/drawable/add.xml
create mode 100644 app/src/main/res/drawable/bookmarks.xml
create mode 100644 app/src/main/res/layout/bookmarks_coordinatorlayout.xml
create mode 100644 app/src/main/res/layout/bookmarks_item_linearlayout.xml
create mode 100644 app/src/main/res/layout/create_bookmark_dialog.xml
diff --git a/.idea/dictionaries/soren.xml b/.idea/dictionaries/soren.xml
index 2fcbda73..f0434fc3 100644
--- a/.idea/dictionaries/soren.xml
+++ b/.idea/dictionaries/soren.xml
@@ -7,24 +7,32 @@
appbarlayout
aren
bebdb
+ bookmarkname
+ bookmarkurl
buildapi
buildversion
chromeversion
commitdiff
coordinatorlayout
+ displayorder
eadd
+ edittext
exynos
+ favoriteicon
imbedded
imbedding
intl
+ isfolder
khtml
konqueror
linearlayout
+ listview
logins
mozilla
nojs
orbot
panopticlick
+ parentfolder
redmine
referer
relativelayout
@@ -36,6 +44,7 @@
tablayout
techrepublic
textview
+ uids
webkay
webkitversion
whatismyip
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 8bc6746e..246393e9 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -69,12 +69,13 @@
+
@@ -91,12 +92,23 @@
android:persistableMode="persistNever" >
+
+
+
+
diff --git a/app/src/main/assets/about_license.html b/app/src/main/assets/about_license.html
index 094ec166..6e4dc0a8 100644
--- a/app/src/main/assets/about_license.html
+++ b/app/src/main/assets/about_license.html
@@ -63,16 +63,20 @@
ic_arrow_forward.
- ic_file_download.
+ ic_bookmark_border.
- ic_import_contacts.
+ ic_file_download.
ic_settings.
+ ic_import_contacts.
+
ic_info_outline.
ic_exit_to_app.
+ ic_add.
+
GNU General Public License
diff --git a/app/src/main/assets/guide_clear_and_exit.html b/app/src/main/assets/guide_clear_and_exit.html
index 7f297296..9d5c1f34 100644
--- a/app/src/main/assets/guide_clear_and_exit.html
+++ b/app/src/main/assets/guide_clear_and_exit.html
@@ -38,6 +38,7 @@
- Removes all cookies
.
- Removes all DOM storage
.
+ - Removes all form data
.
- Clears the cache, including disk files
.
- Clears the back/forward history
.
- Destroys the internal state of the WebView
.
diff --git a/app/src/main/assets/guide_javascript.html b/app/src/main/assets/guide_javascript.html
index 1f1bcdc8..1cfd92e2 100644
--- a/app/src/main/assets/guide_javascript.html
+++ b/app/src/main/assets/guide_javascript.html
@@ -47,7 +47,7 @@
Of course, the concept of running arbitrary programs from a website is potentially dangerous. So there are limitations placed on JavaScript
to keep it from doing things like installing viruses on the device. However, it turns out that these limitations are overly broad.
Below is a screenshot from webkay, which is a website that demonstrates the type of information that
- JavaScript can produce about a device.
+ JavaScript can produce about a device. Browser Leaks is another good resource.
diff --git a/app/src/main/assets/guide_overview.html b/app/src/main/assets/guide_overview.html
index a1c5701e..90e14d6a 100644
--- a/app/src/main/assets/guide_overview.html
+++ b/app/src/main/assets/guide_overview.html
@@ -39,12 +39,10 @@
without informing the user they are doing so. Privacy Browser is designed to grant the user as much information and control over these tracking techniques as possible.
-WebView Limitations
+Android's WebView Limitations
Privacy Browser uses Android's built-in WebView to render websites. There are some limitations in the controls WebView exposes for managing privacy settings. For example,
- it isn't possible to enable some JavaScript commands while disabling others. It also isn't possible to control the
- referer header.
- Once Privacy Browser has matured to take full advantage of all the privacy options WebView does offer, some consideration might be made to imbedding a customized WebView
- or using a different rendering engine.
+ it isn't possible to enable some JavaScript commands while disabling others. Once Privacy Browser has matured to take full advantage of all the privacy options WebView
+ does offer, some consideration might be made to imbedding a customized WebView or using a different rendering engine.