summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-03-10 23:30:10 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-10 23:30:10 +0000
commitef5a75f220f98d9616462373db9057dd4de6872c (patch)
tree6b59edb842eca34d4f88eb087c06b59404c94ce3 /InCallUI
parent899205564599ba3cff49627ba6a6625e14c42c0b (diff)
parentaeeec7e4ac819289fe977704c6b55a754c019f85 (diff)
am 7318ee42: DO NOT MERGE Fix NPE in DialpadFragment.onHover when fragment is detached
* commit '7318ee42e7eafd9f605428cbefc4dd5d9a76b27c': 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()) {