Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
hook screen capture in system_server on S to U
Browse files Browse the repository at this point in the history
  • Loading branch information
tehcneko committed Jun 1, 2024
1 parent 4df65a6 commit e8c1d93
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ public void onSystemServerLoaded(@NonNull SystemServerLoadedParam param) {
}

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
// ScreenCapture in WindowManagerService (U)
try {
hookScreenCapture(classLoader);
} catch (Throwable t) {
log("hook ScreenCapture failed", t);
}

// Screenshot detection (U)
try {
hookActivityTaskManagerService(classLoader);
Expand All @@ -72,6 +65,13 @@ public void onSystemServerLoaded(@NonNull SystemServerLoadedParam param) {
}

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
// ScreenCapture in WindowManagerService (S~U)
try {
hookScreenCapture(classLoader);
} catch (Throwable t) {
log("hook ScreenCapture failed", t);
}

if (Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
// Blackout permission check (S~T)
try {
Expand Down

0 comments on commit e8c1d93

Please sign in to comment.