summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShuhrat Dehkanov <uzbmaster@gmail.com>2012-01-26 23:04:02 +0900
committerShuhrat Dehkanov <uzbmaster@gmail.com>2012-01-26 23:04:02 +0900
commitf9237f6e3ca32afdb79d4bcc8f13af0cd9309e84 (patch)
treed28af671681d244d514ce1e63091d5d3846135c4 /src
parent1e78bd01ca308eec6a08ad376a889240635d6c24 (diff)
downloadpackages_apps_settings-f9237f6e3ca32afdb79d4bcc8f13af0cd9309e84.zip
packages_apps_settings-f9237f6e3ca32afdb79d4bcc8f13af0cd9309e84.tar.gz
packages_apps_settings-f9237f6e3ca32afdb79d4bcc8f13af0cd9309e84.tar.bz2
Do not set minimum value for mobile data limit dialog higher than the actual set value
When mobile data limit and warning limit are set to 0, pressing mobile data limit text (0.0 GB) pops up mobile data limit dialog with minimum value 1. But the value set is 0, which is causing the dialog to show its maximum value 2^31-1. Change-Id: I79ed4df5fbf095a7e60bda640ff2ca26bcbd3cc4 Signed-off-by: Shuhrat Dehkanov <uzbmaster@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/DataUsageSummary.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java
index 46d6c65..a2f0c3f 100644
--- a/src/com/android/settings/DataUsageSummary.java
+++ b/src/com/android/settings/DataUsageSummary.java
@@ -1761,7 +1761,7 @@ public class DataUsageSummary extends Fragment {
final long limitBytes = editor.getPolicyLimitBytes(template);
bytesPicker.setMaxValue(Integer.MAX_VALUE);
- if (warningBytes != WARNING_DISABLED) {
+ if (warningBytes != WARNING_DISABLED && limitBytes > 0) {
bytesPicker.setMinValue((int) (warningBytes / MB_IN_BYTES) + 1);
} else {
bytesPicker.setMinValue(0);