Fix Settings crash when clicks Notifications

- FaceSettingsLockscreenBypassPreferenceController's preference key
is different from that in xml. Use DashboardFragment generic way to
create PreferenceController which bind the preference key defined in
xml.
- Also refine the way of fixing b/140878309

Fixes: 145893081
Test: manual check FaceSettings and Notification Settings
Change-Id: Ia80e755e3f86b44e771b0cf80c9bf53a8ef8f430
This commit is contained in:
Raff Tsai
2019-12-12 15:14:34 +08:00
parent e3d171cc1d
commit 2790889921
2 changed files with 12 additions and 12 deletions

View File

@@ -30,16 +30,10 @@ import com.android.internal.annotations.VisibleForTesting;
public class FaceSettingsLockscreenBypassPreferenceController
extends FaceSettingsPreferenceController {
static final String KEY = "security_lockscreen_bypass";
@VisibleForTesting
protected FaceManager mFaceManager;
private UserManager mUserManager;
public FaceSettingsLockscreenBypassPreferenceController(Context context) {
this(context, KEY);
}
public FaceSettingsLockscreenBypassPreferenceController(Context context, String preferenceKey) {
super(context, preferenceKey);
if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_FACE)) {