From 792956e409a0a191f0e1a2da9bdc9c46941215ca Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Mon, 12 Jun 2017 21:39:08 -0700 Subject: [PATCH] Create a dark theme for `MainWebViewActivity`. --- .idea/dictionaries/soren.xml | 1 + .../free/assets/zh-rTW/about_permissions.html | 60 - .../assets/zh-rTW/about_privacy_policy.html | 119 -- app/src/main/AndroidManifest.xml | 17 +- app/src/main/assets/de/about_licenses.html | 1 + app/src/main/assets/en/about_licenses.html | 1 + app/src/main/assets/en/images/ic_style.png | Bin 0 -> 2395 bytes app/src/main/assets/es/about_licenses.html | 1 + app/src/main/assets/it/about_licenses.html | 1 + .../main/assets/zh-rTW/about_changelog.html | 281 ----- .../assets/zh-rTW/about_contributors.html | 47 - .../main/assets/zh-rTW/about_licenses.html | 1057 ----------------- app/src/main/assets/zh-rTW/about_links.html | 48 - .../main/assets/zh-rTW/about_permissions.html | 43 - .../assets/zh-rTW/about_privacy_policy.html | 106 -- .../assets/zh-rTW/guide_domain_settings.html | 56 - .../main/assets/zh-rTW/guide_javascript.html | 78 -- .../assets/zh-rTW/guide_local_storage.html | 100 -- .../main/assets/zh-rTW/guide_overview.html | 48 - app/src/main/assets/zh-rTW/guide_tor.html | 103 -- .../assets/zh-rTW/guide_tracking_ids.html | 68 -- .../main/assets/zh-rTW/guide_user_agent.html | 72 -- .../activities/MainWebViewActivity.java | 51 +- .../fragments/SettingsFragment.java | 21 +- .../helpers/OrbotProxyHelper.java | 6 - .../dark_primary_text_color_selector.xml | 26 + app/src/main/res/drawable/theme_dark.xml | 18 + app/src/main/res/drawable/theme_light.xml | 18 + .../url_bar_background_dark_blue.xml} | 16 +- ...xml => url_bar_background_light_green.xml} | 2 +- .../res/layout/about_coordinatorlayout.xml | 4 +- .../layout/bookmarks_coordinatorlayout.xml | 4 +- ...kmarks_database_view_coordinatorlayout.xml | 4 +- .../domain_settings_coordinatorlayout.xml | 4 +- .../res/layout/domains_coordinatorlayout.xml | 4 +- .../res/layout/guide_coordinatorlayout.xml | 4 +- .../res/layout/main_drawerlayout_dark.xml | 102 ++ ...layout.xml => main_drawerlayout_light.xml} | 9 +- app/src/main/res/layout/main_webview.xml | 3 +- .../res/layout/navigation_header_dark.xml | 34 + ...header.xml => navigation_header_light.xml} | 0 app/src/main/res/values-zh-rTW/strings.xml | 334 ------ app/src/main/res/values/colors.xml | 13 +- app/src/main/res/values/strings.xml | 2 + app/src/main/res/values/styles.xml | 46 +- app/src/main/res/xml/preferences.xml | 6 + build.gradle | 2 +- 47 files changed, 363 insertions(+), 2678 deletions(-) delete mode 100644 app/src/free/assets/zh-rTW/about_permissions.html delete mode 100644 app/src/free/assets/zh-rTW/about_privacy_policy.html create mode 100644 app/src/main/assets/en/images/ic_style.png delete mode 100644 app/src/main/assets/zh-rTW/about_changelog.html delete mode 100644 app/src/main/assets/zh-rTW/about_contributors.html delete mode 100644 app/src/main/assets/zh-rTW/about_licenses.html delete mode 100644 app/src/main/assets/zh-rTW/about_links.html delete mode 100644 app/src/main/assets/zh-rTW/about_permissions.html delete mode 100644 app/src/main/assets/zh-rTW/about_privacy_policy.html delete mode 100644 app/src/main/assets/zh-rTW/guide_domain_settings.html delete mode 100644 app/src/main/assets/zh-rTW/guide_javascript.html delete mode 100644 app/src/main/assets/zh-rTW/guide_local_storage.html delete mode 100644 app/src/main/assets/zh-rTW/guide_overview.html delete mode 100644 app/src/main/assets/zh-rTW/guide_tor.html delete mode 100644 app/src/main/assets/zh-rTW/guide_tracking_ids.html delete mode 100644 app/src/main/assets/zh-rTW/guide_user_agent.html create mode 100644 app/src/main/res/color/dark_primary_text_color_selector.xml create mode 100644 app/src/main/res/drawable/theme_dark.xml create mode 100644 app/src/main/res/drawable/theme_light.xml rename app/src/{free/res/values-zh-rTW/strings.xml => main/res/drawable/url_bar_background_dark_blue.xml} (73%) rename app/src/main/res/drawable/{url_bar_background_green.xml => url_bar_background_light_green.xml} (94%) create mode 100644 app/src/main/res/layout/main_drawerlayout_dark.xml rename app/src/main/res/layout/{main_drawerlayout.xml => main_drawerlayout_light.xml} (93%) create mode 100644 app/src/main/res/layout/navigation_header_dark.xml rename app/src/main/res/layout/{navigation_header.xml => navigation_header_light.xml} (100%) delete mode 100644 app/src/main/res/values-zh-rTW/strings.xml diff --git a/.idea/dictionaries/soren.xml b/.idea/dictionaries/soren.xml index f593ed68..ad8158d5 100644 --- a/.idea/dictionaries/soren.xml +++ b/.idea/dictionaries/soren.xml @@ -6,6 +6,7 @@ adservers adview amiunique + amoled androidversion anonymized appbarlayout diff --git a/app/src/free/assets/zh-rTW/about_permissions.html b/app/src/free/assets/zh-rTW/about_permissions.html deleted file mode 100644 index bbddbb57..00000000 --- a/app/src/free/assets/zh-rTW/about_permissions.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - -

Have full network access

-

android.permission.INTERNET

-

Required for the WebView to access the internet. Without this permission, Privacy Browser would be “No Browser: Protecting Your Privacy by Staying Completely Off the Internet”.

- -

Install shortcuts

-

com.android.launcher.permission.INSTALL_SHORTCUT

-

Required to add shortcuts for websites to the launcher desktop.

- -
-
-
- -

In addition, Privacy Browser Free displays ads from Google's AdMob network using the Firebase backend. For the free flavor, Firebase adds the following permissions even though they are not listed in the manifest file.

- -

View network connections

-

android.permission.ACCESS_NETWORK_STATE

-

Allows the ads to tell when you are connected to the internet and when you aren't (presumably so they don't try to reload an ad when you are disconnected). They can also tell if you are connected via Wi-Fi, 2G, 3G, 4G, etc.

- -

Prevent phone from sleeping

-

android.permission.WAKE_LOCK

-

Allows the ads to keep the processor from sleeping and the screen from dimming, although in my testing I don't think the ads actually do this.

- -

Receive data from Internet

-

com.google.android.c2dm.permission.RECEIVE

-

Allows Google to send information directly to the AdView without having to receive a request first (cloud-to-device messaging).

- -

Receive data from Internet

-

com.stoutner.privacybrowser.free.permission.C2D_MESSAGE

-

Secures the cloud-to-device messages so that only Privacy Browser Free can receive them.

- - \ No newline at end of file diff --git a/app/src/free/assets/zh-rTW/about_privacy_policy.html b/app/src/free/assets/zh-rTW/about_privacy_policy.html deleted file mode 100644 index b0215646..00000000 --- a/app/src/free/assets/zh-rTW/about_privacy_policy.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - -

Privacy Browser Free

-

Privacy Browser Free does not collect any user information.

- - -

Google Play

-

Google Play has its own privacy policy. - Google provides anonymized summary installation information to developers, including the number of installs organized by the following categories.

- - - -

Google Play Ratings

-

Google Play has its own privacy policy. - Google provides developers with anonymized summaries of the following information related to user ratings.

- - - -

Google Play Reviews

-

Google Play has its own privacy policy. - In addition to the name of the reviewer, the rating, and the text of the review (which are all available publicly), Google provides some or all of the following information to the developer.

- - - -

Advertisements

-

Privacy Browser Free displays a banner ad across the bottom of the screen using Google's AdMob network, which has its own privacy policy. - Note that unless you have opted out of interest-based ads, - the advertiser will receive a copy of your unique device advertising ID, which allows them to track your device across apps. - AdMob reports anonymized summaries of the following information to developers.

- - - -

Direct Communications

-

Users may choose to send direct communications to Stoutner, like email messages and comments on stoutner.com.

- - -

Use of Information

-

Stoutner may use this information in any way that assists in the development of Privacy Browser, like troubleshooting bug reports or developing features, including sharing the information with a third party to assist in this process. - Stoutner will never sell this information nor transfer it to any third party that would use it for advertising or marketing.

- -
-

Revision 1.4, 20 April 2017

- - \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d7784e6e..300e3045 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -37,7 +37,6 @@ @@ -47,7 +46,8 @@ android:name="android.webkit.WebView.MetricsOptOut" android:value="true" /> - - - - - - - - - -

2.3 (version code 23)

-

26 May 2017 - minimum API 19, target API 25

- - -

2.2 (version code 22)

-

27 April 2017 - minimum API 19, target API 25

- - -

2.1 (version code 21)

-

25 March 2017 - minimum API 19, target API 25

- - -

2.0.1 (version code 20)

-

21 March 2017 - minimum API 19, target API 25

- - -

2.0 (version code 19)

-

16 March 2017 - minimum API 19, target API 25

- - -

1.15 (version code 18)

-

11 February 2017 - minimum API 19, target API 25

- - -

1.14.1 (version code 17)

-

4 January 2017 - minimum API 19, target API 25

- - -

1.14 (version code 16)

-

26 December 2016 - minimum API 19, target API 25

- - -

1.13 (version code 15)

-

28 November 2016 - minimum API 19, target API 24

- - -

1.12 (version code 14)

