瑞芯微Rockchip开发者社区
直播中

无厘头

13年用户 546经验值
擅长:基础元器件
私信 关注
[问答]

RK3288如何隐藏底部状态栏截屏按钮?

RK3288如何隐藏底部状态栏截屏按钮?

回帖(1)

陈忠阳

2022-3-3 10:54:09
修改frameworks/base/packages/SystemUI/src/com/android/systemui/statu***ar/phone/PhoneStatusBar.java文件

dongsy@build-server-100:~/work/dsy/3288_haier/work/3288-7.1/haier/frameworks(master)$ git diff base/packages/SystemUI/src/com/android/systemui/statu***ar/phone/PhoneStatusBar.java
diff --git a/haier/frameworks/base/packages/SystemUI/src/com/android/systemui/statu***ar/phone/PhoneStatusBar.java b/haier/frameworks/ba
index f55d1f7..7fded5d 100755
--- a/haier/frameworks/base/packages/SystemUI/src/com/android/systemui/statu***ar/phone/PhoneStatusBar.java
+++ b/haier/frameworks/base/packages/SystemUI/src/com/android/systemui/statu***ar/phone/PhoneStatusBar.java
@@ -477,8 +477,10 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
     final private ContentObserver screenshotShowObserver = new ContentObserver(mHandler) {
         @Override
         public void onChange(boolean selfChange) {
-            boolean isShow = Settings.System.getInt(mContext.getContentResolver(), Settings.System.SCREENSHOT_BUTTON_SHOW, 1) == 1;
-            ButtonDispatcher screenshotButton = mNavigationBarView.getScreenshotButton();
+                //20190809 modified  by elink_dongsy for  hide screenshot capture virtual buttons start  
+            boolean isShow = Settings.System.getInt(mContext.getContentResolver(), Settings.System.SCREENSHOT_BUTTON_SHOW, 0) == 0;
+         //20190809 modified  by elink_dongsy for  hide screenshot capture virtual buttons end
+                   ButtonDispatcher screenshotButton = mNavigationBarView.getScreenshotButton();
             screenshotButton.setVisibility(isShow ? View.VISIBLE : View.GONE);//这里是通过判断isShow值为1,则状态为View.VISIBLE 在底部状态栏显示截屏按钮;isShow值为0,则状态为View.GONE在底部状态栏上隐藏截屏按钮
         }
     };
@@ -1461,8 +1463,10 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
         screenshotButton.setOnClickListener(mScreenshotClickListener);
         screenshotButton.setOnTouchListener(mScreenshotTouchListener);
         screenshotButton.setVisibility(View.VISIBLE);
-        boolean isShow=Settings.System.getInt(mContext.getContentResolver(), Settings.System.SCREENSHOT_BUTTON_SHOW, 1)==1;
-        if(isShow){
+                //20190809 modified  by elink_dongsy for  hide screenshot capture virtual buttons start
+        boolean isShow=Settings.System.getInt(mContext.getContentResolver(), Settings.System.SCREENSHOT_BUTTON_SHOW, 0)==0;
+         //20190809 modified  by elink_dongsy for  hide screenshot capture virtual buttons end
+               if(isShow){    //如果isShow值为1,则 状态为View.VISIBLE 在底部状态栏显示截屏按钮
             screenshotButton.setVisibility(View.VISIBLE);
         }else{//否则isShow值为0,则状态为View.GONE在底部状态栏上隐藏截屏按钮
             screenshotButton.setVisibility(View.GONE);

根据我们现在修改的方式代码是默认在底部状态栏上隐藏截屏按钮,所以需要修改以下文件
修改/packages/apps/Settings/res/values/strings.xml文件

dongsy@build-server-100:~/work/dsy/3288_haier/work/3288-7.1/haier/frameworks(master)$ git diff ../packages/apps/Settings/res/values/strings.xml
diff --git a/haier/packages/apps/Settings/res/values/strings.xml b/haier/packages/apps/Settings/res/values/strings.xml
index a895fb6..ef911d1 100755
--- a/haier/packages/apps/Settings/res/values/strings.xml
+++ b/haier/packages/apps/Settings/res/values/strings.xml
@@ -7936,7 +7936,9 @@
     ScreenshotManager
     ScreenshotSetting
     Select delay time to capture the screen
-    Show the screenshot button in the statu***ar
+   
+    Hide the screenshot button in the statu***ar
+   
     Show the version of screenshot manager.
     Set the location of screenshot storage
     s later capture

修改/packages/apps/Settings/res/values-zh-rCN/strings.xml文件

dongsy@build-server-100:~/work/dsy/3288_haier/work/3288-7.1/haier/frameworks(master)$ git diff ../packages/apps/Settings/res/values-zh-rCN/strings.xml
diff --git a/haier/packages/apps/Settings/res/values-zh-rCN/strings.xml b/haier/packages/apps/Settings/res/values-zh-rCN/strings.xml
index 8fff2ff..2951ab0 100755
--- a/haier/packages/apps/Settings/res/values-zh-rCN/strings.xml
+++ b/haier/packages/apps/Settings/res/values-zh-rCN/strings.xml
@@ -3258,7 +3258,9 @@
     截屏管理器
截屏设置
    延时截屏设置
-  在状态栏上显示截屏按钮
+     
+    在状态栏上隐藏截屏按钮
+   
    截屏管理器版本
    设置截屏图片存储位置
举报

更多回帖

发帖
×
20
完善资料,
赚取积分