[RK3399][Android7.1] 调试笔记 --- 设置里打开返回按键

Platform: RK3399
OS: Android 7.1
Kernel: v4.4.83

原因:
在没有物理按键和导航栏的情况下没法退出设置界面,不过app里有自带此功能,
只是默认关闭的。

方法:

diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 1a615d8..e53d42b 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -629,7 +629,8 @@ public class SettingsActivity extends SettingsDrawerActivity
                         mInitialTitleResId, mInitialTitle, false);
             } else {
                 // No UP affordance if we are displaying the main Dashboard
-                mDisplayHomeAsUpEnabled = false;
+                //Kris,180724, show back key.
+                mDisplayHomeAsUpEnabled = true;
                 // Show Search affordance
                 mDisplaySearch = true;
                 mInitialTitleResId = R.string.dashboard_title;

改动后效果:
[RK3399][Android7.1] 调试笔记 --- 设置里打开返回按键_第1张图片

你可能感兴趣的:(子类__Android,RK3399)