Merge "Fix 3201870: Move OwnerInfo settings to Location&Security."
This commit is contained in:
@@ -566,8 +566,10 @@
|
|||||||
<string name="lock_after_timeout_summary">Adjust the delay before the device automatically locks</string>
|
<string name="lock_after_timeout_summary">Adjust the delay before the device automatically locks</string>
|
||||||
<!-- Text shown next to checkbox for showing owner info on LockScreen [CHAR LIMIT=50]-->
|
<!-- Text shown next to checkbox for showing owner info on LockScreen [CHAR LIMIT=50]-->
|
||||||
<string name="show_owner_info_on_lockscreen_label">Show owner info on lock screen</string>
|
<string name="show_owner_info_on_lockscreen_label">Show owner info on lock screen</string>
|
||||||
<!-- Text shown on top-level settings for owner info [CHAR LIMIT=20]-->
|
<!-- Text shown for title of owner info setting [CHAR LIMIT=20]-->
|
||||||
<string name="owner_info_settings_title">Owner info</string>
|
<string name="owner_info_settings_title">Owner info</string>
|
||||||
|
<!-- Text shown for summary of owner info setting [CHAR LIMIT=40]-->
|
||||||
|
<string name="owner_info_settings_summary">Set or disable showing owner info on lock screen</string>
|
||||||
<!-- Main Settings screen setting option title for the item to take you the security and location screen -->
|
<!-- Main Settings screen setting option title for the item to take you the security and location screen -->
|
||||||
<string name="security_settings_title">Location & security</string>
|
<string name="security_settings_title">Location & security</string>
|
||||||
<!-- Location & security settings screen title -->
|
<!-- Location & security settings screen title -->
|
||||||
@@ -598,6 +600,12 @@
|
|||||||
<!-- Summary for PreferenceScreen to changeecurity method: None/Pattern/PIN/Password [CHAR LIMIT=45] -->
|
<!-- Summary for PreferenceScreen to changeecurity method: None/Pattern/PIN/Password [CHAR LIMIT=45] -->
|
||||||
<string name="unlock_set_unlock_launch_picker_change_summary">Change or disable pattern, PIN, or password security</string>
|
<string name="unlock_set_unlock_launch_picker_change_summary">Change or disable pattern, PIN, or password security</string>
|
||||||
|
|
||||||
|
<!-- Title for PreferenceScreen to enable any lockscreen method: None/Pattern/PIN/Password [CHAR LIMIT=22] -->
|
||||||
|
<string name="unlock_set_unlock_launch_picker_enable_title">Enable screen lock</string>
|
||||||
|
|
||||||
|
<!-- Summary for PreferenceScreen to changeecurity method: None/Pattern/PIN/Password [CHAR LIMIT=45] -->
|
||||||
|
<string name="unlock_set_unlock_launch_picker_enable_summary">Choose a method to lock the screen</string>
|
||||||
|
|
||||||
<!-- Title for preference that disables unlock security [CHAR LIMIT=22] -->
|
<!-- Title for preference that disables unlock security [CHAR LIMIT=22] -->
|
||||||
<string name="unlock_set_unlock_off_title">Off</string>
|
<string name="unlock_set_unlock_off_title">Off</string>
|
||||||
<!-- Summary for preference that disables unlock security [CHAR LIMIT=45] -->
|
<!-- Summary for preference that disables unlock security [CHAR LIMIT=45] -->
|
||||||
@@ -2448,7 +2456,7 @@ found in the list of installed applications.</string>
|
|||||||
|
|
||||||
<!-- Activity title for battery usage history details -->
|
<!-- Activity title for battery usage history details -->
|
||||||
<string name="history_details_title">History details</string>
|
<string name="history_details_title">History details</string>
|
||||||
|
|
||||||
<!-- Activity title for battery usage details for an app. or power consumer -->
|
<!-- Activity title for battery usage details for an app. or power consumer -->
|
||||||
<string name="details_title">Use details</string>
|
<string name="details_title">Use details</string>
|
||||||
<!-- Subtitle for application/subsystem details -->
|
<!-- Subtitle for application/subsystem details -->
|
||||||
|
@@ -26,6 +26,12 @@
|
|||||||
android:summary="@string/unlock_set_unlock_launch_picker_summary"
|
android:summary="@string/unlock_set_unlock_launch_picker_summary"
|
||||||
android:persistent="false"/>
|
android:persistent="false"/>
|
||||||
|
|
||||||
|
<PreferenceScreen
|
||||||
|
android:fragment="com.android.settings.OwnerInfoSettings"
|
||||||
|
android:key="owner_info_settings"
|
||||||
|
android:title="@string/owner_info_settings_title"
|
||||||
|
android:summary="@string/owner_info_settings_summary"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
31
res/xml/security_settings_lockscreen.xml
Normal file
31
res/xml/security_settings_lockscreen.xml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2010 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<PreferenceCategory
|
||||||
|
android:key="security_category"
|
||||||
|
android:title="@string/lock_settings_title">
|
||||||
|
|
||||||
|
<PreferenceScreen
|
||||||
|
android:key="unlock_set_or_change"
|
||||||
|
android:title="@string/unlock_set_unlock_launch_picker_enable_title"
|
||||||
|
android:summary="@string/unlock_set_unlock_launch_picker_enable_summary"
|
||||||
|
android:persistent="false"/>
|
||||||
|
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
</PreferenceScreen>
|
@@ -25,9 +25,9 @@
|
|||||||
android:title="@string/lock_after_timeout"
|
android:title="@string/lock_after_timeout"
|
||||||
android:summary="@string/lock_after_timeout_summary"
|
android:summary="@string/lock_after_timeout_summary"
|
||||||
android:entries="@array/lock_after_timeout_entries"
|
android:entries="@array/lock_after_timeout_entries"
|
||||||
android:entryValues="@array/lock_after_timeout_values"
|
android:entryValues="@array/lock_after_timeout_values"
|
||||||
android:persistent="false"/>
|
android:persistent="false"/>
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="unlock_set_or_change"
|
android:key="unlock_set_or_change"
|
||||||
android:title="@string/unlock_set_unlock_launch_picker_change_title"
|
android:title="@string/unlock_set_unlock_launch_picker_change_title"
|
||||||
@@ -38,6 +38,12 @@
|
|||||||
android:key="unlock_tactile_feedback"
|
android:key="unlock_tactile_feedback"
|
||||||
android:title="@string/lockpattern_settings_enable_tactile_feedback_title"/>
|
android:title="@string/lockpattern_settings_enable_tactile_feedback_title"/>
|
||||||
|
|
||||||
|
<PreferenceScreen
|
||||||
|
android:fragment="com.android.settings.OwnerInfoSettings"
|
||||||
|
android:key="owner_info_settings"
|
||||||
|
android:title="@string/owner_info_settings_title"
|
||||||
|
android:summary="@string/owner_info_settings_summary"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
@@ -25,9 +25,9 @@
|
|||||||
android:title="@string/lock_after_timeout"
|
android:title="@string/lock_after_timeout"
|
||||||
android:summary="@string/lock_after_timeout_summary"
|
android:summary="@string/lock_after_timeout_summary"
|
||||||
android:entries="@array/lock_after_timeout_entries"
|
android:entries="@array/lock_after_timeout_entries"
|
||||||
android:entryValues="@array/lock_after_timeout_values"
|
android:entryValues="@array/lock_after_timeout_values"
|
||||||
android:persistent="false"/>
|
android:persistent="false"/>
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="unlock_set_or_change"
|
android:key="unlock_set_or_change"
|
||||||
android:title="@string/unlock_set_unlock_launch_picker_change_title"
|
android:title="@string/unlock_set_unlock_launch_picker_change_title"
|
||||||
@@ -42,6 +42,12 @@
|
|||||||
android:key="unlock_tactile_feedback"
|
android:key="unlock_tactile_feedback"
|
||||||
android:title="@string/lockpattern_settings_enable_tactile_feedback_title"/>
|
android:title="@string/lockpattern_settings_enable_tactile_feedback_title"/>
|
||||||
|
|
||||||
|
<PreferenceScreen
|
||||||
|
android:fragment="com.android.settings.OwnerInfoSettings"
|
||||||
|
android:key="owner_info_settings"
|
||||||
|
android:title="@string/owner_info_settings_title"
|
||||||
|
android:summary="@string/owner_info_settings_summary"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
@@ -25,9 +25,9 @@
|
|||||||
android:title="@string/lock_after_timeout"
|
android:title="@string/lock_after_timeout"
|
||||||
android:summary="@string/lock_after_timeout_summary"
|
android:summary="@string/lock_after_timeout_summary"
|
||||||
android:entries="@array/lock_after_timeout_entries"
|
android:entries="@array/lock_after_timeout_entries"
|
||||||
android:entryValues="@array/lock_after_timeout_values"
|
android:entryValues="@array/lock_after_timeout_values"
|
||||||
android:persistent="false"/>
|
android:persistent="false"/>
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="unlock_set_or_change"
|
android:key="unlock_set_or_change"
|
||||||
android:title="@string/unlock_set_unlock_launch_picker_change_title"
|
android:title="@string/unlock_set_unlock_launch_picker_change_title"
|
||||||
@@ -38,6 +38,12 @@
|
|||||||
android:key="unlock_tactile_feedback"
|
android:key="unlock_tactile_feedback"
|
||||||
android:title="@string/lockpattern_settings_enable_tactile_feedback_title"/>
|
android:title="@string/lockpattern_settings_enable_tactile_feedback_title"/>
|
||||||
|
|
||||||
|
<PreferenceScreen
|
||||||
|
android:fragment="com.android.settings.OwnerInfoSettings"
|
||||||
|
android:key="owner_info_settings"
|
||||||
|
android:title="@string/owner_info_settings_title"
|
||||||
|
android:summary="@string/owner_info_settings_summary"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
@@ -151,14 +151,6 @@
|
|||||||
android:icon="@drawable/ic_settings_date_time"
|
android:icon="@drawable/ic_settings_date_time"
|
||||||
android:title="@string/date_and_time_settings_title" />
|
android:title="@string/date_and_time_settings_title" />
|
||||||
|
|
||||||
<!-- Owner info -->
|
|
||||||
|
|
||||||
<header
|
|
||||||
android:id="@+id/owner_info_settings"
|
|
||||||
android:fragment="com.android.settings.OwnerInfoSettings"
|
|
||||||
android:icon="@drawable/ic_settings_about"
|
|
||||||
android:title="@string/owner_info_settings_title" />
|
|
||||||
|
|
||||||
<!-- About Device -->
|
<!-- About Device -->
|
||||||
|
|
||||||
<header
|
<header
|
||||||
|
@@ -20,8 +20,6 @@ import android.app.Fragment;
|
|||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.text.Editable;
|
|
||||||
import android.text.TextWatcher;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@@ -58,7 +58,7 @@ import java.util.Observer;
|
|||||||
/**
|
/**
|
||||||
* Gesture lock pattern settings.
|
* Gesture lock pattern settings.
|
||||||
*/
|
*/
|
||||||
public class SecuritySettings extends SettingsPreferenceFragment
|
public class SecuritySettings extends SettingsPreferenceFragment
|
||||||
implements OnPreferenceChangeListener {
|
implements OnPreferenceChangeListener {
|
||||||
private static final String KEY_UNLOCK_SET_OR_CHANGE = "unlock_set_or_change";
|
private static final String KEY_UNLOCK_SET_OR_CHANGE = "unlock_set_or_change";
|
||||||
|
|
||||||
@@ -107,11 +107,11 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
// This is necessary because the Network Location Provider can change settings
|
// This is necessary because the Network Location Provider can change settings
|
||||||
// if the user does not confirm enabling the provider.
|
// if the user does not confirm enabling the provider.
|
||||||
private ContentQueryMap mContentQueryMap;
|
private ContentQueryMap mContentQueryMap;
|
||||||
|
|
||||||
private ChooseLockSettingsHelper mChooseLockSettingsHelper;
|
private ChooseLockSettingsHelper mChooseLockSettingsHelper;
|
||||||
private LockPatternUtils mLockPatternUtils;
|
private LockPatternUtils mLockPatternUtils;
|
||||||
private ListPreference mLockAfter;
|
private ListPreference mLockAfter;
|
||||||
|
|
||||||
private SettingsObserver mSettingsObserver;
|
private SettingsObserver mSettingsObserver;
|
||||||
|
|
||||||
private final class SettingsObserver implements Observer {
|
private final class SettingsObserver implements Observer {
|
||||||
@@ -183,24 +183,30 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
|
|
||||||
PreferenceManager pm = getPreferenceManager();
|
PreferenceManager pm = getPreferenceManager();
|
||||||
|
|
||||||
// Lock screen
|
// Add options for lock/unlock screen
|
||||||
|
int resid = 0;
|
||||||
if (!mLockPatternUtils.isSecure()) {
|
if (!mLockPatternUtils.isSecure()) {
|
||||||
addPreferencesFromResource(R.xml.security_settings_chooser);
|
if (mLockPatternUtils.isLockScreenDisabled()) {
|
||||||
|
resid = R.xml.security_settings_lockscreen;
|
||||||
|
} else {
|
||||||
|
resid = R.xml.security_settings_chooser;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (mLockPatternUtils.getKeyguardStoredPasswordQuality()) {
|
switch (mLockPatternUtils.getKeyguardStoredPasswordQuality()) {
|
||||||
case DevicePolicyManager.PASSWORD_QUALITY_SOMETHING:
|
case DevicePolicyManager.PASSWORD_QUALITY_SOMETHING:
|
||||||
addPreferencesFromResource(R.xml.security_settings_pattern);
|
resid = R.xml.security_settings_pattern;
|
||||||
break;
|
break;
|
||||||
case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC:
|
case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC:
|
||||||
addPreferencesFromResource(R.xml.security_settings_pin);
|
resid = R.xml.security_settings_pin;
|
||||||
break;
|
break;
|
||||||
case DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC:
|
case DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC:
|
||||||
case DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC:
|
case DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC:
|
||||||
case DevicePolicyManager.PASSWORD_QUALITY_COMPLEX:
|
case DevicePolicyManager.PASSWORD_QUALITY_COMPLEX:
|
||||||
addPreferencesFromResource(R.xml.security_settings_password);
|
resid = R.xml.security_settings_password;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
addPreferencesFromResource(resid);
|
||||||
|
|
||||||
// lock after preference
|
// lock after preference
|
||||||
mLockAfter = setupLockAfterPreference(pm);
|
mLockAfter = setupLockAfterPreference(pm);
|
||||||
@@ -276,14 +282,14 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
private ListPreference setupLockAfterPreference(PreferenceManager pm) {
|
private ListPreference setupLockAfterPreference(PreferenceManager pm) {
|
||||||
ListPreference result = (ListPreference) pm.findPreference(LOCK_AFTER_TIMEOUT_KEY);
|
ListPreference result = (ListPreference) pm.findPreference(LOCK_AFTER_TIMEOUT_KEY);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
int lockAfterValue = Settings.Secure.getInt(getContentResolver(),
|
int lockAfterValue = Settings.Secure.getInt(getContentResolver(),
|
||||||
Settings.Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT,
|
Settings.Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT,
|
||||||
FALLBACK_LOCK_AFTER_TIMEOUT_VALUE);
|
FALLBACK_LOCK_AFTER_TIMEOUT_VALUE);
|
||||||
result.setValue(String.valueOf(lockAfterValue));
|
result.setValue(String.valueOf(lockAfterValue));
|
||||||
result.setOnPreferenceChangeListener(this);
|
result.setOnPreferenceChangeListener(this);
|
||||||
final long adminTimeout = mDPM != null ? mDPM.getMaximumTimeToLock(null) : 0;
|
final long adminTimeout = mDPM != null ? mDPM.getMaximumTimeToLock(null) : 0;
|
||||||
final ContentResolver cr = getContentResolver();
|
final ContentResolver cr = getContentResolver();
|
||||||
final long displayTimeout = Math.max(0,
|
final long displayTimeout = Math.max(0,
|
||||||
Settings.System.getInt(cr, SCREEN_OFF_TIMEOUT, 0));
|
Settings.System.getInt(cr, SCREEN_OFF_TIMEOUT, 0));
|
||||||
if (adminTimeout > 0) {
|
if (adminTimeout > 0) {
|
||||||
// This setting is a slave to display timeout when a device policy is enforced.
|
// This setting is a slave to display timeout when a device policy is enforced.
|
||||||
@@ -377,9 +383,12 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
} else if (preference == mAssistedGps) {
|
} else if (preference == mAssistedGps) {
|
||||||
Settings.Secure.putInt(getContentResolver(), Settings.Secure.ASSISTED_GPS_ENABLED,
|
Settings.Secure.putInt(getContentResolver(), Settings.Secure.ASSISTED_GPS_ENABLED,
|
||||||
mAssistedGps.isChecked() ? 1 : 0);
|
mAssistedGps.isChecked() ? 1 : 0);
|
||||||
|
} else {
|
||||||
|
// If we didn't handle it, let preferences handle it.
|
||||||
|
return super.onPreferenceTreeClick(preferenceScreen, preference);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -501,7 +510,7 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
Boolean bval = (Boolean)value;
|
Boolean bval = (Boolean)value;
|
||||||
mWillEnableEncryptedFS = bval.booleanValue();
|
mWillEnableEncryptedFS = bval.booleanValue();
|
||||||
showSwitchEncryptedFSDialog();
|
showSwitchEncryptedFSDialog();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user