Tweak setup wizard and fix tests

Signed-off-by: androidacy-user <opensource@androidacy.com>
pull/27/head
androidacy-user 3 years ago
parent 414caf3dbe
commit a8877af824

@ -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

@ -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);

@ -1,19 +1,11 @@
<?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="16dp"
android:paddingRight="16dp"
android:scrollbars="vertical">
<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">
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:text="@string/setup_message"
android:textSize="14sp" />
android:layout_margin="4dp"
android:text="@string/setup_message" />
<ScrollView
android:layout_width="match_parent"
@ -28,80 +20,74 @@
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="6dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="6dp"
android:layout_margin="4dp"
android:text="@string/repos"
android:textSize="18sp" />
android:textAppearance="@android:style/TextAppearance.Material.Headline" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_androidacy_repo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="4dp"
android:layout_margin="4dp"
android:checked="false"
android:key="pref_androidacy_repo_enabled"
android:text="@string/setup_androidacy_repo"
android:textSize="14sp" />
android:textAppearance="@android:style/TextAppearance.Material.Small" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_magisk_alt_repo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="4dp"
android:layout_margin="4dp"
android:text="@string/setup_magisk_alt_repo"
android:checked="false"
android:key="pref_magisk_alt_repo_enabled"
android:text="@string/setup_magisk_alt_repo"
android:textSize="14sp" />
android:textAppearance="@android:style/TextAppearance.Material.Small" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="2dp"
android:checked="false"
android:layout_margin="4dp"
android:text="@string/setup_custom_repos"
android:textSize="12sp" />
android:textAppearance="@android:style/TextAppearance.Material.Caption" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="6dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="6dp"
android:layout_margin="4dp"
android:text="@string/misc"
android:textSize="18sp" />
android:textAppearance="@android:style/TextAppearance.Material.Headline" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_crash_reporting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="4dp"
android:layout_margin="4dp"
android:checked="false"
android:key="pref_crash_reporting_enabled"
android:text="@string/setup_crash_reporting"
android:textSize="14sp" />
android:textAppearance="@android:style/TextAppearance.Material.Small" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_background_update_check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="4dp"
android:layout_margin="4dp"
android:checked="false"
android:key="pref_background_update_check"
android:text="@string/setup_background_update_check"
android:textSize="14sp" />
android:textAppearance="@android:style/TextAppearance.Material.Small" />
<!-- Placeholder for future settings -->
<!--<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_app_analytics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:checked="false"
android:key="pref_app_analytics"
android:textAppearance="@android:style/TextAppearance.Material.Small"
android:text="@string/setup_app_analytics" />-->
</LinearLayout>
</ScrollView>

@ -132,7 +132,7 @@
<string name="remove_repo">Remove Repo</string>
<string name="custom_url">Custom url</string>
<string name="link_copied">Link copied</string>
<string name="androidacy_repo_info">This repository may display some non-intrusive advertising to cover server and development costs.</string>
<string name="androidacy_repo_info">This repository may display some non-intrusive dvertising to cover server and development costs. Features reviews, automatic virus scans, and more.</string>
<string name="backup_module_list">Backup modules</string>
<string name="restore_module_list">Restore modules</string>
<string name="require_internet">This operation require an internet connection</string>
@ -222,20 +222,19 @@
<string name="official">Official</string>
<string name="unofficial">Unofficial</string>
<string name="setup_title">First time setup</string>
<string name="setup_message">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.</string>
<string name="setup_message">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.</string>
<string name="setup_button">Finish setup</string>
<string name="setup_background_update_check">Allow us to check for updates in the background. May use more battery.</string>
<string name="setup_androidacy_repo">Enable the Androidacy repo, which features user reviews, automatic virus scans, fast updates, a wide selection, and is backed by Androidacy.</string>
<string name="setup_background_update_check">Allow us to check for updates in the background.\nThis feature may use more battery.</string>
<string name="setup_androidacy_repo">Enable the Androidacy repo\nIt features user reviews, automatic virus scans, fast updates, a wide selection, and is backed by Androidacy.</string>
<!-- Maybe once alt repo fixes their shit and stops allowing crappy modules or outright
kanged modules, we'll reword this. -->
<string name="setup_magisk_alt_repo">Enable the Magisk Alternative Repo. Significantly more lax
than the original, but at the cost of some safety and privacy. Fully hosted on GitHub
.</string>
<string name="setup_crash_reporting">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.</string>
<string name="setup_magisk_alt_repo">Enable the Magisk Alt Repo\nIt is significantly more lax than the original. Has a lot of modules at the cost of some safety.</string>
<string name="setup_crash_reporting">Enable Sentry crash reporting and performance monitoring.\nAll reports are striclty anonymous and confidential.</string>
<string name="setup_custom_repos">You can add custom repos later in settings.</string>
<string name="repos">Repos</string>
<string name="misc">Misc settings</string>
<string name="setup_button_skip">Skip</string><string name="low_performance_device_dialogue_title">Enabling blur on lower-end device</string><string name="low_performance_device_dialogue_message">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.</string>
<string name="misc">Miscellaneous</string>
<string name="setup_button_skip">Skip</string>
<string name="low_performance_device_dialogue_title">Enabling blur on lower-end device</string>
<string name="low_performance_device_dialogue_message">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.</string>
<string name="alt_repo_info">This repo has less restrictions and reviews, which may lead to lower quality modules. Pretty barebones but has a lot of modules.</string>
</resources>

@ -86,6 +86,12 @@
app:key="pref_magisk_alt_repo_submit"
app:singleLineTitle="false"
app:title="@string/submit_modules" />
<Preference
app:enabled="false"
app:icon="@drawable/ic_baseline_info_24"
app:key="pref_alt_repo_disclaimer"
app:singleLineTitle="false"
app:summary="@string/alt_repo_info" />
</PreferenceCategory>
<PreferenceCategory
app:key="pref_custom_repo_0"

Loading…
Cancel
Save