fun fact: 9/10 devs have no idea why this works

Signed-off-by: androidacy-user <opensource@androidacy.com>
pull/89/head
androidacy-user 3 years ago
parent 71acd0b681
commit 9ca946b497

@ -499,12 +499,12 @@ dependencies {
implementation("com.github.Fox2Code:AndroidANSI:1.2.1")
// sentry
implementation("io.sentry:sentry-android:6.28.0")
implementation("io.sentry:sentry-android-timber:6.28.0")
implementation("io.sentry:sentry-android-fragment:6.28.0")
implementation("io.sentry:sentry-android-okhttp:6.28.0")
implementation("io.sentry:sentry-kotlin-extensions:6.28.0")
implementation("io.sentry:sentry-android-ndk:6.28.0")
implementation("io.sentry:sentry-android:6.29.0")
implementation("io.sentry:sentry-android-timber:6.29.0")
implementation("io.sentry:sentry-android-fragment:6.29.0")
implementation("io.sentry:sentry-android-okhttp:6.29.0")
implementation("io.sentry:sentry-kotlin-extensions:6.29.0")
implementation("io.sentry:sentry-android-ndk:6.29.0")
// Markdown
// TODO: switch to an updated implementation
@ -554,6 +554,8 @@ dependencies {
// optional - Kotlin Extensions and Coroutines support for Room
implementation("androidx.room:room-ktx:2.5.2")
implementation("pl.droidsonroids.gif:android-gif-drawable:1.2.28")
}
android {
@ -563,7 +565,7 @@ android {
}
}
ndkVersion = "25.2.9519653"
ndkVersion = "26.0.10636728 rc2"
dependenciesInfo {
includeInApk = false
includeInBundle = false

@ -27,6 +27,7 @@ import com.fox2code.mmm.utils.IntentHelper
import com.fox2code.mmm.utils.io.Files.Companion.patchModuleSimple
import com.fox2code.mmm.utils.io.Files.Companion.read
import com.fox2code.mmm.utils.io.net.Http
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import timber.log.Timber
import java.io.BufferedReader
import java.io.File
@ -195,6 +196,15 @@ enum class NotificationType(
androidx.appcompat.R.attr.colorBackgroundFloating,
com.google.android.material.R.attr.colorOnBackground,
View.OnClickListener { v: View? ->
if (MainApplication.getSharedPreferences("mmm")?.getBoolean("pref_require_security", false) == true) {
// block local install for safety
MaterialAlertDialogBuilder(v!!.context)
.setTitle(R.string.install_from_storage)
.setMessage(R.string.install_from_storage_safe_modules)
.setPositiveButton(android.R.string.ok, null)
.show()
return@OnClickListener
}
val compatActivity = FoxActivity.getFoxActivity(v)
val module = File(
compatActivity.cacheDir, "installer" + File.separator + "module.zip"

@ -11,6 +11,7 @@ import android.content.DialogInterface
import android.content.Intent
import android.content.pm.PackageManager
import android.content.res.Resources.Theme
import android.net.Uri
import android.os.Bundle
import android.os.Process
import android.view.View
@ -46,6 +47,7 @@ class SetupActivity : FoxActivity(), LanguageActivity {
private var cachedTheme = 0
@SuppressLint("ApplySharedPref", "RestrictedApi")
@Suppress("KotlinConstantConditions", "NAME_SHADOWING")
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
this.setTitle(R.string.setup_title)
@ -69,7 +71,7 @@ class SetupActivity : FoxActivity(), LanguageActivity {
if (ts.time > buildTime.time) {
val pm = packageManager
val intent = Intent(this, ExpiredActivity::class.java)
@Suppress("DEPRECATION") val resolveInfo = pm.queryIntentActivities(intent, 0)
val resolveInfo = pm.queryIntentActivities(intent, 0)
if (resolveInfo.size > 0) {
startActivity(intent)
finish()
@ -85,6 +87,67 @@ class SetupActivity : FoxActivity(), LanguageActivity {
}
}
val view: View = binding.root
// if our application id is "com.androidacy.mmm" or begins with it, check if com.fox2code.mmm is installed and offer to uninstall it. if we're com.fox2code.mmm, check if com.fox2code.mmm.fdroid or com.fox2code.mmm.debug is installed and offer to uninstall it
val ourPackageName = BuildConfig.APPLICATION_ID
val foxPkgName = "com.fox2code.mmm"
val foxPkgNameFdroid = "com.fox2code.mmm.fdroid"
val foxPkgNameDebug = "com.fox2code.mmm.debug"
val foxPkgNamePlay = "com.androidacy.mmm.play"
val androidacyPkgName = "com.androidacy.mmm"
val pm = packageManager
val intent = Intent(Intent.ACTION_MAIN, null)
intent.addCategory(Intent.CATEGORY_LAUNCHER)
val resolveInfoList = pm.queryIntentActivities(intent, 0)
for (resolveInfo in resolveInfoList) {
val packageName = resolveInfo.activityInfo.packageName
if (packageName == ourPackageName) {
continue
}
when (ourPackageName) {
foxPkgName -> {
if (packageName == foxPkgNameDebug || packageName == foxPkgNameFdroid || packageName == foxPkgNamePlay) {
val materialAlertDialogBuilder = MaterialAlertDialogBuilder(this)
materialAlertDialogBuilder.setTitle(R.string.setup_uninstall_title)
materialAlertDialogBuilder.setMessage(getString(R.string.setup_uninstall_message, packageName))
materialAlertDialogBuilder.setPositiveButton(R.string.uninstall) { _: DialogInterface?, _: Int ->
// start uninstall intent
val intent = Intent(Intent.ACTION_DELETE)
intent.data = Uri.parse("package:$packageName")
startActivity(intent)
}
materialAlertDialogBuilder.setNegativeButton(R.string.cancel) { _: DialogInterface?, _: Int -> }
}
}
androidacyPkgName -> {
if (packageName == foxPkgName || packageName == foxPkgNameFdroid || packageName == foxPkgNameDebug || packageName == foxPkgNamePlay) {
val materialAlertDialogBuilder = MaterialAlertDialogBuilder(this)
materialAlertDialogBuilder.setTitle(R.string.setup_uninstall_title)
materialAlertDialogBuilder.setMessage(getString(R.string.setup_uninstall_message, packageName))
materialAlertDialogBuilder.setPositiveButton(R.string.uninstall) { _: DialogInterface?, _: Int ->
// start uninstall intent
val intent = Intent(Intent.ACTION_DELETE)
intent.data = Uri.parse("package:$packageName")
startActivity(intent)
}
materialAlertDialogBuilder.setNegativeButton(R.string.cancel) { _: DialogInterface?, _: Int -> }
}
}
else -> {
if (packageName == foxPkgNameDebug) {
val materialAlertDialogBuilder = MaterialAlertDialogBuilder(this)
materialAlertDialogBuilder.setTitle(R.string.setup_uninstall_title)
materialAlertDialogBuilder.setMessage(getString(R.string.setup_uninstall_message, packageName))
materialAlertDialogBuilder.setPositiveButton(R.string.uninstall) { _: DialogInterface?, _: Int ->
// start uninstall intent
val intent = Intent(Intent.ACTION_DELETE)
intent.data = Uri.parse("package:$packageName")
startActivity(intent)
}
materialAlertDialogBuilder.setNegativeButton(R.string.cancel) { _: DialogInterface?, _: Int -> }
}
}
}
}
(Objects.requireNonNull<Any>(view.findViewById(R.id.setup_background_update_check)) as MaterialSwitch).isChecked =
BuildConfig.ENABLE_AUTO_UPDATER
(Objects.requireNonNull<Any>(view.findViewById(R.id.setup_crash_reporting)) as MaterialSwitch).isChecked =
@ -205,10 +268,16 @@ class SetupActivity : FoxActivity(), LanguageActivity {
val setupButton = view.findViewById<BottomNavigationItemView>(R.id.setup_finish)
// on clicking setup_agree_eula, enable the setup button if it's checked, if it's not, disable it
val agreeEula = view.findViewById<MaterialCheckBox>(R.id.setup_agree_eula)
agreeEula.setOnCheckedChangeListener { _: CompoundButton?, isChecked: Boolean ->
setupButton.isEnabled = isChecked
}
setupButton.setOnClickListener { _: View? ->
// if agreeEula is not checked, show a toast and return
if (!agreeEula.isChecked) {
Toast.makeText(
this,
R.string.setup_agree_eula_toast,
Toast.LENGTH_LONG
).show()
return@setOnClickListener
}
Timber.i("Setup button clicked")
// get instance of editor
if (BuildConfig.DEBUG) Timber.d("Saving preferences")
@ -247,6 +316,14 @@ class SetupActivity : FoxActivity(), LanguageActivity {
"pref_analytics_enabled",
(Objects.requireNonNull<Any>(view.findViewById(R.id.setup_app_analytics)) as MaterialSwitch).isChecked
)
// setup_require_security -> pref_require_security
editor.putBoolean(
"pref_require_security", (Objects.requireNonNull<Any>(
view.findViewById(
R.id.setup_require_security
)
) as MaterialSwitch).isChecked
)
if (BuildConfig.DEBUG) Timber.d("Saving preferences")
// now basically do the same thing for room db
val db = Room.databaseBuilder(
@ -262,7 +339,7 @@ class SetupActivity : FoxActivity(), LanguageActivity {
reposListDao.setEnabled(androidacyRepoRoomObj.id, androidacyRepoRoom)
reposListDao.setEnabled(magiskAltRepoRoomObj.id, magiskAltRepoRoom)
db.close()
editor.putString("last_shown_setup", "v3")
editor.putString("last_shown_setup", "v4")
// Commit the changes
editor.commit()
// Log the changes
@ -415,11 +492,11 @@ class SetupActivity : FoxActivity(), LanguageActivity {
safe = false,
stats = 0,
)
moduleListCacheDao.deleteAll()
// insert the modulelistcache into the database
moduleListCacheDao.insert(moduleListCache)
// now make sure reposlist is updated with 2 entries and modulelistcache is updated with 1 entry
val reposList = reposListDao.getAll()
val moduleListCacheList = moduleListCacheDao.getAll()
// make sure reposlist is updated with 2 entries
if (reposList.size != 2) {
Timber.e("ReposList is not updated with 2 entries")
@ -435,7 +512,7 @@ class SetupActivity : FoxActivity(), LanguageActivity {
if (BuildConfig.DEBUG) Timber.d("ReposList is updated with 2 entries")
}
// make sure modulelistcache is updated with 1 entry
if (moduleListCacheList.size != 1) {
if (moduleListCacheDao.getAll().size != 1) {
Timber.e("ModuleListCache is not updated with 1 entry")
// show a toast
runOnUiThread {

@ -14,7 +14,6 @@ import android.content.Intent
import android.content.pm.PackageManager
import android.net.ConnectivityManager
import android.net.NetworkCapabilities
import android.os.Build
import androidx.core.app.NotificationChannelCompat
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
@ -381,19 +380,17 @@ class BackgroundUpdateChecker(context: Context, workerParams: WorkerParameters)
fun onMainActivityCreate(context: Context) {
// Refuse to run if first_launch pref is not false
if (MainApplication.getSharedPreferences("mmm")!!
.getString("last_shown_setup", null) != "v3"
.getString("last_shown_setup", null) != "v4"
) return
// create notification channel group
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val groupName: CharSequence = context.getString(R.string.notification_group_updates)
val mNotificationManager =
ContextCompat.getSystemService(context, NotificationManager::class.java)
mNotificationManager?.createNotificationChannelGroup(
NotificationChannelGroup(
NOTFIICATION_GROUP, groupName
)
val groupName: CharSequence = context.getString(R.string.notification_group_updates)
val mNotificationManager =
ContextCompat.getSystemService(context, NotificationManager::class.java)
mNotificationManager?.createNotificationChannelGroup(
NotificationChannelGroup(
NOTFIICATION_GROUP, groupName
)
}
)
val notificationManagerCompat = NotificationManagerCompat.from(context)
notificationManagerCompat.createNotificationChannel(
NotificationChannelCompat.Builder(

@ -32,9 +32,9 @@ class ModuleManager private constructor() : SyncManager() {
private var updatableModuleCount = 0
override fun scanInternal(updateListener: UpdateListener) {
// if last_shown_setup is not "v3", then refuse to continue
// if last_shown_setup is not "v4", then refuse to continue
if (MainApplication.getSharedPreferences("mmm")!!
.getString("last_shown_setup", "") != "v3"
.getString("last_shown_setup", "") != "v4"
) {
return
}

@ -14,6 +14,7 @@ import androidx.annotation.DrawableRes
import com.fox2code.foxcompat.app.FoxActivity
import com.fox2code.foxcompat.view.FoxDisplay
import com.fox2code.mmm.BuildConfig
import com.fox2code.mmm.MainApplication
import com.fox2code.mmm.MainApplication.Companion.INSTANCE
import com.fox2code.mmm.MainApplication.Companion.isShowcaseMode
import com.fox2code.mmm.R
@ -121,6 +122,19 @@ enum class ActionButtonType {
}
override fun doAction(button: Chip, moduleHolder: ModuleHolder) {
if (MainApplication.getSharedPreferences("mmm")?.getBoolean("pref_require_security", false) == true) {
// get safe status from either mainmoduleinfo or repo module
val safe = moduleHolder.mainModuleInfo.safe || moduleHolder.repoModule?.moduleInfo?.safe ?: false
if (!safe) {
// block local install for safety
MaterialAlertDialogBuilder(button.context)
.setTitle(R.string.install_blocked)
.setMessage(R.string.install_blocked_message)
.setPositiveButton(android.R.string.ok, null)
.show()
return
}
}
// if mainmoduleinfo is null, we are in repo mode
val moduleInfo: ModuleInfo = if (moduleHolder.mainModuleInfo != null) {
moduleHolder.mainModuleInfo

@ -30,7 +30,7 @@ class CustomRepoManager internal constructor(
init {
repoCount = 0
// refuse to load if setup is not complete
if (getSharedPreferences("mmm")!!.getString("last_shown_setup", "") == "v3") {
if (getSharedPreferences("mmm")!!.getString("last_shown_setup", "") == "v4") {
val i = 0
val lastFilled = intArrayOf(0)
// now the same as above but for room database

@ -56,7 +56,7 @@ class RepoManager private constructor(mainApplication: MainApplication) : SyncMa
repoData = LinkedHashMap()
modules = HashMap()
// refuse to load if setup is not complete
if (getSharedPreferences("mmm")!!.getString("last_shown_setup", "") == "v3") {
if (getSharedPreferences("mmm")!!.getString("last_shown_setup", "") == "v4") {
// We do not have repo list config yet.
androidacyRepoData = addAndroidacyRepoData()
val altRepo = addRepoData(MAGISK_ALT_REPO, "Magisk Modules Alt Repo")
@ -82,8 +82,8 @@ class RepoManager private constructor(mainApplication: MainApplication) : SyncMa
}
private fun populateDefaultCache(repoData: RepoData?) {
// if last_shown_setup is not "v3", them=n refuse to continue
if (getSharedPreferences("mmm")!!.getString("last_shown_setup", "") != "v3") {
// if last_shown_setup is not "v4", them=n refuse to continue
if (getSharedPreferences("mmm")!!.getString("last_shown_setup", "") != "v4") {
return
}
// make sure repodata is not null

@ -25,6 +25,7 @@ import java.io.File
import java.io.FileOutputStream
import java.io.IOException
import java.io.InputStreamReader
import java.util.Date
class DebugFragment : PreferenceFragmentCompat() {
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
@ -182,6 +183,17 @@ class DebugFragment : PreferenceFragmentCompat() {
}
}
}
// save logs to our external storage - name is current date and time
try {
val extStorage = File(requireContext().getExternalFilesDir(null), "logs" + File.separator + "log-" + Date().toString() + ".txt")
FileUtils.copyFile(logsFile, extStorage)
} catch (e: IOException) {
e.printStackTrace()
Toast.makeText(
requireContext(), R.string.error_saving_logs, Toast.LENGTH_SHORT
).show()
return@setOnPreferenceClickListener true
}
// Share logs
val shareIntent = Intent()
// create a new intent and grantUriPermission to the file provider

@ -159,7 +159,7 @@ class RuntimeUtils {
if (BuildConfig.DEBUG) Timber.i("Checking if we need to run setup")
// Check if context is the first launch using prefs and if doSetupRestarting was passed in the intent
val prefs = MainApplication.getSharedPreferences("mmm")!!
var firstLaunch = prefs.getString("last_shown_setup", null) != "v3"
var firstLaunch = prefs.getString("last_shown_setup", null) != "v4"
// First launch
// context is intentionally separate from the above if statement, because it needs to be checked even if the first launch check is true due to some weird edge cases
if (activity.intent.getBooleanExtra("doSetupRestarting", false)) {

@ -72,7 +72,7 @@ object SentryMain {
}
// If first_launch pref is not false, refuse to initialize Sentry
val sharedPreferences = MainApplication.getSharedPreferences("mmm")!!
if (sharedPreferences.getString("last_shown_setup", null) != "v3") {
if (sharedPreferences.getString("last_shown_setup", null) != "v4") {
return
}
isSentryEnabled = sharedPreferences.getBoolean("pref_crash_reporting_enabled", false)

@ -0,0 +1,5 @@
<vector android:autoMirrored="true" android:height="24dp"
android:tint="#000000" android:viewportHeight="24"
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M8.59,16.59L13.17,12 8.59,7.41 10,6l6,6 -6,6 -1.41,-1.41z"/>
</vector>

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2023 to present Androidacy and contributors. Names, logos, icons, and the Androidacy name are all trademarks of Androidacy and may not be used without license. See LICENSE for more information.
-->
<font-family xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:targetApi="o">
<!-- variants for inter font -->
<font
android:font="@font/interregular"
android:fontStyle="normal"
android:fontWeight="400" />
<font
android:font="@font/interitalic"
android:fontStyle="italic"
android:fontWeight="400" />
<font
android:font="@font/interbold"
android:fontStyle="normal"
android:fontWeight="700" />
</font-family>

@ -2,12 +2,11 @@
~ Copyright (c) 2023 to present Androidacy and contributors. Names, logos, icons, and the Androidacy name are all trademarks of Androidacy and may not be used without license. See LICENSE for more information.
-->
<font-family xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<font-family xmlns:android="http://schemas.android.com/apk/res/android">
<!-- jetbrains mono font -->
<font
android:font="@font/jetbrainsmonoregular"
android:fontStyle="normal"
android:fontWeight="400"
tools:targetApi="o" />
/>
</font-family>

@ -2,7 +2,8 @@
~ Copyright (c) 2023 to present Androidacy and contributors. Names, logos, icons, and the Androidacy name are all trademarks of Androidacy and may not be used without license. See LICENSE for more information.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
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/setup_box"
@ -110,6 +111,14 @@
android:text="@string/repos"
android:textAppearance="@android:style/TextAppearance.Material.Headline" />
<!-- recommend users to enable androidacy repo and nothing else for an optimized experience -->
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:text="@string/setup_androidacy_repo_recommendation"
android:textAppearance="@style/TextAppearance.Material3.BodyMedium" />
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_androidacy_repo"
android:layout_width="match_parent"
@ -157,6 +166,27 @@
android:text="@string/setup_custom_repos"
android:textAppearance="@android:style/TextAppearance.Material.Caption" />
<!-- require security switch -->
<com.google.android.material.materialswitch.MaterialSwitch
android:id="@+id/setup_require_security"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:checked="false"
android:key="pref_require_security"
android:text="@string/setup_require_security"
android:textSize="18sp" />
<!-- description for require security 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_require_security_summary"
android:textAppearance="@android:style/TextAppearance.Material.Small" />
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"

@ -14,7 +14,8 @@
android:id="@+id/install_horizontal_scroller"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/black"
android:background="@null"
android:fontFamily="@font/jetbrainsmono"
android:overScrollMode="never"
app:layout_constraintBottom_toTopOf="@id/bottom_navigation"
app:layout_constraintEnd_toEndOf="parent"
@ -26,8 +27,8 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@null"
android:padding="4dp"
android:fontFamily="@font/jetbrainsmono"
android:padding="4dp"
android:textSize="16sp" />
</HorizontalScrollView>
@ -44,8 +45,8 @@
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/install_horizontal_scroller"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/install_horizontal_scroller"
app:menu="@menu/bottom_nav_install" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -18,6 +18,7 @@
android:fontFamily="@font/jetbrainsmono"
android:overScrollMode="never"
android:textSize="16sp"
app:flow_wrapMode="aligned"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/bottom_navigation"

@ -7,7 +7,7 @@
<!-- cancel and finish setup -->
<item
android:id="@+id/cancel_setup"
android:checked="false"
android:checked="true"
android:enabled="true"
android:icon="@drawable/baseline_close_24"
android:title="@string/cancel"
@ -17,8 +17,8 @@
<item
android:id="@+id/setup_finish"
android:checked="false"
android:enabled="false"
android:icon="@drawable/baseline_check_24"
android:enabled="true"
android:icon="@drawable/baseline_keyboard_arrow_right_24"
android:title="@string/finish"
app:showAsAction="ifRoom" />
</menu>

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.MagiskModuleManager.Light" parent="Theme.Material3.Light">
<item name="isLightTheme">true</item>
<!-- Primary brand color. -->
<item name="colorPrimary">@color/indigo_200</item>
<item name="colorPrimaryVariant">@color/white</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/blue_200</item>
<item name="colorSecondaryVariant">@color/blue_200</item>
<item name="colorOnSecondary">@color/white</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">@color/status_bar_color</item>
<item name="android:navigationBarColor">@color/transparent</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:windowLightNavigationBar">true</item>
<!-- Customize your theme here. -->
<item name="android:windowActivityTransitions">true</item>
<!-- <item name="android:activityOpenEnterAnimation">@*android:anim/slide_in_right</item>
<item name="android:activityOpenExitAnimation">@*android:anim/slide_out_left</item>
<item name="android:activityCloseEnterAnimation">@*android:anim/slide_in_left</item>
<item name="android:activityCloseExitAnimation">@*android:anim/slide_out_right</item> -->
<item name="android:windowEnterAnimation">@android:anim/fade_in</item>
<item name="android:windowExitAnimation">@android:anim/fade_out</item>
<item name="colorBackgroundFloating">@color/light_colorBackgroundFloating</item>
<item name="backgroundColor">@color/light_backgroundColor</item>
<item name="chipStyle">@style/Widget.Material3.Chip.Assist.Elevated</item>
<item name="android:actionBarStyle">@style/Theme.Design.NoActionBar</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="cornerRadius">@dimen/card_corner_radius</item>
</style>
</resources>

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.MagiskModuleManager.Light" parent="Theme.Material3.Light">
<item name="android:isLightTheme">true</item>
<item name="isLightTheme">true</item>
<!-- Primary brand color. -->
<item name="colorPrimary">@color/indigo_200</item>
<item name="colorPrimaryVariant">@color/white</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/blue_200</item>
<item name="colorSecondaryVariant">@color/blue_200</item>
<item name="colorOnSecondary">@color/white</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">@color/status_bar_color</item>
<item name="android:navigationBarColor">@color/transparent</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:windowLightNavigationBar">true</item>
<!-- Customize your theme here. -->
<item name="android:windowActivityTransitions">true</item>
<!-- <item name="android:activityOpenEnterAnimation">@*android:anim/slide_in_right</item>
<item name="android:activityOpenExitAnimation">@*android:anim/slide_out_left</item>
<item name="android:activityCloseEnterAnimation">@*android:anim/slide_in_left</item>
<item name="android:activityCloseExitAnimation">@*android:anim/slide_out_right</item> -->
<item name="android:windowEnterAnimation">@android:anim/fade_in</item>
<item name="android:windowExitAnimation">@android:anim/fade_out</item>
<item name="colorBackgroundFloating">@color/light_colorBackgroundFloating</item>
<item name="backgroundColor">@color/light_backgroundColor</item>
<item name="chipStyle">@style/Widget.Material3.Chip.Assist.Elevated</item>
<item name="android:actionBarStyle">@style/Theme.Design.NoActionBar</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="cornerRadius">@dimen/card_corner_radius</item>
</style>
</resources>

@ -11,9 +11,6 @@
<item name="chipStyle">@style/Widget.Material3.Chip.Assist.Elevated</item>
<!-- fix bottom navigation bar color -->
<item name="android:navigationBarColor">@color/system_accent2_100</item>
<!-- fonts -->
<item name="android:fontFamily">@font/inter</item>
<item name="font">@font/inter</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
@ -28,9 +25,6 @@
<item name="colorBackgroundFloating">@color/system_neutral1_800</item>
<item name="android:windowBackground">@color/system_neutral1_900</item>
<item name="chipStyle">@style/Widget.Material3.Chip.Assist.Elevated</item>
<!-- fonts -->
<item name="android:fontFamily">@font/inter</item>
<item name="font">@font/inter</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
@ -57,9 +51,6 @@
<item name="chipSurfaceColor">@color/system_accent2_700</item>
<!-- chips should be dark, not black -->
<item name="chipStyle">@style/Widget.Material3.Chip.Assist.Elevated</item>
<!-- fonts -->
<item name="android:fontFamily">@font/inter</item>
<item name="font">@font/inter</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>

@ -188,8 +188,7 @@
<string name="setup_background_update_check_summary">Allow us to check for module and app updates in the background. This feature may use more battery and data.</string>
<string name="setup_androidacy_repo">Enable the Androidacy repo</string>
<string name="setup_androidacy_repo_summary">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. -->
<!-- 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 Alt Repo</string>
<string name="setup_magisk_alt_repo_summary">Much more lax than the original. Has a lot of modules at the cost of some safety.</string>
<string name="setup_crash_reporting">Enable Sentry</string>
@ -401,5 +400,16 @@
<string name="update_frequency_360">6 hours</string>
<string name="update_frequency_720">12 hours</string>
<string name="update_frequency_1440">Daily</string>
<string name="ksu_experimental"><![CDATA[KernelSU support is currently <b>experimental</b> and may have issues. Compatibility with modules is not guaraunteed.]]></string>
<string name="ksu_experimental">KernelSU support is currently <b>experimental</b> and may have issues. Compatibility with modules is not guaraunteed.></string>
<string name="setup_uninstall_title">Uninstall other version?</string>
<string name="setup_uninstall_message">There\'s another version of this app present on your device. We recommend removing it to prevent unexpected behavior.\n\nApp: %s</string>
<string name="require_safe_modules_desc">Require that modules are safe. This status is repository dependent and will disable local install.</string>
<string name="require_safe_modules_pref">Only allow safe modules</string>
<string name="install_from_storage_safe_modules">For your security, local module install is disabled by module security. You can toggle this in settings <b>at your own risk</b>.</string>
<string name="install_blocked">Install blocked</string>
<string name="install_blocked_message">You currently cannot install this module because you have module security enabled in settings. Please disable it if you want to continue, but you disable <b>at your own risk</b>.</string>
<string name="setup_require_security">Require modules be safe</string>
<string name="setup_require_security_summary">Requires modules to be marked as safe before installing. This will disable local module install and module safety is determined by the repository owner.</string>
<string name="setup_agree_eula_toast">Please agree to the terms first</string>
<string name="setup_androidacy_repo_recommendation">We recommend you to enable just the Androidacy repo. This ensures you will receive an optimized and more secure experience.</string>
</resources>

@ -19,7 +19,6 @@
<item name="android:statusBarColor">@color/status_bar_color</item>
<item name="android:navigationBarColor">@color/transparent</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">true</item>
<!-- Customize your theme here. -->
<item name="android:windowActivityTransitions">true</item>
<!-- <item name="android:activityOpenEnterAnimation">@*android:anim/slide_in_right</item>
@ -32,9 +31,6 @@
<item name="backgroundColor">@color/light_backgroundColor</item>
<item name="chipStyle">@style/Widget.Material3.Chip.Assist.Elevated</item>
<item name="android:actionBarStyle">@style/Theme.Design.NoActionBar</item>
<!-- fonts -->
<item name="android:fontFamily">@font/inter</item>
<item name="font">@font/inter</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
@ -60,9 +56,6 @@
<!-- Action bar -->
<item name="actionBarStyle">@style/Theme.Design.NoActionBar</item>
<item name="chipStyle">@style/Widget.Material3.Chip.Assist.Elevated</item>
<!-- fonts -->
<item name="android:fontFamily">@font/inter</item>
<item name="font">@font/inter</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
@ -86,7 +79,6 @@
<item name="android:statusBarColor">@color/status_bar_color</item>
<item name="android:navigationBarColor">@color/transparent</item>
<item name="android:windowLightStatusBar">false</item>
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">false</item>
<!-- Customize your theme here. -->
<item name="android:windowActivityTransitions">true</item>
<!-- <item name="android:activityOpenEnterAnimation">@*android:anim/slide_in_right</item>
@ -98,9 +90,6 @@
<item name="colorBackgroundFloating">@color/dark_colorBackgroundFloating</item>
<item name="backgroundColor">@color/dark_backgroundColor</item>
<item name="android:actionBarStyle">@style/Theme.Design.NoActionBar</item>
<!-- fonts -->
<item name="android:fontFamily">@font/inter</item>
<item name="font">@font/inter</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
@ -128,9 +117,6 @@
<!-- chips should be dark, not black -->
<item name="android:actionBarStyle">@style/Theme.Design.NoActionBar</item>
<item name="chipStyle">@style/Widget.Material3.Chip.Assist.Elevated</item>
<!-- fonts -->
<item name="android:fontFamily">@font/inter</item>
<item name="font">@font/inter</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>

@ -28,6 +28,15 @@
app:singleLineTitle="false"
app:summary="@string/prevent_reboot_desc"
app:title="@string/prevent_reboot_pref" />
<!-- require safe modules -->
<SwitchPreferenceCompat
app:defaultValue="false"
app:icon="@drawable/ic_baseline_warning_24"
app:key="pref_require_security"
app:singleLineTitle="false"
app:summary="@string/require_safe_modules_desc"
app:title="@string/require_safe_modules_pref" />
</PreferenceCategory>
</PreferenceScreen>
Loading…
Cancel
Save