-

9 November 2016 - minimum API 19, target API 24

- - -

1.11 (version code 13)

-

22 October 2016 - minimum API 19, target API 24

- - -

1.10 (version code 12)

-

15 September 2016 - minimum API 19, target API 23

- - -

1.9.1 (version code 11)

-

27 August 2016 - minimum API 19, target API 23

- - -

1.9 (version code 10)

-

26 August 2016 - minimum API 19, target API 23

- - -

1.8 (version code 9)

-

16 July 2016 - minimum API 19, target API 23

- - - -

1.7 (version code 8)

-

16 June 2016 - minimum API 19, target API 23

- - - -

1.6 (version code 7)

-

11 May 2016 - minimum API 15, target API 23

- - - -

1.5 (version code 6)

-

5 May 2016 - minimum API 15, target API 23

- - - -

1.4 (version code 5)

-

28 April 2016 - minimum API 15, target API 23

- - - -

1.3 (version code 4)

-

7 April 2016 - minimum API 15, target API 23

- - - -

1.2 (version code 3)

-

23 March 2016 - minimum API 15, target API 23

- - - -

1.1 (version code 2)

-

9 March 2016 - minimum API 10, target API 23

- - - -

1.0 (version code 1)

-

24 February 2016 - minimum API 10, target API 23

- - - \ No newline at end of file diff --git a/app/src/main/assets/zh-rTW/about_contributors.html b/app/src/main/assets/zh-rTW/about_contributors.html deleted file mode 100644 index 251b052c..00000000 --- a/app/src/main/assets/zh-rTW/about_contributors.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - -

Principal Developer

-

Privacy Browser is primarily developed by Soren Stoutner.

- -

Coders

- Thomas Jensen
- Hendrik Knackstedt - -

Translators

- Francesco Buratti: Italian
- Jose A. León Becerra: Spanish - -

Past Translators

- Aaron Gerlach: German
- -
-

Contributors are welcome to submit both code and translations.

- - \ No newline at end of file diff --git a/app/src/main/assets/zh-rTW/about_licenses.html b/app/src/main/assets/zh-rTW/about_licenses.html deleted file mode 100644 index 5226d733..00000000 --- a/app/src/main/assets/zh-rTW/about_licenses.html +++ /dev/null @@ -1,1057 +0,0 @@ - - - - - - - - - -

Copyright

-

Privacy Browser copyright © 2015-2017 Soren Stoutner.

- -

License

-

Privacy Browser is released under the GPLv3+ license. The full text of the license is below. - The source code is available from git.stoutner.com.

- -

Attributions

-

The list of ad servers used by the ad blocker comes from pgl.yoyo.org. - Because a list of domain names is a list of facts, it cannot be copyrighted.

-

- - - - are derived from ic_security and ic_language, which are part of the Android Material icon set and are released under the Apache License 2.0. - The full text of the license is below. Modifications copyright © 2016 Soren Stoutner. The resulting images are released under the GPLv3+ license.

-

orbot is a modified version of the status icon from the Orbot project, which is copyright - 2009-2010 Nathan Freitas, The Guardian Project. It is released under the 3-clause BSD license. - The full text of the license is below. Modifications copyright © 2017 Soren Stoutner. The resulting image is released under the GPLv3+ license.

-

cookie was created by Google. It is released under the Apache License 2.0 - and can be downloaded from Material Design Icons. It is unchanged except for layout information like color and size.

-

The following icons come from the Android Material icon set, which is released under the Apache License 2.0. They are unchanged except for layout - information like color and size. Some of them have been renamed to match their use in the code. The original icons and names are shown below.

-

ic_add.

-

ic_arrow_back.

-

ic_arrow_forward.

-

ic_bookmark_border.

-

ic_bug_report.

-

ic_call_to_action.

-

ic_chrome_reader_mode.

-

ic_close.

-

ic_create_new_folder.

-

ic_devices_other.

-

ic_delete.

-

ic_delete_forever.

-

ic_dns.

-

ic_donut_small.

-

ic_edit.

-

ic_exit_to_app.

-

ic_expand_less.

-

ic_expand_more.

-

ic_file_download.

-

ic_find_in_page.

-

ic_folder.

-

ic_folder_special.

-

ic_fullscreen.

-

ic_home.

-

ic_image.

-

ic_import_contacts.

-

ic_important_devices.

-

ic_info_outline.

-

ic_language.

-

ic_list.

-

ic_local_activity.

-

ic_location_off.

-

ic_map.

-

ic_more.

-

ic_question_answer.

-

ic_refresh.

-

ic_search.

-

ic_select_all.

-

ic_settings.

-

ic_smartphone.

-

ic_subtitles.

-

ic_text_fields.

-

ic_vertical_align_bottom.

-

ic_vertical_align_top.

-

ic_visibility_off.

-

ic_web.

- -
- -

GNU General Public License

-

Version 3, 29 June 2007

- -

Copyright © 2007 Free Software Foundation, Inc. - <http://fsf.org/>

- -

Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed.

- -

Preamble

- -

The GNU General Public License is a free, copyleft license for - software and other kinds of works.

- -

The licenses for most software and other practical works are designed - to take away your freedom to share and change the works. By contrast, - the GNU General Public License is intended to guarantee your freedom to - share and change all versions of a program—to make sure it remains free - software for all its users. We, the Free Software Foundation, use the - GNU General Public License for most of our software; it applies also to - any other work released this way by its authors. You can apply it to - your programs, too.

- -

When we speak of free software, we are referring to freedom, not - price. Our General Public Licenses are designed to make sure that you - have the freedom to distribute copies of free software (and charge for - them if you wish), that you receive source code or can get it if you - want it, that you can change the software or use pieces of it in new - free programs, and that you know you can do these things.

- -

To protect your rights, we need to prevent others from denying you - these rights or asking you to surrender the rights. Therefore, you have - certain responsibilities if you distribute copies of the software, or if - you modify it: responsibilities to respect the freedom of others.

- -

For example, if you distribute copies of such a program, whether - gratis or for a fee, you must pass on to the recipients the same - freedoms that you received. You must make sure that they, too, receive - or can get the source code. And you must show them these terms so they - know their rights.

- -

Developers that use the GNU GPL protect your rights with two steps: - (1) assert copyright on the software, and (2) offer you this License - giving you legal permission to copy, distribute and/or modify it.

- -

For the developers’ and authors’ protection, the GPL clearly explains - that there is no warranty for this free software. For both users’ and - authors’ sake, the GPL requires that modified versions be marked as - changed, so that their problems will not be attributed erroneously to - authors of previous versions.

- -

Some devices are designed to deny users access to install or run - modified versions of the software inside them, although the manufacturer - can do so. This is fundamentally incompatible with the aim of - protecting users’ freedom to change the software. The systematic - pattern of such abuse occurs in the area of products for individuals to - use, which is precisely where it is most unacceptable. Therefore, we - have designed this version of the GPL to prohibit the practice for those - products. If such problems arise substantially in other domains, we - stand ready to extend this provision to those domains in future versions - of the GPL, as needed to protect the freedom of users.

- -

Finally, every program is threatened constantly by software patents. - States should not allow patents to restrict development and use of - software on general-purpose computers, but in those that do, we wish to - avoid the special danger that patents applied to a free program could - make it effectively proprietary. To prevent this, the GPL assures that - patents cannot be used to render the program non-free.

- -

The precise terms and conditions for copying, distribution and - modification follow.

- -

TERMS AND CONDITIONS

- -

0. Definitions.

- -

“This License” refers to version 3 of the GNU General Public License.

- -

“Copyright” also means copyright-like laws that apply to other kinds of - works, such as semiconductor masks.

- -

“The Program” refers to any copyrightable work licensed under this - License. Each licensee is addressed as “you”. “Licensees” and - “recipients” may be individuals or organizations.

- -

To “modify” a work means to copy from or adapt all or part of the work - in a fashion requiring copyright permission, other than the making of an - exact copy. The resulting work is called a “modified version” of the - earlier work or a work “based on” the earlier work.

- -

A “covered work” means either the unmodified Program or a work based - on the Program.

- -

To “propagate” a work means to do anything with it that, without - permission, would make you directly or secondarily liable for - infringement under applicable copyright law, except executing it on a - computer or modifying a private copy. Propagation includes copying, - distribution (with or without modification), making available to the - public, and in some countries other activities as well.

- -

To “convey” a work means any kind of propagation that enables other - parties to make or receive copies. Mere interaction with a user through - a computer network, with no transfer of a copy, is not conveying.

- -

An interactive user interface displays “Appropriate Legal Notices” - to the extent that it includes a convenient and prominently visible - feature that (1) displays an appropriate copyright notice, and (2) - tells the user that there is no warranty for the work (except to the - extent that warranties are provided), that licensees may convey the - work under this License, and how to view a copy of this License. If - the interface presents a list of user commands or options, such as a - menu, a prominent item in the list meets this criterion.

- -

1. Source Code.

- -

The “source code” for a work means the preferred form of the work - for making modifications to it. “Object code” means any non-source - form of a work.

- -

A “Standard Interface” means an interface that either is an official - standard defined by a recognized standards body, or, in the case of - interfaces specified for a particular programming language, one that - is widely used among developers working in that language.

- -

The “System Libraries” of an executable work include anything, other - than the work as a whole, that (a) is included in the normal form of - packaging a Major Component, but which is not part of that Major - Component, and (b) serves only to enable use of the work with that - Major Component, or to implement a Standard Interface for which an - implementation is available to the public in source code form. A - “Major Component”, in this context, means a major essential component - (kernel, window system, and so on) of the specific operating system - (if any) on which the executable work runs, or a compiler used to - produce the work, or an object code interpreter used to run it.

- -

The “Corresponding Source” for a work in object code form means all - the source code needed to generate, install, and (for an executable - work) run the object code and to modify the work, including scripts to - control those activities. However, it does not include the work’s - System Libraries, or general-purpose tools or generally available free - programs which are used unmodified in performing those activities but - which are not part of the work. For example, Corresponding Source - includes interface definition files associated with source files for - the work, and the source code for shared libraries and dynamically - linked subprograms that the work is specifically designed to require, - such as by intimate data communication or control flow between those - subprograms and other parts of the work.

