summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/MediaKeyEventButton.java
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/MediaKeyEventButton.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/MediaKeyEventButton.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/MediaKeyEventButton.java b/packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/MediaKeyEventButton.java
index f722036..62ddbbd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/MediaKeyEventButton.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/MediaKeyEventButton.java
@@ -14,10 +14,9 @@ import android.view.View;
public abstract class MediaKeyEventButton extends PowerButton {
private static final String TAG = "MediaKeyEventButton";
- private static AudioManager AUDIO_MANAGER = null;
+ private AudioManager mAM = null;
- protected void sendMediaKeyEvent(int code) {
- Context context = mView.getContext();
+ protected void sendMediaKeyEvent(Context context, int code) {
long eventtime = SystemClock.uptimeMillis();
Intent downIntent = new Intent(Intent.ACTION_MEDIA_BUTTON, null);
@@ -31,11 +30,11 @@ public abstract class MediaKeyEventButton extends PowerButton {
context.sendOrderedBroadcast(upIntent, null);
}
- protected static AudioManager getAudioManager(Context context) {
- if(AUDIO_MANAGER == null) {
- AUDIO_MANAGER = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
+ protected AudioManager getAudioManager(Context context) {
+ if (mAM == null) {
+ mAM = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
}
- return AUDIO_MANAGER;
+ return mAM;
}
}