xiongzhu 10 months ago
parent
commit
7edb304733

+ 1 - 0
app/src/main/java/com/example/modifier/service/ModifierService.kt

@@ -236,6 +236,7 @@ class ModifierService : AccessibilityService() {
                 checkPif()
                 if (Build.MODEL.startsWith("SM-F707") || Build.MODEL.startsWith("SM-F711")) {
                     killPhoneProcess(force = false)
+                    delay(15.seconds)
                 }
             }
             appStateRepo.updateRuntimeFlags(preparing = false)

+ 7 - 7
app/src/main/java/com/example/modifier/utils/System.kt

@@ -181,13 +181,13 @@ suspend fun optimize() {
         "cmd netpolicy add restrict-background-blacklist ${info.uid}",
         "pm grant ${BuildConfig.APPLICATION_ID} android.permission.POST_NOTIFICATIONS",
     )
-//    if (Build.MODEL.startsWith("SM-F707") || Build.MODEL.startsWith("SM-F711")) {
-//    shellRun(
-//        "settings put global window_animation_scale 1",
-//        "settings put global transition_animation_scale 1",
-//        "settings put global animator_duration_scale 1"
-//    )
-//    }
+    if (Build.MODEL.startsWith("SM-F707") || Build.MODEL.startsWith("SM-F711")) {
+        shellRun(
+            "settings put global window_animation_scale 0",
+            "settings put global transition_animation_scale 0",
+            "settings put global animator_duration_scale 0"
+        )
+    }
 }
 
 suspend fun syncTime() {