完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
平台:ROCKCHIP
操作系统:Android 6.0 内核:3.10.92 默认用户不开发者选项栏,需要通过连续点击版本号7次来显示。 packagesappsSettingssrccomandroidsettingsDeviceInfoSettings.java static final int TAPS_TO_BE_A_DEVELOPER = 7; 公共无效 onResume() { super.onResume(); mDevHitCountdown = getActivity().getSharedPreferences(DevelopmentSettings.PREF_FILE, Context.MODE_PRIVATE).getBoolean(DevelopmentSettings.PREF_SHOW, android.os.Build.TYPE.equals(“eng”)) ?-1:TAPS_TO_BE_A_DEVELOPER; mDevHitToast = null; } public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { 。。.。。. if (mDevHitCountdown 》 0) { mDevHitCountdown--; if (mDevHitCountdown == 0) { getActivity().getSharedPreferences(DevelopmentSettings.PREF_FILE, Context.MODE_PRIVATE).edit().putBoolean( DevelopmentSettings.PREF_SHOW, true).apply(); if (mDevHitToast != null) { mDevHitToast.cancel(); } mDevHitToast = Toast.makeText(getActivity(), R.string.show_dev_on, Toast.LENGTH_LONG); mDevHitToast.show(); // 这是索引开发人员选项的好时机 Index.getInstance( getActivity().getApplicationContext()).updateFromClassNameResource( DevelopmentSettings.class.getName(), true, true); } else if (mDevHitCountdown 》 0 && mDevHitCountdown 《 (TAPS_TO_BE_A_DEVELOPER-2)) { if (mDevHitToast != null) { mDevHitToast.cancel(); mDevHitToast = Toast.makeText(getActivity(), getResources().getQuantityString( R.plurals.show_dev_countdown, mDevHitCountdown, mDevHitCountdown), Toast.LENGTH_SHORT); mDevHitToast.show(); } } else if (mDevHitCountdown 《 0) { //点击完7次之后 if (mDevHitToast != null) { mDevHitToast.cancel(); } mDevHitToast = Toast.makeText(getActivity(), R.string.show_dev_already, Toast.LENGTH_LONG); mDevHitToast.show(); } } 。。.。。. } 而默认引导控制是否显示由变量showDevpackages appsSettingssrccomandroidsettingsSettingsActivity.java private void updateTilesList(List《DashboardCategory》 target) { final boolean showDev = mDevelopmentPreferences.getBoolean( DevelopmentSettings.PREF_SHOW, android.os.Build.TYPE.equals(“eng”)); //因此eng才返回true 。。.。。. } else if (id == R.id.development_settings) { if (!showDev || um.hasUserRestriction( UserManager.DISALLOW_DEBUGGING_FEATURES)) { removeTile = true; //showDev为false则不显示 } } } 解决方法: diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java index 645add3..11a9c55 100755 --- a/src/com/android/settings/SettingsActivity.java +++ b/src/com/android/settings/SettingsActivity.java @@ -1236,9 +1236,11 @@ public class SettingsActivity 扩展 Activity } 私人无效更新TilesList(列表《DashboardCategory》目标){ - final boolean showDev = mDevelopmentPreferences.getBoolean( - DevelopmentSettings.PREF_SHOW, - android.os.Build.TYPE.equals(“eng”)); + /*Kris, 170413, 随时显示开发选项。*/ + // final boolean showDev = mDevelopmentPreferences.getBoolean( + // DevelopmentSettings.PREF_SHOW, + //android.os.Build.TYPE.equals(“eng”)) ; + 最终布尔 showDev = true; |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
基于米尔瑞芯微RK3576核心板/开发板的人脸疲劳检测应用方案
1760 浏览 0 评论
2096 浏览 1 评论
1771 浏览 1 评论
3106 浏览 1 评论
4025 浏览 1 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-1-11 19:31 , Processed in 1.123964 second(s), Total 73, Slave 55 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号