- -

The Corresponding Source need not include anything that users - can regenerate automatically from other parts of the Corresponding - Source.

- -

The Corresponding Source for a work in source code form is that - same work.

- -

2. Basic Permissions.

- -

All rights granted under this License are granted for the term of - copyright on the Program, and are irrevocable provided the stated - conditions are met. This License explicitly affirms your unlimited - permission to run the unmodified Program. The output from running a - covered work is covered by this License only if the output, given its - content, constitutes a covered work. This License acknowledges your - rights of fair use or other equivalent, as provided by copyright law.

- -

You may make, run and propagate covered works that you do not - convey, without conditions so long as your license otherwise remains - in force. You may convey covered works to others for the sole purpose - of having them make modifications exclusively for you, or provide you - with facilities for running those works, provided that you comply with - the terms of this License in conveying all material for which you do - not control copyright. Those thus making or running the covered works - for you must do so exclusively on your behalf, under your direction - and control, on terms that prohibit them from making any copies of - your copyrighted material outside their relationship with you.

- -

Conveying under any other circumstances is permitted solely under - the conditions stated below. Sublicensing is not allowed; section 10 - makes it unnecessary.

- -

3. Protecting Users’ Legal Rights From Anti-Circumvention Law.

- -

No covered work shall be deemed part of an effective technological - measure under any applicable law fulfilling obligations under article - 11 of the WIPO copyright treaty adopted on 20 December 1996, or - similar laws prohibiting or restricting circumvention of such - measures.

- -

When you convey a covered work, you waive any legal power to forbid - circumvention of technological measures to the extent such circumvention - is effected by exercising rights under this License with respect to - the covered work, and you disclaim any intention to limit operation or - modification of the work as a means of enforcing, against the work’s - users, your or third parties’ legal rights to forbid circumvention of - technological measures.

- -

4. Conveying Verbatim Copies.

- -

You may convey verbatim copies of the Program’s source code as you - receive it, in any medium, provided that you conspicuously and - appropriately publish on each copy an appropriate copyright notice; - keep intact all notices stating that this License and any - non-permissive terms added in accord with section 7 apply to the code; - keep intact all notices of the absence of any warranty; and give all - recipients a copy of this License along with the Program.

- -

You may charge any price or no price for each copy that you convey, - and you may offer support or warranty protection for a fee.

- -

5. Conveying Modified Source Versions.

- -

You may convey a work based on the Program, or the modifications to - produce it from the Program, in the form of source code under the - terms of section 4, provided that you also meet all of these conditions:

- - - -

A compilation of a covered work with other separate and independent - works, which are not by their nature extensions of the covered work, - and which are not combined with it such as to form a larger program, - in or on a volume of a storage or distribution medium, is called an - “aggregate” if the compilation and its resulting copyright are not - used to limit the access or legal rights of the compilation’s users - beyond what the individual works permit. Inclusion of a covered work - in an aggregate does not cause this License to apply to the other - parts of the aggregate.

- -

6. Conveying Non-Source Forms.

- -

You may convey a covered work in object code form under the terms - of sections 4 and 5, provided that you also convey the - machine-readable Corresponding Source under the terms of this License, - in one of these ways:

- - - -

A separable portion of the object code, whose source code is excluded - from the Corresponding Source as a System Library, need not be - included in conveying the object code work.

- -

A “User Product” is either (1) a “consumer product”, which means any - tangible personal property which is normally used for personal, family, - or household purposes, or (2) anything designed or sold for incorporation - into a dwelling. In determining whether a product is a consumer product, - doubtful cases shall be resolved in favor of coverage. For a particular - product received by a particular user, “normally used” refers to a - typical or common use of that class of product, regardless of the status - of the particular user or of the way in which the particular user - actually uses, or expects or is expected to use, the product. A product - is a consumer product regardless of whether the product has substantial - commercial, industrial or non-consumer uses, unless such uses represent - the only significant mode of use of the product.

- -

“Installation Information” for a User Product means any methods, - procedures, authorization keys, or other information required to install - and execute modified versions of a covered work in that User Product from - a modified version of its Corresponding Source. The information must - suffice to ensure that the continued functioning of the modified object - code is in no case prevented or interfered with solely because - modification has been made.

- -

If you convey an object code work under this section in, or with, or - specifically for use in, a User Product, and the conveying occurs as - part of a transaction in which the right of possession and use of the - User Product is transferred to the recipient in perpetuity or for a - fixed term (regardless of how the transaction is characterized), the - Corresponding Source conveyed under this section must be accompanied - by the Installation Information. But this requirement does not apply - if neither you nor any third party retains the ability to install - modified object code on the User Product (for example, the work has - been installed in ROM).

- -

The requirement to provide Installation Information does not include a - requirement to continue to provide support service, warranty, or updates - for a work that has been modified or installed by the recipient, or for - the User Product in which it has been modified or installed. Access to a - network may be denied when the modification itself materially and - adversely affects the operation of the network or violates the rules and - protocols for communication across the network.

- -

Corresponding Source conveyed, and Installation Information provided, - in accord with this section must be in a format that is publicly - documented (and with an implementation available to the public in - source code form), and must require no special password or key for - unpacking, reading or copying.

- -

7. Additional Terms.

- -

“Additional permissions” are terms that supplement the terms of this - License by making exceptions from one or more of its conditions. - Additional permissions that are applicable to the entire Program shall - be treated as though they were included in this License, to the extent - that they are valid under applicable law. If additional permissions - apply only to part of the Program, that part may be used separately - under those permissions, but the entire Program remains governed by - this License without regard to the additional permissions.

- -

When you convey a copy of a covered work, you may at your option - remove any additional permissions from that copy, or from any part of - it. (Additional permissions may be written to require their own - removal in certain cases when you modify the work.) You may place - additional permissions on material, added by you to a covered work, - for which you have or can give appropriate copyright permission.

- -

Notwithstanding any other provision of this License, for material you - add to a covered work, you may (if authorized by the copyright holders of - that material) supplement the terms of this License with terms:

- - - -

All other non-permissive additional terms are considered “further - restrictions” within the meaning of section 10. If the Program as you - received it, or any part of it, contains a notice stating that it is - governed by this License along with a term that is a further - restriction, you may remove that term. If a license document contains - a further restriction but permits relicensing or conveying under this - License, you may add to a covered work material governed by the terms - of that license document, provided that the further restriction does - not survive such relicensing or conveying.

- -

If you add terms to a covered work in accord with this section, you - must place, in the relevant source files, a statement of the - additional terms that apply to those files, or a notice indicating - where to find the applicable terms.

- -

Additional terms, permissive or non-permissive, may be stated in the - form of a separately written license, or stated as exceptions; - the above requirements apply either way.

- -

8. Termination.

- -

You may not propagate or modify a covered work except as expressly - provided under this License. Any attempt otherwise to propagate or - modify it is void, and will automatically terminate your rights under - this License (including any patent licenses granted under the third - paragraph of section 11).

- -

However, if you cease all violation of this License, then your - license from a particular copyright holder is reinstated (a) - provisionally, unless and until the copyright holder explicitly and - finally terminates your license, and (b) permanently, if the copyright - holder fails to notify you of the violation by some reasonable means - prior to 60 days after the cessation.

- -

Moreover, your license from a particular copyright holder is - reinstated permanently if the copyright holder notifies you of the - violation by some reasonable means, this is the first time you have - received notice of violation of this License (for any work) from that - copyright holder, and you cure the violation prior to 30 days after - your receipt of the notice.

- -

Termination of your rights under this section does not terminate the - licenses of parties who have received copies or rights from you under - this License. If your rights have been terminated and not permanently - reinstated, you do not qualify to receive new licenses for the same - material under section 10.

- -

9. Acceptance Not Required for Having Copies.

- -

You are not required to accept this License in order to receive or - run a copy of the Program. Ancillary propagation of a covered work - occurring solely as a consequence of using peer-to-peer transmission - to receive a copy likewise does not require acceptance. However, - nothing other than this License grants you permission to propagate or - modify any covered work. These actions infringe copyright if you do - not accept this License. Therefore, by modifying or propagating a - covered work, you indicate your acceptance of this License to do so.

- -

10. Automatic Licensing of Downstream Recipients.

- -

Each time you convey a covered work, the recipient automatically - receives a license from the original licensors, to run, modify and - propagate that work, subject to this License. You are not responsible - for enforcing compliance by third parties with this License.

- -

An “entity transaction” is a transaction transferring control of an - organization, or substantially all assets of one, or subdividing an - organization, or merging organizations. If propagation of a covered - work results from an entity transaction, each party to that - transaction who receives a copy of the work also receives whatever - licenses to the work the party’s predecessor in interest had or could - give under the previous paragraph, plus a right to possession of the - Corresponding Source of the work from the predecessor in interest, if - the predecessor has it or can get it with reasonable efforts.

- -

You may not impose any further restrictions on the exercise of the - rights granted or affirmed under this License. For example, you may - not impose a license fee, royalty, or other charge for exercise of - rights granted under this License, and you may not initiate litigation - (including a cross-claim or counterclaim in a lawsuit) alleging that - any patent claim is infringed by making, using, selling, offering for - sale, or importing the Program or any portion of it.

- -

11. Patents.

- -

A “contributor” is a copyright holder who authorizes use under this - License of the Program or a work on which the Program is based. The - work thus licensed is called the contributor’s “contributor version”.

- -

A contributor’s “essential patent claims” are all patent claims - owned or controlled by the contributor, whether already acquired or - hereafter acquired, that would be infringed by some manner, permitted - by this License, of making, using, or selling its contributor version, - but do not include claims that would be infringed only as a - consequence of further modification of the contributor version. For - purposes of this definition, “control” includes the right to grant - patent sublicenses in a manner consistent with the requirements of - this License.

- -

