android 7.1 底部栏不要隐藏后重启显示

diff --git a/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java b/PhoneWindowManager.java
index af0f528..80d926a 100755
--- a/PhoneWindowManager.java
+++ b/PhoneWindowManager.java
@@ -162,6 +162,16 @@ import java.io.PrintWriter;
 import java.util.ArrayList;  //add limit
 import java.util.HashSet;
 import java.util.List;
+//liao modify
+//import android.os.SystemProperties;
 /**
  * WindowManagerPolicy implementation for the Android phone UI.  This
@@ -381,6 +391,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
     WindowState mNavigationBar = null;
     boolean mHasNavigationBar = false;
        boolean mCanHideNavigationBar = false;   
     boolean mNavigationBarCanMove = false; // can the navigation bar ever move to the side?
     int mNavigationBarPosition = NAV_BAR_BOTTOM;
     int[] mNavigationBarHeightForRotationDefault = new int[4];
@@ -1913,14 +1924,17 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                         mHandler.removeMessages(MSG_REQUEST_TRANSIENT_BARS);
                     }
                 });
+                   //liao
                    mNavBarListener = new NavBarEventListener(context,
                new NavBarEventListener.Callbacks() {
                     @Override
                     public void onRemoveNavBar() {
                         removeNavigationBarLw();                                      
                    }
                    @Override
                    public void onShowNavBar() {
+                                          SystemProperties.set("persist.sys.app.rotation", "show");
                         addNavigationBarLw();
                     }
                 });
@@ -2040,15 +2054,16 @@ public class PhoneWindowManager implements WindowManagerPolicy {
 
         // Allow the navigation bar to move on non-square small devices (phones).
         mNavigationBarCanMove = width != height && shortSizeDp < 600;
         // mHasNavigationBar = res.getBoolean(com.android.internal.R.bool.config_showNavigationBar);
-        mHasNavigationBar = SystemProperties.get("persist.sys.app.rotation", "middle_port").equals("heng"))
+         mHasNavigationBar = true;
         // Allow a system property to override this. Used by the emulator.
         // See also hasNavigationBar().


diff --git a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/PhoneStatusBar.java
index 36f525e..af2d25c 100755
--- a/PhoneStatusBar.java
+++ b/PhoneStatusBar.java
@@ -731,6 +731,13 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
 
         mScreenPinningRequest = new ScreenPinningRequest(mContext);
         mFalsingManager = FalsingManager.getInstance(mContext);
+               //liao add
+               String GetString = SystemProperties.get("persist.sys.app.rotation", "hide");
+               Log.d("mylog", "PhoneStatusBar=========GetString===============" + GetString);
+               if(GetString.equals("hide")){
+                       removeNavigationBar();
+               }
+               
     }
 
     protected void createIconController() {
@@ -5095,8 +5102,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
         mWindowManager.removeView(mNavigationBarView);
         mNavigationBarView = null;
         mIsNavbarShow = false;
-        Toast.makeText(mContext, "The navigation bar can be came out if we slide or click the bottom ! ! !", Toast.LENGTH_SHORT).show()
-    }
+               SystemProperties.set("persist.sys.app.rotation", "hide");
+        
+       }
 
     public void showNavigationBar() {
         // If we have no Navbar view and we should have one, create it

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不想写代码的农民工

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值