summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src
diff options
context:
space:
mode:
authorDavid van Tonder <david.vantonder@gmail.com>2013-05-20 08:07:45 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2013-05-20 08:07:45 -0700
commit83a611a916a2eeb0eb37c0c8001652e3fac38a42 (patch)
treefaaa88b00ba43bd57cd87e751dc269f1d7fc222b /packages/SystemUI/src
parente54123cf09512bd4bc24b1e01a04a4e9a6f0810d (diff)
parent9e1aef7ef82a4f3357b96599b3d10259ba458a91 (diff)
downloadframeworks_base-83a611a916a2eeb0eb37c0c8001652e3fac38a42.zip
frameworks_base-83a611a916a2eeb0eb37c0c8001652e3fac38a42.tar.gz
frameworks_base-83a611a916a2eeb0eb37c0c8001652e3fac38a42.tar.bz2
Merge "Pie Controls: Fix sound effects." into cm-10.1
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/PieController.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/PieController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/PieController.java
index d26ef8a..b013d15 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/PieController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/PieController.java
@@ -159,7 +159,6 @@ public class PieController implements BaseStatusBar.NavigationBarCallback, PieVi
case MSG_INJECT_KEY_DOWN:
inputManager.injectInputEvent((KeyEvent) m.obj,
InputManager.INJECT_INPUT_EVENT_MODE_ASYNC);
- mPieContainer.playSoundEffect(SoundEffectConstants.CLICK);
break;
case MSG_INJECT_KEY_UP:
inputManager.injectInputEvent((KeyEvent) m.obj,
@@ -577,12 +576,14 @@ public class PieController implements BaseStatusBar.NavigationBarCallback, PieVi
long when = SystemClock.uptimeMillis();
ButtonInfo bi = (ButtonInfo) item.tag;
+ // play sound effect directly, since detaching the container will prevent to play the sound
+ // at a later time.
+ mPieContainer.playSoundEffect(SoundEffectConstants.CLICK);
if (bi.keyCode != 0) {
injectKeyDelayed(bi.keyCode, when);
} else {
// provide the same haptic feedback as if a virtual key is pressed
mPieContainer.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
- mPieContainer.playSoundEffect(SoundEffectConstants.CLICK);
if (bi == NavigationButtons.RECENT) {
if (mStatusBar != null) {
mStatusBar.toggleRecentApps();