From 11981b7154cb46e17d237d1e18930f0f5530a4f3 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Mon, 16 Jul 2018 20:39:18 +0200 Subject: Implement about full licenses as simple TextView instead of Webview --- main/src/main/assets/full_licenses.html | 223 ++++++++++----------- .../de/blinkt/openvpn/fragments/AboutFragment.java | 27 ++- main/src/main/res/layout/about.xml | 4 +- main/src/main/res/values/untranslatable.xml | 27 ++- 4 files changed, 153 insertions(+), 128 deletions(-) (limited to 'main') 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.

-
-/* ====================================================================
- * 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).
- *
- */
-
+ +

/* ==================================================================== +
* 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). +
* +
*/

Original SSLeay License

-
-/* 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.]
- */
-
+
/* 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.] +
*/ 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" /> - 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 @@ - Copyright 2012–2016 Arne Schwabe <arne@rfc2549.org> - App Logo design by Helen Beierling <helbeierling@t-online.de> + Copyright 2012–2016 Arne Schwabe <arne@rfc2549.org> + + App Logo design by Helen Beierling + <helbeierling@t-online.de> + Copyright © 2002–2010 OpenVPN Technologies, Inc. <sales@openvpn.net>\n - "OpenVPN" is a trademark of OpenVPN Technologies, Inc.\n + "OpenVPN" is a trademark of OpenVPN Technologies, Inc.\n + openvpn.uni-paderborn.de 1194 File Dialog based on work by Alexander Ponomarev - Copyright © 1996 – 2011 Markus Franz Xaver Johannes Oberhumer - This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit\n + Copyright © 1996 – 2011 Markus Franz Xaver Johannes Oberhumer + + 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. + Copyright © 1995-1998 Eric Young (eay@cryptsoft.com) All rights reserved. + OpenVPN File Dialog LZO @@ -26,7 +33,9 @@ Unknown state Allows another app to control OpenVPN Bouncy Castle Crypto APIs - Copyright © 2000–2012 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) + Copyright © 2000–2012 The Legion Of The Bouncy Castle + (http://www.bouncycastle.org) + 0 @@ -52,7 +61,8 @@ Unique UUID that identifies the profile (example: - 0E910C15–9A85-4DD9-AE0D-E6862392E638). Generate using uuidgen or similar tools + 0E910C15–9A85-4DD9-AE0D-E6862392E638). Generate using uuidgen or similar tools + UUID Content of the OpenVPN configuration file Config @@ -62,5 +72,4 @@ VPN configuration Version of the managed configuration schema - -- cgit v1.2.3