From a8877af824309c78c1b5e469f1cfa3b48d7f5967 Mon Sep 17 00:00:00 2001 From: androidacy-user Date: Wed, 14 Dec 2022 21:14:27 -0500 Subject: [PATCH] Tweak setup wizard and fix tests Signed-off-by: androidacy-user --- app/build.gradle | 2 + .../java/com/fox2code/mmm/MainActivity.java | 3 +- app/src/main/res/layout/setup_box.xml | 74 ++++++++----------- app/src/main/res/values/strings.xml | 23 +++--- app/src/main/res/xml/repo_preferences.xml | 6 ++ 5 files changed, 51 insertions(+), 57 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 6d5b5bf..bc59db5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -126,6 +126,8 @@ android { properties.load(fis) } buildConfigField "String", "SENTRY_TOKEN", '"' + properties.getProperty("auth." + "token") + '"' + } else { + buildConfigField "String", "SENTRY_TOKEN", '""' } // Repo with ads or tracking feature are disabled by default for the diff --git a/app/src/main/java/com/fox2code/mmm/MainActivity.java b/app/src/main/java/com/fox2code/mmm/MainActivity.java index 069073b..99bfeea 100644 --- a/app/src/main/java/com/fox2code/mmm/MainActivity.java +++ b/app/src/main/java/com/fox2code/mmm/MainActivity.java @@ -308,7 +308,8 @@ public class MainActivity extends FoxActivity implements SwipeRefreshLayout.OnRe ExternalHelper.INSTANCE.refreshHelper(this); this.initMode = false; // Show an material alert dialog if lastEventId is not "" or null in the private sentry shared preferences - if (MainApplication.isCrashReportingEnabled()) { + //noinspection ConstantConditions + if (MainApplication.isCrashReportingEnabled() && !BuildConfig.SENTRY_TOKEN.isEmpty()) { SharedPreferences preferences = getSharedPreferences("sentry", MODE_PRIVATE); String lastExitReason = preferences.getString("lastExitReason", ""); if (BuildConfig.DEBUG) Log.d("NoodleDebug", "Last Exit Reason: " + lastExitReason); diff --git a/app/src/main/res/layout/setup_box.xml b/app/src/main/res/layout/setup_box.xml index 994d6bb..f3626ea 100644 --- a/app/src/main/res/layout/setup_box.xml +++ b/app/src/main/res/layout/setup_box.xml @@ -1,19 +1,11 @@ - + + android:layout_margin="4dp" + android:text="@string/setup_message" /> + android:textAppearance="@android:style/TextAppearance.Material.Headline" /> + android:textAppearance="@android:style/TextAppearance.Material.Small" /> + android:textAppearance="@android:style/TextAppearance.Material.Small" /> + android:textAppearance="@android:style/TextAppearance.Material.Caption" /> + android:textAppearance="@android:style/TextAppearance.Material.Headline" /> + android:textAppearance="@android:style/TextAppearance.Material.Small" /> + android:textAppearance="@android:style/TextAppearance.Material.Small" /> + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bd522d7..a60fa5b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -132,7 +132,7 @@ Remove Repo Custom url Link copied - This repository may display some non-intrusive advertising to cover server and development costs. + This repository may display some non-intrusive dvertising to cover server and development costs. Features reviews, automatic virus scans, and more. Backup modules Restore modules This operation require an internet connection @@ -222,20 +222,19 @@ Official Unofficial First time setup - Welcome! This app will help you install and manage modules - for Magisk. To get started, please select the options below. Everything can be - configured from settings later. + Welcome! This app will help you install and manage Magisk modules. To get started, please select the options below. These and more can be configured from settings later. Finish setup - Allow us to check for updates in the background. May use more battery. - Enable the Androidacy repo, which features user reviews, automatic virus scans, fast updates, a wide selection, and is backed by Androidacy. + Allow us to check for updates in the background.\nThis feature may use more battery. + Enable the Androidacy repo\nIt features user reviews, automatic virus scans, fast updates, a wide selection, and is backed by Androidacy. - Enable the Magisk Alternative Repo. Significantly more lax - than the original, but at the cost of some safety and privacy. Fully hosted on GitHub - . - Enable automatic crash reporting and performance monitoring. Crash reports are anonymized with all personal info removed, and are onlly accessible to the developers. Uses sentry.io. + Enable the Magisk Alt Repo\nIt is significantly more lax than the original. Has a lot of modules at the cost of some safety. + Enable Sentry crash reporting and performance monitoring.\nAll reports are striclty anonymous and confidential. You can add custom repos later in settings. Repos - Misc settings - SkipEnabling blur on lower-end deviceYou are trying to enable blur on a device that may not perform well with it.\nYou may enable it, but this may lead to a poor user experience and we recommend you don\'t. + Miscellaneous + Skip + Enabling blur on lower-end device + You are trying to enable blur on a device that may not perform well with it.\nYou may enable it, but this may lead to a poor user experience and we recommend you don\'t. + This repo has less restrictions and reviews, which may lead to lower quality modules. Pretty barebones but has a lot of modules. diff --git a/app/src/main/res/xml/repo_preferences.xml b/app/src/main/res/xml/repo_preferences.xml index d8b0e2a..4ad416c 100644 --- a/app/src/main/res/xml/repo_preferences.xml +++ b/app/src/main/res/xml/repo_preferences.xml @@ -86,6 +86,12 @@ app:key="pref_magisk_alt_repo_submit" app:singleLineTitle="false" app:title="@string/submit_modules" /> +