Each contributor grants you a non-exclusive, worldwide, royalty-free - patent license under the contributor’s essential patent claims, to - make, use, sell, offer for sale, import and otherwise run, modify and - propagate the contents of its contributor version.

- -

In the following three paragraphs, a “patent license” is any express - agreement or commitment, however denominated, not to enforce a patent - (such as an express permission to practice a patent or covenant not to - sue for patent infringement). To “grant” such a patent license to a - party means to make such an agreement or commitment not to enforce a - patent against the party.

- -

If you convey a covered work, knowingly relying on a patent license, - and the Corresponding Source of the work is not available for anyone - to copy, free of charge and under the terms of this License, through a - publicly available network server or other readily accessible means, - then you must either (1) cause the Corresponding Source to be so - available, or (2) arrange to deprive yourself of the benefit of the - patent license for this particular work, or (3) arrange, in a manner - consistent with the requirements of this License, to extend the patent - license to downstream recipients. “Knowingly relying” means you have - actual knowledge that, but for the patent license, your conveying the - covered work in a country, or your recipient’s use of the covered work - in a country, would infringe one or more identifiable patents in that - country that you have reason to believe are valid.

- -

If, pursuant to or in connection with a single transaction or - arrangement, you convey, or propagate by procuring conveyance of, a - covered work, and grant a patent license to some of the parties - receiving the covered work authorizing them to use, propagate, modify - or convey a specific copy of the covered work, then the patent license - you grant is automatically extended to all recipients of the covered - work and works based on it.

- -

A patent license is “discriminatory” if it does not include within - the scope of its coverage, prohibits the exercise of, or is - conditioned on the non-exercise of one or more of the rights that are - specifically granted under this License. You may not convey a covered - work if you are a party to an arrangement with a third party that is - in the business of distributing software, under which you make payment - to the third party based on the extent of your activity of conveying - the work, and under which the third party grants, to any of the - parties who would receive the covered work from you, a discriminatory - patent license (a) in connection with copies of the covered work - conveyed by you (or copies made from those copies), or (b) primarily - for and in connection with specific products or compilations that - contain the covered work, unless you entered into that arrangement, - or that patent license was granted, prior to 28 March 2007.

- -

Nothing in this License shall be construed as excluding or limiting - any implied license or other defenses to infringement that may - otherwise be available to you under applicable patent law.

- -

12. No Surrender of Others’ Freedom.

- -

If conditions are imposed on you (whether by court order, agreement or - otherwise) that contradict the conditions of this License, they do not - excuse you from the conditions of this License. If you cannot convey a - covered work so as to satisfy simultaneously your obligations under this - License and any other pertinent obligations, then as a consequence you may - not convey it at all. For example, if you agree to terms that obligate you - to collect a royalty for further conveying from those to whom you convey - the Program, the only way you could satisfy both those terms and this - License would be to refrain entirely from conveying the Program.

- -

13. Use with the GNU Affero General Public License.

- -

Notwithstanding any other provision of this License, you have - permission to link or combine any covered work with a work licensed - under version 3 of the GNU Affero General Public License into a single - combined work, and to convey the resulting work. The terms of this - License will continue to apply to the part which is the covered work, - but the special requirements of the GNU Affero General Public License, - section 13, concerning interaction through a network will apply to the - combination as such.

- -

14. Revised Versions of this License.

- -

The Free Software Foundation may publish revised and/or new versions of - the GNU General Public License from time to time. Such new versions will - be similar in spirit to the present version, but may differ in detail to - address new problems or concerns.

- -

Each version is given a distinguishing version number. If the - Program specifies that a certain numbered version of the GNU General - Public License “or any later version” applies to it, you have the - option of following the terms and conditions either of that numbered - version or of any later version published by the Free Software - Foundation. If the Program does not specify a version number of the - GNU General Public License, you may choose any version ever published - by the Free Software Foundation.

- -

If the Program specifies that a proxy can decide which future - versions of the GNU General Public License can be used, that proxy’s - public statement of acceptance of a version permanently authorizes you - to choose that version for the Program.

- -

Later license versions may give you additional or different - permissions. However, no additional obligations are imposed on any - author or copyright holder as a result of your choosing to follow a - later version.

- -

15. Disclaimer of Warranty.

- -

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY - APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT - HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY - OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, - THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM - IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF - ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

- -

16. Limitation of Liability.

- -

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING - WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS - THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY - GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE - USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF - DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD - PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), - EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF - SUCH DAMAGES.

- -

17. Interpretation of Sections 15 and 16.

- -

If the disclaimer of warranty and limitation of liability provided - above cannot be given local legal effect according to their terms, - reviewing courts shall apply local law that most closely approximates - an absolute waiver of all civil liability in connection with the - Program, unless a warranty or assumption of liability accompanies a - copy of the Program in return for a fee.

- -

END OF TERMS AND CONDITIONS

- -

How to Apply These Terms to Your New Programs

- -

If you develop a new program, and you want it to be of the greatest - possible use to the public, the best way to achieve this is to make it - free software which everyone can redistribute and change under these terms.

- -

To do so, attach the following notices to the program. It is safest - to attach them to the start of each source file to most effectively - state the exclusion of warranty; and each file should have at least - the “copyright” line and a pointer to where the full notice is found.

- -
<one line to give the program’s name
-and a brief idea of what it does.>
-Copyright (C) <year>  <name of author>
-
-This program 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.
-
-This program 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
-this program.  If not, see
-<http://www.gnu.org/licenses/>.
- -

Also add information on how to contact you by electronic and paper mail.

- -

If the program does terminal interaction, make it output a short - notice like this when it starts in an interactive mode:

- -
<program>  Copyright (C) <year>
-<name of author>
-This program comes with ABSOLUTELY NO
-WARRANTY; for details type `show w'.
-This is free software, and you are
-welcome to redistribute it under
-certain conditions; type `show c'
-for details.
- -

The hypothetical commands `show w' and `show c' should show the appropriate - parts of the General Public License. Of course, your program’s commands - might be different; for a GUI interface, you would use an “about box”.

- -

You should also get your employer (if you work as a programmer) or school, - if any, to sign a “copyright disclaimer” for the program, if necessary. - For more information on this, and how to apply and follow the GNU GPL, see - <http://www.gnu.org/licenses/>.

- -

The GNU General Public License does not permit incorporating your program - into proprietary programs. If your program is a subroutine library, you - may consider it more useful to permit linking proprietary applications with - the library. If this is what you want to do, use the GNU Lesser General - Public License instead of this License. But first, please read - <http://www.gnu.org/philosophy/why-not-lgpl.html>.

- -
- -

Apache License

-

Version 2.0, January 2004

-

http://www.apache.org/licenses/

- -

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

- -

1. Definitions.

- -

“License” shall mean the terms and conditions for use, reproduction, and - distribution as defined by Sections 1 through 9 of this document.

- -

“Licensor” shall mean the copyright owner or entity authorized by the - copyright owner that is granting the License.

- -

“Legal Entity” shall mean the union of the acting entity and all other - entities that control, are controlled by, or are under common control with - that entity. For the purposes of this definition, “control” means (i) the - power, direct or indirect, to cause the direction or management of such - entity, whether by contract or otherwise, or (ii) ownership of fifty - percent (50%) or more of the outstanding shares, or (iii) beneficial - ownership of such entity.

- -

“You” (or “Your”) shall mean an individual or Legal Entity exercising - permissions granted by this License.

- -

“Source” form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation source, - and configuration files.

- -

“Object” form shall mean any form resulting from mechanical transformation - or translation of a Source form, including but not limited to compiled - object code, generated documentation, and conversions to other media types.

- -

“Work” shall mean the work of authorship, whether in Source or Object form, - made available under the License, as indicated by a copyright notice that - is included in or attached to the work (an example is provided in the - Appendix below).

- -

“Derivative Works” shall mean any work, whether in Source or Object form, - that is based on (or derived from) the Work and for which the editorial - revisions, annotations, elaborations, or other modifications represent, as - a whole, an original work of authorship. For the purposes of this License, - Derivative Works shall not include works that remain separable from, or - merely link (or bind by name) to the interfaces of, the Work and Derivative - Works thereof.

- -

“Contribution” shall mean any work of authorship, including the original - version of the Work and any modifications or additions to that Work or - Derivative Works thereof, that is intentionally submitted to Licensor for - inclusion in the Work by the copyright owner or by an individual or Legal - Entity authorized to submit on behalf of the copyright owner. For the - purposes of this definition, “submitted” means any form of electronic, - verbal, or written communication sent to the Licensor or its - representatives, including but not limited to communication on electronic - mailing lists, source code control systems, and issue tracking systems that - are managed by, or on behalf of, the Licensor for the purpose of discussing - and improving the Work, but excluding communication that is conspicuously - marked or otherwise designated in writing by the copyright owner as “Not a - Contribution.”

- -

“Contributor” shall mean Licensor and any individual or Legal Entity on - behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work.

- -

2. Grant of Copyright License.

- -

Subject to the terms and conditions of this License, each Contributor hereby - grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, - irrevocable copyright license to reproduce, prepare Derivative Works of, publicly - display, publicly perform, sublicense, and distribute the Work and such - Derivative Works in Source or Object form.

- -

3. Grant of Patent License.

- -

Subject to the terms and conditions of this License, each Contributor hereby grants - to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, use, - offer to sell, sell, import, and otherwise transfer the Work, where such - license applies only to those patent claims licensable by such Contributor - that are necessarily infringed by their Contribution(s) alone or by - combination of their Contribution(s) with the Work to which such - Contribution(s) was submitted. If You institute patent litigation against - any entity (including a cross-claim or counterclaim in a lawsuit) alleging - that the Work or a Contribution incorporated within the Work constitutes - direct or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate as of the - date such litigation is filed.

- -

4. Redistribution.

- -

You may reproduce and distribute copies of the Work or Derivative Works thereof - in any medium, with or without modifications, and in Source or Object form, provided - that You meet the following conditions:

