===========================================================
init
system/core/init
readme.txt
keywords.h -init command
===========================================================
Android 6:
查詢相對應的Key_code
frameworks/base/data/keyboards/Generic.kl
處理Key_Event
frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
158 /* KEY_BACK */
172 /* KEY_HOMEPAGE */
580 /* APP_SWITCH */
/frameworks/base/core/res/res/values/config.xml
===========================================================
Disable the software navigation bar
<bool name="config_showNavigationBar">false</bool>
Check the device init.rc don't "setprop sys.device.type tablet"
If deivetpye is tablet, the mHasNavigationBar will be true.
// Allow a system property to override this. Used by the emulator.
// See also hasNavigationBar().
String navBarOverride = SystemProperties.get("qemu.hw.mainkeys");
if ("1".equals(navBarOverride)) {
mHasNavigationBar = false;
} else if ("0".equals(navBarOverride)) {
mHasNavigationBar = true;
}
//if device type is tablet force enable NavigationBar and forbid NavigationBar move
String deviceType = SystemProperties.get("sys.device.type");
if (! "".equals(deviceType) && deviceType.equals("tablet")) {
mNavigationBarCanMove = false;
mHasNavigationBar = true;
}
===========================================================
Screen flip
frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
if (mForceDefaultOrientation) {
return Surface.ROTATION_0;
}
+ return Surface.ROTATION_180;
synchronized (mLock) {
===========================================================
沒有留言:
張貼留言