Loading policy/com/android/internal/policy/impl/KeyguardViewBase.java +12 −12 Original line number Diff line number Diff line Loading @@ -142,7 +142,7 @@ public abstract class KeyguardViewBase extends FrameLayout { final int keyCode = event.getKeyCode(); if (event.getAction() == KeyEvent.ACTION_DOWN) { switch (keyCode) { case KeyEvent.KEYCODE_PLAYPAUSE: case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: /* Suppress PLAYPAUSE toggle when phone is ringing or * in-call to avoid music playback */ if (mTelephonyManager == null) { Loading @@ -154,11 +154,11 @@ public abstract class KeyguardViewBase extends FrameLayout { return true; // suppress key event } case KeyEvent.KEYCODE_HEADSETHOOK: case KeyEvent.KEYCODE_STOP: case KeyEvent.KEYCODE_NEXTSONG: case KeyEvent.KEYCODE_PREVIOUSSONG: case KeyEvent.KEYCODE_REWIND: case KeyEvent.KEYCODE_FORWARD: { case KeyEvent.KEYCODE_MEDIA_STOP: case KeyEvent.KEYCODE_MEDIA_NEXT: case KeyEvent.KEYCODE_MEDIA_PREVIOUS: case KeyEvent.KEYCODE_MEDIA_REWIND: case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD: { Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON, null); intent.putExtra(Intent.EXTRA_KEY_EVENT, event); getContext().sendOrderedBroadcast(intent, null); Loading Loading @@ -190,12 +190,12 @@ public abstract class KeyguardViewBase extends FrameLayout { switch (keyCode) { case KeyEvent.KEYCODE_MUTE: case KeyEvent.KEYCODE_HEADSETHOOK: case KeyEvent.KEYCODE_PLAYPAUSE: case KeyEvent.KEYCODE_STOP: case KeyEvent.KEYCODE_NEXTSONG: case KeyEvent.KEYCODE_PREVIOUSSONG: case KeyEvent.KEYCODE_REWIND: case KeyEvent.KEYCODE_FORWARD: { case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: case KeyEvent.KEYCODE_MEDIA_STOP: case KeyEvent.KEYCODE_MEDIA_NEXT: case KeyEvent.KEYCODE_MEDIA_PREVIOUS: case KeyEvent.KEYCODE_MEDIA_REWIND: case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD: { Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON, null); intent.putExtra(Intent.EXTRA_KEY_EVENT, event); getContext().sendOrderedBroadcast(intent, null); Loading policy/com/android/internal/policy/impl/KeyguardViewMediator.java +6 −6 Original line number Diff line number Diff line Loading @@ -679,12 +679,12 @@ public class KeyguardViewMediator implements KeyguardViewCallback, case KeyEvent.KEYCODE_VOLUME_DOWN: case KeyEvent.KEYCODE_MUTE: case KeyEvent.KEYCODE_HEADSETHOOK: case KeyEvent.KEYCODE_PLAYPAUSE: case KeyEvent.KEYCODE_STOP: case KeyEvent.KEYCODE_NEXTSONG: case KeyEvent.KEYCODE_PREVIOUSSONG: case KeyEvent.KEYCODE_REWIND: case KeyEvent.KEYCODE_FORWARD: case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: case KeyEvent.KEYCODE_MEDIA_STOP: case KeyEvent.KEYCODE_MEDIA_NEXT: case KeyEvent.KEYCODE_MEDIA_PREVIOUS: case KeyEvent.KEYCODE_MEDIA_REWIND: case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD: case KeyEvent.KEYCODE_CAMERA: return false; } Loading policy/com/android/internal/policy/impl/PhoneWindow.java +12 −12 Original line number Diff line number Diff line Loading @@ -1230,7 +1230,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } case KeyEvent.KEYCODE_PLAYPAUSE: case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: /* Suppress PLAYPAUSE toggle when phone is ringing or in-call * to avoid music playback */ if (mTelephonyManager == null) { Loading @@ -1243,11 +1243,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } case KeyEvent.KEYCODE_MUTE: case KeyEvent.KEYCODE_HEADSETHOOK: case KeyEvent.KEYCODE_STOP: case KeyEvent.KEYCODE_NEXTSONG: case KeyEvent.KEYCODE_PREVIOUSSONG: case KeyEvent.KEYCODE_REWIND: case KeyEvent.KEYCODE_FORWARD: { case KeyEvent.KEYCODE_MEDIA_STOP: case KeyEvent.KEYCODE_MEDIA_NEXT: case KeyEvent.KEYCODE_MEDIA_PREVIOUS: case KeyEvent.KEYCODE_MEDIA_REWIND: case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD: { Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON, null); intent.putExtra(Intent.EXTRA_KEY_EVENT, event); getContext().sendOrderedBroadcast(intent, null); Loading Loading @@ -1370,12 +1370,12 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } case KeyEvent.KEYCODE_HEADSETHOOK: case KeyEvent.KEYCODE_PLAYPAUSE: case KeyEvent.KEYCODE_STOP: case KeyEvent.KEYCODE_NEXTSONG: case KeyEvent.KEYCODE_PREVIOUSSONG: case KeyEvent.KEYCODE_REWIND: case KeyEvent.KEYCODE_FORWARD: { case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: case KeyEvent.KEYCODE_MEDIA_STOP: case KeyEvent.KEYCODE_MEDIA_NEXT: case KeyEvent.KEYCODE_MEDIA_PREVIOUS: case KeyEvent.KEYCODE_MEDIA_REWIND: case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD: { Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON, null); intent.putExtra(Intent.EXTRA_KEY_EVENT, event); getContext().sendOrderedBroadcast(intent, null); Loading policy/com/android/internal/policy/impl/PhoneWindowManager.java +6 −6 Original line number Diff line number Diff line Loading @@ -1386,12 +1386,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { static boolean isMediaKey(int code) { if (code == KeyEvent.KEYCODE_HEADSETHOOK || code == KeyEvent.KEYCODE_PLAYPAUSE || code == KeyEvent.KEYCODE_STOP || code == KeyEvent.KEYCODE_NEXTSONG || code == KeyEvent.KEYCODE_PREVIOUSSONG || code == KeyEvent.KEYCODE_PREVIOUSSONG || code == KeyEvent.KEYCODE_FORWARD) { code == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE || code == KeyEvent.KEYCODE_MEDIA_STOP || code == KeyEvent.KEYCODE_MEDIA_NEXT || code == KeyEvent.KEYCODE_MEDIA_PREVIOUS || code == KeyEvent.KEYCODE_MEDIA_PREVIOUS || code == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD) { return true; } return false; Loading Loading
policy/com/android/internal/policy/impl/KeyguardViewBase.java +12 −12 Original line number Diff line number Diff line Loading @@ -142,7 +142,7 @@ public abstract class KeyguardViewBase extends FrameLayout { final int keyCode = event.getKeyCode(); if (event.getAction() == KeyEvent.ACTION_DOWN) { switch (keyCode) { case KeyEvent.KEYCODE_PLAYPAUSE: case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: /* Suppress PLAYPAUSE toggle when phone is ringing or * in-call to avoid music playback */ if (mTelephonyManager == null) { Loading @@ -154,11 +154,11 @@ public abstract class KeyguardViewBase extends FrameLayout { return true; // suppress key event } case KeyEvent.KEYCODE_HEADSETHOOK: case KeyEvent.KEYCODE_STOP: case KeyEvent.KEYCODE_NEXTSONG: case KeyEvent.KEYCODE_PREVIOUSSONG: case KeyEvent.KEYCODE_REWIND: case KeyEvent.KEYCODE_FORWARD: { case KeyEvent.KEYCODE_MEDIA_STOP: case KeyEvent.KEYCODE_MEDIA_NEXT: case KeyEvent.KEYCODE_MEDIA_PREVIOUS: case KeyEvent.KEYCODE_MEDIA_REWIND: case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD: { Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON, null); intent.putExtra(Intent.EXTRA_KEY_EVENT, event); getContext().sendOrderedBroadcast(intent, null); Loading Loading @@ -190,12 +190,12 @@ public abstract class KeyguardViewBase extends FrameLayout { switch (keyCode) { case KeyEvent.KEYCODE_MUTE: case KeyEvent.KEYCODE_HEADSETHOOK: case KeyEvent.KEYCODE_PLAYPAUSE: case KeyEvent.KEYCODE_STOP: case KeyEvent.KEYCODE_NEXTSONG: case KeyEvent.KEYCODE_PREVIOUSSONG: case KeyEvent.KEYCODE_REWIND: case KeyEvent.KEYCODE_FORWARD: { case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: case KeyEvent.KEYCODE_MEDIA_STOP: case KeyEvent.KEYCODE_MEDIA_NEXT: case KeyEvent.KEYCODE_MEDIA_PREVIOUS: case KeyEvent.KEYCODE_MEDIA_REWIND: case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD: { Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON, null); intent.putExtra(Intent.EXTRA_KEY_EVENT, event); getContext().sendOrderedBroadcast(intent, null); Loading
policy/com/android/internal/policy/impl/KeyguardViewMediator.java +6 −6 Original line number Diff line number Diff line Loading @@ -679,12 +679,12 @@ public class KeyguardViewMediator implements KeyguardViewCallback, case KeyEvent.KEYCODE_VOLUME_DOWN: case KeyEvent.KEYCODE_MUTE: case KeyEvent.KEYCODE_HEADSETHOOK: case KeyEvent.KEYCODE_PLAYPAUSE: case KeyEvent.KEYCODE_STOP: case KeyEvent.KEYCODE_NEXTSONG: case KeyEvent.KEYCODE_PREVIOUSSONG: case KeyEvent.KEYCODE_REWIND: case KeyEvent.KEYCODE_FORWARD: case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: case KeyEvent.KEYCODE_MEDIA_STOP: case KeyEvent.KEYCODE_MEDIA_NEXT: case KeyEvent.KEYCODE_MEDIA_PREVIOUS: case KeyEvent.KEYCODE_MEDIA_REWIND: case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD: case KeyEvent.KEYCODE_CAMERA: return false; } Loading
policy/com/android/internal/policy/impl/PhoneWindow.java +12 −12 Original line number Diff line number Diff line Loading @@ -1230,7 +1230,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } case KeyEvent.KEYCODE_PLAYPAUSE: case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: /* Suppress PLAYPAUSE toggle when phone is ringing or in-call * to avoid music playback */ if (mTelephonyManager == null) { Loading @@ -1243,11 +1243,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } case KeyEvent.KEYCODE_MUTE: case KeyEvent.KEYCODE_HEADSETHOOK: case KeyEvent.KEYCODE_STOP: case KeyEvent.KEYCODE_NEXTSONG: case KeyEvent.KEYCODE_PREVIOUSSONG: case KeyEvent.KEYCODE_REWIND: case KeyEvent.KEYCODE_FORWARD: { case KeyEvent.KEYCODE_MEDIA_STOP: case KeyEvent.KEYCODE_MEDIA_NEXT: case KeyEvent.KEYCODE_MEDIA_PREVIOUS: case KeyEvent.KEYCODE_MEDIA_REWIND: case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD: { Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON, null); intent.putExtra(Intent.EXTRA_KEY_EVENT, event); getContext().sendOrderedBroadcast(intent, null); Loading Loading @@ -1370,12 +1370,12 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } case KeyEvent.KEYCODE_HEADSETHOOK: case KeyEvent.KEYCODE_PLAYPAUSE: case KeyEvent.KEYCODE_STOP: case KeyEvent.KEYCODE_NEXTSONG: case KeyEvent.KEYCODE_PREVIOUSSONG: case KeyEvent.KEYCODE_REWIND: case KeyEvent.KEYCODE_FORWARD: { case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: case KeyEvent.KEYCODE_MEDIA_STOP: case KeyEvent.KEYCODE_MEDIA_NEXT: case KeyEvent.KEYCODE_MEDIA_PREVIOUS: case KeyEvent.KEYCODE_MEDIA_REWIND: case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD: { Intent intent = new Intent(Intent.ACTION_MEDIA_BUTTON, null); intent.putExtra(Intent.EXTRA_KEY_EVENT, event); getContext().sendOrderedBroadcast(intent, null); Loading
policy/com/android/internal/policy/impl/PhoneWindowManager.java +6 −6 Original line number Diff line number Diff line Loading @@ -1386,12 +1386,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { static boolean isMediaKey(int code) { if (code == KeyEvent.KEYCODE_HEADSETHOOK || code == KeyEvent.KEYCODE_PLAYPAUSE || code == KeyEvent.KEYCODE_STOP || code == KeyEvent.KEYCODE_NEXTSONG || code == KeyEvent.KEYCODE_PREVIOUSSONG || code == KeyEvent.KEYCODE_PREVIOUSSONG || code == KeyEvent.KEYCODE_FORWARD) { code == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE || code == KeyEvent.KEYCODE_MEDIA_STOP || code == KeyEvent.KEYCODE_MEDIA_NEXT || code == KeyEvent.KEYCODE_MEDIA_PREVIOUS || code == KeyEvent.KEYCODE_MEDIA_PREVIOUS || code == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD) { return true; } return false; Loading