rework ui a bit

Signed-off-by: androidacy-user <opensource@androidacy.com>
pull/299/head
androidacy-user 1 year ago
parent 3217eaddee
commit 9ac56c371b

@ -66,6 +66,7 @@ android {
vectorDrawables {
useSupportLibrary true
}
multiDexEnabled true
}
splits {
@ -110,7 +111,6 @@ android {
}
}
//noinspection GrDeprecatedAPIUsage
flavorDimensions "type"
productFlavors {
"default" {
@ -138,6 +138,7 @@ android {
buildConfigField "String", "SENTRY_TOKEN", '""'
}
// Get the androidacy client ID from the androidacy.properties
Properties properties = new Properties()
// If androidacy.properties doesn't exist, use the default client ID which is heavily
// rate limited to 30 requests per minute
@ -146,7 +147,7 @@ android {
} else {
properties.setProperty('client_id', '"5KYccdYxWB2RxMq5FTbkWisXi2dS6yFN9R7RVlFCG98FRdz6Mf5ojY2fyJCUlXJZ"')
}
buildConfigField("String", "ANDROIDACY_CLIENT_ID", properties.getProperty('client_id'))
buildConfigField("String", "ANDROIDACY_CLIENT_ID", "\"" + properties.getProperty('client_id') + "\"")
// If client ID is empty, disable androidacy
if (properties.getProperty('client_id').isEmpty()) {
buildConfigField("java.util.List<String>",
@ -314,11 +315,13 @@ dependencies {
implementation 'androidx.work:work-runtime:2.8.0'
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.10'
implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:5.0.0-alpha.10'
// logging interceptor
implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.10'
// Chromium cronet from androidacy
implementation 'com.androidacy:cronet-common:111.0.5563.75'
implementation 'com.androidacy:cronet-native:111.0.5563.75'
implementation 'com.androidacy:cronet-api:111.0.5563.75'
// protobuf - fixes a crash on some devicesa
// protobuf - fixes a crash on some devices
implementation 'com.google.protobuf:protobuf-javalite:3.22.2'
implementation 'com.github.topjohnwu.libsu:io:5.0.1'
@ -377,13 +380,14 @@ android {
}
buildFeatures {
viewBinding true
buildConfig true
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}
//noinspection GrDeprecatedAPIUsage
buildToolsVersion '33.0.2'
buildToolsVersion '34.0.0 rc2'
}

@ -10,7 +10,6 @@ import org.json.JSONObject;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.security.NoSuchAlgorithmException;
public final class CustomRepoData extends RepoData {
boolean loadedExternal;
@ -31,7 +30,7 @@ public final class CustomRepoData extends RepoData {
this.id : this.override;
}
public void quickPrePopulate() throws IOException, JSONException, NoSuchAlgorithmException {
public void quickPrePopulate() throws IOException, JSONException {
JSONObject jsonObject = new JSONObject(
new String(Http.doHttpGet(this.getUrl(),
false), StandardCharsets.UTF_8));

@ -4,6 +4,11 @@ import android.content.SharedPreferences;
import com.fox2code.mmm.MainApplication;
import com.fox2code.mmm.utils.io.PropUtils;
import com.fox2code.mmm.utils.realm.ReposList;
import io.realm.Realm;
import io.realm.RealmConfiguration;
import timber.log.Timber;
public class CustomRepoManager {
public static final int MAX_CUSTOM_REPOS = 5;
@ -21,7 +26,19 @@ public class CustomRepoManager {
SharedPreferences sharedPreferences = this.getSharedPreferences();
int lastFilled = 0;
for (int i = 0; i < MAX_CUSTOM_REPOS; i++) {
String repo = sharedPreferences.getString("repo_" + i, "");
RealmConfiguration realmConfiguration = new RealmConfiguration.Builder().name("ReposList.realm").allowQueriesOnUiThread(true).allowWritesOnUiThread(true).directory(MainApplication.getINSTANCE().getDataDirWithPath("realms")).schemaVersion(1).build();
Realm realm = Realm.getInstance(realmConfiguration);
try {
realm.beginTransaction();
} catch (IllegalStateException e) {
Timber.w(e, "Failed to begin transaction");
}
// find the matching entry for repo_0, repo_1, etc.
ReposList reposList = realm.where(ReposList.class).equalTo("id", "repo_" + i).findFirst();
if (reposList == null) {
continue;
}
String repo = reposList.getUrl();
if (!PropUtils.isNullString(repo) && !RepoManager.isBuiltInRepo(repo)) {
lastFilled = i;
int index = AUTO_RECOMPILE ?
@ -33,12 +50,23 @@ public class CustomRepoManager {
}
}
if (AUTO_RECOMPILE && (lastFilled + 1) != this.customReposCount) {
SharedPreferences.Editor editor = sharedPreferences.edit().clear();
RealmConfiguration realmConfiguration = new RealmConfiguration.Builder().name("ReposList.realm").allowQueriesOnUiThread(true).allowWritesOnUiThread(true).directory(MainApplication.getINSTANCE().getDataDirWithPath("realms")).schemaVersion(1).build();
Realm realm = Realm.getInstance(realmConfiguration);
try {
realm.beginTransaction();
} catch (IllegalStateException e) {
Timber.w(e, "Failed to begin transaction");
}
for (int i = 0; i < MAX_CUSTOM_REPOS; i++) {
if (this.customRepos[i] != null)
editor.putString("repo_" + i, this.customRepos[i]);
if (this.customRepos[i] != null) {
// find the matching entry for repo_0, repo_1, etc.
ReposList reposList = realm.where(ReposList.class).equalTo("id", "repo_" + i).findFirst();
if (reposList == null) {
continue;
}
reposList.setUrl(this.customRepos[i]);
}
}
editor.apply();
}
}
@ -57,8 +85,17 @@ public class CustomRepoManager {
int i = 0;
while (customRepos[i] != null) i++;
customRepos[i] = repo;
this.getSharedPreferences().edit()
.putString("repo_" + i, repo).apply();
RealmConfiguration realmConfiguration = new RealmConfiguration.Builder().name("ReposList.realm").allowQueriesOnUiThread(true).allowWritesOnUiThread(true).directory(MainApplication.getINSTANCE().getDataDirWithPath("realms")).schemaVersion(1).build();
Realm realm = Realm.getInstance(realmConfiguration);
realm.beginTransaction();
// find the matching entry for repo_0, repo_1, etc.
ReposList reposList = realm.where(ReposList.class).equalTo("id", "repo_" + i).findFirst();
if (reposList == null) {
reposList = realm.createObject(ReposList.class, "repo_" + i);
}
reposList.setUrl(repo);
realm.commitTransaction();
customReposCount++;
this.dirty = true;
CustomRepoData customRepoData = (CustomRepoData)
this.repoManager.addOrGet(repo);

@ -428,7 +428,7 @@ public class SettingsActivity extends FoxActivity implements LanguageActivity {
debugNotification.setEnabled(MainApplication.isBackgroundUpdateCheckEnabled());
debugNotification.setVisible(MainApplication.isDeveloper() && !MainApplication.isWrapped() && MainApplication.isBackgroundUpdateCheckEnabled());
debugNotification.setOnPreferenceClickListener(preference -> {
// fake updateable modules hashmap
// fake updatable modules hashmap
HashMap<String, String> updateableModules = new HashMap<>();
// count of modules to fake must match the count in the random number generator
Random random = new Random();
@ -797,7 +797,8 @@ public class SettingsActivity extends FoxActivity implements LanguageActivity {
@SuppressLint({"RestrictedApi", "UnspecifiedImmutableFlag"})
public void onCreatePreferencesAndroidacy() {
// Bind the pref_show_captcha_webview to captchaWebview('https://production-api.androidacy.com/')
// Also require dev modeowCaptchaWebview.setVisible(false);
// Also require dev mode
// CaptchaWebview.setVisible(false);
Preference androidacyTestMode = Objects.requireNonNull(findPreference("pref_androidacy_test_mode"));
if (!MainApplication.isDeveloper()) {
androidacyTestMode.setVisible(false);

@ -111,19 +111,13 @@ public enum Hashes {
public static String checkSumName(String checksum) {
if (checksum == null)
return null;
switch (checksum.length()) {
case 0:
default:
return null;
case 32:
return "MD5";
case 40:
return "SHA-1";
case 64:
return "SHA-256";
case 128:
return "SHA-512";
}
return switch (checksum.length()) {
default -> null;
case 32 -> "MD5";
case 40 -> "SHA-1";
case 64 -> "SHA-256";
case 128 -> "SHA-512";
};
}
public static String checkSumFormat(String checksum) {

@ -52,6 +52,7 @@ import okhttp3.RequestBody;
import okhttp3.Response;
import okhttp3.ResponseBody;
import okhttp3.dnsoverhttps.DnsOverHttps;
import okhttp3.logging.HttpLoggingInterceptor;
import okio.BufferedSink;
import timber.log.Timber;
@ -140,8 +141,29 @@ public enum Http {
request.header("Accept-Language", // Send system language to the server
mainApplication.getResources().getConfiguration().getLocales().get(0).toLanguageTag());
}
// add client hints
request.header("Sec-CH-UA", androidacyUA);
request.header("Sec-CH-UA-Mobile", "?1");
request.header("Sec-CH-UA-Platform", "Android");
request.header("Sec-CH-UA-Platform-Version", Build.VERSION.RELEASE);
request.header("Sec-CH-UA-Arch", Build.SUPPORTED_ABIS[0]);
request.header("Sec-CH-UA-Full-Version", BuildConfig.VERSION_NAME);
request.header("Sec-CH-UA-Model", Build.DEVICE);
request.header("Sec-CH-UA-Bitness", Build.SUPPORTED_64_BIT_ABIS.length > 0 ? "64" : "32");
return chain.proceed(request.build());
});
// add sentry interceptor
if (MainApplication.isCrashReportingEnabled()) {
httpclientBuilder.addInterceptor(new SentryOkHttpInterceptor());
}
// for debug builds, add a logging interceptor
if (BuildConfig.DEBUG) {
HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor();
loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
httpclientBuilder.addInterceptor(loggingInterceptor);
}
// Add cronet interceptor
// init cronet
try {
@ -173,10 +195,6 @@ public enum Http {
Timber.e(e, "Failed to init cronet");
// Gracefully fallback to okhttp
}
// add sentry interceptor
if (MainApplication.isCrashReportingEnabled()) {
httpclientBuilder.addInterceptor(new SentryOkHttpInterceptor());
}
// Fallback DNS cache responses in case request fail but already succeeded once in the past
fallbackDNS = new FallBackDNS(mainApplication, dns, "github.com", "api.github.com", "raw.githubusercontent.com", "camo.githubusercontent.com", "user-images.githubusercontent.com", "cdn.jsdelivr.net", "img.shields.io", "magisk-modules-repo.github.io", "www.androidacy.com", "api.androidacy.com", "production-api.androidacy.com");
httpclientBuilder.dns(Dns.SYSTEM);

@ -5,10 +5,251 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/setup_box"
android:layout_width="match_parent"
android:paddingVertical="0dp"
android:layout_height="match_parent"
app:fitsSystemWindowsInsets="left|right"
app:fitsSystemWindowsInsets="start|end|bottom|top"
tools:context=".SetupActivity">
<include android:id="@+id/include2" layout="@layout/content_scrolling" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="parent" />
<ScrollView
android:id="@+id/setupNestedScrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@id/bottom_navigation"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:id="@+id/setup_box_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="10dp"
android:paddingBottom="84dp"
android:paddingTop="42dp"
app:layout_constraintTop_toTopOf="@id/setup_box"
app:layout_constraintBottom_toTopOf="@id/bottom_navigation">
<!-- Title -->
<com.google.android.material.textview.MaterialTextView
android:id="@+id/setup_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/setup_title"
android:textAppearance="@style/TextAppearance.Material3.HeadlineLarge" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/setup_summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:text="@string/setup_message"
android:textAppearance="@style/TextAppearance.Material3.BodyMedium" />
<!-- Theme radio select. Options are system, light, dark, black, transparent_light -->
<!-- Button to trigger theme selection, half width, and in container with language -->
<LinearLayout
android:id="@+id/LinearLayout02"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:id="@+id/setup_theme_button"
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginEnd="4dp"
android:layout_weight="1"
android:padding="12dp"
android:text="@string/setup_theme_button"
android:textSize="16sp"
app:icon="@drawable/ic_baseline_palette_24"
app:iconGravity="textStart"
app:iconPadding="8dp"
app:iconTintMode="src_in"
app:rippleColor="@color/gray_800"
tools:ignore="DuplicateSpeakableTextCheck" />
<com.google.android.material.button.MaterialButton
android:id="@+id/setup_language_button"
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginTop="4dp"
android:layout_weight="1"
android:padding="12dp"
android:text="@string/setup_language_button"
android:textSize="16sp"
app:icon="@drawable/ic_baseline_language_24"
app:iconGravity="textStart"
app:iconPadding="8dp"
app:iconTintMode="src_in"
app:rippleColor="@color/gray_800"
tools:ignore="DuplicateSpeakableTextCheck" />
</LinearLayout>
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:text="@string/repos"
android:textAppearance="@android:style/TextAppearance.Material.Headline" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_androidacy_repo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:checked="false"
android:key="pref_androidacy_repo_enabled"
android:text="@string/setup_androidacy_repo"
android:textSize="18sp" />
<!-- Small summary for above switch -->
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:drawableStart="@drawable/ic_baseline_info_24"
android:drawablePadding="8dp"
android:text="@string/setup_androidacy_repo_summary"
android:textAppearance="@android:style/TextAppearance.Material.Small" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_magisk_alt_repo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:checked="false"
android:key="pref_magisk_alt_repo_enabled"
android:text="@string/setup_magisk_alt_repo"
android:textSize="18sp" />
<!-- Small summary for above switch -->
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:drawableStart="@drawable/ic_baseline_info_24"
android:drawablePadding="8dp"
android:text="@string/setup_magisk_alt_repo_summary"
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_margin="2dp"
android:text="@string/setup_custom_repos"
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_margin="4dp"
android:text="@string/crash_reporting_headline"
android:textAppearance="@android:style/TextAppearance.Material.Headline" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_crash_reporting"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:checked="false"
android:key="pref_crash_reporting_enabled"
android:text="@string/setup_crash_reporting"
android:textAppearance="@android:style/TextAppearance.Material.Subhead"
android:textSize="18sp" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:drawableStart="@drawable/ic_baseline_info_24"
android:drawablePadding="8dp"
android:text="@string/setup_crash_reporting_summary"
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_margin="4dp"
android:text="@string/setup_update_check_headline"
android:textAppearance="@android:style/TextAppearance.Material.Headline" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_background_update_check"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:checked="false"
android:key="pref_background_update_check"
android:text="@string/setup_background_update_check"
android:textSize="18sp" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:drawableStart="@drawable/ic_baseline_info_24"
android:drawablePadding="8dp"
app:dependency="pref_background_update_check"
android:text="@string/setup_background_update_check_summary"
android:textAppearance="@android:style/TextAppearance.Material.Small"
app:icon="@drawable/ic_baseline_info_24" />
<!-- require wifi switch -->
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_background_update_check_require_wifi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:checked="true"
android:key="pref_background_update_check_require_wifi"
android:text="@string/setup_background_update_check_require_wifi"
android:textSize="18sp" />
<!-- description for require wifi switch -->
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:drawableStart="@drawable/ic_baseline_info_24"
android:drawablePadding="8dp"
android:text="@string/setup_background_update_check_require_wifi_summary"
android:textAppearance="@android:style/TextAppearance.Material.Small"
app:icon="@drawable/ic_baseline_info_24" />
<!-- 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:text="@string/setup_app_analytics"
android:textAppearance="@android:style/TextAppearance.Material.Small"
android:visibility="gone" />
</LinearLayout>
</ScrollView>
<!-- bottom nav for cancel and finish -->
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible"
android:paddingBottom="0dp"
app:compatShadowEnabled="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:menu="@menu/setup_bottom_nav" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,236 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/setupScrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context=".SetupActivity"
tools:showIn="@layout/activity_setup">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="8dp">
<!-- Title -->
<com.google.android.material.textview.MaterialTextView
android:id="@+id/setup_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/setup_title"
android:textAppearance="@style/TextAppearance.Material3.HeadlineLarge" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/setup_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:text="@string/setup_message"
android:textAppearance="@style/TextAppearance.Material3.BodyMedium" />
<!-- Theme radio select. Options are system, light, dark, black, transparent_light -->
<!-- Button to trigger theme selection, half width, and in container with language -->
<LinearLayout
android:id="@+id/LinearLayout02"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.button.MaterialButton
android:id="@+id/setup_theme_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginEnd="4dp"
android:layout_weight="1"
android:padding="12dp"
android:text="@string/setup_theme_button"
android:textSize="16sp"
app:icon="@drawable/ic_baseline_palette_24"
style="@style/Widget.Material3.Button.IconButton.Outlined"
app:iconGravity="textStart"
app:iconPadding="8dp"
app:iconTintMode="src_in"
app:rippleColor="@color/gray_800"
tools:ignore="DuplicateSpeakableTextCheck" />
<com.google.android.material.button.MaterialButton
android:id="@+id/setup_language_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginTop="4dp"
android:layout_weight="1"
style="@style/Widget.Material3.Button.IconButton.Outlined"
android:padding="12dp"
android:text="@string/setup_language_button"
android:textSize="16sp"
app:icon="@drawable/ic_baseline_language_24"
app:iconGravity="textStart"
app:iconPadding="8dp"
app:iconTintMode="src_in"
app:rippleColor="@color/gray_800"
tools:ignore="DuplicateSpeakableTextCheck" />
</LinearLayout>
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:text="@string/repos"
android:textAppearance="@android:style/TextAppearance.Material.Headline" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_androidacy_repo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:checked="false"
android:key="pref_androidacy_repo_enabled"
android:text="@string/setup_androidacy_repo"
android:textSize="18sp" />
<!-- Small summary for above switch -->
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:drawableStart="@drawable/ic_baseline_info_24"
android:drawablePadding="8dp"
android:text="@string/setup_androidacy_repo_summary"
android:textAppearance="@android:style/TextAppearance.Material.Small" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_magisk_alt_repo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:checked="false"
android:key="pref_magisk_alt_repo_enabled"
android:text="@string/setup_magisk_alt_repo"
android:textSize="18sp" />
<!-- Small summary for above switch -->
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:drawableStart="@drawable/ic_baseline_info_24"
android:drawablePadding="8dp"
android:text="@string/setup_magisk_alt_repo_summary"
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_margin="2dp"
android:text="@string/setup_custom_repos"
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_margin="4dp"
android:text="@string/crash_reporting_headline"
android:textAppearance="@android:style/TextAppearance.Material.Headline" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_crash_reporting"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:checked="false"
android:key="pref_crash_reporting_enabled"
android:text="@string/setup_crash_reporting"
android:textAppearance="@android:style/TextAppearance.Material.Subhead"
android:textSize="18sp" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:drawableStart="@drawable/ic_baseline_info_24"
android:drawablePadding="8dp"
android:text="@string/setup_crash_reporting_summary"
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_margin="4dp"
android:text="@string/setup_update_check_headline"
android:textAppearance="@android:style/TextAppearance.Material.Headline" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_background_update_check"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:checked="false"
android:key="pref_background_update_check"
android:text="@string/setup_background_update_check"
android:textSize="18sp" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:drawableStart="@drawable/ic_baseline_info_24"
android:drawablePadding="8dp"
android:text="@string/setup_background_update_check_summary"
android:textAppearance="@android:style/TextAppearance.Material.Small"
app:icon="@drawable/ic_baseline_info_24" />
<!-- require wifi switch -->
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_background_update_check_require_wifi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:checked="false"
android:key="pref_background_update_check_require_wifi"
android:text="@string/setup_background_update_check_require_wifi"
android:textSize="18sp" />
<!-- description for require wifi switch -->
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:drawableStart="@drawable/ic_baseline_info_24"
android:drawablePadding="8dp"
android:text="@string/setup_background_update_check_require_wifi_summary"
android:textAppearance="@android:style/TextAppearance.Material.Small"
app:icon="@drawable/ic_baseline_info_24" />
<!-- 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" />-->
<!-- bottom nav for cancel and finish -->
<com.google.android.material.bottomnavigation.BottomNavigationView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_margin="4dp"
app:menu="@menu/setup_bottom_nav"
app:compatShadowEnabled="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:background="?attr/colorSurface"
android:elevation="4dp" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>

@ -379,4 +379,5 @@
<string name="setup_update_check_headline">Update checks</string>
<string name="setup_background_update_check_require_wifi">Require wifi for update checks</string>
<string name="setup_background_update_check_require_wifi_summary">Require wifi or an otherwise unmetered connection to do update checks</string>
<string name="setup_app_analytics">Allow app analytics</string>
</resources>

@ -18,6 +18,7 @@ buildscript {
project.ext.kotlin_version = "1.8.0"
project.ext.sentry_version = "6.16.0"
dependencies {
//noinspection AndroidGradlePluginVersion
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10"
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${latestAboutLibsRelease}"

@ -1,6 +1,6 @@
#Sun Jun 05 10:40:53 EDT 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Loading…
Cancel
Save