diff options
author | Nancy Chen <nancychen@google.com> | 2015-11-23 21:53:13 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-11-23 21:53:13 +0000 |
commit | a0ecd4ccf6e92c15bebfca9a6e5a7870ea4d972c (patch) | |
tree | 617230e8034b3ca7801da16e73add458e1457156 | |
parent | be998efeacd573abb2d33da7af9172094122a025 (diff) | |
parent | bf0f0fd52ee2315ffd01f7968e5808bea9fdc045 (diff) |
Merge "getContext() -> getActivity() in fragments for backwards compatibility." into ub-contactsdialer-b-dev
5 files changed, 25 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); } diff --git a/src/com/android/dialer/filterednumber/BlockNumberDialogFragment.java b/src/com/android/dialer/filterednumber/BlockNumberDialogFragment.java index 0f4bd74bd..de4fe99f1 100644 --- a/src/com/android/dialer/filterednumber/BlockNumberDialogFragment.java +++ b/src/com/android/dialer/filterednumber/BlockNumberDialogFragment.java @@ -123,6 +123,11 @@ public class BlockNumberDialogFragment extends DialogFragment { } @Override + public Context getContext() { + return getActivity(); + } + + @Override public Dialog onCreateDialog(Bundle savedInstanceState) { super.onCreateDialog(savedInstanceState); final boolean isBlocked = getArguments().containsKey(ARG_BLOCK_ID); diff --git a/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java b/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java index 073aac2fb..e231c6afd 100644 --- a/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java +++ b/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java @@ -52,6 +52,11 @@ public class BlockedNumbersFragment extends ListFragment private View mBlockedNumberListDivider; @Override + public Context getContext() { + return getActivity(); + } + + @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); diff --git a/src/com/android/dialer/filterednumber/ViewNumbersToImportFragment.java b/src/com/android/dialer/filterednumber/ViewNumbersToImportFragment.java index 9912416ec..153d73cde 100644 --- a/src/com/android/dialer/filterednumber/ViewNumbersToImportFragment.java +++ b/src/com/android/dialer/filterednumber/ViewNumbersToImportFragment.java @@ -44,6 +44,11 @@ public class ViewNumbersToImportFragment extends ListFragment private ViewNumbersToImportAdapter mAdapter; @Override + public Context getContext() { + return getActivity(); + } + + @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); diff --git a/src/com/android/dialer/settings/SoundSettingsFragment.java b/src/com/android/dialer/settings/SoundSettingsFragment.java index 83847004d..35e1dae2d 100644 --- a/src/com/android/dialer/settings/SoundSettingsFragment.java +++ b/src/com/android/dialer/settings/SoundSettingsFragment.java @@ -88,6 +88,11 @@ public class SoundSettingsFragment extends PreferenceFragment }; @Override + public Context getContext() { + return getActivity(); + } + + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); |