Created
December 6, 2016 20:42
-
-
Save invisiblek/023f004a725054767a50b8279670eafa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/res/values/bools.xml b/res/values/bools.xml | |
index 20b8c54..48f12b6 100644 | |
--- a/res/values/bools.xml | |
+++ b/res/values/bools.xml | |
@@ -50,6 +50,9 @@ | |
<!-- Whether none security option is hide or not (country specific). --> | |
<bool name="config_hide_none_security_option">false</bool> | |
+ <!--Whether help links are defined. --> | |
+ <bool name="config_has_help">false</bool> | |
+ | |
<!-- Whether enable get network info --> | |
<bool name="config_netinfo">false</bool> | |
@@ -95,6 +98,7 @@ | |
<!-- Whether to hide mms apn--> | |
<bool name="config_hide_mms_enable">false</bool> | |
- <!--Whether help links are defined. --> | |
- <bool name="config_has_help">false</bool> | |
+ <!--Whether the storage manager exists. --> | |
+ <bool name="config_has_storage_manager">false</bool> | |
+ | |
</resources> | |
diff --git a/res/values/config.xml b/res/values/config.xml | |
index 1db4a32..141aa50 100644 | |
--- a/res/values/config.xml | |
+++ b/res/values/config.xml | |
@@ -81,6 +81,9 @@ | |
<!-- When true enable gesture setting. --> | |
<bool name="config_gesture_settings_enabled">false</bool> | |
+ <!-- If the Storage Manager settings are enabled. --> | |
+ <bool name="config_storage_manager_settings_enabled">false</bool> | |
+ | |
<!-- Display ro.product.name above Device model --> | |
<bool name="config_displayDeviceName">false</bool> | |
@@ -92,7 +95,4 @@ | |
--> | |
<integer name="config_fingerprintSensorLocation">0</integer> | |
- <!-- If the Storage Manager settings are enabled. --> | |
- <bool name="config_storage_manager_settings_enabled">false</bool> | |
- | |
</resources> | |
diff --git a/res/xml/device_info_settings.xml b/res/xml/device_info_settings.xml | |
index f756b26..ce0c233 100644 | |
--- a/res/xml/device_info_settings.xml | |
+++ b/res/xml/device_info_settings.xml | |
@@ -98,11 +98,8 @@ | |
android:key="device_model" | |
android:enabled="false" | |
android:shouldDisableView="false" | |
- android:selectable="false" | |
android:title="@string/device_model" | |
- android:summary="@string/device_info_default" | |
- settings:allowDividerAbove="true" | |
- settings:allowDividerBelow="true"/> | |
+ android:summary="@string/device_info_default"/> | |
<!-- Device firmware version --> | |
<Preference android:key="firmware_version" | |
diff --git a/src/com/android/settings/ApnEditor.java b/src/com/android/settings/ApnEditor.java | |
index e170e24..2b19096 100755 | |
--- a/src/com/android/settings/ApnEditor.java | |
+++ b/src/com/android/settings/ApnEditor.java | |
@@ -754,7 +754,7 @@ public class ApnEditor extends SettingsPreferenceFragment | |
return; | |
} | |
// If it's a new APN, then cancel will delete the new entry in onPause | |
- if (!mNewApn && !mReadOnlyApn && !mDisableEditor) { | |
+ if (!mNewApn && !mReadOnlyApn) { | |
menu.add(0, MENU_DELETE, 0, R.string.menu_delete) | |
.setIcon(R.drawable.ic_menu_delete); | |
} | |
diff --git a/src/com/android/settings/ChooseLockGeneric.java b/src/com/android/settings/ChooseLockGeneric.java | |
index 9e02d62..efff15f 100644 | |
--- a/src/com/android/settings/ChooseLockGeneric.java | |
+++ b/src/com/android/settings/ChooseLockGeneric.java | |
@@ -163,9 +163,9 @@ public class ChooseLockGeneric extends SettingsActivity { | |
mKeyStore = KeyStore.getInstance(); | |
mChooseLockSettingsHelper = new ChooseLockSettingsHelper(this.getActivity()); | |
mLockPatternUtils = new LockPatternUtils(getActivity()); | |
- mLockPatternUtils.sanitizePassword(); | |
mIsSetNewPassword = ACTION_SET_NEW_PARENT_PROFILE_PASSWORD.equals(chooseLockAction) | |
|| ACTION_SET_NEW_PASSWORD.equals(chooseLockAction); | |
+ mLockPatternUtils.sanitizePassword(); | |
// Defaults to needing to confirm credentials | |
final boolean confirmCredentials = getActivity().getIntent() | |
@@ -450,17 +450,17 @@ public class ChooseLockGeneric extends SettingsActivity { | |
final String key[] = { KEY_UNLOCK_SET_PATTERN, | |
KEY_UNLOCK_SET_PIN, | |
KEY_UNLOCK_SET_PASSWORD }; | |
- final int icon[] = { R.drawable.ic_security_pattern, | |
- R.string.fingerprint_unlock_set_unlock_pin, | |
- R.string.fingerprint_unlock_set_unlock_password}; | |
final int res[] = { R.string.fingerprint_unlock_set_unlock_pattern, | |
R.string.fingerprint_unlock_set_unlock_pin, | |
R.string.fingerprint_unlock_set_unlock_password }; | |
+ final int icons[] = { R.drawable.ic_security_pattern, | |
+ R.drawable.ic_security_pin, | |
+ R.drawable.ic_security_pwd }; | |
for (int i = 0; i < key.length; i++) { | |
Preference pref = findPreference(key[i]); | |
if (pref != null) { // can be removed by device admin | |
- pref.setIcon(icon[i]); | |
pref.setTitle(res[i]); | |
+ pref.setIcon(icons[i]); | |
} | |
} | |
} | |
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java | |
index e95a0e5..cdfcc77 100644 | |
--- a/src/com/android/settings/SettingsActivity.java | |
+++ b/src/com/android/settings/SettingsActivity.java | |
@@ -16,11 +16,11 @@ | |
package com.android.settings; | |
-import android.app.ActionBar; | |
import android.app.ActivityManager; | |
import android.app.Fragment; | |
import android.app.FragmentManager; | |
import android.app.FragmentTransaction; | |
+import android.app.ActionBar; | |
import android.content.ActivityNotFoundException; | |
import android.content.BroadcastReceiver; | |
import android.content.ComponentName; | |
diff --git a/src/com/android/settings/datausage/BillingCycleSettings.java b/src/com/android/settings/datausage/BillingCycleSettings.java | |
index a7e93e3..80ab430 100755 | |
--- a/src/com/android/settings/datausage/BillingCycleSettings.java | |
+++ b/src/com/android/settings/datausage/BillingCycleSettings.java | |
@@ -158,6 +158,14 @@ public class BillingCycleSettings extends DataUsageBase implements | |
setPolicyLimitBytes(LIMIT_DISABLED); | |
} | |
return true; | |
+ } else if (mEnableDataWarning == preference) { | |
+ boolean enabled = (Boolean) newValue; | |
+ if (enabled) { | |
+ setPolicyWarningBytes(mDataUsageController.getDefaultWarningLevel()); | |
+ } else { | |
+ setPolicyWarningBytes(WARNING_DISABLED); | |
+ } | |
+ return true; | |
} else if (mEnableDataTimeRange == preference) { | |
boolean enabled = (Boolean) newValue; | |
mShowDataUsage = !mShowDataUsage; | |
diff --git a/src/com/android/settings/deviceinfo/StorageSettings.java b/src/com/android/settings/deviceinfo/StorageSettings.java | |
index c355b82..02aa0b8 100644 | |
--- a/src/com/android/settings/deviceinfo/StorageSettings.java | |
+++ b/src/com/android/settings/deviceinfo/StorageSettings.java | |
@@ -170,9 +170,9 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index | |
final long volumeTotalBytes = getTotalSize(vol); | |
final int color = COLOR_PRIVATE[privateCount++ % COLOR_PRIVATE.length]; | |
boolean isInternal = VolumeInfo.ID_PRIVATE_INTERNAL.equals(vol.getId()); | |
- long size = isInternal ? volumeTotalBytes : vol.getPath().getTotalSpace(); | |
+ long size = isInternal ? sTotalInternalStorage : vol.getPath().getTotalSpace(); | |
mInternalCategory.addPreference( | |
- new StorageVolumePreference(context, vol, color, size)); | |
+ new StorageVolumePreference(context, vol, color, volumeTotalBytes)); | |
if (vol.isMountedReadable()) { | |
final File path = vol.getPath(); | |
privateUsedBytes += (volumeTotalBytes - path.getFreeSpace()); | |
diff --git a/src/com/android/settings/notification/NotificationSettingsBase.java b/src/com/android/settings/notification/NotificationSettingsBase.java | |
index 1931f1e..ee5d2d0 100644 | |
--- a/src/com/android/settings/notification/NotificationSettingsBase.java | |
+++ b/src/com/android/settings/notification/NotificationSettingsBase.java | |
@@ -169,8 +169,8 @@ abstract public class NotificationSettingsBase extends SettingsPreferenceFragmen | |
mImportance.setDisabledByAdmin(mSuspendedAppsAdmin); | |
mImportance.setMinimumProgress( | |
notBlockable ? Ranking.IMPORTANCE_MIN : Ranking.IMPORTANCE_NONE); | |
- mImportance.setMax(importanceToLevel(Ranking.IMPORTANCE_MAX)); | |
- mImportance.setImportance(importance); | |
+ mImportance.setMax(Ranking.IMPORTANCE_MAX); | |
+ mImportance.setProgress(importance); | |
mImportance.setAutoOn(importance == Ranking.IMPORTANCE_UNSPECIFIED); | |
mImportance.setCallback(new ImportanceSeekBarPreference.Callback() { | |
@Override | |
diff --git a/src/com/android/settings/notification/OtherSoundSettings.java b/src/com/android/settings/notification/OtherSoundSettings.java | |
index f3bba11..a5c36a3 100644 | |
--- a/src/com/android/settings/notification/OtherSoundSettings.java | |
+++ b/src/com/android/settings/notification/OtherSoundSettings.java | |
@@ -218,6 +218,7 @@ public class OtherSoundSettings extends SettingsPreferenceFragment implements In | |
} else { | |
removePreference(KEY_BOOT_SOUNDS); | |
} | |
+ | |
final CMHardwareManager hardware = CMHardwareManager.getInstance(mContext); | |
if (!hardware.isSupported(CMHardwareManager.FEATURE_VIBRATOR)) { | |
removePreference(CMSettings.Secure.VIBRATOR_INTENSITY); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment