summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2018-07-16 20:39:18 +0200
committerArne Schwabe <arne@rfc2549.org>2018-07-16 20:39:18 +0200
commit11981b7154cb46e17d237d1e18930f0f5530a4f3 (patch)
treeca3c780949b89a311bafb3884e54dcb93e47e58b
parente3c6001c9d0679f3c0b5231c84aa4e92377ec8cc (diff)
Implement about full licenses as simple TextView instead of Webview
-rw-r--r--main/src/main/assets/full_licenses.html223
-rw-r--r--main/src/main/java/de/blinkt/openvpn/fragments/AboutFragment.java27
-rw-r--r--main/src/main/res/layout/about.xml4
-rw-r--r--main/src/main/res/values/untranslatable.xml27
4 files changed, 153 insertions, 128 deletions
diff --git a/main/src/main/assets/full_licenses.html b/main/src/main/assets/full_licenses.html
index eb69f2fe..a32190df 100644
--- a/main/src/main/assets/full_licenses.html
+++ b/main/src/main/assets/full_licenses.html
@@ -172,118 +172,115 @@ DEALINGS IN THE SOFTWARE.
See below for the actual license texts. Actually both licenses are BSD-style
Open Source licenses. In case of any license issues related to OpenSSL
please contact openssl-core@openssl.org.</p>
-<pre>
-/* ====================================================================
- * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. All advertising materials mentioning features or use of this
- * software must display the following acknowledgment:
- * "This product includes software developed by the OpenSSL Project
- * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * openssl-core@openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- * nor may "OpenSSL" appear in their names without prior written
- * permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- * "This product includes software developed by the OpenSSL Project
- * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay@cryptsoft.com). This product includes software written by Tim
- * Hudson (tjh@cryptsoft.com).
- *
- */
-</pre>
+
+<p>/* ====================================================================
+<br> * Copyright (c) 1998-2003 The OpenSSL Project. All rights reserved.
+<br> *
+<br>* Redistribution and use in source and binary forms, with or without
+<br> * modification, are permitted provided that the following conditions
+<br> * are met:
+<br> *
+<br> * 1. Redistributions of source code must retain the above copyright
+<br> * notice, this list of conditions and the following disclaimer.
+<br> *
+<br> * 2. Redistributions in binary form must reproduce the above copyright
+<br> * notice, this list of conditions and the following disclaimer in
+<br> * the documentation and/or other materials provided with the
+<br> * distribution.
+<br> *
+<br> * 3. All advertising materials mentioning features or use of this
+<br> * software must display the following acknowledgment:
+<br> * "This product includes software developed by the OpenSSL Project
+<br> * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+<br> *
+<br> * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+<br> * endorse or promote products derived from this software without
+<br> * prior written permission. For written permission, please contact
+<br> * openssl-core@openssl.org.
+<br> *
+<br> * 5. Products derived from this software may not be called "OpenSSL"
+<br> * nor may "OpenSSL" appear in their names without prior written
+<br> * permission of the OpenSSL Project.
+<br> *
+<br> * 6. Redistributions of any form whatsoever must retain the following
+<br> * acknowledgment:
+<br> * "This product includes software developed by the OpenSSL Project
+<br> * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+<br> *
+<br> * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+<br> * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+<br> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+<br> * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+<br> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+<br> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+<br> * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+<br> * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+<br> * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+<br> * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+<br> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+<br> * OF THE POSSIBILITY OF SUCH DAMAGE.
+<br> * ====================================================================
+<br> *
+<br> * This product includes cryptographic software written by Eric Young
+<br> * (eay@cryptsoft.com). This product includes software written by Tim
+<br> * Hudson (tjh@cryptsoft.com).
+<br> *
+<br> */
<h3> Original SSLeay License</h3>
-<pre>
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-</pre>
+<br> /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+<br> * All rights reserved.
+<br> *
+<br> * This package is an SSL implementation written
+<br> * by Eric Young (eay@cryptsoft.com).
+<br> * The implementation was written so as to conform with Netscapes SSL.
+<br> *
+<br> * This library is free for commercial and non-commercial use as long as
+<br> * the following conditions are aheared to. The following conditions
+<br> * apply to all code found in this distribution, be it the RC4, RSA,
+<br> * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+<br> * included with this distribution is covered by the same copyright terms
+<br> * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+<br> *
+<br> * Copyright remains Eric Young's, and as such any Copyright notices in
+<br> * the code are not to be removed.
+<br> * If this package is used in a product, Eric Young should be given attribution
+<br> * as the author of the parts of the library used.
+<br> * This can be in the form of a textual message at program startup or
+<br> * in documentation (online or textual) provided with the package.
+<br> *
+<br> * Redistribution and use in source and binary forms, with or without
+<br> * modification, are permitted provided that the following conditions
+<br> * are met:
+<br> * 1. Redistributions of source code must retain the copyright
+<br> * notice, this list of conditions and the following disclaimer.
+<br> * 2. Redistributions in binary form must reproduce the above copyright
+<br> * notice, this list of conditions and the following disclaimer in the
+<br> * documentation and/or other materials provided with the distribution.
+<br> * 3. All advertising materials mentioning features or use of this software
+<br> * must display the following acknowledgement:
+<br> * "This product includes cryptographic software written by
+<br> * Eric Young (eay@cryptsoft.com)"
+<br> * The word 'cryptographic' can be left out if the rouines from the library
+<br> * being used are not cryptographic related :-).
+<br> * 4. If you include any Windows specific code (or a derivative thereof) from
+<br> * the apps directory (application code) you must include an acknowledgement:
+<br> * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+<br> *
+<br> * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+<br> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+<br> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+<br> * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+<br> * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+<br> * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+<br> * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+<br> * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+<br> * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+<br> * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+<br> * SUCH DAMAGE.
+<br> *
+<br> * The licence and distribution terms for any publically available version or
+<br> * derivative of this code cannot be changed. i.e. this code cannot simply be
+<br> * copied and put under another distribution licence
+<br> * [including the GNU Public Licence.]
+<br> */
diff --git a/main/src/main/java/de/blinkt/openvpn/fragments/AboutFragment.java b/main/src/main/java/de/blinkt/openvpn/fragments/AboutFragment.java
index 98fc7c9a..4fce6eaa 100644
--- a/main/src/main/java/de/blinkt/openvpn/fragments/AboutFragment.java
+++ b/main/src/main/java/de/blinkt/openvpn/fragments/AboutFragment.java
@@ -16,6 +16,7 @@ import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
+import android.text.Html;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.method.LinkMovementMethod;
@@ -25,7 +26,6 @@ import android.util.Pair;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.webkit.WebView;
import android.widget.TextView;
import com.android.vending.billing.IInAppBillingService;
@@ -33,6 +33,7 @@ import com.android.vending.billing.IInAppBillingService;
import org.json.JSONException;
import org.json.JSONObject;
+import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
@@ -288,12 +289,30 @@ public class AboutFragment extends Fragment implements View.OnClickListener {
else
translation.setText(R.string.translationby);
- WebView wv = (WebView)v.findViewById(R.id.webView);
- wv.loadUrl("file:///android_asset/full_licenses.html");
-
+ TextView wv = (TextView) v.findViewById(R.id.full_licenses);
+ wv.setText(Html.fromHtml(readHtmlFromAssets()));
return v;
}
+ String readHtmlFromAssets()
+ {
+ InputStream mvpn;
+
+ try {
+ mvpn = getActivity().getAssets().open("full_licenses.html");
+ BufferedReader reader = new BufferedReader(new InputStreamReader(mvpn));
+ StringBuilder sb = new StringBuilder();
+ String line = null;
+ while ((line = reader.readLine()) != null) {
+ sb.append(line).append("\n");
+ }
+ reader.close();
+ return sb.toString();
+ } catch (IOException errabi) {
+ return "full_licenses.html not found";
+ }
+ }
+
@Override
public void onActivityCreated(Bundle savedInstanceState) {
diff --git a/main/src/main/res/layout/about.xml b/main/src/main/res/layout/about.xml
index 09a872f7..2ab9a4f3 100644
--- a/main/src/main/res/layout/about.xml
+++ b/main/src/main/res/layout/about.xml
@@ -182,10 +182,10 @@
android:text="@string/full_licenses"
android:textAppearance="?android:attr/textAppearanceLarge" />
- <WebView
+ <TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:id="@+id/webView"
+ android:id="@+id/full_licenses"
android:layout_gravity="center_horizontal" />
</LinearLayout>
diff --git a/main/src/main/res/values/untranslatable.xml b/main/src/main/res/values/untranslatable.xml
index 94012670..d7113fa4 100644
--- a/main/src/main/res/values/untranslatable.xml
+++ b/main/src/main/res/values/untranslatable.xml
@@ -5,20 +5,27 @@
<resources>
- <string name="copyright_blinktgui" translatable="false">Copyright 2012–2016 Arne Schwabe &lt;arne@rfc2549.org></string>
- <string name="copyright_logo" translatable="false">App Logo design by Helen Beierling &lt;helbeierling@t-online.de></string>
+ <string name="copyright_blinktgui" translatable="false">Copyright 2012–2016 Arne Schwabe &lt;arne@rfc2549.org>
+ </string>
+ <string name="copyright_logo" translatable="false">App Logo design by Helen Beierling
+ &lt;helbeierling@t-online.de>
+ </string>
<string name="opevpn_copyright" translatable="false">Copyright © 2002–2010 OpenVPN Technologies, Inc. &lt;sales@openvpn.net>\n
- "OpenVPN" is a trademark of OpenVPN Technologies, Inc.\n</string>
+ "OpenVPN" is a trademark of OpenVPN Technologies, Inc.\n
+ </string>
<string name="defaultserver" translatable="false">openvpn.uni-paderborn.de</string>
<string name="defaultport" translatable="false">1194</string>
<string name="copyright_file_dialog" translatable="false">File Dialog based on work by Alexander Ponomarev</string>
- <string name="lzo_copyright" translatable="false">Copyright © 1996 – 2011 Markus Franz Xaver Johannes Oberhumer</string>
- <string name="copyright_openssl" translatable="false"> This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit\n
+ <string name="lzo_copyright" translatable="false">Copyright © 1996 – 2011 Markus Franz Xaver Johannes Oberhumer
+ </string>
+ <string name="copyright_openssl" translatable="false">This product includes software developed by the OpenSSL
+ Project for use in the OpenSSL Toolkit\n
Copyright © 1998-2008 The OpenSSL Project. All rights reserved.\n\n
This product includes cryptographic software written by Eric Young (eay@cryptsoft.com)\n
- Copyright © 1995-1998 Eric Young (eay@cryptsoft.com) All rights reserved.</string>
+ Copyright © 1995-1998 Eric Young (eay@cryptsoft.com) All rights reserved.
+ </string>
<string name="openvpn" translatable="false">OpenVPN</string>
<string name="file_dialog" translatable="false">File Dialog</string>
<string name="lzo" translatable="false">LZO</string>
@@ -26,7 +33,9 @@
<string name="unknown_state" translatable="false">Unknown state</string>
<string name="permission_description">Allows another app to control OpenVPN</string>
<string name="bouncy_castle" translatable="false">Bouncy Castle Crypto APIs</string>
- <string name="copyright_bouncycastle" translatable="false">Copyright © 2000–2012 The Legion Of The Bouncy Castle (http://www.bouncycastle.org)</string>
+ <string name="copyright_bouncycastle" translatable="false">Copyright © 2000–2012 The Legion Of The Bouncy Castle
+ (http://www.bouncycastle.org)
+ </string>
<string-array name="tls_directions_values" translatable="false">
<item>0</item>
@@ -52,7 +61,8 @@
<!-- APP restriction strings -->
<string name="apprest_uuid_desc">Unique UUID that identifies the profile (example:
- 0E910C15–9A85-4DD9-AE0D-E6862392E638). Generate using uuidgen or similar tools</string>
+ 0E910C15–9A85-4DD9-AE0D-E6862392E638). Generate using uuidgen or similar tools
+ </string>
<string name="apprest_uuid">UUID</string>
<string name="apprest_ovpn_desc">Content of the OpenVPN configuration file</string>
<string name="apprest_ovpn">Config</string>
@@ -62,5 +72,4 @@
<string name="apprest_vpnconf">VPN configuration</string>
<string name="apprest_ver">Version of the managed configuration schema</string>
-
</resources>