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

Commit f2043439 authored by Pawit Pornkitprasan's avatar Pawit Pornkitprasan
Browse files

Dialer: Fix press on button press after many resume

Move setPhoneNumberFormattingTextWatcher back to onCreateView
as having it in onResume will cause a new text watcher to be
added every resume slowing things down to a halt when the text
has to be formatted many times after many resumes

Change-Id: Id83ecc8b52ca283d8e64df579b97c588b1073ab2
parent 14b62579
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -285,6 +285,9 @@ public class DialpadFragment extends Fragment
        }
        mT9Flipper = (ViewSwitcher) fragmentView.findViewById(R.id.t9flipper);
        mT9Top = (LinearLayout) fragmentView.findViewById(R.id.t9topbar);

        PhoneNumberFormatter.setPhoneNumberFormattingTextWatcher(getActivity(), mDigits);

        // Soft menu button should appear only when there's no hardware menu button.
        final View overflowMenuButton = fragmentView.findViewById(R.id.overflow_menu);
        if (overflowMenuButton != null) {
@@ -515,7 +518,6 @@ public class DialpadFragment extends Fragment
            loadContacts.start();
        }

        PhoneNumberFormatter.setPhoneNumberFormattingTextWatcher(getActivity(), mDigits);
        hideT9();
        // Query the last dialed number. Do it first because hitting
        // the DB is 'slow'. This call is asynchronous.