赞
踩
写在前面:本文给出Android 13 手机/平板原生SystemUI 一些实用的屏蔽补丁。
导航栏屏蔽很简单,直接把创建导航栏的代码屏蔽即可。
代码路径:frameworks\base\packages\SystemUI\src\com\android\systemui\statusbar\phone\CentralSurfacesImpl.java
// ================================================================================
// Constructing the view
// ================================================================================
protected void makeStatusBarView(@Nullable RegisterStatusBarResult result) {
. . . . . .
. . . . . .
. . . . . .
//createNavigationBar(result);//注释这行代码即可
. . . . . .
. . . . . .
. . . . . .
}
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)) {
解锁之后禁止状态栏下拉显示快捷通知、快捷设置。
Android 13 使用摄像头时右上角会有绿色图标,屏蔽方法如下:
frameworks\base\packages\SystemUI\src\com\android\systemui\volume\VolumeDialogImpl.java
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。