Update string for work profile face unlock

Fixes: 134053456

Test: With work profile and fully managed device, strings are correct
Change-Id: I358b94acfa0626083fdc422b6333765dcc2bc158
This commit is contained in:
Kevin Chyn
2019-06-14 12:56:59 -07:00
parent a854373bee
commit 2d586f18f8
3 changed files with 18 additions and 0 deletions

View File

@@ -19,6 +19,10 @@ package com.android.settings.biometrics.face;
import android.content.Context;
import android.os.UserHandle;
import com.android.settings.R;
import androidx.preference.Preference;
public class FaceProfileStatusPreferenceController extends FaceStatusPreferenceController {
public static final String KEY_FACE_SETTINGS = "face_settings_profile";
@@ -37,4 +41,11 @@ public class FaceProfileStatusPreferenceController extends FaceStatusPreferenceC
protected int getUserId() {
return mProfileChallengeUserId;
}
@Override
public void updateState(Preference preference) {
super.updateState(preference);
preference.setTitle(mContext.getResources().getString(
R.string.security_settings_face_profile_preference_title));
}
}

View File

@@ -119,6 +119,11 @@ public class FaceSettings extends DashboardFragment {
mUserId = getActivity().getIntent().getIntExtra(
Intent.EXTRA_USER_ID, UserHandle.myUserId());
if (mUserManager.getUserInfo(mUserId).isManagedProfile()) {
getActivity().setTitle(getActivity().getResources().getString(
R.string.security_settings_face_profile_preference_title));
}
Preference keyguardPref = findPreference(FaceSettingsKeyguardPreferenceController.KEY);
Preference appPref = findPreference(FaceSettingsAppPreferenceController.KEY);
Preference attentionPref = findPreference(FaceSettingsAttentionPreferenceController.KEY);