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

Commit 4c96a5e2 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Add @TestApi to KeyEvent.actionToString(..)

Currently, it is not possible to use KeyEvent.actionToString(..) in a
CTS test because that API is @hide. However, it would be useful to print
these actions when tests fail. Therefore, add the @TestApi annotation.

Bug: 77803694 36069459
Test: m cts-input-lib CtsHardwareTestCases (under development)
Change-Id: I2d23dbd101cef3f1c6c7a70c521a9dc219797615
parent 98ded07b
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -1259,6 +1259,10 @@ package android.view {
    method public void enable();
    method public void enable();
  }
  }


  public class KeyEvent extends android.view.InputEvent implements android.os.Parcelable {
    method public static java.lang.String actionToString(int);
  }

  public final class KeyboardShortcutGroup implements android.os.Parcelable {
  public final class KeyboardShortcutGroup implements android.os.Parcelable {
    ctor public KeyboardShortcutGroup(java.lang.CharSequence, java.util.List<android.view.KeyboardShortcutInfo>, boolean);
    ctor public KeyboardShortcutGroup(java.lang.CharSequence, java.util.List<android.view.KeyboardShortcutInfo>, boolean);
    ctor public KeyboardShortcutGroup(java.lang.CharSequence, boolean);
    ctor public KeyboardShortcutGroup(java.lang.CharSequence, boolean);
+2 −0
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@


package android.view;
package android.view;


import android.annotation.TestApi;
import android.os.Parcel;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable;
import android.text.method.MetaKeyKeyListener;
import android.text.method.MetaKeyKeyListener;
@@ -2857,6 +2858,7 @@ public class KeyEvent extends InputEvent implements Parcelable {
     * @return The symbolic name of the specified action.
     * @return The symbolic name of the specified action.
     * @hide
     * @hide
     */
     */
    @TestApi
    public static String actionToString(int action) {
    public static String actionToString(int action) {
        switch (action) {
        switch (action) {
            case ACTION_DOWN:
            case ACTION_DOWN: