From c3d38c18a350ca1f07cf662b47bb72ba3f5c66a5 Mon Sep 17 00:00:00 2001 From: Alexander Bakker Date: Mon, 10 Aug 2020 18:49:53 +0200 Subject: [PATCH] Update the list of licenses of our dependencies --- .../{ui/glide => licenses}/GlideLicense.java | 2 +- .../aegis/licenses/ProtobufLicense.java | 34 ++++++++ .../aegis/ui/AboutActivity.java | 5 +- app/src/main/res/raw/notices.xml | 79 +++++++++++-------- app/src/main/res/raw/protobuf_license.txt | 32 ++++++++ 5 files changed, 117 insertions(+), 35 deletions(-) rename app/src/main/java/com/beemdevelopment/aegis/{ui/glide => licenses}/GlideLicense.java (94%) create mode 100644 app/src/main/java/com/beemdevelopment/aegis/licenses/ProtobufLicense.java create mode 100644 app/src/main/res/raw/protobuf_license.txt diff --git a/app/src/main/java/com/beemdevelopment/aegis/ui/glide/GlideLicense.java b/app/src/main/java/com/beemdevelopment/aegis/licenses/GlideLicense.java similarity index 94% rename from app/src/main/java/com/beemdevelopment/aegis/ui/glide/GlideLicense.java rename to app/src/main/java/com/beemdevelopment/aegis/licenses/GlideLicense.java index ad301d27..3d3435d2 100644 --- a/app/src/main/java/com/beemdevelopment/aegis/ui/glide/GlideLicense.java +++ b/app/src/main/java/com/beemdevelopment/aegis/licenses/GlideLicense.java @@ -1,4 +1,4 @@ -package com.beemdevelopment.aegis.ui.glide; +package com.beemdevelopment.aegis.licenses; import android.content.Context; diff --git a/app/src/main/java/com/beemdevelopment/aegis/licenses/ProtobufLicense.java b/app/src/main/java/com/beemdevelopment/aegis/licenses/ProtobufLicense.java new file mode 100644 index 00000000..f6b937fa --- /dev/null +++ b/app/src/main/java/com/beemdevelopment/aegis/licenses/ProtobufLicense.java @@ -0,0 +1,34 @@ +package com.beemdevelopment.aegis.licenses; + +import android.content.Context; + +import com.beemdevelopment.aegis.R; + +import de.psdev.licensesdialog.licenses.License; + +public class ProtobufLicense extends License { + @Override + public String getName() { + return "Protocol Buffers License"; + } + + @Override + public String readSummaryTextFromResources(Context context) { + return getContent(context, R.raw.protobuf_license); + } + + @Override + public String readFullTextFromResources(Context context) { + return getContent(context, R.raw.protobuf_license); + } + + @Override + public String getVersion() { + return null; + } + + @Override + public String getUrl() { + return "https://raw.githubusercontent.com/protocolbuffers/protobuf/master/LICENSE"; + } +} diff --git a/app/src/main/java/com/beemdevelopment/aegis/ui/AboutActivity.java b/app/src/main/java/com/beemdevelopment/aegis/ui/AboutActivity.java index c9fab821..a08e6248 100644 --- a/app/src/main/java/com/beemdevelopment/aegis/ui/AboutActivity.java +++ b/app/src/main/java/com/beemdevelopment/aegis/ui/AboutActivity.java @@ -19,7 +19,8 @@ import com.beemdevelopment.aegis.BuildConfig; import com.beemdevelopment.aegis.R; import com.beemdevelopment.aegis.Theme; import com.beemdevelopment.aegis.helpers.ThemeHelper; -import com.beemdevelopment.aegis.ui.glide.GlideLicense; +import com.beemdevelopment.aegis.licenses.GlideLicense; +import com.beemdevelopment.aegis.licenses.ProtobufLicense; import com.mikepenz.iconics.context.IconicsLayoutInflater2; import de.psdev.licensesdialog.LicenseResolver; @@ -125,6 +126,8 @@ public class AboutActivity extends AegisActivity { stylesheet = String.format(stylesheet, backgroundColor, textColor, licenseColor, linkColor); LicenseResolver.registerLicense(new GlideLicense()); + LicenseResolver.registerLicense(new ProtobufLicense()); + new LicensesDialog.Builder(this) .setNotices(R.raw.notices) .setTitle(R.string.licenses) diff --git a/app/src/main/res/raw/notices.xml b/app/src/main/res/raw/notices.xml index d6172340..685d034c 100644 --- a/app/src/main/res/raw/notices.xml +++ b/app/src/main/res/raw/notices.xml @@ -1,15 +1,21 @@ - TextDrawable - https://github.com/amulyakhare/TextDrawable - Copyright (C) 2014 Amulya Khare + Android Jetpack Libraries + https://developer.android.com/jetpack/androidx + Copyright (C) 2020 The Android Open Source Project + Apache Software License 2.0 + + + Bouncy Castle + https://www.bouncycastle.org/ + Copyright (c) 2000-2020 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org) MIT License - Preferencex - https://github.com/takisoft/preferencex-android - + CircleImageView + https://github.com/hdodenhof/CircleImageView + Copyright 2014 - 2019 Henning Dodenhof Apache Software License 2.0 @@ -19,8 +25,18 @@ Apache Software License 2.0 - AppIntro - https://github.com/AppIntro/AppIntro + Guava + https://github.com/google/guava + Apache Software License 2.0 + + + Glide + https://github.com/bumptech/glide + Glide License + + + Iconics + https://github.com/mikepenz/Android-Iconics Apache Software License 2.0 @@ -31,48 +47,45 @@ MIT License - Bouncy Castle - https://www.bouncycastle.org/ - Copyright (c) 2000-2019 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org) - MIT License + libsu + https://github.com/topjohnwu/libsu + Apache Software License 2.0 - CircleImageView - https://github.com/hdodenhof/CircleImageView - Copyright 2014 - 2019 Henning Dodenhof + LicensesDialog + https://github.com/PSDev/LicensesDialog Apache Software License 2.0 - Barcodescanner - https://github.com/dm77/barcodescanner - Copyright (c) 2014 Dushyanth Maguluru + Material Components for Android + https://github.com/material-components/material-components-android Apache Software License 2.0 - libsu - https://github.com/topjohnwu/libsu - Apache Software License 2.0 + Protocol Buffers + https://github.com/protocolbuffers/protobuf/tree/master/java + Protocol Buffers License - Glide - https://github.com/bumptech/glide - Glide License + TextDrawable + https://github.com/amulyakhare/TextDrawable + Copyright (C) 2014 Amulya Khare + MIT License - Iconics - https://github.com/mikepenz/Android-Iconics - + Zip4j + https://github.com/srikanth-lingala/zip4j Apache Software License 2.0 - Android Support Libraries - http://developer.android.com/tools/support-library/index.html - Copyright (C) 2016 The Android Open Source Project - Apache Software License 2.0 + zxcvbn4j + https://github.com/nulab/zxcvbn4j + Copyright (c) 2014 Nulab Inc + MIT License - SQLCipher for Android - https://github.com/sqlcipher/android-database-sqlcipher + ZXing Buffers + https://github.com/zxing/zxing Apache Software License 2.0 \ No newline at end of file diff --git a/app/src/main/res/raw/protobuf_license.txt b/app/src/main/res/raw/protobuf_license.txt new file mode 100644 index 00000000..19b305b0 --- /dev/null +++ b/app/src/main/res/raw/protobuf_license.txt @@ -0,0 +1,32 @@ +Copyright 2008 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +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. + +Code generated by the Protocol Buffer compiler is owned by the owner +of the input file used when generating it. This code is not +standalone and requires a support library to be linked with it. This +support library is itself covered by the above license.