- -
    -
  1. You must give any other recipients of the Work or Derivative Works a - copy of this License; and
  2. - -
  3. You must cause any modified files to carry prominent notices stating - that You changed the files; and
  4. - -
  5. You must retain, in the Source form of any Derivative Works that You - distribute, all copyright, patent, trademark, and attribution notices from - the Source form of the Work, excluding those notices that do not pertain to - any part of the Derivative Works; and
  6. - -
  7. If the Work includes a “NOTICE” text file as part of its distribution, - then any Derivative Works that You distribute must include a readable copy - of the attribution notices contained within such NOTICE file, excluding - those notices that do not pertain to any part of the Derivative Works, in - at least one of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or documentation, - if provided along with the Derivative Works; or, within a display generated - by the Derivative Works, if and wherever such third-party notices normally - appear. The contents of the NOTICE file are for informational purposes only - and do not modify the License. You may add Your own attribution notices - within Derivative Works that You distribute, alongside or as an addendum to - the NOTICE text from the Work, provided that such additional attribution - notices cannot be construed as modifying the License. -
    -
    - You may add Your own copyright statement to Your modifications and may - provide additional or different license terms and conditions for use, - reproduction, or distribution of Your modifications, or for any such - Derivative Works as a whole, provided Your use, reproduction, and - distribution of the Work otherwise complies with the conditions stated in - this License.
  8. -
- -

5. Submission of Contributions.

- -

Unless You explicitly state otherwise, any Contribution intentionally submitted for - inclusion in the Work by You to the Licensor shall be under the terms and - conditions of this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify the - terms of any separate license agreement you may have executed with Licensor - regarding such Contributions.

- -

6. Trademarks.

- -

This License does not grant permission to use the trade names, trademarks, service marks, - or product names of the Licensor, except as required for reasonable and customary use - in describing the origin of the Work and reproducing the content of the - NOTICE file.

- -

7. Disclaimer of Warranty.

- -

Unless required by applicable law or agreed to in writing, Licensor provides the Work - (and each Contributor provides its Contributions) on an “AS IS” BASIS, WITHOUT - WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, - without limitation, any warranties or conditions of TITLE, - NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You - are solely responsible for determining the appropriateness of using or - redistributing the Work and assume any risks associated with Your exercise - of permissions under this License.

- -

8. Limitation of Liability.

- -

