Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96912680 authored by Danez's avatar Danez
Browse files

Bugfix: Setting dial_retrieve_last was not used in dialpad.

The setting exists in the menu, but regardless if the option was actived
or not, it always retrieved the last called number when pressing the
dialbutton and nothing entered before.
Added a check for this setting. Also removed a duplicate check in
onClick(), which is already done in dialButtonPressed().

An other possibility would be the removing of this setting. Not sure
which is intended.

Change-Id: Ia480105b5f6697c7a422acecea2fceebf16fd71f
parent c2abb439
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -794,13 +794,10 @@ public class TwelveKeyDialer extends Activity implements View.OnClickListener,
            case R.id.dialButton: {
                // Vibrate here too, just like we do for the regular keys
                vibrate();
                if (mDigits.length() == 0) {
                    mDigits.setText(getLastDialedNumber());
                    mDigits.setSelection(mDigits.length());
                }
                else {                  
                // Call dialButtonPressed() regardless if there is something
                // entered or not.
                // dialButtonPressed() will handle all combinations
                dialButtonPressed();
                }
                break;
            }
            /*
@@ -922,10 +919,12 @@ public class TwelveKeyDialer extends Activity implements View.OnClickListener,
                intent.setData(Uri.fromParts("tel", EMPTY_NUMBER, null));
                intent.putExtra(EXTRA_SEND_EMPTY_FLASH, true);
                sendEmptyFlash = true;
            } else if (!TextUtils.isEmpty(mLastNumberDialed)) {
            } else if (retrieveLastDialled && !TextUtils.isEmpty(mLastNumberDialed)) {
                // Otherwise, pressing the Dial button without entering
                // any digits means "recall the last number dialed".
                // Only if set in options.
                mDigits.setText(mLastNumberDialed);
                mDigits.setSelection(mDigits.length());
                return;
            } else {
                // Rare case: there's no "last number dialed".  There's