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