写在前面:本文给出Android 13 手机/平板原生SystemUI 一些实用的屏蔽补丁。
1、屏蔽导航栏
导航栏屏蔽很简单,直接把创建导航栏的代码屏蔽即可。
代码路径:frameworks\base\packages\SystemUI\src\com\android\systemui\statusbar\phone\CentralSurfacesImpl.java
// ================================================================================
// Constructing the view
// ================================================================================
protected void makeStatusBarView(@Nullable RegisterStatusBarResult result) {
. . . . . .
. . . . . .
. . . . . .
//createNavigationBar(result);//注释这行代码即可
. . . . . .
. . . . . .
. . . . . .
}
2、屏蔽锁屏
diff --git a/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
index 99b15db780..e68bc2f410 100644
--- a/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
+++ b/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -82,7 +82,7 @@
<integer name="def_max_sound_trigger_detection_service_ops_per_day" translatable="false">1000</integer>
<integer name="def_sound_trigger_detection_service_op_timeout" translatable="false">15000</integer>
- <bool name="def_lockscreen_disabled">false</bool>
+ <bool name="def_lockscreen_disabled">true</bool>
<bool name="def_device_provisioned">false</bool>
<integer name="def_dock_audio_media_enabled">1</integer>
diff --git a/packages/apps/Settings/res/xml/security_settings_picker.xml b/packages/apps/Settings/res/xml/security_settings_picker.xml
index aed702983c..1c4ee9854e 100644
--- a/packages/apps/Settings/res/xml/security_settings_picker.xml
+++ b/packages/apps/Settings/res/xml/security_settings_picker.xml
@@ -24,7 +24,7 @@
android:icon="@drawable/ic_lock_none"
android:persistent="false"/>
- <com.android.settingslib.RestrictedPreference
+ <!-- <com.android.settingslib.RestrictedPreference
android:key="unlock_set_none"
android:title="@string/unlock_set_unlock_none_title"
android:icon="@drawable/ic_lock_swipe"
@@ -70,6 +70,6 @@
<com.android.settingslib.widget.FooterPreference
android:key="lock_settings_footer"
android:selectable="false"
- settings:searchable="false"/>
+ settings:searchable="false"/> -->
</PreferenceScreen>
diff --git a/packages/apps/Settings/src/com/android/settings/password/ChooseLockGeneric.java b/packages/apps/Settings/src/com/android/settings/password/ChooseLockGeneric.java
index 8a4e9bb6c1..a1ca5340e3 100644
--- a/packages/apps/Settings/src/com/android/settings/password/ChooseLockGeneric.java
+++ b/packages/apps/Settings/src/com/android/settings/password/ChooseLockGeneric.java
@@ -656,11 +656,11 @@ public class ChooseLockGeneric extends SettingsActivity {
// Used for testing purposes
findPreference(ScreenLockType.NONE.preferenceKey).setViewId(R.id.lock_none);
- findPreference(KEY_SKIP_FINGERPRINT).setViewId(R.id.lock_none);
- findPreference(KEY_SKIP_FACE).setViewId(R.id.lock_none);
- findPreference(KEY_SKIP_BIOMETRICS).setViewId(R.id.lock_none);
- findPreference(ScreenLockType.PIN.preferenceKey).setViewId(R.id.lock_pin);
- findPreference(ScreenLockType.PASSWORD.preferenceKey).setViewId(R.id.lock_password);
+ // findPreference(KEY_SKIP_FINGERPRINT).setViewId(R.id.lock_none); //xuhao add
+ // findPreference(KEY_SKIP_FACE).setViewId(R.id.lock_none);
+ // findPreference(KEY_SKIP_BIOMETRICS).setViewId(R.id.lock_none);
+ // findPreference(ScreenLockType.PIN.preferenceKey).setViewId(R.id.lock_pin);
+ // findPreference(ScreenLockType.PASSWORD.preferenceKey).setViewId(R.id.lock_password);
}
private String getFooterString() {
@@ -686,30 +686,30 @@ public class ChooseLockGeneric extends SettingsActivity {
private void updatePreferenceText() {
if (mForFingerprint) {
- setPreferenceTitle(ScreenLockType.PATTERN,
- R.string.fingerprint_unlock_set_unlock_pattern);
- setPreferenceTitle(ScreenLockType.PIN, R.string.fingerprint_unlock_set_unlock_pin);
- setPreferenceTitle(ScreenLockType.PASSWORD,
- R.string.fingerprint_unlock_set_unlock_password);
+ // setPreferenceTitle(ScreenLockType.PATTERN,
+ // R.string.fingerprint_unlock_set_unlock_pattern);
+ // setPreferenceTitle(ScreenLockType.PIN, R.string.fingerprint_unlock_set_unlock_pin);
+ // setPreferenceTitle(ScreenLockType.PASSWORD,
+ // R.string.fingerprint_unlock_set_unlock_password);
} else if (mForFace) {
- setPreferenceTitle(ScreenLockType.PATTERN,
- R.string.face_unlock_set_unlock_pattern);
- setPreferenceTitle(ScreenLockType.PIN, R.string.face_unlock_set_unlock_pin);
- setPreferenceTitle(ScreenLockType.PASSWORD,
- R.string.face_unlock_set_unlock_password);
+ // setPreferenceTitle(ScreenLockType.PATTERN,
+ // R.string.face_unlock_set_unlock_pattern);
+ // setPreferenceTitle(ScreenLockType.PIN, R.string.face_unlock_set_unlock_pin);
+ // setPreferenceTitle(ScreenLockType.PASSWORD,
+ // R.string.face_unlock_set_unlock_password);
} else if (mForBiometrics) {
- setPreferenceTitle(ScreenLockType.PATTERN,
- R.string.biometrics_unlock_set_unlock_pattern);
- setPreferenceTitle(ScreenLockType.PIN, R.string.biometrics_unlock_set_unlock_pin);
- setPreferenceTitle(ScreenLockType.PASSWORD,
- R.string.biometrics_unlock_set_unlock_password);
+ // setPreferenceTitle(ScreenLockType.PATTERN,
+ // R.string.biometrics_unlock_set_unlock_pattern);
+ // setPreferenceTitle(ScreenLockType.PIN, R.string.biometrics_unlock_set_unlock_pin);
+ // setPreferenceTitle(ScreenLockType.PASSWORD,
+ // R.string.biometrics_unlock_set_unlock_password);
}
if (mManagedPasswordProvider.isSettingManagedPasswordSupported()) {
- setPreferenceTitle(ScreenLockType.MANAGED,
- mManagedPasswordProvider.getPickerOptionTitle(mForFingerprint));
+ // setPreferenceTitle(ScreenLockType.MANAGED,
+ // mManagedPasswordProvider.getPickerOptionTitle(mForFingerprint));
} else {
- removePreference(ScreenLockType.MANAGED.preferenceKey);
+ //removePreference(ScreenLockType.MANAGED.preferenceKey);
}
if (!(mForFingerprint && mIsSetNewPassword)) {
3、隐藏状态栏
4、禁止状态栏下拉
解锁之后禁止状态栏下拉显示快捷通知、快捷设置。
5、屏蔽Camera绿色图标
Android 13 使用摄像头时右上角会有绿色图标,屏蔽方法如下:
6、屏蔽原生音量条
frameworks\base\packages\SystemUI\src\com\android\systemui\volume\VolumeDialogImpl.java
文章来源:https://www.toymoban.com/news/detail-853912.html
7、屏蔽原生亮度条
文章来源地址https://www.toymoban.com/news/detail-853912.html
到了这里,关于Android 13 SystemUI 屏蔽导航栏;屏蔽锁屏;隐藏状态栏;禁止状态栏下拉;屏蔽Camera绿色图标;屏蔽原生音量条;屏蔽原生亮度条。的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!