Android11系统去掉截屏功能

  1. 去掉Settings里截屏菜单条目,packages/apps/Settings:
java 复制代码
diff --git a/res/xml/top_level_settings.xml b/res/xml/top_level_settings.xml
old mode 100644
new mode 100755
index a5e4d06..a9420bb
--- a/res/xml/top_level_settings.xml
+++ b/res/xml/top_level_settings.xml
@@ -125,13 +125,13 @@
         android:fragment="com.android.settings.accessibility.AccessibilitySettings"
         settings:controller="com.android.settings.accessibility.TopLevelAccessibilityPreferenceController"/>
 
-    <Preference
+    <!-- Preference
         android:key="top_level_screenshot"
         android:title="@string/screenshot_manager"
         android:summary="@string/screenshot_manager"
         android:icon="@drawable/ic_homepage_screenshot"
         android:order="-10"
-        android:fragment="com.android.settings.ScreenshotSettings"/>
+        android:fragment="com.android.settings.ScreenshotSettings"/ -->
 
     <Preference
         android:key="top_level_system"
  1. 去掉power键+音量减键组合截屏功能,frameworks/base:
java 复制代码
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 95c532e..3f4ebe8 100755
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -966,7 +966,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                 && (event.getFlags() & KeyEvent.FLAG_FALLBACK) == 0) {
             mScreenshotChordPowerKeyTriggered = true;
             mScreenshotChordPowerKeyTime = event.getDownTime();
-            interceptScreenshotChord();
+            //interceptScreenshotChord();
             interceptRingerToggleChord();
         }
 
@@ -3841,7 +3841,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                             mScreenshotChordVolumeDownKeyTime = event.getDownTime();
                             mScreenshotChordVolumeDownKeyConsumed = false;
                             cancelPendingPowerKeyAction();
-                            interceptScreenshotChord();
+                            //interceptScreenshotChord();
                             interceptAccessibilityShortcutChord();
                         }
                     } else {
相关推荐
叫致寒吧19 小时前
Tomcat详解
java·tomcat
踢球的打工仔21 小时前
PHP面向对象(7)
android·开发语言·php
安卓理事人21 小时前
安卓socket
android
S***26751 天前
基于SpringBoot和Leaflet的行政区划地图掩膜效果实战
java·spring boot·后端
马剑威(威哥爱编程)1 天前
鸿蒙6开发视频播放器的屏幕方向适配问题
java·音视频·harmonyos
JIngJaneIL1 天前
社区互助|社区交易|基于springboot+vue的社区互助交易系统(源码+数据库+文档)
java·数据库·vue.js·spring boot·论文·毕设·社区互助
V***u4531 天前
MS SQL Server partition by 函数实战二 编排考场人员
java·服务器·开发语言
这是程序猿1 天前
基于java的ssm框架旅游在线平台
java·开发语言·spring boot·spring·旅游·旅游在线平台
i***t9191 天前
基于SpringBoot和PostGIS的云南与缅甸的千里边境线实战
java·spring boot·spring
k***08291 天前
【监控】spring actuator源码速读
java·spring boot·spring