From 1e9812219c080b6bed91be6842cec80d328c2ccc Mon Sep 17 00:00:00 2001 From: Imanol Fernandez Date: Fri, 8 Mar 2019 15:43:03 +0100 Subject: [PATCH] Fix editing only the first field on a DoubleEditSetting (#986) --- .../vrbrowser/ui/views/settings/DoubleEditSetting.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/views/settings/DoubleEditSetting.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/settings/DoubleEditSetting.java index 6bfa8974f..2eb2015a7 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/views/settings/DoubleEditSetting.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/views/settings/DoubleEditSetting.java @@ -79,7 +79,11 @@ public void setDefaultSecondValue(String value) { } public String getSecondText() { - return mEdit2.getText().toString().equals(mEdit2.getHint()) ? mDefaultSecondValue : mEdit2.getText().toString(); + if (mDefaultSecondValue != null) { + return mEdit2.getText().toString().equals(mEdit2.getHint()) ? mDefaultSecondValue : mEdit2.getText().toString(); + } else { + return mEdit2.getText().toString(); + } } public void setSecondText(String text) {