<excludeFolder url="file://$MODULE_DIR$/build/intermediates/debug" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.1/jars" />
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/23.1.1/jars" />
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.1.1/jars" />
- <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.1.1/jars" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/animated-vector-drawable/23.2.0/jars" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.2.0/jars" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/design/23.2.0/jars" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/23.2.0/jars" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.2.0/jars" />
+ <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/23.2.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-ads/8.4.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.google.android.gms/play-services-basement/8.4.0/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
</content>
<orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" exported="" name="recyclerview-v7-23.1.1" level="project" />
- <orderEntry type="library" exported="" name="support-annotations-23.1.1" level="project" />
- <orderEntry type="library" exported="" name="support-v4-23.1.1" level="project" />
+ <orderEntry type="library" exported="" name="animated-vector-drawable-23.2.0" level="project" />
+ <orderEntry type="library" exported="" name="support-v4-23.2.0" level="project" />
+ <orderEntry type="library" exported="" name="recyclerview-v7-23.2.0" level="project" />
+ <orderEntry type="library" exported="" name="support-annotations-23.2.0" level="project" />
<orderEntry type="library" exported="" name="play-services-basement-8.4.0" level="project" />
- <orderEntry type="library" exported="" name="design-23.1.1" level="project" />
- <orderEntry type="library" exported="" name="appcompat-v7-23.1.1" level="project" />
+ <orderEntry type="library" exported="" name="support-vector-drawable-23.2.0" level="project" />
+ <orderEntry type="library" exported="" name="design-23.2.0" level="project" />
+ <orderEntry type="library" exported="" name="appcompat-v7-23.2.0" level="project" />
<orderEntry type="library" exported="" name="play-services-ads-8.4.0" level="project" />
</component>
</module>
\ No newline at end of file
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
- compile 'com.android.support:appcompat-v7:23.1.1'
- compile 'com.android.support:design:23.1.1'
- compile 'com.android.support:support-v4:23.1.1'
+ compile 'com.android.support:appcompat-v7:23.2.0'
+ compile 'com.android.support:design:23.2.0'
+ compile 'com.android.support:support-v4:23.2.0'
compile 'com.google.android.gms:play-services-ads:8.4.0'
}
--- /dev/null
+/**
+ * Copyright 2016 Soren Stoutner <soren@stoutner.com>.
+ *
+ * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+ *
+ * Privacy Browser is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Privacy Browser is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package com.stoutner.privacybrowser;
+
+import android.support.v7.app.AppCompatActivity;
+import android.view.View;
+
+import com.google.android.gms.ads.AdRequest;
+import com.google.android.gms.ads.AdView;
+
+public class BannerAd extends AppCompatActivity{
+ public static void requestAd(View view) {
+ // Cast view to an AdView.
+ AdView adView = (AdView) view;
+
+ // Load an ad.
+ AdRequest adRequest = new AdRequest.Builder().build();
+ adView.loadAd(adRequest);
+ }
+
+ public static void hideAd(View view) {
+ // Cast view to an AdView.
+ AdView adView = (AdView) view;
+
+ // Hide the ad.
+ adView.setVisibility(View.GONE);
+ }
+
+ public static void showAd(View view) {
+ // Cast view to an AdView.
+ AdView adView = (AdView) view;
+
+ // Hide the ad.
+ adView.setVisibility(View.VISIBLE);
+ }
+}
\ No newline at end of file
<!--
Copyright 2016 Soren Stoutner <soren@stoutner.com>.
- This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
Privacy Browser is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
Copyright 2015-2016 Soren Stoutner <soren@stoutner.com>.
- This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
Privacy Browser is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
Copyright 2015-2016 Soren Stoutner <soren@stoutner.com>.
- This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
Privacy Browser is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<body>
<p>Privacy Browser Copyright © 2015-2016 <a href="mailto:soren@stoutner.com">Soren Stoutner</a></p>
-<p>Detailed information about Privacy Browser, including changelogs and a bug tracker, is available at <a href=https://privacybrowser.stoutner.com>privacybrowser.stoutner.com</a>.</p>
+<p>Detailed information about Privacy Browser, including changelogs and a bug tracker, is available at <a href=https://www.stoutner.com/privacy-browser>www.stoutner.com</a>.</p>
<p>Privacy Browser is released under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPLv3+ license</a>. The full text of the license is below.</p>
+<p>/app/src/main/res/mipmap-*/privacy_browser.png, /app/src/main/res/privacy-browser-web.png, /app/src/free/mipmap-*/privacy_browser.png, and /app/src/free/res/privacy_browser-web.png
+ are derived from ic_security and ic_language, which are part of the Android Material icon set.
+ They are released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>. Modification were made by Soren Stoutner in 2016.</p>
+
<p>/app/src/main/res/drawable/javascript_enabled.xml is part of the Android Material icon set, where it is named ic_visibility.
- It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>. Changes to fill color were made by Soren Stoutner in 2016.</p>
+ It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>. Changes to fill color and size were made by Soren Stoutner in 2016.</p>
<p>/app/src/main/res/drawable/warning.xml is part of the Android Material icon set, where it is named ic_visibility.
- It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>. Changes to fill color were made by Soren Stoutner in 2016.</p>
+ It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>. Changes to fill color and size were made by Soren Stoutner in 2016.</p>
<p>/app/src/main/res/drawable/privacy_mode.xml is part of the Android Material icon set, where it is named ic_visibility_off.
- It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>. Changes to fill color were made by Soren Stoutner in 2016.</p>
+ It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>. Changes to fill color and size were made by Soren Stoutner in 2016.</p>
+
+<p>/app.src/main/res/drawable/world.xml is part of the Android Material icon set, where it is named ic_language.
+ It is released under the <a href=https://creativecommons.org/licenses/by/4.0/>CC-BY license</a>. Changes to fill color and size were made by Soren Stoutner in 2016.</p>
<br/>
<hr/>
/**
* Copyright 2015-2016 Soren Stoutner <soren@stoutner.com>.
*
- * This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+ * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
*
* Privacy Browser is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* Copyright 2015 Soren Stoutner <soren@stoutner.com>.
*
- * This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+ * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
*
* Privacy Browser is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* Copyright 2015-2016 Soren Stoutner <soren@stoutner.com>.
*
- * This file is part of Privacy Browser.
+ * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
*
* Privacy Browser is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
import android.widget.ProgressBar;
import android.widget.Toast;
-import com.google.android.gms.ads.AdRequest;
-import com.google.android.gms.ads.AdView;
-
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
// We need to use the SupportActionBar from android.support.v7.app.ActionBar until the minimum API is >= 21.
final ActionBar appBar = getSupportActionBar();
- // Setup the AdView for the free flavor.
- final AdView adView = (AdView) findViewById(R.id.adView);
+ // Setup AdView for the free flavor.
+ final View adView = findViewById(R.id.adView);
// Implement swipe to refresh
final SwipeRefreshLayout swipeToRefresh = (SwipeRefreshLayout) findViewById(R.id.swipeRefreshLayout);
// Hide the mainWebView.
mainWebView.setVisibility(View.GONE);
- // Hide the add if this is the free flavor.
- if (getString(R.string.free_flavor).equals("true")) {
- adView.setVisibility(View.GONE);
- }
+ // Hide the ad if this is the free flavor.
+ BannerAd.hideAd(adView);
/* SYSTEM_UI_FLAG_HIDE_NAVIGATION hides the navigation bars on the bottom or right of the screen.
** SYSTEM_UI_FLAG_FULLSCREEN hides the status bar across the top of the screen.
// Show the mainWebView.
mainWebView.setVisibility(View.VISIBLE);
- // Show the adView if this is the free flavor.
- if (getString(R.string.free_flavor).equals("true")) {
- adView.setVisibility(View.VISIBLE);
- }
+ // Show the ad if this is the free flavor.
+ BannerAd.showAd(adView);
// Hide the fullScreenVideoFrameLayout.
fullScreenVideoFrameLayout.removeAllViews();
mainWebView.loadUrl(formattedUrlString);
// Load the ad if this is the free flavor.
- if (getString(R.string.free_flavor).equals("true")) {
- AdRequest adRequest = new AdRequest.Builder().build();
- adView.loadAd(adRequest);
- }
+ BannerAd.requestAd(adView);
}
@Override
/**
* Copyright 2016 Soren Stoutner <soren@stoutner.com>.
*
- * This file is part of Privacy Browser.
+ * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
*
* Privacy Browser is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
<!--
Copyright 2015-2016 Soren Stoutner <soren@stoutner.com>.
- This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
Privacy Browser is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Copyright 2016 Soren Stoutner <soren@stoutner.com>.
+
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+ Privacy Browser is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Privacy Browser is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- android:layout_martinTop="?attr/actionBarSize" moves adRelativeLayout below the appBarLayout, which otherwise would cover the top of mainWebView. -->
+<!-- the RelativeLayout has an id of adView in the standard flavor so that the ad commands (which do nothing in the standard flavor) don't produce errors. -->
+<RelativeLayout
+ android:id="@+id/adView"
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginTop="?attr/actionBarSize"
+ tools:context="com.stoutner.privacybrowser.MainWebViewActivity"
+ tools:showIn="@layout/activity_webview" >
+
+ <android.support.v4.widget.SwipeRefreshLayout
+ android:id="@+id/swipeRefreshLayout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+
+ <!-- Google does not currently want to support hiding the AppBar on scroll for a WebView child with the Support Toolbar. https://code.google.com/p/android/issues/detail?id=200394 -->
+ <WebView
+ android:id="@+id/mainWebView"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:focusable="true"
+ android:focusableInTouchMode="true"/>
+ </android.support.v4.widget.SwipeRefreshLayout>
+</RelativeLayout>
\ No newline at end of file
<!--
Copyright 2015 Soren Stoutner <soren@stoutner.com>.
- This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
Privacy Browser is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
Copyright 2015-2016 Soren Stoutner <soren@stoutner.com>.
- This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
Privacy Browser is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
Copyright 2015-2016 Soren Stoutner <soren@stoutner.com>.
- This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
Privacy Browser is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
Copyright 2016 Soren Stoutner <soren@stoutner.com>.
- This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
Privacy Browser is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
Copyright 2016 Soren Stoutner <soren@stoutner.com>.
- This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
Privacy Browser is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
Copyright 2015-2016 Soren Stoutner <soren@stoutner.com>.
- This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
Privacy Browser is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
Copyright 2015-2016 Soren Stoutner <soren@stoutner.com>.
- This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
Privacy Browser is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
<!--
Copyright 2016 Soren Stoutner <soren@stoutner.com>.
- This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
Privacy Browser is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- /dev/null
+/**
+ * Copyright 2016 Soren Stoutner <soren@stoutner.com>.
+ *
+ * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+ *
+ * Privacy Browser is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Privacy Browser is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package com.stoutner.privacybrowser;
+
+import android.view.View;
+
+public class BannerAd {
+ public static void requestAd(View view) {
+ // Do nothing because this is the standard version.
+ }
+
+ public static void hideAd(View view) {
+ // Do nothing because this is the standard version.
+ }
+
+ public static void showAd(View view) {
+ // Do nothing because this is the standard version.
+ }
+}
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- Copyright 2016 Soren Stoutner <soren@stoutner.com>.
-
- This file is part of Privacy Browser <https://privacybrowser.stoutner.com/>.
-
- Privacy Browser is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Privacy Browser is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- android:layout_martinTop="?attr/actionBarSize" moves adRelativeLayout below the appBarLayout, which otherwise would cover the top of mainWebView. -->
-<RelativeLayout
- android:id="@+id/adRelativeLayout"
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginTop="?attr/actionBarSize"
- tools:context="com.stoutner.privacybrowser.MainWebViewActivity"
- tools:showIn="@layout/activity_webview" >
-
- <!-- Set to visibility="gone" in the standard flavor. -->
- <com.google.android.gms.ads.AdView
- android:id="@+id/adView"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerHorizontal="true"
- android:layout_alignParentBottom="true"
- android:visibility="gone">
- </com.google.android.gms.ads.AdView>
-
- <android.support.v4.widget.SwipeRefreshLayout
- android:id="@+id/swipeRefreshLayout"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_above="@id/adView">
-
- <!-- Google does not currently want to support hiding the AppBar on scroll for a WebView child with the Support Toolbar. https://code.google.com/p/android/issues/detail?id=200394 -->
- <WebView
- android:id="@+id/mainWebView"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:focusable="true"
- android:focusableInTouchMode="true"/>
- </android.support.v4.widget.SwipeRefreshLayout>
-</RelativeLayout>
\ No newline at end of file