summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-03-10 23:32:33 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-10 23:32:33 +0000
commit512ca2adec28b284e8272122754758b1a70e0bd7 (patch)
treeeac09ee0ee15b5974e5629511cbd6173ec840c48 /InCallUI
parent6f47a5a3b868d07a9d0fe764e306ad136ba5670b (diff)
parentef5a75f220f98d9616462373db9057dd4de6872c (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.java5
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()) {