Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec6bf884 authored by Hyundo Moon's avatar Hyundo Moon Committed by Android (Google) Code Review
Browse files

Merge "Revert Media 1.0 API changes introduced for making 1.0 updatable"

parents f296a878 c3ce09ee
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -49201,7 +49201,6 @@ package android.view {
    method public final boolean isFunctionPressed();
    method public static final boolean isGamepadButton(int);
    method public final boolean isLongPress();
    method public static final boolean isMediaSessionKey(int);
    method public final boolean isMetaPressed();
    method public static boolean isModifierKey(int);
    method public final boolean isNumLockOn();
+0 −2
Original line number Diff line number Diff line
@@ -231,7 +231,6 @@ package android {
  }
  public static final class R.dimen {
    field public static final int config_mediaMetadataBitmapMaxSize = 17104904; // 0x1050008
    field public static final int config_restrictedIconSize = 17104903; // 0x1050007
  }
@@ -3495,7 +3494,6 @@ package android.media {
    field public static final int AUDIOFOCUS_FLAG_DELAY_OK = 1; // 0x1
    field public static final int AUDIOFOCUS_FLAG_LOCK = 4; // 0x4
    field public static final int AUDIOFOCUS_FLAG_PAUSES_ON_DUCKABLE_LOSS = 2; // 0x2
    field public static final int FLAG_FROM_KEY = 65536; // 0x10000
    field public static final int SUCCESS = 0; // 0x0
  }
+24 −22
Original line number Diff line number Diff line
@@ -1805,28 +1805,6 @@ public class KeyEvent extends InputEvent implements Parcelable {
        return isWakeKey(mKeyCode);
    }

    /**
     * Returns whether this key will be sent to the
     * {@link android.media.session.MediaSession.Callback} if not handled.
     */
    public static final boolean isMediaSessionKey(int keyCode) {
        switch (keyCode) {
            case KeyEvent.KEYCODE_MEDIA_PLAY:
            case KeyEvent.KEYCODE_MEDIA_PAUSE:
            case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
            case KeyEvent.KEYCODE_MUTE:
            case KeyEvent.KEYCODE_HEADSETHOOK:
            case KeyEvent.KEYCODE_MEDIA_STOP:
            case KeyEvent.KEYCODE_MEDIA_NEXT:
            case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
            case KeyEvent.KEYCODE_MEDIA_REWIND:
            case KeyEvent.KEYCODE_MEDIA_RECORD:
            case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD:
                return true;
        }
        return false;
    }

    /**
     * Returns true if the specified keycode is a gamepad button.
     * @return True if the keycode is a gamepad button, such as {@link #KEYCODE_BUTTON_A}.
@@ -1886,6 +1864,30 @@ public class KeyEvent extends InputEvent implements Parcelable {
        }
    }

    /**
     * Returns whether this key will be sent to the
     * {@link android.media.session.MediaSession.Callback} if not handled.
     *
     * @hide
     */
    public static final boolean isMediaSessionKey(int keyCode) {
        switch (keyCode) {
            case KeyEvent.KEYCODE_MEDIA_PLAY:
            case KeyEvent.KEYCODE_MEDIA_PAUSE:
            case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
            case KeyEvent.KEYCODE_MUTE:
            case KeyEvent.KEYCODE_HEADSETHOOK:
            case KeyEvent.KEYCODE_MEDIA_STOP:
            case KeyEvent.KEYCODE_MEDIA_NEXT:
            case KeyEvent.KEYCODE_MEDIA_PREVIOUS:
            case KeyEvent.KEYCODE_MEDIA_REWIND:
            case KeyEvent.KEYCODE_MEDIA_RECORD:
            case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD:
                return true;
        }
        return false;
    }

    /** Is this a system key? System keys can not be used for menu shortcuts.
     * @hide
     */
+0 −2
Original line number Diff line number Diff line
@@ -3006,8 +3006,6 @@
    <public-group type="dimen" first-id="0x01050007">
        <!-- @hide @SystemApi -->
        <public name="config_restrictedIconSize" />
        <!-- @hide @SystemApi -->
        <public name="config_mediaMetadataBitmapMaxSize" />
    </public-group>

    <public-group type="color" first-id="0x0106001c">
+1 −2
Original line number Diff line number Diff line
@@ -553,8 +553,7 @@ public class AudioManager {
     * request is from a hardware key press. (e.g. {@link MediaController}).
     * @hide
     */
    @SystemApi
    public static final int FLAG_FROM_KEY = 1 << 16;
    public static final int FLAG_FROM_KEY = 1 << 12;

    // The iterator of TreeMap#entrySet() returns the entries in ascending key order.
    private static final TreeMap<Integer, String> FLAG_NAMES = new TreeMap<>();
Loading