diff --git a/app/src/main/java/space/bdeshi/veil/Features.kt b/app/src/main/java/space/bdeshi/veil/Features.kt index e041f2a..0c805bd 100644 --- a/app/src/main/java/space/bdeshi/veil/Features.kt +++ b/app/src/main/java/space/bdeshi/veil/Features.kt @@ -1,5 +1,7 @@ package space.bdeshi.veil +data class FeatureInfo(val label: String, val description: String) + object Features { const val PREFS_NAME = "veil_prefs" const val KEY_PREFIX = "features_" @@ -21,13 +23,31 @@ object Features { BUILD_TAGS, ) - val LABELS: LinkedHashMap = linkedMapOf( - ACCESSIBILITY to "Accessibility services", - ADB to "USB / wireless debugging", - DEV_OPTIONS to "Developer options enabled", - MOCK_LOCATION to "Mock location (legacy flag only)", - ROOT_APPS to "Root/manager apps (PackageManager)", - BUILD_TAGS to "Build tags/type (test-keys, userdebug)", + val INFO: LinkedHashMap = linkedMapOf( + ACCESSIBILITY to FeatureInfo( + "Hide accessibility services", + "This app will see zero accessibility services running, even if you have some enabled.", + ), + ADB to FeatureInfo( + "Hide USB / wireless debugging", + "This app will see debugging as off, regardless of your actual setting.", + ), + DEV_OPTIONS to FeatureInfo( + "Hide developer options", + "This app will see Developer Options as disabled.", + ), + MOCK_LOCATION to FeatureInfo( + "Hide mock location (legacy flag)", + "Only covers the old pre-Android-6 system flag — modern per-app mock location isn't covered.", + ), + ROOT_APPS to FeatureInfo( + "Hide root / manager apps", + "Apps in the \"hidden packages\" list below become invisible to this app's PackageManager lookups.", + ), + BUILD_TAGS to FeatureInfo( + "Hide test-keys / userdebug build", + "This app will see build tags as release-keys/user instead of your real build.", + ), ) val DEFAULT_HIDDEN_PACKAGES: Set = setOf( diff --git a/app/src/main/java/space/bdeshi/veil/SettingsActivity.kt b/app/src/main/java/space/bdeshi/veil/SettingsActivity.kt index 29ed753..5e1de35 100644 --- a/app/src/main/java/space/bdeshi/veil/SettingsActivity.kt +++ b/app/src/main/java/space/bdeshi/veil/SettingsActivity.kt @@ -74,9 +74,9 @@ class SettingsActivity : Activity() { setPadding(0, dp(24), 0, dp(4)) }) root.addView(TextView(this).apply { - text = "Used by the \"Root/manager apps\" toggle above — apps in this list become " + - "invisible to getPackageInfo/getInstalledPackages for any target app with that " + - "toggle on." + text = "Used by the \"Hide root / manager apps\" checkbox above — apps in this list " + + "become invisible to PackageManager lookups for any target app with that box " + + "checked." setPadding(0, 0, 0, dp(8)) }) @@ -154,10 +154,15 @@ class SettingsActivity : Activity() { textSize = 16f setTypeface(typeface, Typeface.BOLD) }) + card.addView(TextView(this).apply { + text = "Checking a box below hides that thing from this app specifically — it stays " + + "on for every other app." + setPadding(0, 0, 0, dp(8)) + }) - for ((id, label) in Features.LABELS) { + for ((id, info) in Features.INFO) { card.addView(CheckBox(this).apply { - text = label + text = info.label isChecked = id in enabled setOnCheckedChangeListener { _, isChecked -> val current = (prefs.getStringSet(Features.keyFor(pkg), Features.ALL) ?: Features.ALL).toMutableSet() @@ -166,6 +171,11 @@ class SettingsActivity : Activity() { fixPermissions() } }) + card.addView(TextView(this).apply { + text = info.description + textSize = 13f + setPadding(dp(32), 0, 0, dp(8)) + }) } card.addView(Button(this).apply {