mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2026-08-31 19:03:45 +02:00
Add suport for accessibility service permission
This commit is contained in:
@@ -107,6 +107,20 @@ export async function dispatchUpdateDeviceStatus ({ deviceId, action, cache }: {
|
||||
}
|
||||
}
|
||||
|
||||
if (action.newAccessibilityServiceEnabled !== undefined) {
|
||||
const hasChanged = deviceEntry.asEnabled !== action.newAccessibilityServiceEnabled
|
||||
|
||||
deviceEntry.asEnabled = action.newAccessibilityServiceEnabled
|
||||
|
||||
if (action.newAccessibilityServiceEnabled) {
|
||||
deviceEntry.wasAsEnabled = true
|
||||
}
|
||||
|
||||
if (hasChanged && (deviceEntry.asEnabled !== deviceEntry.wasAsEnabled)) {
|
||||
deviceEntry.hadManipulation = true
|
||||
}
|
||||
}
|
||||
|
||||
if (action.newAppVersion !== undefined) {
|
||||
const hasChanged = deviceEntry.currentAppVersion !== action.newAppVersion
|
||||
|
||||
|
||||
@@ -58,6 +58,10 @@ export async function dispatchIgnoreManipulation ({ action, cache }: {
|
||||
deviceEntry.highestOverlayPermission = deviceEntry.currentOverlayPermission
|
||||
}
|
||||
|
||||
if (action.ignoreAccessibilityServiceManipulation) {
|
||||
deviceEntry.wasAsEnabled = deviceEntry.asEnabled
|
||||
}
|
||||
|
||||
if (action.ignoreDidReboot) {
|
||||
deviceEntry.didReboot = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user