Tweaks, fixes, and kittens

Signed-off-by: androidacy-user <opensource@androidacy.com>
pull/27/head
androidacy-user 3 years ago
parent 482a4d2b90
commit a5cd1daaa7

@ -15,13 +15,11 @@ android {
Properties properties = new Properties()
if (project.rootProject.file('local.properties').exists()) {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
// AndroidStudio generate local.properties, only set values if file is defined.
if (properties.hasProperty('keystore.file')) {
storeFile file(properties.getProperty('keystore.file'))
storePassword properties.getProperty('keystore.password')
keyAlias 'key0'
keyPassword properties.getProperty('keystore.password')
}
// FFS DO NOT CHANGE THIS, IT WILL BREAK THE BUILD
storeFile file(properties.getProperty('keystore.file'))
storePassword properties.getProperty('keystore.password')
keyAlias 'key0'
keyPassword properties.getProperty('keystore.password')
}
}
}
@ -30,8 +28,8 @@ android {
applicationId "com.fox2code.mmm"
minSdk 23
targetSdk 33
versionCode 61
versionName "1.0.1"
versionCode 62
versionName "1.0.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.release
}
@ -89,9 +87,7 @@ android {
}
buildConfigField "String", "SENTRY_TOKEN", '"' + properties.getProperty("auth." + "token") + '"'
} else {
buildConfigField "String", "SENTRY_TOKEN", '""'
}
// Get the androidacy client ID from the androidacy.properties
Properties properties = new Properties()
@ -289,9 +285,6 @@ dependencies {
// Test
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
// Add okhttp logging interceptor if debug build
debugImplementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.10'
}
if (hasSentryConfig) {

@ -22,8 +22,8 @@ public class AndroidacyUtil {
int i; // Check both string and Uri to mitigate parse exploit
return url.startsWith("https://") &&
(i = url.indexOf("/", 8)) != -1 &&
url.substring(8, i).endsWith(".androidacy.com") &&
uri.getHost().endsWith(".androidacy.com");
url.substring(8, i).endsWith("api.androidacy.com") &&
uri.getHost().endsWith("api.androidacy.com");
}
public static boolean isAndroidacyFileUrl(@Nullable String url) {
@ -68,7 +68,7 @@ public class AndroidacyUtil {
// URL decode
moduleId = Uri.decode(moduleId);
// Strip non alphanumeric
moduleId = moduleId.replaceAll("[^a-zA-Z0-9]", "");
moduleId = moduleId.replaceAll("[^a-zA-Z\\d]", "");
return moduleId;
}
if (BuildConfig.DEBUG) {

@ -959,11 +959,7 @@ public class SettingsActivity extends FoxActivity implements LanguageActivity {
if (!homepage.isEmpty()) {
preference.setVisible(true);
preference.setOnPreferenceClickListener(p -> {
if (homepage.startsWith("https://www.androidacy.com/")) {
IntentHelper.openUrlAndroidacy(getFoxActivity(this), homepage, true);
} else {
IntentHelper.openUrl(getFoxActivity(this), homepage);
}
IntentHelper.openUrl(getFoxActivity(this), homepage);
return true;
});
((LongClickablePreference) preference).setOnPreferenceLongClickListener(p -> {

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="fill" android:orientation="vertical" android:paddingLeft="20dp" android:paddingRight="20dp" android:scrollbars="vertical">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="fill" android:orientation="vertical" android:paddingLeft="20dp" android:paddingRight="20dp" android:scrollbars="vertical">
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="crash_reporting_desc">If you disable this, the developer will not get automatic bug reports, and this may make troubleshooting harder</string>
<string name="api_key">Androidacy API Key</string>
</resources>

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="crash_reporting_desc">If you disable this, the developer will not get automatic bug reports, and this may make troubleshooting harder</string>
<string name="api_key">Androidacy API Key</string>
</resources>
Loading…
Cancel
Save