mirror of https://github.com/beemdevelopment/Aegis
Switch to AboutLibraries for the third-party license list
The previous library we were using is unmaintained and can't be customized to match the Material 3 theme.pull/1321/head
parent
8001ecb482
commit
60c72d48ee
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"uniqueId": "com.github.avito-tech:krop",
|
||||||
|
"licenses": [
|
||||||
|
"MIT"
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"uniqueId": "com.github.topjohnwu.libsu:.*::regex",
|
||||||
|
"licenses": [
|
||||||
|
"Apache-2.0"
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"uniqueId": "com.amulyakhare:com.amulyakhare.textdrawable",
|
||||||
|
"licenses": [
|
||||||
|
"MIT"
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
package com.beemdevelopment.aegis.helpers;
|
||||||
|
|
||||||
|
import android.content.res.Configuration;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.beemdevelopment.aegis.Preferences;
|
||||||
|
import com.beemdevelopment.aegis.R;
|
||||||
|
import com.beemdevelopment.aegis.Theme;
|
||||||
|
import com.google.android.material.color.DynamicColors;
|
||||||
|
import com.google.android.material.color.DynamicColorsOptions;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class ThemeHelper {
|
||||||
|
private final AppCompatActivity _activity;
|
||||||
|
private final Preferences _prefs;
|
||||||
|
|
||||||
|
public ThemeHelper(AppCompatActivity activity, Preferences prefs) {
|
||||||
|
_activity = activity;
|
||||||
|
_prefs = prefs;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the theme of the activity. The actual style that is set is picked from the
|
||||||
|
* given map, based on the theme configured by the user.
|
||||||
|
*/
|
||||||
|
public void setTheme(Map<Theme, Integer> themeMap) {
|
||||||
|
int theme = themeMap.get(getConfiguredTheme());
|
||||||
|
_activity.setTheme(theme);
|
||||||
|
|
||||||
|
if (_prefs.isDynamicColorsEnabled()) {
|
||||||
|
DynamicColorsOptions.Builder optsBuilder = new DynamicColorsOptions.Builder();
|
||||||
|
if (getConfiguredTheme().equals(Theme.AMOLED)) {
|
||||||
|
optsBuilder.setThemeOverlay(R.style.ThemeOverlay_Aegis_Dynamic_Amoled);
|
||||||
|
}
|
||||||
|
DynamicColors.applyToActivityIfAvailable(_activity, optsBuilder.build());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Theme getConfiguredTheme() {
|
||||||
|
Theme theme = _prefs.getCurrentTheme();
|
||||||
|
|
||||||
|
if (theme == Theme.SYSTEM || theme == Theme.SYSTEM_AMOLED) {
|
||||||
|
int currentNightMode = _activity.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
|
||||||
|
if (currentNightMode == Configuration.UI_MODE_NIGHT_YES) {
|
||||||
|
theme = theme == Theme.SYSTEM_AMOLED ? Theme.AMOLED : Theme.DARK;
|
||||||
|
} else {
|
||||||
|
theme = Theme.LIGHT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return theme;
|
||||||
|
}
|
||||||
|
}
|
@ -1,34 +0,0 @@
|
|||||||
package com.beemdevelopment.aegis.licenses;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
|
|
||||||
import com.beemdevelopment.aegis.R;
|
|
||||||
|
|
||||||
import de.psdev.licensesdialog.licenses.License;
|
|
||||||
|
|
||||||
public class GlideLicense extends License {
|
|
||||||
@Override
|
|
||||||
public String getName() {
|
|
||||||
return "Glide License";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String readSummaryTextFromResources(Context context) {
|
|
||||||
return getContent(context, R.raw.glide_license);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String readFullTextFromResources(Context context) {
|
|
||||||
return getContent(context, R.raw.glide_license);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getVersion() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getUrl() {
|
|
||||||
return "https://github.com/bumptech/glide/blob/master/LICENSE";
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
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";
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,40 @@
|
|||||||
|
package com.beemdevelopment.aegis.ui;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import com.beemdevelopment.aegis.Preferences;
|
||||||
|
import com.beemdevelopment.aegis.R;
|
||||||
|
import com.beemdevelopment.aegis.ThemeMap;
|
||||||
|
import com.beemdevelopment.aegis.helpers.ThemeHelper;
|
||||||
|
import com.mikepenz.aboutlibraries.LibsBuilder;
|
||||||
|
import com.mikepenz.aboutlibraries.ui.LibsActivity;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import dagger.hilt.InstallIn;
|
||||||
|
import dagger.hilt.android.EarlyEntryPoint;
|
||||||
|
import dagger.hilt.android.EarlyEntryPoints;
|
||||||
|
import dagger.hilt.components.SingletonComponent;
|
||||||
|
|
||||||
|
public class LicensesActivity extends LibsActivity {
|
||||||
|
@Override
|
||||||
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
|
LibsBuilder builder = new LibsBuilder()
|
||||||
|
.withSearchEnabled(true)
|
||||||
|
.withAboutMinimalDesign(true)
|
||||||
|
.withActivityTitle(getString(R.string.title_activity_licenses));
|
||||||
|
setIntent(builder.intent(this));
|
||||||
|
|
||||||
|
Preferences _prefs = EarlyEntryPoints.get(getApplicationContext(), PrefEntryPoint.class).getPreferences();
|
||||||
|
ThemeHelper themeHelper = new ThemeHelper(this, _prefs);
|
||||||
|
themeHelper.setTheme(ThemeMap.DEFAULT);
|
||||||
|
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
}
|
||||||
|
|
||||||
|
@EarlyEntryPoint
|
||||||
|
@InstallIn(SingletonComponent.class)
|
||||||
|
public interface PrefEntryPoint {
|
||||||
|
Preferences getPreferences();
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
@ -1,94 +0,0 @@
|
|||||||
License for everything not in third_party and not otherwise marked:
|
|
||||||
|
|
||||||
Copyright 2014 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:
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY GOOGLE, INC. ``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 GOOGLE, INC. 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 views and conclusions contained in the software and documentation are those of the
|
|
||||||
authors and should not be interpreted as representing official policies, either expressed
|
|
||||||
or implied, of Google, Inc.
|
|
||||||
---------------------------------------------------------------------------------------------
|
|
||||||
License for third_party/disklrucache:
|
|
||||||
|
|
||||||
Copyright 2012 Jake Wharton
|
|
||||||
Copyright 2011 The Android Open Source Project
|
|
||||||
|
|
||||||
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.
|
|
||||||
---------------------------------------------------------------------------------------------
|
|
||||||
License for third_party/gif_decoder:
|
|
||||||
|
|
||||||
Copyright (c) 2013 Xcellent Creations, Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
a copy of this software and associated documentation files (the
|
|
||||||
"Software"), to deal in the Software without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be
|
|
||||||
included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
---------------------------------------------------------------------------------------------
|
|
||||||
License for third_party/gif_encoder/AnimatedGifEncoder.java and
|
|
||||||
third_party/gif_encoder/LZWEncoder.java:
|
|
||||||
|
|
||||||
No copyright asserted on the source code of this class. May be used for any
|
|
||||||
purpose, however, refer to the Unisys LZW patent for restrictions on use of
|
|
||||||
the associated LZWEncoder class. Please forward any corrections to
|
|
||||||
kweiner@fmsware.com.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
License for third_party/gif_encoder/NeuQuant.java
|
|
||||||
|
|
||||||
Copyright (c) 1994 Anthony Dekker
|
|
||||||
|
|
||||||
NEUQUANT Neural-Net quantization algorithm by Anthony Dekker, 1994. See
|
|
||||||
"Kohonen neural networks for optimal colour quantization" in "Network:
|
|
||||||
Computation in Neural Systems" Vol. 5 (1994) pp 351-367. for a discussion of
|
|
||||||
the algorithm.
|
|
||||||
|
|
||||||
Any party obtaining a copy of these files from the author, directly or
|
|
||||||
indirectly, is granted, free of charge, a full and unrestricted irrevocable,
|
|
||||||
world-wide, paid up, royalty-free, nonexclusive right and license to deal in
|
|
||||||
this software and documentation files (the "Software"), including without
|
|
||||||
limitation the rights to use, copy, modify, merge, publish, distribute,
|
|
||||||
sublicense, and/or sell copies of the Software, and to permit persons who
|
|
||||||
receive copies from any such party to do so, with the only requirement being
|
|
||||||
that this copyright notice remain intact.
|
|
@ -1,96 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<notices>
|
|
||||||
<notice>
|
|
||||||
<name>Android Jetpack Libraries</name>
|
|
||||||
<url>https://developer.android.com/jetpack/androidx</url>
|
|
||||||
<copyright>Copyright (C) 2020 The Android Open Source Project</copyright>
|
|
||||||
<license>Apache Software License 2.0</license>
|
|
||||||
</notice>
|
|
||||||
<notice>
|
|
||||||
<name>Bouncy Castle</name>
|
|
||||||
<url>https://www.bouncycastle.org/</url>
|
|
||||||
<copyright>Copyright (c) 2000-2020 The Legion of the Bouncy Castle Inc. (http://www.bouncycastle.org)</copyright>
|
|
||||||
<license>MIT License</license>
|
|
||||||
</notice>
|
|
||||||
<notice>
|
|
||||||
<name>CircleImageView</name>
|
|
||||||
<url>https://github.com/hdodenhof/CircleImageView</url>
|
|
||||||
<copyright>Copyright 2014 - 2019 Henning Dodenhof</copyright>
|
|
||||||
<license>Apache Software License 2.0</license>
|
|
||||||
</notice>
|
|
||||||
<notice>
|
|
||||||
<name>FloatingActionButton</name>
|
|
||||||
<url>https://github.com/futuresimple/android-floating-action-button</url>
|
|
||||||
<copyright>Copyright 2014 Jerzy Chalupski</copyright>
|
|
||||||
<license>Apache Software License 2.0</license>
|
|
||||||
</notice>
|
|
||||||
<notice>
|
|
||||||
<name>Guava</name>
|
|
||||||
<url>https://github.com/google/guava</url>
|
|
||||||
<license>Apache Software License 2.0</license>
|
|
||||||
</notice>
|
|
||||||
<notice>
|
|
||||||
<name>Glide</name>
|
|
||||||
<url>https://github.com/bumptech/glide</url>
|
|
||||||
<license>Glide License</license>
|
|
||||||
</notice>
|
|
||||||
<notice>
|
|
||||||
<name>Krop</name>
|
|
||||||
<url>https://github.com/avito-tech/krop</url>
|
|
||||||
<copyright>Copyright (c) 2017 Avito Technology</copyright>
|
|
||||||
<license>MIT License</license>
|
|
||||||
</notice>
|
|
||||||
<notice>
|
|
||||||
<name>libsu</name>
|
|
||||||
<url>https://github.com/topjohnwu/libsu</url>
|
|
||||||
<license>Apache Software License 2.0</license>
|
|
||||||
</notice>
|
|
||||||
<notice>
|
|
||||||
<name>LicensesDialog</name>
|
|
||||||
<url>https://github.com/PSDev/LicensesDialog</url>
|
|
||||||
<license>Apache Software License 2.0</license>
|
|
||||||
</notice>
|
|
||||||
<notice>
|
|
||||||
<name>Material Components for Android</name>
|
|
||||||
<url>https://github.com/material-components/material-components-android</url>
|
|
||||||
<license>Apache Software License 2.0</license>
|
|
||||||
</notice>
|
|
||||||
<notice>
|
|
||||||
<name>Protocol Buffers</name>
|
|
||||||
<url>https://github.com/protocolbuffers/protobuf/tree/master/java</url>
|
|
||||||
<license>Protocol Buffers License</license>
|
|
||||||
</notice>
|
|
||||||
<notice>
|
|
||||||
<name>Simple Flat Mapper</name>
|
|
||||||
<url>https://github.com/arnaudroger/SimpleFlatMapper</url>
|
|
||||||
<copyright>Copyright (c) 2014 Arnaud Roger</copyright>
|
|
||||||
<license>MIT License</license>
|
|
||||||
</notice>
|
|
||||||
<notice>
|
|
||||||
<name>TextDrawable</name>
|
|
||||||
<url>https://github.com/amulyakhare/TextDrawable</url>
|
|
||||||
<copyright>Copyright (C) 2014 Amulya Khare</copyright>
|
|
||||||
<license>MIT License</license>
|
|
||||||
</notice>
|
|
||||||
<notice>
|
|
||||||
<name>Trusted Intents</name>
|
|
||||||
<url>https://github.com/guardianproject/TrustedIntents</url>
|
|
||||||
<license>GNU Lesser General Public License 2.1</license>
|
|
||||||
</notice>
|
|
||||||
<notice>
|
|
||||||
<name>Zip4j</name>
|
|
||||||
<url>https://github.com/srikanth-lingala/zip4j</url>
|
|
||||||
<license>Apache Software License 2.0</license>
|
|
||||||
</notice>
|
|
||||||
<notice>
|
|
||||||
<name>zxcvbn4j</name>
|
|
||||||
<url>https://github.com/nulab/zxcvbn4j</url>
|
|
||||||
<copyright>Copyright (c) 2014 Nulab Inc</copyright>
|
|
||||||
<license>MIT License</license>
|
|
||||||
</notice>
|
|
||||||
<notice>
|
|
||||||
<name>ZXing Buffers</name>
|
|
||||||
<url>https://github.com/zxing/zxing</url>
|
|
||||||
<license>Apache Software License 2.0</license>
|
|
||||||
</notice>
|
|
||||||
</notices>
|
|
@ -1,32 +0,0 @@
|
|||||||
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.
|
|
Loading…
Reference in New Issue