In no event and under no legal theory, whether in tort (including negligence), contract, - or otherwise, unless required by applicable law (such as deliberate and - grossly negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a result - of this License or out of the use or inability to use the Work (including - but not limited to damages for loss of goodwill, work stoppage, computer - failure or malfunction, or any and all other commercial damages or losses), - even if such Contributor has been advised of the possibility of such - damages.

- -

9. Accepting Warranty or Additional Liability.

- -

While redistributing the Work or Derivative Works thereof, You may choose - to offer, and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this License. - However, in accepting such obligations, You may act only on Your own behalf - and on Your sole responsibility, not on behalf of any other Contributor, - and only if You agree to indemnify, defend, and hold each Contributor - harmless for any liability incurred by, or claims asserted against, such - Contributor by reason of your accepting any such warranty or additional - liability.

- -

END OF TERMS AND CONDITIONS

- -

APPENDIX: How to apply the Apache License to your work

- -

To apply the Apache License to your work, attach the following boilerplate - notice, with the fields enclosed by brackets “[]” replaced with your own - identifying information. (Don’t include the brackets!) The text should be - enclosed in the appropriate comment syntax for the file format. We also - recommend that a file or class name and description of purpose be included - on the same “printed page” as the copyright notice for easier - identification within third-party archives.

-
Copyright [yyyy] [name of copyright owner]
-
-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.
- -
- -

3-Clause BSD License

- -

Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met:

- - - -

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE 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.

- - \ No newline at end of file diff --git a/app/src/main/assets/zh-rTW/about_links.html b/app/src/main/assets/zh-rTW/about_links.html deleted file mode 100644 index f9284514..00000000 --- a/app/src/main/assets/zh-rTW/about_links.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - -

Websites

- -

News

- -

Roadmap

- -

Bug Tracker and Feature Requests

- -

Forum

- -

GitWeb

- - \ No newline at end of file diff --git a/app/src/main/assets/zh-rTW/about_permissions.html b/app/src/main/assets/zh-rTW/about_permissions.html deleted file mode 100644 index 4fda4bac..00000000 --- a/app/src/main/assets/zh-rTW/about_permissions.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - -

Have full network access

- -

android.permission.INTERNET

- -

Required for the WebView to access the internet. Without this permission, Privacy Browser would be “No Browser: Protecting Your Privacy by Staying Completely Off the Internet”.

- - -

Install shortcuts

- -

com.android.launcher.permission.INSTALL_SHORTCUT

- -

Required to add shortcuts for websites to the launcher desktop.

- - \ No newline at end of file diff --git a/app/src/main/assets/zh-rTW/about_privacy_policy.html b/app/src/main/assets/zh-rTW/about_privacy_policy.html deleted file mode 100644 index 5fdcce18..00000000 --- a/app/src/main/assets/zh-rTW/about_privacy_policy.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - -

Privacy Browser

-

Privacy Browser does not collect any user information.

- - -

Google Play

-

Google Play has its own privacy policy. - Google provides anonymized summary installation information to developers, including the number of installs organized by the following categories.

- - - -

Google Play Ratings

-

Google Play has its own privacy policy. - Google provides developers with anonymized summaries of the following information related to user ratings.

- - - -

Google Play Reviews

-

Google Play has its own privacy policy. - In addition to the name of the reviewer, the rating, and the text of the review (which are all available publicly), Google provides some or all of the following information to the developer.

- - - -

Direct Communications

-

Users may choose to send direct communications to Stoutner, like email messages and comments on stoutner.com.

- - -

Use of Information

-

Stoutner may use this information in any way that assists in the development of Privacy Browser, like troubleshooting bug reports or developing features, including sharing the information with a third party to assist in this process. - Stoutner will never sell this information nor transfer it to any third party that would use it for advertising or marketing.

- -
-

Revision 1.4, 20 April 2017

- - \ No newline at end of file diff --git a/app/src/main/assets/zh-rTW/guide_domain_settings.html b/app/src/main/assets/zh-rTW/guide_domain_settings.html deleted file mode 100644 index 5c69fbae..00000000 --- a/app/src/main/assets/zh-rTW/guide_domain_settings.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - -

Secure Web Browsing

- -

Privacy Browser’s default is to browse with JavaScript, cookies, and DOM storage disabled. - However, some websites legitimately need these features enabled to function correctly. - Domain settings can automatically turn on a specified set of features when visiting a designated domain.

- -

- -

When visiting a domain that has domain settings specified, the background of the URL text box is green.

- -

- - \ No newline at end of file diff --git a/app/src/main/assets/zh-rTW/guide_javascript.html b/app/src/main/assets/zh-rTW/guide_javascript.html deleted file mode 100644 index ab132415..00000000 --- a/app/src/main/assets/zh-rTW/guide_javascript.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - -

JavaScript Is Powerful

- -

Back in the early days of the internet, web pages were static, meaning they they contained text and images that were displayed on the screen - but didn’t change or interact with the user. Of course, only so much that is interesting can happen with static content. - Several different technologies were developed to facilitate dynamic web pages. JavaScript is one of these technologies.

- -

JavaScript is a programming language. Many web servers host programs written in JavaScript, which are sent to devices as part of the web page. - The device runs the JavaScript on its local processor and follows the commands of the program, which can animate images on the website, - popup a menu, and do many other useful things.

- - -

JavaScript Is Dangerous

- -

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. 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. Browser Leaks is another good resource.

- -

- -

For privacy purposes, the ideal would be to browse the internet with JavaScript disabled. However, there are some websites that legitimately require - JavaScript to accomplish their purposes and others that don’t work correctly without JavaScript even though they could be programmed to do so. - Privacy Browser addresses this by making it easy to toggle JavaScript on and off. Tapping the privacy shield will toggle it between blue - or yellow (both of which indicate - that JavaScript is disabled) and red (JavaScript enabled). - Looking at the different information webkay can collect with JavaScript enabled and disabled is informative.

- -

Browsing the internet with JavaScript disabled, and only enabling it if needed, goes a long way to protecting user privacy. In addition, JavaScript - is used to load much of the annoying advertisements and extra cruft that comes along with most modern websites. With it disabled, websites will - load faster, consume less network traffic, and contain less annoying advertisements, instead of those that do things like cover up the text of the - entire web page.

- - \ No newline at end of file diff --git a/app/src/main/assets/zh-rTW/guide_local_storage.html b/app/src/main/assets/zh-rTW/guide_local_storage.html deleted file mode 100644 index 49254abb..00000000 --- a/app/src/main/assets/zh-rTW/guide_local_storage.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - -

First-Party Cookies

- -

First-party cookies are set by the website in the URL bar at the top of the page.

- -

From the early days of the internet, it became obvious that it would be advantageous for websites to be able to store - information on a computer for future access. For example, a website that displays weather information could ask the - user for a zip code, and then store it in a cookie. The next time the user visited the website, weather information - would automatically load for that zip code, without the user having to enter the zip code, and without the need for - the user to create an account on the website (which would be overkill for such a simple task).

- -

Like everything else on the web, clever people figured out all types of ways to abuse cookies to do things that users - would not approve of if they knew they were happening. For example, a website can set a cookie with a unique serial - number on a device. Then, every time a user visits the website on that device, it can be linked to a unique profile - the server maintains for that serial number, even if the device connects from different IP addresses, as cell phones often do.

- -

Many websites with logins require first-party cookies to be enabled for a user to stay logged in. Cookies aren’t the only way - a website can maintain a user logged in as they move from page to page on the site, but if a particular website has chosen to - implement logins in that way, enabling first-party cookies on that site will be the only way to use the functionality.

- -

If first-party cookies are enabled but JavaScript is disabled, the privacy icon will be yellow - as a warning.

- - -

Third-Party Cookies

- -

Third-party cookies are set by portions of a website that are loaded from servers different from the URL at the top of the page. - For example, most website that have advertisements load them from a third-party ad broker, like Google’s - Ad Sense. Every time the website loads, it requests the ad - broker to display an ad. The ad broker analyzes any information they may have about the user, looks at the current - rate advertisers are willing to pay for their ads, and selects the one to display. The section of the website that displays - the ads is loaded from the third-party broker’s server instead of the main server.

- -

Because most of the advertisements on the internet are processed by only a few brokers, it didn’t take long for them to realize - that they could set a tracking cookie on the user’s device and know every place that user goes. Every time an ad loads from a broker, - the first thing it does it check to see if if the device already has a unique serial number in a tracking cookie. If it does, it looks up - the profile for that serial number and makes a note of the new site. This is why a user can do a search on one website for a - product they typically don’t look for, like walnuts, and then suddenly start seeing advertisements for walnuts on every - website they visit.

- -

In addition to ad brokers, social media sites discovered they could get in on the action. A few years ago, the major social media sites - like Facebook and Twitter convinced a large number of websites that it would be in there best interest to place little social media - icons on their pages. These are not just images. They contain embedded code that - links back to the social media site, and, among other things, loads a third-party cookie on the device. These cookies are placed even if the user does - not have an account with the social media platform. Over time, companies like Facebook (which also runs an ad network) have built up quite a large number - of detailed profiles about people who have never even - created an account on their site.

- -

There is almost no good reason to ever enable third-party cookies. On devices with Android KitKat or older (version <= 4.4.4 or API <= 20), WebView - does not differentiate - between first-party and third-party cookies. Thus, enabling first-party cookies will also enable third-party cookies.

- - -

DOM Storage

- -

Document Object Model storage, also known as web storage, is like cookies on steroids. Whereas the maximum combined storage size for all cookies from - a single URL is 4 kilobytes, DOM storage can hold megabytes per site. - Because DOM storage uses JavaScript to read and write data, enabling it will do nothing unless JavaScript is also enabled.

- - -

Form Data

- -

Form data contains information typed into web forms, like user names, addresses, phone numbers, etc., and lists them in a drop-down box on future visits. - Unlike the other forms of local storage, form data is not sent to the web server without specific user interaction.

- - \ No newline at end of file diff --git a/app/src/main/assets/zh-rTW/guide_overview.html b/app/src/main/assets/zh-rTW/guide_overview.html deleted file mode 100644 index e2d37864..00000000 --- a/app/src/main/assets/zh-rTW/guide_overview.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - -

True Privacy

- -

Privacy Browser is designed to let you take as much control of your privacy as possible while still browsing the internet. - When a browser connects to a website, certain pieces of information which are necessary to facilitate the connection are transferred to the server. - For example, the server will receive your IP address and a port number, which are necessary for it to know where to send the response. - This information is often logged by the server, allowing the website developer to produce reports showing how often a webpage was loaded and how many different IP addresses accessed it.

- -

However, most website operators want more information about their visitors, including tracking their web browsing across multiple websites. - There use many different techniques, including requesting or placing extra information on a user’s device, that facilitate this tracking. - Almost all browsers will voluntarily participate in this tracking 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.

- - -

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. In the future, Privacy Browser will switch to a custom WebView called Privacy WebView.

- - \ No newline at end of file diff --git a/app/src/main/assets/zh-rTW/guide_tor.html b/app/src/main/assets/zh-rTW/guide_tor.html deleted file mode 100644 index 27cacb60..00000000 --- a/app/src/main/assets/zh-rTW/guide_tor.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - -

Tor and Its Limits

- -

There are two general categories of bad actors that want to infringe on the privacy of the web: malicious governments with access to ISPs (Internet Service Providers) and mega corporations that run social and advertising networks. - TOR (The Onion Router) is useful in protecting privacy from malicious governments (which spy on traffic in transit) but not from mega corporations (which embed malicious code on web servers).

- - -

Malicious Governments

- -

Malicious governments often spy on their citizens to punish dissent or human rights activity. They commonly either - operate the local ISPs or they can force them to disclose information showing every IP address that is visited - by each user. Tor is designed to defeat this infringement of privacy by encrypting the traffic - from a user’s device and routing it through three separate servers on the internet before sending it on to the final destination. - This means that no individual ISP, server, or website, can know both the IP address the user’s device - and the IP address of the final web server. Malicious governments and the ISPs they control cannot tell which - web servers a user is accessing, although they can tell that the user is using Tor. In some parts of - the world, using Tor could be construed as an evidence of illegal behavior (“if you didn’t have anything - to hide you wouldn’t be encrypting your traffic”) and users could be punished because governments - assume they are doing something that is prohibited. Thus, Tor can be helpful, but isn’t a panacea.

- - -

Mega Corporations

- -

When a user connects to a web server, the web server can see the user’s IP address. Although it isn’t a perfect science, - IP addresses can be turned into physical addresses with a fair amount of accuracy. - Small web servers typically rely on IP addresses to identify the location of the users visiting their site. - Tor is a good solution to mask the user’s location from these servers. But large mega corporations - that own social media and advertising networks use a whole profile of information that is designed to track users - across devices and IP addresses. These profiles employ a variety of techniques to identify users, including JavaScript, - cookies, tracking IDs, and browser fingerprinting. Because the vast majority - of the websites on the internet either load an ad from one of the major networks or embed social media icons with their - associated JavaScript, these corporations have built profiles for almost every user online and can track their internet - activity across unrelated sites.

- -

They track every site that is visited, everything that is purchased, every credit card that is used to - make a purchase, every address that items are shipped to, and the GPS metadata of every picture that is - uploaded to the internet. They build a profile of a user’s age, gender, marital status, address, political affiliations, - religious affiliations, family circumstances, number of pets, and everything else they can get their hands on. - They even buy up databases of credit card transactions at local stores, so they can track the off-line purchasing patterns of the users - in their profiles. Because they already have much more accurate address information about a user than an IP address discloses, - Tor provides no real privacy protection against mega corporations.

- -

The single best privacy protection against mega corporations is to browse the web with JavaScript disabled, followed - by blocking ad networks, disabling cookies and DOM storage, and using a browser that is difficult to fingerprint.

- - -

Using Tor

- -

Despite its limitations, Tor can be useful in some circumstances. The Tor project has an app for Android called Orbot, - which is available on F-Droid - and everywhere else that Privacy Browser is distributed. Privacy Browser has a setting to use Orbot as - a proxy. When this is turned on, Privacy Browser’s app bar will have a light blue background instead of - the default light grey. When Privacy Browser’s Orbot proxy setting is enabled, internet access - will not work unless Orbot is running and connected to Tor. Because traffic is being routed through several Tor nodes, - using Tor is often much slower than connecting directly to the internet.

- - - - \ No newline at end of file diff --git a/app/src/main/assets/zh-rTW/guide_tracking_ids.html b/app/src/main/assets/zh-rTW/guide_tracking_ids.html deleted file mode 100644 index 25358a94..00000000 --- a/app/src/main/assets/zh-rTW/guide_tracking_ids.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - -

Do Not Track

- -

A few years ago the W3C (World Wide Web Consortium) created a mechanism for browsers to inform web servers that they would not like to be tracked. - This is accomplished by including a DNT (Do Not Track) header with web requests.

- -

The DNT header doesn't really provide much privacy because most web servers ignore it. For example, Yahoo, Google, Microsoft, and Facebook all ignore at least some DNT headers.

- - -

Advertisements

- -

Privacy Browser Free includes a banner advertisement across the bottom of the screen that is populated by Google’s AdMob network. - By default, Google provides the advertising ID of the device to the ads displayed through this network. - This allows advertising companies to build a profile of the device that show which apps are installed (that display ads), how often they are used, and which ads the user is interested in.

- -

Users can choose to disable the advertising ID in Settings, Google, Ads.

- - - -

The purpose of the free version of Privacy Browser is to allow people to test the features of the app. The standard version can be purchased on the major app stores or downloaded for free from - F-Droid.

- - -

Verizon Tracking Headers

- -

Verizon, one of the major mobile carriers in the United States, adds a unique tracking header to all unencrypted HTTP traffic on their network. The Electronic Frontier Foundation has written about the - privacy implications of this practice. Due to public pressure Verizon has created a way to - opt out of this tracking.

- - \ No newline at end of file diff --git a/app/src/main/assets/zh-rTW/guide_user_agent.html b/app/src/main/assets/zh-rTW/guide_user_agent.html deleted file mode 100644 index d1be2ba4..00000000 --- a/app/src/main/assets/zh-rTW/guide_user_agent.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - -

Browser Identification

- -

When web browsers connect to websites, they send a user agent, which identifies the browser and the rendering capabilities it possesses. The web server can use this information to decide which version of the - website to send to the browser. For example, many websites have different versions for desktop and mobile browsers.

- -

By default, Privacy Browser uses its own user agent, which is PrivacyBrowser/1.0. This sends a minimum of information to the web server. Because web servers do not recognize this to be a mobile user agent, - they typically display the desktop version of the site.

- -

By comparison, WebView’s default user agent divulges a large amount of information about the hardware and software of the device. On the Settings screen, selecting WebView Default as the - User agent displays the user agent that will be sent. The screenshot below shows a Nexus 6P running Android 7.1.1 with Android System WebView 55.0.2883.91 installed. Most web servers will recognize this as - a mobile browser and will display the mobile version of the site if they have one.

- - - -

There is enough information in the user agent that sometimes only a few visitors to a website will be the same. If the user agent is combined with another piece of non-unique identifying information, often it results in a unique fingerprint. - The Electronic Frontier Foundation created a tool called Panopticlick to demonstrate how much information can be gleaned from these sources. If this test is run with JavaScript enabled the - amount of information that is disclosed increases greatly. Browser Leaks and Am I Unique are also good sources of information.

- - - -

There are several preset user agents that match common browsers and operating systems. For browser fingerprinting purposes, anything that is rare is easier to track. If Privacy Browser becomes common and many people use PrivacyBrowser/1.0 - as their user agent, it will be a good choice for privacy. Firefox or Chrome are the most common user agents, but they auto-update and their version numbers change so quickly that it is likely the user agents included in Privacy Browser - will often be out of step with the majority of user agents in the server logs.

- -

Android’s WebView does not allow the user agent to be blank. If it is, WebView simply sends the default user agent to the server.

- - \ No newline at end of file diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java index 4200fb5e..d708132d 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java @@ -122,9 +122,6 @@ import java.util.Set; public class MainWebViewActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener, CreateHomeScreenShortcutDialog.CreateHomeScreenSchortcutListener, SslCertificateErrorDialog.SslCertificateErrorListener, DownloadFileDialog.DownloadFileListener, DownloadImageDialog.DownloadImageListener, UrlHistoryDialog.UrlHistoryListener { - // `appBar` is public static so it can be accessed from `OrbotProxyHelper`. It is also used in `onCreate()`, `onOptionsItemSelected()`, `closeFindOnPage()`, and `applyAppSettings()`. - public static ActionBar appBar; - // `favoriteIconBitmap` is public static so it can be accessed from `CreateHomeScreenShortcutDialog`, `BookmarksActivity`, `CreateBookmarkDialog`, `CreateBookmarkFolderDialog`, `EditBookmarkDialog`, `EditBookmarkFolderDialog`, `ViewSslCertificateDialog`. // It is also used in `onCreate()`, `onCreateHomeScreenShortcutCreate()`, and `applyDomainSettings`. public static Bitmap favoriteIconBitmap; @@ -149,6 +146,9 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation public static boolean reloadOnRestartBoolean; + // `appBar` is used in `onCreate()`, `onOptionsItemSelected()`, `closeFindOnPage()`, and `applyAppSettings()`. + private ActionBar appBar; + // `navigatingHistory` is used in `onCreate()`, `onNavigationItemSelected()`, and `applyDomainSettings()`. private boolean navigatingHistory; @@ -292,14 +292,37 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation // `mainWebViewRelativeLayout` is used in `onCreate()` and `onNavigationItemSelected()`. private RelativeLayout mainWebViewRelativeLayout; + // `darkTheme` is used in `onCreate()`, `applyAppSettings()`, and `applyDomainSettings()`. + private boolean darkTheme; + @Override // Remove Android Studio's warning about the dangers of using SetJavaScriptEnabled. The whole premise of Privacy Browser is built around an understanding of these dangers. @SuppressLint("SetJavaScriptEnabled") // Remove Android Studio's warning about deprecations. We have to use the deprecated `getColor()` until API >= 23. @SuppressWarnings("deprecation") protected void onCreate(Bundle savedInstanceState) { + // Get a handle for `sharedPreferences`. `this` references the current context. + SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); + + // Get the theme preference. + darkTheme = sharedPreferences.getBoolean("dark_theme", false); + + // Set the activity theme. + if (darkTheme) { + setTheme(R.style.PrivacyBrowserDark); + } else { + setTheme(R.style.PrivacyBrowserLight); + } + + // Run the default commands. super.onCreate(savedInstanceState); - setContentView(R.layout.main_drawerlayout); + + // Set the content view according to the theme.. + if (darkTheme) { + setContentView(R.layout.main_drawerlayout_dark); + } else { + setContentView(R.layout.main_drawerlayout_light); + } // Get a handle for `inputMethodManager`. inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); @@ -2218,6 +2241,13 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation // Set the proxy. `this` refers to the current activity where an `AlertDialog` might be displayed. OrbotProxyHelper.setProxy(getApplicationContext(), this, "localhost", "8118"); + // Set the `appBar` background to indicate proxying through Orbot is enabled. `this` refers to the context. + if (darkTheme) { + appBar.setBackgroundDrawable(ContextCompat.getDrawable(this, R.color.dark_blue_30)); + } else { + appBar.setBackgroundDrawable(ContextCompat.getDrawable(this, R.color.blue_50)); + } + // Display a message to the user if we are waiting on Orbot. if (!orbotStatus.equals("ON")) { // Set `waitingForOrbot`. @@ -2245,6 +2275,13 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation // Reset the proxy to default. The host is `""` and the port is `"0"`. OrbotProxyHelper.setProxy(getApplicationContext(), this, "", "0"); + // Set the default `appBar` background. `this` refers to the context. + if (darkTheme) { + appBar.setBackgroundDrawable(ContextCompat.getDrawable(this, R.color.gray_900)); + } else { + appBar.setBackgroundDrawable(ContextCompat.getDrawable(this, R.color.gray_100)); + } + // Reset `waitingForOrbot. waitingForOrbot = false; } @@ -2444,7 +2481,11 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation } // Set a green background on `urlTextBox` to indicate that custom domain settings are being used. We have to use the deprecated `.getDrawable()` until the minimum API >= 21. - urlAppBarRelativeLayout.setBackground(getResources().getDrawable(R.drawable.url_bar_background_green)); + if (darkTheme) { + urlAppBarRelativeLayout.setBackground(getResources().getDrawable(R.drawable.url_bar_background_dark_blue)); + } else { + urlAppBarRelativeLayout.setBackground(getResources().getDrawable(R.drawable.url_bar_background_light_green)); + } } else { // The URL we are loading does not have custom domain settings. Load the defaults. // Store the values from `sharedPreferences` in variables. javaScriptEnabled = sharedPreferences.getBoolean("javascript_enabled", false); diff --git a/app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java b/app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java index 78a92f87..14d39bd9 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java +++ b/app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java @@ -73,6 +73,7 @@ public class SettingsFragment extends PreferenceFragment { final Preference defaultFontSizePreference = findPreference("default_font_size"); final Preference swipeToRefreshPreference = findPreference("swipe_to_refresh"); final Preference displayAdditionalAppBarIconsPreference = findPreference("display_additional_app_bar_icons"); + final Preference darkThemePreference = findPreference("dark_theme"); final Preference displayWebpageImagesPreference = findPreference("display_webpage_images"); // Set dependencies. @@ -356,6 +357,13 @@ public class SettingsFragment extends PreferenceFragment { displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_disabled); } + // Set the `darkThemePreference` icon. + if (savedPreferences.getBoolean("dark_theme", false)) { + darkThemePreference.setIcon(R.drawable.theme_dark); + } else { + darkThemePreference.setIcon(R.drawable.theme_light); + } + // Set the `displayWebpageImagesPreference` icon. if (savedPreferences.getBoolean("display_webpage_images", true)) { displayWebpageImagesPreference.setIcon(R.drawable.images_enabled); @@ -777,6 +785,15 @@ public class SettingsFragment extends PreferenceFragment { } break; + case "dark_theme": + // Update the icon. + if (sharedPreferences.getBoolean("dark_theme", false)) { + darkThemePreference.setIcon(R.drawable.theme_dark); + } else { + darkThemePreference.setIcon(R.drawable.theme_light); + } + break; + case "display_webpage_images": if (sharedPreferences.getBoolean("display_webpage_images", true)) { // Update the icon. @@ -792,10 +809,6 @@ public class SettingsFragment extends PreferenceFragment { MainWebViewActivity.reloadOnRestartBoolean = true; } break; - - default: - // If no match, do nothing. - break; } } }; diff --git a/app/src/main/java/com/stoutner/privacybrowser/helpers/OrbotProxyHelper.java b/app/src/main/java/com/stoutner/privacybrowser/helpers/OrbotProxyHelper.java index 696bd504..2e1b22b6 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/helpers/OrbotProxyHelper.java +++ b/app/src/main/java/com/stoutner/privacybrowser/helpers/OrbotProxyHelper.java @@ -25,7 +25,6 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Proxy; -import android.support.v4.content.ContextCompat; import android.support.v7.app.AlertDialog; import android.util.ArrayMap; import android.util.Log; @@ -77,9 +76,6 @@ public class OrbotProxyHelper { } if (proxyPort.equals("8118")) { // Orbot proxy was turned on. - // Set the `appBar` background to be light blue if Orbot proxy support is enabled. - MainWebViewActivity.appBar.setBackgroundDrawable(ContextCompat.getDrawable(privacyBrowserContext, R.color.blue_50)); - try { // Check to see if Orbot is installed. PackageManager packageManager = privacyBrowserContext.getPackageManager(); packageManager.getPackageInfo("org.torproject.android", PackageManager.GET_ACTIVITIES); @@ -113,8 +109,6 @@ public class OrbotProxyHelper { AlertDialog alertDialog = dialogBuilder.create(); alertDialog.show(); } - } else { // Otherwise set the default grey `appBar` background. - MainWebViewActivity.appBar.setBackgroundDrawable(ContextCompat.getDrawable(privacyBrowserContext, R.color.gray_100)); } } } diff --git a/app/src/main/res/color/dark_primary_text_color_selector.xml b/app/src/main/res/color/dark_primary_text_color_selector.xml new file mode 100644 index 00000000..27f283e5 --- /dev/null +++ b/app/src/main/res/color/dark_primary_text_color_selector.xml @@ -0,0 +1,26 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/theme_dark.xml b/app/src/main/res/drawable/theme_dark.xml new file mode 100644 index 00000000..d294217b --- /dev/null +++ b/app/src/main/res/drawable/theme_dark.xml @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/app/src/main/res/drawable/theme_light.xml b/app/src/main/res/drawable/theme_light.xml new file mode 100644 index 00000000..339b1e02 --- /dev/null +++ b/app/src/main/res/drawable/theme_light.xml @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/app/src/free/res/values-zh-rTW/strings.xml b/app/src/main/res/drawable/url_bar_background_dark_blue.xml similarity index 73% rename from app/src/free/res/values-zh-rTW/strings.xml rename to app/src/main/res/drawable/url_bar_background_dark_blue.xml index abf7c81d..12bf4e84 100644 --- a/app/src/free/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/drawable/url_bar_background_dark_blue.xml @@ -1,7 +1,7 @@ - - - Privacy Browser Free - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/url_bar_background_green.xml b/app/src/main/res/drawable/url_bar_background_light_green.xml similarity index 94% rename from app/src/main/res/drawable/url_bar_background_green.xml rename to app/src/main/res/drawable/url_bar_background_light_green.xml index c385fc41..c5bf2d47 100644 --- a/app/src/main/res/drawable/url_bar_background_green.xml +++ b/app/src/main/res/drawable/url_bar_background_light_green.xml @@ -23,7 +23,7 @@ android:shape="rectangle" > + android:color="@color/green_200" /> diff --git a/app/src/main/res/layout/about_coordinatorlayout.xml b/app/src/main/res/layout/about_coordinatorlayout.xml index 56ebc941..b8ddd1d8 100644 --- a/app/src/main/res/layout/about_coordinatorlayout.xml +++ b/app/src/main/res/layout/about_coordinatorlayout.xml @@ -41,7 +41,7 @@ android:layout_height="wrap_content" android:layout_width="match_parent" android:background="@color/blue_700" - android:theme="@style/AppBarOverlay" > + android:theme="@style/PrivacyBrowserAppBarOverlayLight" > + app:popupTheme="@style/PrivacyBrowserPopupOverlayLight" /> + android:theme="@style/PrivacyBrowserAppBarOverlayLight" > + app:popupTheme="@style/PrivacyBrowserPopupOverlayLight" /> + app:popupTheme="@style/PrivacyBrowserPopupOverlayLight" /> + android:theme="@style/PrivacyBrowserAppBarOverlayLight" > + app:popupTheme="@style/PrivacyBrowserPopupOverlayLight" /> diff --git a/app/src/main/res/layout/guide_coordinatorlayout.xml b/app/src/main/res/layout/guide_coordinatorlayout.xml index 223f5086..54f39617 100644 --- a/app/src/main/res/layout/guide_coordinatorlayout.xml +++ b/app/src/main/res/layout/guide_coordinatorlayout.xml @@ -41,7 +41,7 @@ android:layout_height="wrap_content" android:layout_width="match_parent" android:background="@color/blue_700" - android:theme="@style/AppBarOverlay" > + android:theme="@style/PrivacyBrowserAppBarOverlayLight" > + app:popupTheme="@style/PrivacyBrowserPopupOverlayLight" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/main_drawerlayout.xml b/app/src/main/res/layout/main_drawerlayout_light.xml similarity index 93% rename from app/src/main/res/layout/main_drawerlayout.xml rename to app/src/main/res/layout/main_drawerlayout_light.xml index d2835157..00048dc3 100644 --- a/app/src/main/res/layout/main_drawerlayout.xml +++ b/app/src/main/res/layout/main_drawerlayout_light.xml @@ -44,11 +44,12 @@ android:layout_width="match_parent" android:orientation="vertical" > + + android:theme="@style/PrivacyBrowserAppBarOverlayLight" > + android:layout_width="match_parent" /> + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/navigation_header.xml b/app/src/main/res/layout/navigation_header_light.xml similarity index 100% rename from app/src/main/res/layout/navigation_header.xml rename to app/src/main/res/layout/navigation_header_light.xml diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml deleted file mode 100644 index d03678fa..00000000 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - - - - Privacy Browser - Privacy Browser Settings - zh_TW - - - Privacy Mode - JavaScript enabled - JavaScript disabled - First-Party Cookies enabled - First-Party Cookies disabled - Third-Party Cookies enabled - Third-Party Cookies disabled - DOM Storage enabled - DOM Storage disabled - Form Data enabled - Form Data disabled - Cookies deleted - DOM Storage deleted - Form Data deleted - Open Navigation Drawer - Close Navigation Drawer - No title - - - Save As - Save Image As - File name - Image name - unknown size - Download - This file cannot be downloaded because it does not have an HTTP or HTTPS URI. - This image cannot be downloaded because it does not have an HTTP or HTTPS URI. - - - Favorite Icon - URL or Search Terms - - - View SSL Certificate - Unencrypted Website - Communication with this website is not encrypted by an SSL certificate. - SSL Certificate - Close - Issued To - Issued By - Common Name (CN): - Organization (O): - Organizational Unit (OU): - Valid Dates - Start Date: - End Date: - - - SSL Certificate Error - Proceed - The certificate start date is in the future - The certificate is expired - The Common Name does not match the hostname - The certificate authority is not trusted - The date on the certificate is invalid - The certificate is invalid - URL - URL: - - - Navigation Drawer - Navigation - Home - Back - Forward - History - Clear History - Bookmarks - Downloads - Settings - Guide - About - Clear and Exit - - - JavaScript - First-Party Cookies - Third-Party Cookies - DOM Storage - Form Data - Clear Cookies - Clear DOM Storage - Clear Form Data - Font Size - 25% - 50% - 75% - 100% - 125% - 150% - 175% - 200% - Display Images - Find on Page - Share - Add to Home Screen - Print - Privacy Browser Web Page - Refresh - - - Load URL - Copy URL - Email Address - Copy Email Address - Write Email - View Image - Download Image - - - Previous - Next - - - Create Shortcut - Shortcut name - Cancel - Create - - - Database View - Create Bookmark - Create Folder - Current bookmark icon - Current folder icon - Default folder icon - Web page favorite icon - Bookmark name - Folder name - Bookmark URL - Folder names must be unique - Cannot create the folder because the name is not unique: - Cannot save the folder because the new name is not unique: - Cannot move the selected bookmarks because no new folder was selected. - Edit Bookmark - Edit Folder - Move to Folder - Move - Save - - - 1 Selected - Selected - Move Up - Move Down - Edit - Delete - Select All - 1 Bookmark Deleted - Bookmarks Deleted - Undo - - - Bookmarks Database View - Home Folder - - - Domains - Domain Settings - Add Domain - Add - Domain name - Domain settings saved - Domain deleted - *. may be prepended to a domain to include all subdomains (eg. *.stoutner.com) - - System default - Images enabled - Images disabled - - - - Privacy Browser Guide - Overview - Local Storage - Tracking IDs - Planned Features - - - Privacy - Enable JavaScript by default - JavaScript allows websites to run programs (scripts) on the device. - Enable first-party cookies by default - Devices with versions of Android older than Lollipop (version 5.0) will also enable third-party cookies with this setting. - Enable third-party cookies by default - This setting requires Android Lollipop (version 5.0) or higher. It has no effect if first-party cookies are disabled. - Enable DOM storage by default - JavaScript must be enabled for DOM storage to function. - Enable saving of form data by default - Saved form data can auto-populate fields on websites. - User agent - - Privacy Browser 1.0 - WebView Default - Firefox 50 on Android 7.1.1 - Chrome 55 on Android 7.1.1 - Safari 10 on iOS 10.2.1 - Firefox 45 on Linux - Chromium 55 on Linux - Konqueror 4.14.26 on Linux - Firefox 50 on Windows 10 - Chrome 55 on Windows 10 - Edge 14 on Windows 10 - Internet Explorer 11 on Windows 10 - Safari 10.0.2 on macOS 10.12.2 - Custom - - Custom user agent - Block ads - Use the list of ad servers from pgl.yoyo.org to block ads. - Incognito Mode - Clear the history and cache after each webpage finishes loading. - Do Not Track - Send the Do Not Track header, which politely suggests that web servers not track this browser. - Tor - Proxy through Orbot - Proxy all web traffic through Orbot on localhost:8118. - Tor homepage - Tor search - - DuckDuckGo - JavaScript disabled - DuckDuckGo - JavaScript enabled - Custom - - Tor search custom URL - Search - - DuckDuckGo - JavaScript disabled - DuckDuckGo - JavaScript enabled - StartPage - Google - Bing - Yahoo - JavaScript disabled - Yahoo - JavaScript enabled - Qwant - JavaScript disabled - Qwant - JavaScript enabled - Custom - - Search custom URL - Custom URL - Full Screen - Full screen browsing mode - Double-tap to toggle full screen browsing mode. - Hide system bars - Hide the status and navigation bars in full screen browsing mode. This doesn\'t work well if the keyboard is displayed during full screen browsing mode. - Translucent navigation bar - Make the navigation bar translucent in full screen browsing mode. - General - Homepage - Default font size - - 25% - 50% - 75% - 100% - 125% - 150% - 175% - 200% - - Swipe to refresh - Some websites don\'t work well if swipe to refresh is enabled. - Display additional app bar icons - Display icons for toggling cookies, DOM storage, and form data in the app bar if there is room. - Display webpage images - Disable to conserve bandwidth. - - - Orbot proxy will not work unless Orbot is installed. - Waiting for Orbot to connect... - - - About Privacy Browser - Version - version code - Hardware - Brand: - Manufacturer: - Model: - Device: - Bootloader: - Radio: - Software - Android: - API - Build: - Security Patch: - WebKit: - Chrome: - Orbot: - Package Signature - Issuer DN: - Subject DN: - Certificate Version: - Serial Number: - Signature Algorithm: - Permissions - Privacy Policy - Changelog - Licenses - Contributors - Links - diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index cd1d60d8..72113ba1 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with Privacy Browser. If not, see . --> - + #66000000 @@ -38,11 +38,22 @@ #FF607D8B + #FF1766A6 + #FF14568C + #FF0E3F66 + #FF002A4D + #FF001C33 + + #FF163317 + #FFF5F5F5 + #FFE0E0E0 #FF9E9E9E + #FF212121 #FFE8F5E9 #FFC8E6C9 + #FFA5D6A7 #FFDCEDC8 #FF64DD17 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index eb7d0ab9..6b38aed8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -347,6 +347,8 @@ Some websites don’t work well if swipe to refresh is enabled. Display additional app bar icons Display icons for toggling cookies, DOM storage, and form data in the app bar if there is room. + Dark theme + Privacy Browser must be restarted for the new theme to take effect. Display webpage images Disable to conserve bandwidth. diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 7a226038..5395eee0 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -19,9 +19,11 @@ along with Privacy Browser. If not, see . --> + + - - + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 5c188cf4..d7e096b1 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -225,6 +225,12 @@ android:summary="@string/display_additional_app_bar_icons_summary" android:defaultValue="false" /> + +