install system app
- add permission
/frameworks/base/data/etc/oobe.xml /frameworks/base/data/etc/privapp-permissions-platform.xml
-
sign apk tools all from rom source code java -Djava.library.path=. -jar signapk.jar platform.x509.pem platform.pk8 ./app-debug.apk ./app-debug-sign.apk
-
android:sharedUserId="android.uid.system"
-
fullscreen, immersive = toggleFreeformWindowingMode & hide natvigation/statusbar /frameworks/base/core/java/com/android/internal/policy/DecorView.java
setSystemUiVisibility(
View.SYSTEM_UI_FLAG_IMMERSIVE
// Set the content to appear under the system bars so that the
// content doesn't resize when the system bars hide and show.
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
// Hide the nav bar and status bar
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
public void toggleFreeformWindowingMode(){
Window.WindowControllerCallback callback = mWindow.getWindowControllerCallback();
final int windowingMode =
getResources().getConfiguration().windowConfiguration.getWindowingMode();
try {
if (windowingMode == WINDOWING_MODE_FREEFORM && callback != null) {
callback.toggleFreeformWindowingMode();
updateDecorCaptionShade();
} else if (windowingMode != WINDOWING_MODE_FREEFORM && callback != null) {
callback.toggleFreeformWindowingMode();
updateDecorCaptionShade();
}
} catch (RemoteException ex) {
Log.e(TAG, "Catch exception when process F11", ex);
}
}