Loading api/test-current.txt +5 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,10 @@ package android.animation { package android.app { public class Activity extends android.view.ContextThemeWrapper implements android.content.ComponentCallbacks2 android.view.KeyEvent.Callback android.view.LayoutInflater.Factory2 android.view.View.OnCreateContextMenuListener android.view.Window.Callback { method public void onMovedToDisplay(int, android.content.res.Configuration); } public class ActivityManager { method public void addOnUidImportanceListener(android.app.ActivityManager.OnUidImportanceListener, int); method public void alwaysShowUnsupportedCompileSdkWarning(android.content.ComponentName); Loading Loading @@ -1592,6 +1596,7 @@ package android.view { public class KeyEvent extends android.view.InputEvent implements android.os.Parcelable { method public static java.lang.String actionToString(int); method public final void setDisplayId(int); field public static final int LAST_KEYCODE = 288; // 0x120 } Loading core/java/android/app/Activity.java +2 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.annotation.StyleRes; import android.annotation.SystemApi; import android.annotation.TestApi; import android.annotation.UnsupportedAppUsage; import android.app.VoiceInteractor.Request; import android.app.admin.DevicePolicyManager; Loading Loading @@ -2346,6 +2347,7 @@ public class Activity extends ContextThemeWrapper * @see View#onMovedToDisplay(int, Configuration) * @hide */ @TestApi public void onMovedToDisplay(int displayId, Configuration config) { } Loading core/java/android/app/Instrumentation.java +6 −11 Original line number Diff line number Diff line Loading @@ -1017,14 +1017,7 @@ public class Instrumentation { long downTime = event.getDownTime(); long eventTime = event.getEventTime(); int action = event.getAction(); int code = event.getKeyCode(); int repeatCount = event.getRepeatCount(); int metaState = event.getMetaState(); int deviceId = event.getDeviceId(); int scancode = event.getScanCode(); int source = event.getSource(); int flags = event.getFlags(); if (source == InputDevice.SOURCE_UNKNOWN) { source = InputDevice.SOURCE_KEYBOARD; } Loading @@ -1034,8 +1027,10 @@ public class Instrumentation { if (downTime == 0) { downTime = eventTime; } KeyEvent newEvent = new KeyEvent(downTime, eventTime, action, code, repeatCount, metaState, deviceId, scancode, flags | KeyEvent.FLAG_FROM_SYSTEM, source); KeyEvent newEvent = new KeyEvent(event); newEvent.setTime(downTime, eventTime); newEvent.setSource(source); newEvent.setFlags(event.getFlags() | KeyEvent.FLAG_FROM_SYSTEM); InputManager.getInstance().injectInputEvent(newEvent, InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH); } Loading core/java/android/view/KeyEvent.java +25 −0 Original line number Diff line number Diff line Loading @@ -1978,6 +1978,7 @@ public class KeyEvent extends InputEvent implements Parcelable { } /** @hide */ @TestApi @Override public final void setDisplayId(int displayId) { mDisplayId = displayId; Loading Loading @@ -2041,6 +2042,16 @@ public class KeyEvent extends InputEvent implements Parcelable { return normalizeMetaState(mMetaState) & META_MODIFIER_MASK; } /** * Modifies the flags of the event. * * @param newFlags New flags for the event, replacing the entire value. * @hide */ public final void setFlags(int newFlags) { mFlags = newFlags; } /** * Returns the flags for this key event. * Loading Loading @@ -2541,6 +2552,20 @@ public class KeyEvent extends InputEvent implements Parcelable { return mRepeatCount; } /** * Modifies the down time and the event time of the event. * * @param downTime The new down time (in {@link android.os.SystemClock#uptimeMillis}) of the * event. * @param eventTime The new event time (in {@link android.os.SystemClock#uptimeMillis}) of the * event. * @hide */ public final void setTime(long downTime, long eventTime) { mDownTime = downTime; mEventTime = eventTime; } /** * Retrieve the time of the most recent key down event, * in the {@link android.os.SystemClock#uptimeMillis} time base. If this Loading Loading
api/test-current.txt +5 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,10 @@ package android.animation { package android.app { public class Activity extends android.view.ContextThemeWrapper implements android.content.ComponentCallbacks2 android.view.KeyEvent.Callback android.view.LayoutInflater.Factory2 android.view.View.OnCreateContextMenuListener android.view.Window.Callback { method public void onMovedToDisplay(int, android.content.res.Configuration); } public class ActivityManager { method public void addOnUidImportanceListener(android.app.ActivityManager.OnUidImportanceListener, int); method public void alwaysShowUnsupportedCompileSdkWarning(android.content.ComponentName); Loading Loading @@ -1592,6 +1596,7 @@ package android.view { public class KeyEvent extends android.view.InputEvent implements android.os.Parcelable { method public static java.lang.String actionToString(int); method public final void setDisplayId(int); field public static final int LAST_KEYCODE = 288; // 0x120 } Loading
core/java/android/app/Activity.java +2 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.annotation.StyleRes; import android.annotation.SystemApi; import android.annotation.TestApi; import android.annotation.UnsupportedAppUsage; import android.app.VoiceInteractor.Request; import android.app.admin.DevicePolicyManager; Loading Loading @@ -2346,6 +2347,7 @@ public class Activity extends ContextThemeWrapper * @see View#onMovedToDisplay(int, Configuration) * @hide */ @TestApi public void onMovedToDisplay(int displayId, Configuration config) { } Loading
core/java/android/app/Instrumentation.java +6 −11 Original line number Diff line number Diff line Loading @@ -1017,14 +1017,7 @@ public class Instrumentation { long downTime = event.getDownTime(); long eventTime = event.getEventTime(); int action = event.getAction(); int code = event.getKeyCode(); int repeatCount = event.getRepeatCount(); int metaState = event.getMetaState(); int deviceId = event.getDeviceId(); int scancode = event.getScanCode(); int source = event.getSource(); int flags = event.getFlags(); if (source == InputDevice.SOURCE_UNKNOWN) { source = InputDevice.SOURCE_KEYBOARD; } Loading @@ -1034,8 +1027,10 @@ public class Instrumentation { if (downTime == 0) { downTime = eventTime; } KeyEvent newEvent = new KeyEvent(downTime, eventTime, action, code, repeatCount, metaState, deviceId, scancode, flags | KeyEvent.FLAG_FROM_SYSTEM, source); KeyEvent newEvent = new KeyEvent(event); newEvent.setTime(downTime, eventTime); newEvent.setSource(source); newEvent.setFlags(event.getFlags() | KeyEvent.FLAG_FROM_SYSTEM); InputManager.getInstance().injectInputEvent(newEvent, InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH); } Loading
core/java/android/view/KeyEvent.java +25 −0 Original line number Diff line number Diff line Loading @@ -1978,6 +1978,7 @@ public class KeyEvent extends InputEvent implements Parcelable { } /** @hide */ @TestApi @Override public final void setDisplayId(int displayId) { mDisplayId = displayId; Loading Loading @@ -2041,6 +2042,16 @@ public class KeyEvent extends InputEvent implements Parcelable { return normalizeMetaState(mMetaState) & META_MODIFIER_MASK; } /** * Modifies the flags of the event. * * @param newFlags New flags for the event, replacing the entire value. * @hide */ public final void setFlags(int newFlags) { mFlags = newFlags; } /** * Returns the flags for this key event. * Loading Loading @@ -2541,6 +2552,20 @@ public class KeyEvent extends InputEvent implements Parcelable { return mRepeatCount; } /** * Modifies the down time and the event time of the event. * * @param downTime The new down time (in {@link android.os.SystemClock#uptimeMillis}) of the * event. * @param eventTime The new event time (in {@link android.os.SystemClock#uptimeMillis}) of the * event. * @hide */ public final void setTime(long downTime, long eventTime) { mDownTime = downTime; mEventTime = eventTime; } /** * Retrieve the time of the most recent key down event, * in the {@link android.os.SystemClock#uptimeMillis} time base. If this Loading