stricter accessibility settings restriction
This commit is contained in:
parent
a017d1e27f
commit
6002eaf0cf
|
|
@ -91,12 +91,10 @@ class DigicaService : AccessibilityService() {
|
||||||
&& className == "android.app.AlertDialog"
|
&& className == "android.app.AlertDialog"
|
||||||
&& event.text.getOrNull(0) == appLabel
|
&& event.text.getOrNull(0) == appLabel
|
||||||
|
|
||||||
// Is user trying to disable the service?
|
// Is user entering the accessibility service page?
|
||||||
val attemptingDisableService = pkgName == "com.android.settings"
|
val attemptingServicePage = pkgName == "com.android.settings"
|
||||||
&& (className == "android.app.AlertDialog"
|
&& className == "com.android.settings.SubSettings"
|
||||||
|| className == "androidx.appcompat.app.AlertDialog")
|
&& event.text.getOrNull(0) == serviceLabel
|
||||||
&& event.text.size == 3
|
|
||||||
&& event.text[0].contains(serviceLabel)
|
|
||||||
|
|
||||||
// Is user trying to go on a banned app?
|
// Is user trying to go on a banned app?
|
||||||
val usingApp = pkgName == "com.zhiliaoapp.musically"
|
val usingApp = pkgName == "com.zhiliaoapp.musically"
|
||||||
|
|
@ -104,7 +102,7 @@ class DigicaService : AccessibilityService() {
|
||||||
|| pkgName == "app.revanced.android.youtube"
|
|| pkgName == "app.revanced.android.youtube"
|
||||||
|
|
||||||
val attempting = (attemptingUninstall
|
val attempting = (attemptingUninstall
|
||||||
|| attemptingDisableService
|
|| attemptingServicePage
|
||||||
|| attemptingForceStop
|
|| attemptingForceStop
|
||||||
|| usingApp)
|
|| usingApp)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
|
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:description="@string/accessibility_service_description"
|
android:description="@string/accessibility_service_description"
|
||||||
android:accessibilityEventTypes="typeWindowStateChanged|typeViewClicked"
|
android:accessibilityEventTypes="typeWindowStateChanged"
|
||||||
android:accessibilityFlags="flagDefault"
|
android:accessibilityFlags="flagDefault"
|
||||||
android:accessibilityFeedbackType="feedbackGeneric"
|
android:accessibilityFeedbackType="feedbackGeneric"
|
||||||
android:notificationTimeout="0"
|
android:notificationTimeout="0"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue