mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-04-19 21:39:18 +00:00
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.
This commit is contained in:
parent
8001ecb482
commit
60c72d48ee
19 changed files with 4020 additions and 375 deletions
|
@ -1,6 +1,7 @@
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'com.google.protobuf'
|
apply plugin: 'com.google.protobuf'
|
||||||
apply plugin: 'dagger.hilt.android.plugin'
|
apply plugin: 'dagger.hilt.android.plugin'
|
||||||
|
apply plugin: 'com.mikepenz.aboutlibraries.plugin'
|
||||||
|
|
||||||
def getCmdOutput = { cmd ->
|
def getCmdOutput = { cmd ->
|
||||||
def stdout = new ByteArrayOutputStream()
|
def stdout = new ByteArrayOutputStream()
|
||||||
|
@ -120,6 +121,17 @@ protobuf {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
aboutLibraries {
|
||||||
|
// Tasks for aboutLibraries are not run automatically to keep the build reproducible
|
||||||
|
// To update manually: ./gradlew app:exportLibraryDefinitions -PaboutLibraries.exportPath=src/main/res/raw
|
||||||
|
prettyPrint = true
|
||||||
|
configPath = "app/config"
|
||||||
|
fetchRemoteFunding = false
|
||||||
|
registerAndroidTasks = false
|
||||||
|
exclusionPatterns = [~"javax.annotation.*"]
|
||||||
|
duplicationMode = com.mikepenz.aboutlibraries.plugin.DuplicateMode.MERGE
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
def cameraxVersion = '1.3.1'
|
def cameraxVersion = '1.3.1'
|
||||||
def glideVersion = '4.16.0'
|
def glideVersion = '4.16.0'
|
||||||
|
@ -161,9 +173,12 @@ dependencies {
|
||||||
implementation 'com.google.android.material:material:1.11.0'
|
implementation 'com.google.android.material:material:1.11.0'
|
||||||
implementation 'com.google.protobuf:protobuf-javalite:3.25.1'
|
implementation 'com.google.protobuf:protobuf-javalite:3.25.1'
|
||||||
implementation 'com.google.zxing:core:3.5.2'
|
implementation 'com.google.zxing:core:3.5.2'
|
||||||
|
implementation("com.mikepenz:aboutlibraries:11.1.0") {
|
||||||
|
exclude group: 'com.mikepenz', module: 'aboutlibraries-core'
|
||||||
|
}
|
||||||
|
implementation "com.mikepenz:aboutlibraries-core-android:11.1.0"
|
||||||
implementation 'com.nulab-inc:zxcvbn:1.8.2'
|
implementation 'com.nulab-inc:zxcvbn:1.8.2'
|
||||||
implementation 'de.hdodenhof:circleimageview:3.1.0'
|
implementation 'de.hdodenhof:circleimageview:3.1.0'
|
||||||
implementation 'de.psdev.licensesdialog:licensesdialog:2.2.0'
|
|
||||||
implementation 'net.lingala.zip4j:zip4j:2.11.5'
|
implementation 'net.lingala.zip4j:zip4j:2.11.5'
|
||||||
implementation 'info.guardianproject.trustedintents:trustedintents:0.2'
|
implementation 'info.guardianproject.trustedintents:trustedintents:0.2'
|
||||||
implementation 'org.bouncycastle:bcprov-jdk18on:1.77'
|
implementation 'org.bouncycastle:bcprov-jdk18on:1.77'
|
||||||
|
|
6
app/config/libraries/krop.json
Normal file
6
app/config/libraries/krop.json
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"uniqueId": "com.github.avito-tech:krop",
|
||||||
|
"licenses": [
|
||||||
|
"MIT"
|
||||||
|
]
|
||||||
|
}
|
6
app/config/libraries/libsu.json
Normal file
6
app/config/libraries/libsu.json
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"uniqueId": "com.github.topjohnwu.libsu:.*::regex",
|
||||||
|
"licenses": [
|
||||||
|
"Apache-2.0"
|
||||||
|
]
|
||||||
|
}
|
6
app/config/libraries/textdrawable.json
Normal file
6
app/config/libraries/textdrawable.json
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"uniqueId": "com.amulyakhare:com.amulyakhare.textdrawable",
|
||||||
|
"licenses": [
|
||||||
|
"MIT"
|
||||||
|
]
|
||||||
|
}
|
|
@ -82,6 +82,8 @@
|
||||||
android:label="@string/title_activity_manage_groups" />
|
android:label="@string/title_activity_manage_groups" />
|
||||||
<activity android:name=".ui.AssignIconsActivity"
|
<activity android:name=".ui.AssignIconsActivity"
|
||||||
android:label="@string/title_activity_assign_icons"/>
|
android:label="@string/title_activity_assign_icons"/>
|
||||||
|
<activity android:name=".ui.LicensesActivity"
|
||||||
|
android:label="@string/title_activity_licenses"/>
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.PanicResponderActivity"
|
android:name=".ui.PanicResponderActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
|
|
@ -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";
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -16,15 +16,10 @@ import androidx.annotation.StringRes;
|
||||||
|
|
||||||
import com.beemdevelopment.aegis.BuildConfig;
|
import com.beemdevelopment.aegis.BuildConfig;
|
||||||
import com.beemdevelopment.aegis.R;
|
import com.beemdevelopment.aegis.R;
|
||||||
import com.beemdevelopment.aegis.licenses.GlideLicense;
|
|
||||||
import com.beemdevelopment.aegis.licenses.ProtobufLicense;
|
|
||||||
import com.beemdevelopment.aegis.ui.dialogs.ChangelogDialog;
|
import com.beemdevelopment.aegis.ui.dialogs.ChangelogDialog;
|
||||||
import com.beemdevelopment.aegis.ui.dialogs.LicenseDialog;
|
import com.beemdevelopment.aegis.ui.dialogs.LicenseDialog;
|
||||||
import com.google.android.material.color.MaterialColors;
|
import com.google.android.material.color.MaterialColors;
|
||||||
|
|
||||||
import de.psdev.licensesdialog.LicenseResolver;
|
|
||||||
import de.psdev.licensesdialog.LicensesDialog;
|
|
||||||
|
|
||||||
public class AboutActivity extends AegisActivity {
|
public class AboutActivity extends AegisActivity {
|
||||||
|
|
||||||
private static String GITHUB = "https://github.com/beemdevelopment/Aegis";
|
private static String GITHUB = "https://github.com/beemdevelopment/Aegis";
|
||||||
|
@ -53,12 +48,15 @@ public class AboutActivity extends AegisActivity {
|
||||||
View btnLicense = findViewById(R.id.btn_license);
|
View btnLicense = findViewById(R.id.btn_license);
|
||||||
btnLicense.setOnClickListener(v -> {
|
btnLicense.setOnClickListener(v -> {
|
||||||
LicenseDialog.create()
|
LicenseDialog.create()
|
||||||
.setTheme(getConfiguredTheme())
|
.setTheme(_themeHelper.getConfiguredTheme())
|
||||||
.show(getSupportFragmentManager(), null);
|
.show(getSupportFragmentManager(), null);
|
||||||
});
|
});
|
||||||
|
|
||||||
View btnThirdPartyLicenses = findViewById(R.id.btn_third_party_licenses);
|
View btnThirdPartyLicenses = findViewById(R.id.btn_third_party_licenses);
|
||||||
btnThirdPartyLicenses.setOnClickListener(v -> showThirdPartyLicenseDialog());
|
btnThirdPartyLicenses.setOnClickListener(v -> {
|
||||||
|
Intent intent = new Intent(this, LicensesActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
});
|
||||||
|
|
||||||
TextView appVersion = findViewById(R.id.app_version);
|
TextView appVersion = findViewById(R.id.app_version);
|
||||||
appVersion.setText(getCurrentAppVersion());
|
appVersion.setText(getCurrentAppVersion());
|
||||||
|
@ -89,7 +87,7 @@ public class AboutActivity extends AegisActivity {
|
||||||
View btnChangelog = findViewById(R.id.btn_changelog);
|
View btnChangelog = findViewById(R.id.btn_changelog);
|
||||||
btnChangelog.setOnClickListener(v -> {
|
btnChangelog.setOnClickListener(v -> {
|
||||||
ChangelogDialog.create()
|
ChangelogDialog.create()
|
||||||
.setTheme(getConfiguredTheme())
|
.setTheme(_themeHelper.getConfiguredTheme())
|
||||||
.show(getSupportFragmentManager(), null);
|
.show(getSupportFragmentManager(), null);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -126,27 +124,6 @@ public class AboutActivity extends AegisActivity {
|
||||||
startActivity(Intent.createChooser(mailIntent, getString(R.string.email)));
|
startActivity(Intent.createChooser(mailIntent, getString(R.string.email)));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showThirdPartyLicenseDialog() {
|
|
||||||
String stylesheet = getString(R.string.custom_notices_format_style);
|
|
||||||
String backgroundColor = getThemeColorAsHex(com.google.android.material.R.attr.colorSurfaceContainerLow);
|
|
||||||
String textColor = getThemeColorAsHex(com.google.android.material.R.attr.colorOnSurface);
|
|
||||||
String licenseColor = getThemeColorAsHex(com.google.android.material.R.attr.colorSurfaceContainerLow);
|
|
||||||
String linkColor = getThemeColorAsHex(com.google.android.material.R.attr.colorAccent);
|
|
||||||
|
|
||||||
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.third_party_licenses)
|
|
||||||
.setNoticesCssStyle(stylesheet)
|
|
||||||
.setIncludeOwnLicense(true)
|
|
||||||
.build()
|
|
||||||
.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getThemeColorAsHex(@AttrRes int attributeId) {
|
private String getThemeColorAsHex(@AttrRes int attributeId) {
|
||||||
int color = MaterialColors.getColor(this, attributeId, getClass().getCanonicalName());
|
int color = MaterialColors.getColor(this, attributeId, getClass().getCanonicalName());
|
||||||
return String.format("%06X", 0xFFFFFF & color);
|
return String.format("%06X", 0xFFFFFF & color);
|
||||||
|
|
|
@ -20,20 +20,17 @@ import androidx.core.view.ViewPropertyAnimatorCompat;
|
||||||
|
|
||||||
import com.beemdevelopment.aegis.Preferences;
|
import com.beemdevelopment.aegis.Preferences;
|
||||||
import com.beemdevelopment.aegis.R;
|
import com.beemdevelopment.aegis.R;
|
||||||
import com.beemdevelopment.aegis.Theme;
|
|
||||||
import com.beemdevelopment.aegis.ThemeMap;
|
import com.beemdevelopment.aegis.ThemeMap;
|
||||||
|
import com.beemdevelopment.aegis.helpers.ThemeHelper;
|
||||||
import com.beemdevelopment.aegis.icons.IconPackManager;
|
import com.beemdevelopment.aegis.icons.IconPackManager;
|
||||||
import com.beemdevelopment.aegis.vault.VaultManager;
|
import com.beemdevelopment.aegis.vault.VaultManager;
|
||||||
import com.beemdevelopment.aegis.vault.VaultRepositoryException;
|
import com.beemdevelopment.aegis.vault.VaultRepositoryException;
|
||||||
import com.google.android.material.color.DynamicColors;
|
|
||||||
import com.google.android.material.color.DynamicColorsOptions;
|
|
||||||
import com.google.android.material.color.MaterialColors;
|
import com.google.android.material.color.MaterialColors;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
@ -46,6 +43,7 @@ import dagger.hilt.components.SingletonComponent;
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
public abstract class AegisActivity extends AppCompatActivity implements VaultManager.LockListener {
|
public abstract class AegisActivity extends AppCompatActivity implements VaultManager.LockListener {
|
||||||
protected Preferences _prefs;
|
protected Preferences _prefs;
|
||||||
|
protected ThemeHelper _themeHelper;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
protected VaultManager _vaultManager;
|
protected VaultManager _vaultManager;
|
||||||
|
@ -59,6 +57,7 @@ public abstract class AegisActivity extends AppCompatActivity implements VaultMa
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
// set the theme and locale before creating the activity
|
// set the theme and locale before creating the activity
|
||||||
_prefs = EarlyEntryPoints.get(getApplicationContext(), PrefEntryPoint.class).getPreferences();
|
_prefs = EarlyEntryPoints.get(getApplicationContext(), PrefEntryPoint.class).getPreferences();
|
||||||
|
_themeHelper = new ThemeHelper(this, _prefs);
|
||||||
onSetTheme();
|
onSetTheme();
|
||||||
setLocale(_prefs.getLocale());
|
setLocale(_prefs.getLocale());
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -111,39 +110,7 @@ public abstract class AegisActivity extends AppCompatActivity implements VaultMa
|
||||||
* Called when the activity is expected to set its theme.
|
* Called when the activity is expected to set its theme.
|
||||||
*/
|
*/
|
||||||
protected void onSetTheme() {
|
protected void onSetTheme() {
|
||||||
setTheme(ThemeMap.DEFAULT);
|
_themeHelper.setTheme(ThemeMap.DEFAULT);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
protected void setTheme(Map<Theme, Integer> themeMap) {
|
|
||||||
int theme = themeMap.get(getConfiguredTheme());
|
|
||||||
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(this, optsBuilder.build());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Theme getConfiguredTheme() {
|
|
||||||
Theme theme = _prefs.getCurrentTheme();
|
|
||||||
|
|
||||||
if (theme == Theme.SYSTEM || theme == Theme.SYSTEM_AMOLED) {
|
|
||||||
int currentNightMode = 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setLocale(Locale locale) {
|
protected void setLocale(Locale locale) {
|
||||||
|
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
|
@ -89,7 +89,7 @@ public class ScannerActivity extends AegisActivity implements QrCodeAnalyzer.Lis
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onSetTheme() {
|
protected void onSetTheme() {
|
||||||
setTheme(ThemeMap.FULLSCREEN);
|
_themeHelper.setTheme(ThemeMap.FULLSCREEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -152,7 +152,7 @@ public class TransferEntriesActivity extends AegisActivity {
|
||||||
_entriesCount.setText(getResources().getQuantityString(R.plurals.qr_count, _authInfos.size(), _currentEntryCount, _authInfos.size()));
|
_entriesCount.setText(getResources().getQuantityString(R.plurals.qr_count, _authInfos.size(), _currentEntryCount, _authInfos.size()));
|
||||||
|
|
||||||
@ColorInt int backgroundColor = Color.WHITE;
|
@ColorInt int backgroundColor = Color.WHITE;
|
||||||
if (getConfiguredTheme() == Theme.LIGHT) {
|
if (_themeHelper.getConfiguredTheme() == Theme.LIGHT) {
|
||||||
TypedValue typedValue = new TypedValue();
|
TypedValue typedValue = new TypedValue();
|
||||||
getTheme().resolveAttribute(androidx.appcompat.R.attr.background, typedValue, true);
|
getTheme().resolveAttribute(androidx.appcompat.R.attr.background, typedValue, true);
|
||||||
backgroundColor = typedValue.data;
|
backgroundColor = typedValue.data;
|
||||||
|
|
3872
app/src/main/res/raw/aboutlibraries.json
Normal file
3872
app/src/main/res/raw/aboutlibraries.json
Normal file
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.
|
|
|
@ -420,22 +420,6 @@
|
||||||
<string name="backup_plaintext_warning_explanation">This warning is shown because you recently exported an unencrypted copy of the vault. To maintain security of your tokens, we recommend deleting this file once it\'s no longer needed.</string>
|
<string name="backup_plaintext_warning_explanation">This warning is shown because you recently exported an unencrypted copy of the vault. To maintain security of your tokens, we recommend deleting this file once it\'s no longer needed.</string>
|
||||||
<string name="switch_camera">Switch camera</string>
|
<string name="switch_camera">Switch camera</string>
|
||||||
|
|
||||||
<string name="custom_notices_format_style" translatable="false" >
|
|
||||||
body {
|
|
||||||
background-color: #%1$s;
|
|
||||||
color: #%2$s;
|
|
||||||
font-family: sans-serif;
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
}
|
|
||||||
pre {
|
|
||||||
background-color: #%3$s;
|
|
||||||
padding: 1em;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color: #%4$s;
|
|
||||||
}
|
|
||||||
</string>
|
|
||||||
<string name="empty_list">There are no codes to be shown. Start adding entries by tapping the plus sign in the bottom right corner</string>
|
<string name="empty_list">There are no codes to be shown. Start adding entries by tapping the plus sign in the bottom right corner</string>
|
||||||
<string name="empty_list_title">No entries found</string>
|
<string name="empty_list_title">No entries found</string>
|
||||||
<string name="empty_group_list">There are no groups to be shown. Add groups in the edit screen of an entry</string>
|
<string name="empty_group_list">There are no groups to be shown. Add groups in the edit screen of an entry</string>
|
||||||
|
@ -474,6 +458,7 @@
|
||||||
<string name="title_activity_scan_qr">Scan a QR code</string>
|
<string name="title_activity_scan_qr">Scan a QR code</string>
|
||||||
<string name="title_activity_import_entries">Import entries</string>
|
<string name="title_activity_import_entries">Import entries</string>
|
||||||
<string name="title_activity_assign_icons">Assign icons</string>
|
<string name="title_activity_assign_icons">Assign icons</string>
|
||||||
|
<string name="title_activity_licenses">Third-party licenses</string>
|
||||||
<string name="dialog_wipe_entries_title">Wipe entries</string>
|
<string name="dialog_wipe_entries_title">Wipe entries</string>
|
||||||
<string name="dialog_wipe_entries_message">Your vault already contains entries. Do you want to remove these entries before importing this file?\n\n<b>In doing so, you will permanently lose access to the existing entries in the vault.</b></string>
|
<string name="dialog_wipe_entries_message">Your vault already contains entries. Do you want to remove these entries before importing this file?\n\n<b>In doing so, you will permanently lose access to the existing entries in the vault.</b></string>
|
||||||
<string name="dialog_wipe_entries_checkbox">Wipe vault contents</string>
|
<string name="dialog_wipe_entries_checkbox">Wipe vault contents</string>
|
||||||
|
|
|
@ -15,6 +15,10 @@ buildscript {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id 'com.mikepenz.aboutlibraries.plugin' version '11.1.0'
|
||||||
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
Loading…
Add table
Reference in a new issue