diff options
author | Nancy Chen <nancychen@google.com> | 2015-11-18 14:32:33 -0800 |
---|---|---|
committer | Nancy Chen <nancychen@google.com> | 2015-11-18 16:01:12 -0800 |
commit | bf0f0fd52ee2315ffd01f7968e5808bea9fdc045 (patch) | |
tree | 2ba48269ef167c99930ed375ce5d4e11e993f965 /src/com/android/dialer/dialpad/DialpadFragment.java | |
parent | 4bbb29d0186cc25be1e83717b736dd319127235f (diff) |
getContext() -> getActivity() in fragments for backwards compatibility.
getContext() did not exist prior to API level 23, so override
getContext() to return the activity in dialer code.
Bug: 25776171
Change-Id: I817a1ba2ef29c032065b1e7eee6c033b050fb61d
Diffstat (limited to 'src/com/android/dialer/dialpad/DialpadFragment.java')
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 760b02032..246b0d7fa 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -274,6 +274,11 @@ public class DialpadFragment extends Fragment } @Override + public Context getContext() { + return getActivity(); + } + + @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { mWasEmptyBeforeTextChange = TextUtils.isEmpty(s); } |