diff options
author | Yorke Lee <yorkelee@google.com> | 2014-03-10 23:32:33 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-10 23:32:33 +0000 |
commit | 512ca2adec28b284e8272122754758b1a70e0bd7 (patch) | |
tree | eac09ee0ee15b5974e5629511cbd6173ec840c48 /InCallUI | |
parent | 6f47a5a3b868d07a9d0fe764e306ad136ba5670b (diff) | |
parent | ef5a75f220f98d9616462373db9057dd4de6872c (diff) |
am 23976bcf: am 7318ee42: DO NOT MERGE Fix NPE in DialpadFragment.onHover when fragment is detached
* commit '23976bcf42e296034dc8d4c3f2061152b9fc57f9':
DO NOT MERGE Fix NPE in DialpadFragment.onHover when fragment is detached
Diffstat (limited to 'InCallUI')
-rw-r--r-- | InCallUI/src/com/android/incallui/DialpadFragment.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/InCallUI/src/com/android/incallui/DialpadFragment.java b/InCallUI/src/com/android/incallui/DialpadFragment.java index c6ec742af..e9cabd2c4 100644 --- a/InCallUI/src/com/android/incallui/DialpadFragment.java +++ b/InCallUI/src/com/android/incallui/DialpadFragment.java @@ -333,9 +333,8 @@ public class DialpadFragment extends BaseFragment<DialpadPresenter, DialpadPrese @Override public void onClick(View v) { - Log.d(this, "onClick"); final AccessibilityManager accessibilityManager = (AccessibilityManager) - getActivity().getSystemService(Context.ACCESSIBILITY_SERVICE); + v.getContext().getSystemService(Context.ACCESSIBILITY_SERVICE); // When accessibility is on, simulate press and release to preserve the // semantic meaning of performClick(). Required for Braille support. if (accessibilityManager.isEnabled()) { @@ -352,7 +351,7 @@ public class DialpadFragment extends BaseFragment<DialpadPresenter, DialpadPrese // When touch exploration is turned on, lifting a finger while inside // the button's hover target bounds should perform a click action. final AccessibilityManager accessibilityManager = (AccessibilityManager) - getActivity().getSystemService(Context.ACCESSIBILITY_SERVICE); + v.getContext().getSystemService(Context.ACCESSIBILITY_SERVICE); if (accessibilityManager.isEnabled() && accessibilityManager.isTouchExplorationEnabled()) { |