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

Commit 66cf1364 authored by Felipe Leme's avatar Felipe Leme
Browse files

Exposes KeyEvent.getDisplayId() as @TestApi.

Test: m update-api
Bug: 272376728

Change-Id: I10759c88057532443607051a5dc352759848a713
parent bbbe3c79
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3349,8 +3349,14 @@ package android.view {
    method @NonNull public android.hardware.input.InputDeviceIdentifier getIdentifier();
  }

  public abstract class InputEvent implements android.os.Parcelable {
    method public abstract int getDisplayId();
    method public abstract void setDisplayId(int);
  }

  public class KeyEvent extends android.view.InputEvent implements android.os.Parcelable {
    method public static String actionToString(int);
    method public final int getDisplayId();
    method public final void setDisplayId(int);
    field public static final int FLAG_IS_ACCESSIBILITY_EVENT = 2048; // 0x800
    field public static final int LAST_KEYCODE = 316; // 0x13c
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.view;

import android.annotation.TestApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
@@ -100,6 +101,7 @@ public abstract class InputEvent implements Parcelable {
     * @return The display id associated with the event.
     * @hide
     */
    @TestApi
    public abstract int getDisplayId();

    /**
@@ -107,6 +109,7 @@ public abstract class InputEvent implements Parcelable {
     * @param displayId
     * @hide
     */
    @TestApi
    public abstract void setDisplayId(int displayId);
    /**
     * Copies the event.
+1 −0
Original line number Diff line number Diff line
@@ -2100,6 +2100,7 @@ public class KeyEvent extends InputEvent implements Parcelable {
    }

    /** @hide */
    @TestApi
    @Override
    public final int getDisplayId() {
        return mDisplayId;