我们的应用程序跑在 RK3399Pro 上面,是一个公共场合使用的代码,所以把菜单底部的返回,HOME,都隐藏,并且参考菜单导航栏下拉功能要取消。
我是 Firefly 的写代码三个
实现功能框架层添加功能
1.导航栏添加手机功能。
2.导航栏支持横屏切换功能。
3.导航栏支持动态和导航显示栏,永久关闭导航栏在框架层提供借用外部使用
不多说,直接上代码
frameworks/base/core/java/android/content/Intent.java
diff --git a/frameworks/base/core/java/android/content/Intent.java b/frameworks/base/core/java/android/content/Intent.java
index 6fd333a0c9..1dc8da6746 100755
--- a/frameworks/base/core/java/android/content/Intent.java
+++ b/frameworks/base/core/java/android/content/Intent.java
@@ -2079,6 +2079,31 @@ public class Intent implements Parcelable, Cloneable {
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_CLOSE_SYSTEM_DIALOGS = "android.intent.action.CLOSE_SYSTEM_DIALOGS";
+
+ /****/
+ /**firefly_modify_songjf Broadcast Action:Status bar hidden
+ * @hide
+ */
+ public static final String ACTION_HIDE_BAR = "action.HIDE_STATUSBAR";
+ /****/
+ /**firefly_modify_songjf Broadcast Action:Status bar show
+ * @hide
+ */
+ public static final String ACTION_SHOW_BAR = "action.SHOW_STATUSBAR";
+
+ /****/
+ /**firefly_modify_songjf Broadcast Action:Status bar show
+ * @hide
+ */
+ public static final String ACTION_ALWAYS_HIDE_BAR_CHANGE = "action.ALWAYS_HIDE_STATUSBAR_CHENAGE";
+
+
+ /****/
+ /**firefly_modify_songjf Broadcast Action:poweroff
+ * @hide
+ */
+ public static final String ACTION_SYSTEMUI_FIREFLY_POWEROFF = "action.SYSTEMUI_FIREFLY_POWEROFF";
+
/**
* Broadcast Action: Trigger the download and eventual installation
* of a package.
frameworks/base/core/java/android/provider/Settings.java
diff --git a/frameworks/base/core/java/android/provider/Settings.java b/frameworks/base/core/java/android/provider/Settings.java
index d5a9d09ce4..a4fbd2064f 100755
--- a/frameworks/base/core/java/android/provider/Settings.java
+++ b/frameworks/base/core/java/android/provider/Settings.java
@@ -3627,6 +3627,23 @@ public final class Settings {
*/
public static final String SCREENSHOT_BUTTON_SHOW = "screenshot_button_show";
+ /**
+ *hidebar button wether display
+ * @hide
+ */
+ public static final String HIDEBAR_BUTTON_SHOW = "hidebar_button_show";
+
+ /**
+ *hide status bar
+ * @hide
+ */
+ public static final String ALWAYS_HIDE_BAR="always_hide_bar";
+
+ /**
+ * if enabled while show rotation in SystenUI and Settings-DisplaySettings
+ * @hide
+ */
+ public static final String ENABLE_ROTATION_BY_USER = "enable_rotation_by_user";
/**
* Whether the phone vibrates when it is ringing due to an incoming call. This will
* be used by Phone and Setting apps; it shouldn't affect other apps.
frameworks/base/core/java/com/android/internal/statu***ar/IStatusBar.aidl
diff --git a/frameworks/base/core/java/com/android/internal/statu***ar/IStatusBar.aidl b/frameworks/base/core/java/com/android/internal/statu***ar/IStatusBar.aidl
index bab0306aaf..8da31c5df1 100644
--- a/frameworks/base/core/java/com/android/internal/statu***ar/IStatusBar.aidl
+++ b/frameworks/base/core/java/com/android/internal/statu***ar/IStatusBar.aidl
@@ -55,6 +55,10 @@ oneway interface IStatusBar
boolean showImeSwitcher);
void setWindowState(int window, int state);
+
+ //firefly_modify_songjf, add bar interface
+ void addBar();
+
void showRecentApps(boolean triggeredFromAltTab, boolean fromHome);
void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey);
void toggleRecentApps();
frameworks/base/core/java/com/android/internal/statu***ar/IStatusBarService.aidl
diff --git a/frameworks/base/core/java/com/android/internal/statu***ar/IStatusBarService.aidl b/frameworks/base/core/java/com/android/internal/statu***ar/IStatusBarService.aidl
index 82eb1abcba..4f59192186 100644
--- a/frameworks/base/core/java/com/android/internal/statu***ar/IStatusBarService.aidl
+++ b/frameworks/base/core/java/com/android/internal/statu***ar/IStatusBarService.aidl
@@ -73,6 +73,9 @@ interface IStatusBarService
void shutdown();
void reboot(boolean safeMode);
+ //firefly_modify_songjf, add bar interface
+ void addBar();
+
void addTile(in ComponentName tile);
void remTile(in ComponentName tile);
void clickTile(in ComponentName tile);
frameworks/base/packages/SettingsProvider/res/values/custom_defaults.xml
diff --git a/frameworks/base/packages/SettingsProvider/res/values/custom_defaults.xml b/frameworks/base/packages/SettingsProvider/res/values/custom_defaults.xml
new file mode 100644
index 0000000000..53da8c515b
--- /dev/null
+++ b/frameworks/base/packages/SettingsProvider/res/values/custom_defaults.xml
@@ -0,0 +1,10 @@
+
+
+
+ true
+
+ false
+
+
+ true
+
frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
diff --git a/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index d8f3daf1d4..858babef54 100644
--- a/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -2339,6 +2339,16 @@ class DatabaseHelper extends SQLiteOpenHelper {
loadIntegerSetting(stmt, Settings.System.SCREENSHOT_BUTTON_SHOW,
R.integer.def_screenshot_button_show);
+ loadBooleanSetting(stmt, Settings.System.HIDEBAR_BUTTON_SHOW,
+ R.bool.def_hidebar_button_show);
+
+ loadBooleanSetting(stmt, Settings.System.ALWAYS_HIDE_BAR,
+ R.bool.def_always_hide_bar);
+
+
+ loadBooleanSetting(stmt, Settings.System.ENABLE_ROTATION_BY_USER,
+ R.bool.def_enable_rotation_by_user);
+
/*
* IMPORTANT: Do not add any more upgrade steps here as the global,
* secure, and system settings are no longer stored in a database
frameworks/base/packages/SystemUI/res/layout/hide_bar.xml
我们的应用程序跑在 RK3399Pro 上面,是一个公共场合使用的代码,所以把菜单底部的返回,HOME,都隐藏,并且参考菜单导航栏下拉功能要取消。
我是 Firefly 的写代码三个
实现功能框架层添加功能
1.导航栏添加手机功能。
2.导航栏支持横屏切换功能。
3.导航栏支持动态和导航显示栏,永久关闭导航栏在框架层提供借用外部使用
不多说,直接上代码
frameworks/base/core/java/android/content/Intent.java
diff --git a/frameworks/base/core/java/android/content/Intent.java b/frameworks/base/core/java/android/content/Intent.java
index 6fd333a0c9..1dc8da6746 100755
--- a/frameworks/base/core/java/android/content/Intent.java
+++ b/frameworks/base/core/java/android/content/Intent.java
@@ -2079,6 +2079,31 @@ public class Intent implements Parcelable, Cloneable {
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_CLOSE_SYSTEM_DIALOGS = "android.intent.action.CLOSE_SYSTEM_DIALOGS";
+
+ /****/
+ /**firefly_modify_songjf Broadcast Action:Status bar hidden
+ * @hide
+ */
+ public static final String ACTION_HIDE_BAR = "action.HIDE_STATUSBAR";
+ /****/
+ /**firefly_modify_songjf Broadcast Action:Status bar show
+ * @hide
+ */
+ public static final String ACTION_SHOW_BAR = "action.SHOW_STATUSBAR";
+
+ /****/
+ /**firefly_modify_songjf Broadcast Action:Status bar show
+ * @hide
+ */
+ public static final String ACTION_ALWAYS_HIDE_BAR_CHANGE = "action.ALWAYS_HIDE_STATUSBAR_CHENAGE";
+
+
+ /****/
+ /**firefly_modify_songjf Broadcast Action:poweroff
+ * @hide
+ */
+ public static final String ACTION_SYSTEMUI_FIREFLY_POWEROFF = "action.SYSTEMUI_FIREFLY_POWEROFF";
+
/**
* Broadcast Action: Trigger the download and eventual installation
* of a package.
frameworks/base/core/java/android/provider/Settings.java
diff --git a/frameworks/base/core/java/android/provider/Settings.java b/frameworks/base/core/java/android/provider/Settings.java
index d5a9d09ce4..a4fbd2064f 100755
--- a/frameworks/base/core/java/android/provider/Settings.java
+++ b/frameworks/base/core/java/android/provider/Settings.java
@@ -3627,6 +3627,23 @@ public final class Settings {
*/
public static final String SCREENSHOT_BUTTON_SHOW = "screenshot_button_show";
+ /**
+ *hidebar button wether display
+ * @hide
+ */
+ public static final String HIDEBAR_BUTTON_SHOW = "hidebar_button_show";
+
+ /**
+ *hide status bar
+ * @hide
+ */
+ public static final String ALWAYS_HIDE_BAR="always_hide_bar";
+
+ /**
+ * if enabled while show rotation in SystenUI and Settings-DisplaySettings
+ * @hide
+ */
+ public static final String ENABLE_ROTATION_BY_USER = "enable_rotation_by_user";
/**
* Whether the phone vibrates when it is ringing due to an incoming call. This will
* be used by Phone and Setting apps; it shouldn't affect other apps.
frameworks/base/core/java/com/android/internal/statu***ar/IStatusBar.aidl
diff --git a/frameworks/base/core/java/com/android/internal/statu***ar/IStatusBar.aidl b/frameworks/base/core/java/com/android/internal/statu***ar/IStatusBar.aidl
index bab0306aaf..8da31c5df1 100644
--- a/frameworks/base/core/java/com/android/internal/statu***ar/IStatusBar.aidl
+++ b/frameworks/base/core/java/com/android/internal/statu***ar/IStatusBar.aidl
@@ -55,6 +55,10 @@ oneway interface IStatusBar
boolean showImeSwitcher);
void setWindowState(int window, int state);
+
+ //firefly_modify_songjf, add bar interface
+ void addBar();
+
void showRecentApps(boolean triggeredFromAltTab, boolean fromHome);
void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey);
void toggleRecentApps();
frameworks/base/core/java/com/android/internal/statu***ar/IStatusBarService.aidl
diff --git a/frameworks/base/core/java/com/android/internal/statu***ar/IStatusBarService.aidl b/frameworks/base/core/java/com/android/internal/statu***ar/IStatusBarService.aidl
index 82eb1abcba..4f59192186 100644
--- a/frameworks/base/core/java/com/android/internal/statu***ar/IStatusBarService.aidl
+++ b/frameworks/base/core/java/com/android/internal/statu***ar/IStatusBarService.aidl
@@ -73,6 +73,9 @@ interface IStatusBarService
void shutdown();
void reboot(boolean safeMode);
+ //firefly_modify_songjf, add bar interface
+ void addBar();
+
void addTile(in ComponentName tile);
void remTile(in ComponentName tile);
void clickTile(in ComponentName tile);
frameworks/base/packages/SettingsProvider/res/values/custom_defaults.xml
diff --git a/frameworks/base/packages/SettingsProvider/res/values/custom_defaults.xml b/frameworks/base/packages/SettingsProvider/res/values/custom_defaults.xml
new file mode 100644
index 0000000000..53da8c515b
--- /dev/null
+++ b/frameworks/base/packages/SettingsProvider/res/values/custom_defaults.xml
@@ -0,0 +1,10 @@
+
+
+
+ true
+
+ false
+
+
+ true
+
frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
diff --git a/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index d8f3daf1d4..858babef54 100644
--- a/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -2339,6 +2339,16 @@ class DatabaseHelper extends SQLiteOpenHelper {
loadIntegerSetting(stmt, Settings.System.SCREENSHOT_BUTTON_SHOW,
R.integer.def_screenshot_button_show);
+ loadBooleanSetting(stmt, Settings.System.HIDEBAR_BUTTON_SHOW,
+ R.bool.def_hidebar_button_show);
+
+ loadBooleanSetting(stmt, Settings.System.ALWAYS_HIDE_BAR,
+ R.bool.def_always_hide_bar);
+
+
+ loadBooleanSetting(stmt, Settings.System.ENABLE_ROTATION_BY_USER,
+ R.bool.def_enable_rotation_by_user);
+
/*
* IMPORTANT: Do not add any more upgrade steps here as the global,
* secure, and system settings are no longer stored in a database
frameworks/base/packages/SystemUI/res/layout/hide_bar.xml
举报