Merge "Wire in device owner information into SecuritySettings"
This commit is contained in:
committed by
Android (Google) Code Review
commit
1258c4f434
@@ -690,6 +690,8 @@
|
|||||||
<string name="cdma_security_settings_summary">Set My Location, screen unlock, credential storage lock</string>
|
<string name="cdma_security_settings_summary">Set My Location, screen unlock, credential storage lock</string>
|
||||||
<!-- In the security screen, the header title for settings related to Passwords-->
|
<!-- In the security screen, the header title for settings related to Passwords-->
|
||||||
<string name="security_passwords_title">Passwords</string>
|
<string name="security_passwords_title">Passwords</string>
|
||||||
|
<!-- Summary for settings preference disabled by administrator [CHAR LIMIT=50] -->
|
||||||
|
<string name="disabled_by_administrator_summary">Disabled by administrator</string>
|
||||||
|
|
||||||
<!-- Fingerprint enrollment and settings --><skip />
|
<!-- Fingerprint enrollment and settings --><skip />
|
||||||
<!-- Title shown for menu item that launches fingerprint settings or enrollment [CHAR LIMIT=22] -->
|
<!-- Title shown for menu item that launches fingerprint settings or enrollment [CHAR LIMIT=22] -->
|
||||||
|
@@ -214,6 +214,9 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
|
|
||||||
mOwnerInfoPref = findPreference(KEY_OWNER_INFO_SETTINGS);
|
mOwnerInfoPref = findPreference(KEY_OWNER_INFO_SETTINGS);
|
||||||
if (mOwnerInfoPref != null) {
|
if (mOwnerInfoPref != null) {
|
||||||
|
mOwnerInfoPref.setEnabled(!mLockPatternUtils.isDeviceOwnerInfoEnabled());
|
||||||
|
|
||||||
|
if (mOwnerInfoPref.isEnabled()) {
|
||||||
mOwnerInfoPref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
mOwnerInfoPref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
public boolean onPreferenceClick(Preference preference) {
|
||||||
@@ -222,6 +225,7 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mIsAdmin) {
|
if (mIsAdmin) {
|
||||||
if (LockPatternUtils.isDeviceEncryptionEnabled()) {
|
if (LockPatternUtils.isDeviceEncryptionEnabled()) {
|
||||||
@@ -630,11 +634,15 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
|
|
||||||
public void updateOwnerInfo() {
|
public void updateOwnerInfo() {
|
||||||
if (mOwnerInfoPref != null) {
|
if (mOwnerInfoPref != null) {
|
||||||
|
if (mLockPatternUtils.isDeviceOwnerInfoEnabled()) {
|
||||||
|
mOwnerInfoPref.setSummary(R.string.disabled_by_administrator_summary);
|
||||||
|
} else {
|
||||||
mOwnerInfoPref.setSummary(mLockPatternUtils.isOwnerInfoEnabled(MY_USER_ID)
|
mOwnerInfoPref.setSummary(mLockPatternUtils.isOwnerInfoEnabled(MY_USER_ID)
|
||||||
? mLockPatternUtils.getOwnerInfo(MY_USER_ID)
|
? mLockPatternUtils.getOwnerInfo(MY_USER_ID)
|
||||||
: getString(R.string.owner_info_settings_summary));
|
: getString(R.string.owner_info_settings_summary));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceTreeClick(Preference preference) {
|
public boolean onPreferenceTreeClick(Preference preference) {
|
||||||
|
Reference in New Issue
Block a user