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>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user