diff options
| author | 2012-10-10 14:17:45 -0700 | |
|---|---|---|
| committer | 2012-10-10 14:17:50 -0700 | |
| commit | 96179213ba1b2b3fc0e7d527ac606eba511bc558 (patch) | |
| tree | 9d394f4956226cdadade5a47b1af7f095bf84eaa | |
| parent | 6ae8a24fc045bc7970f2843fa9baf06aff15e22d (diff) | |
No sound produced on global actions dialog pops up if no vibrator is present.
1. If the global gesture to enable accessibility is enabled there should
be a haptic or auditory feedback after the global actions dialog pops up
as a result of a long press on power. On devices with no vibrator an
attempt to vibrate was performed evne if not hardware support exists
As a result no sound was played because the it was assumed a haptic
feedback was provided.
bug:7324903
Change-Id: Ic76db232d761a2899c1ca5f59ca55ff15ae575dd
| -rwxr-xr-x | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 9307f37b1bfe..7e047fdfdf96 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -4302,6 +4302,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { } public boolean performHapticFeedbackLw(WindowState win, int effectId, boolean always) { + if (!mVibrator.hasVibrator()) { + return false; + } final boolean hapticsDisabled = Settings.System.getIntForUser(mContext.getContentResolver(), Settings.System.HAPTIC_FEEDBACK_ENABLED, 0, UserHandle.USER_CURRENT) == 0; if (!always && (hapticsDisabled || mKeyguardMediator.isShowingAndNotHidden())) { |