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