Loading core/api/test-current.txt +0 −2 Original line number Diff line number Diff line Loading @@ -483,8 +483,6 @@ package android.app { field public static final int WINDOWING_MODE_FULLSCREEN = 1; // 0x1 field public static final int WINDOWING_MODE_MULTI_WINDOW = 6; // 0x6 field public static final int WINDOWING_MODE_PINNED = 2; // 0x2 field public static final int WINDOWING_MODE_SPLIT_SCREEN_PRIMARY = 3; // 0x3 field public static final int WINDOWING_MODE_SPLIT_SCREEN_SECONDARY = 4; // 0x4 field public static final int WINDOWING_MODE_UNDEFINED = 0; // 0x0 } Loading core/java/Android.bp +8 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,14 @@ filegroup { "**/*.java", "**/*.aidl", ], exclude_srcs: [ // Remove election toolbar code from build time "android/service/selectiontoolbar/*.aidl", "android/service/selectiontoolbar/*.java", "android/view/selectiontoolbar/*.aidl", "android/view/selectiontoolbar/*.java", "com/android/internal/widget/floatingtoolbar/RemoteFloatingToolbarPopup.java", ], visibility: ["//frameworks/base"], } Loading core/java/android/app/ActivityManagerInternal.java +5 −4 Original line number Diff line number Diff line Loading @@ -568,14 +568,15 @@ public abstract class ActivityManagerInternal { public abstract void unregisterProcessObserver(IProcessObserver processObserver); /** * Checks if there is an unfinished instrumentation that targets the given uid. * Gets the uid of the instrumentation source if there is an unfinished instrumentation that * targets the given uid. * * @param uid The uid to be checked for * * @return True, if there is an instrumentation whose target application uid matches the given * uid, false otherwise * @return the uid of the instrumentation source, if there is an instrumentation whose target * application uid matches the given uid, and {@link android.os.Process#INVALID_UID} otherwise. */ public abstract boolean isUidCurrentlyInstrumented(int uid); public abstract int getInstrumentationSourceUid(int uid); /** Is this a device owner app? */ public abstract boolean isDeviceOwner(int uid); Loading core/java/android/app/Instrumentation.java +50 −37 Original line number Diff line number Diff line Loading @@ -1058,10 +1058,11 @@ public class Instrumentation { } /** * Sends the key events corresponding to the text to the app being * instrumented. * Sends the key events that result in the given text being typed into the currently focused * window, and waits for it to be processed. * * @param text The text to be sent. * @see #sendKeySync(KeyEvent) */ public void sendStringSync(String text) { if (text == null) { Loading @@ -1084,11 +1085,12 @@ public class Instrumentation { } /** * Send a key event to the currently focused window/view and wait for it to * be processed. Finished at some point after the recipient has returned * from its event processing, though it may <em>not</em> have completely * finished reacting from the event -- for example, if it needs to update * its display as a result, it may still be in the process of doing that. * Sends a key event to the currently focused window, and waits for it to be processed. * <p> * This method blocks until the recipient has finished handling the event. Note that the * recipient may <em>not</em> have completely finished reacting from the event when this method * returns. For example, it may still be in the process of updating its display or UI contents * upon reacting to the injected event. * * @param event The event to send to the current focus. */ Loading Loading @@ -1116,34 +1118,42 @@ public class Instrumentation { } /** * Sends an up and down key event sync to the currently focused window. * Sends up and down key events with the given key code to the currently focused window, and * waits for it to be processed. * * @param key The integer keycode for the event. * @param keyCode The key code for the events to send. * @see #sendKeySync(KeyEvent) */ public void sendKeyDownUpSync(int key) { sendKeySync(new KeyEvent(KeyEvent.ACTION_DOWN, key)); sendKeySync(new KeyEvent(KeyEvent.ACTION_UP, key)); public void sendKeyDownUpSync(int keyCode) { sendKeySync(new KeyEvent(KeyEvent.ACTION_DOWN, keyCode)); sendKeySync(new KeyEvent(KeyEvent.ACTION_UP, keyCode)); } /** * Higher-level method for sending both the down and up key events for a * particular character key code. Equivalent to creating both KeyEvent * objects by hand and calling {@link #sendKeySync}. The event appears * as if it came from keyboard 0, the built in one. * Sends up and down key events with the given key code to the currently focused window, and * waits for it to be processed. * <p> * Equivalent to {@link #sendKeyDownUpSync(int)}. * * @param keyCode The key code of the character to send. * @see #sendKeySync(KeyEvent) */ public void sendCharacterSync(int keyCode) { sendKeySync(new KeyEvent(KeyEvent.ACTION_DOWN, keyCode)); sendKeySync(new KeyEvent(KeyEvent.ACTION_UP, keyCode)); sendKeyDownUpSync(keyCode); } /** * Dispatch a pointer event. Finished at some point after the recipient has * returned from its event processing, though it may <em>not</em> have * completely finished reacting from the event -- for example, if it needs * to update its display as a result, it may still be in the process of * doing that. * Dispatches a pointer event into a window owned by the instrumented application, and waits for * it to be processed. * <p> * If the motion event being injected is targeted at a window that is not owned by the * instrumented application, the input injection will fail. See {@link #getUiAutomation()} for * injecting events into all windows. * <p> * This method blocks until the recipient has finished handling the event. Note that the * recipient may <em>not</em> have completely finished reacting from the event when this method * returns. For example, it may still be in the process of updating its display or UI contents * upon reacting to the injected event. * * @param event A motion event describing the pointer action. (As noted in * {@link MotionEvent#obtain(long, long, int, float, float, int)}, be sure to use Loading @@ -1155,10 +1165,10 @@ public class Instrumentation { event.setSource(InputDevice.SOURCE_TOUCHSCREEN); } syncInputTransactionsAndInjectEvent(event); syncInputTransactionsAndInjectEventIntoSelf(event); } private void syncInputTransactionsAndInjectEvent(MotionEvent event) { private void syncInputTransactionsAndInjectEventIntoSelf(MotionEvent event) { final boolean syncBefore = event.getAction() == MotionEvent.ACTION_DOWN || event.isFromSource(InputDevice.SOURCE_MOUSE); final boolean syncAfter = event.getAction() == MotionEvent.ACTION_UP; Loading @@ -1169,8 +1179,9 @@ public class Instrumentation { .syncInputTransactions(true /*waitForAnimations*/); } // Direct the injected event into windows owned by the instrumentation target. InputManager.getInstance().injectInputEvent( event, InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH); event, InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH, Process.myUid()); if (syncAfter) { WindowManagerGlobal.getWindowManagerService() Loading @@ -1182,11 +1193,13 @@ public class Instrumentation { } /** * Dispatch a trackball event. Finished at some point after the recipient has * returned from its event processing, though it may <em>not</em> have * completely finished reacting from the event -- for example, if it needs * to update its display as a result, it may still be in the process of * doing that. * Dispatches a trackball event into the currently focused window, and waits for it to be * processed. * <p> * This method blocks until the recipient has finished handling the event. Note that the * recipient may <em>not</em> have completely finished reacting from the event when this method * returns. For example, it may still be in the process of updating its display or UI contents * upon reacting to the injected event. * * @param event A motion event describing the trackball action. (As noted in * {@link MotionEvent#obtain(long, long, int, float, float, int)}, be sure to use Loading @@ -1194,7 +1207,7 @@ public class Instrumentation { */ public void sendTrackballEventSync(MotionEvent event) { validateNotAppThread(); if ((event.getSource() & InputDevice.SOURCE_CLASS_TRACKBALL) == 0) { if (!event.isFromSource(InputDevice.SOURCE_CLASS_TRACKBALL)) { event.setSource(InputDevice.SOURCE_TRACKBALL); } InputManager.getInstance().injectInputEvent(event, Loading core/java/android/app/SystemServiceRegistry.java +0 −11 Original line number Diff line number Diff line Loading @@ -230,8 +230,6 @@ import android.view.contentcapture.ContentCaptureManager; import android.view.contentcapture.IContentCaptureManager; import android.view.displayhash.DisplayHashManager; import android.view.inputmethod.InputMethodManager; import android.view.selectiontoolbar.ISelectionToolbarManager; import android.view.selectiontoolbar.SelectionToolbarManager; import android.view.textclassifier.TextClassificationManager; import android.view.textservice.TextServicesManager; import android.view.translation.ITranslationManager; Loading Loading @@ -365,15 +363,6 @@ public final class SystemServiceRegistry { return new TextClassificationManager(ctx); }}); registerService(Context.SELECTION_TOOLBAR_SERVICE, SelectionToolbarManager.class, new CachedServiceFetcher<SelectionToolbarManager>() { @Override public SelectionToolbarManager createService(ContextImpl ctx) { IBinder b = ServiceManager.getService(Context.SELECTION_TOOLBAR_SERVICE); return new SelectionToolbarManager(ctx.getOuterContext(), ISelectionToolbarManager.Stub.asInterface(b)); }}); registerService(Context.FONT_SERVICE, FontManager.class, new CachedServiceFetcher<FontManager>() { @Override Loading Loading
core/api/test-current.txt +0 −2 Original line number Diff line number Diff line Loading @@ -483,8 +483,6 @@ package android.app { field public static final int WINDOWING_MODE_FULLSCREEN = 1; // 0x1 field public static final int WINDOWING_MODE_MULTI_WINDOW = 6; // 0x6 field public static final int WINDOWING_MODE_PINNED = 2; // 0x2 field public static final int WINDOWING_MODE_SPLIT_SCREEN_PRIMARY = 3; // 0x3 field public static final int WINDOWING_MODE_SPLIT_SCREEN_SECONDARY = 4; // 0x4 field public static final int WINDOWING_MODE_UNDEFINED = 0; // 0x0 } Loading
core/java/Android.bp +8 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,14 @@ filegroup { "**/*.java", "**/*.aidl", ], exclude_srcs: [ // Remove election toolbar code from build time "android/service/selectiontoolbar/*.aidl", "android/service/selectiontoolbar/*.java", "android/view/selectiontoolbar/*.aidl", "android/view/selectiontoolbar/*.java", "com/android/internal/widget/floatingtoolbar/RemoteFloatingToolbarPopup.java", ], visibility: ["//frameworks/base"], } Loading
core/java/android/app/ActivityManagerInternal.java +5 −4 Original line number Diff line number Diff line Loading @@ -568,14 +568,15 @@ public abstract class ActivityManagerInternal { public abstract void unregisterProcessObserver(IProcessObserver processObserver); /** * Checks if there is an unfinished instrumentation that targets the given uid. * Gets the uid of the instrumentation source if there is an unfinished instrumentation that * targets the given uid. * * @param uid The uid to be checked for * * @return True, if there is an instrumentation whose target application uid matches the given * uid, false otherwise * @return the uid of the instrumentation source, if there is an instrumentation whose target * application uid matches the given uid, and {@link android.os.Process#INVALID_UID} otherwise. */ public abstract boolean isUidCurrentlyInstrumented(int uid); public abstract int getInstrumentationSourceUid(int uid); /** Is this a device owner app? */ public abstract boolean isDeviceOwner(int uid); Loading
core/java/android/app/Instrumentation.java +50 −37 Original line number Diff line number Diff line Loading @@ -1058,10 +1058,11 @@ public class Instrumentation { } /** * Sends the key events corresponding to the text to the app being * instrumented. * Sends the key events that result in the given text being typed into the currently focused * window, and waits for it to be processed. * * @param text The text to be sent. * @see #sendKeySync(KeyEvent) */ public void sendStringSync(String text) { if (text == null) { Loading @@ -1084,11 +1085,12 @@ public class Instrumentation { } /** * Send a key event to the currently focused window/view and wait for it to * be processed. Finished at some point after the recipient has returned * from its event processing, though it may <em>not</em> have completely * finished reacting from the event -- for example, if it needs to update * its display as a result, it may still be in the process of doing that. * Sends a key event to the currently focused window, and waits for it to be processed. * <p> * This method blocks until the recipient has finished handling the event. Note that the * recipient may <em>not</em> have completely finished reacting from the event when this method * returns. For example, it may still be in the process of updating its display or UI contents * upon reacting to the injected event. * * @param event The event to send to the current focus. */ Loading Loading @@ -1116,34 +1118,42 @@ public class Instrumentation { } /** * Sends an up and down key event sync to the currently focused window. * Sends up and down key events with the given key code to the currently focused window, and * waits for it to be processed. * * @param key The integer keycode for the event. * @param keyCode The key code for the events to send. * @see #sendKeySync(KeyEvent) */ public void sendKeyDownUpSync(int key) { sendKeySync(new KeyEvent(KeyEvent.ACTION_DOWN, key)); sendKeySync(new KeyEvent(KeyEvent.ACTION_UP, key)); public void sendKeyDownUpSync(int keyCode) { sendKeySync(new KeyEvent(KeyEvent.ACTION_DOWN, keyCode)); sendKeySync(new KeyEvent(KeyEvent.ACTION_UP, keyCode)); } /** * Higher-level method for sending both the down and up key events for a * particular character key code. Equivalent to creating both KeyEvent * objects by hand and calling {@link #sendKeySync}. The event appears * as if it came from keyboard 0, the built in one. * Sends up and down key events with the given key code to the currently focused window, and * waits for it to be processed. * <p> * Equivalent to {@link #sendKeyDownUpSync(int)}. * * @param keyCode The key code of the character to send. * @see #sendKeySync(KeyEvent) */ public void sendCharacterSync(int keyCode) { sendKeySync(new KeyEvent(KeyEvent.ACTION_DOWN, keyCode)); sendKeySync(new KeyEvent(KeyEvent.ACTION_UP, keyCode)); sendKeyDownUpSync(keyCode); } /** * Dispatch a pointer event. Finished at some point after the recipient has * returned from its event processing, though it may <em>not</em> have * completely finished reacting from the event -- for example, if it needs * to update its display as a result, it may still be in the process of * doing that. * Dispatches a pointer event into a window owned by the instrumented application, and waits for * it to be processed. * <p> * If the motion event being injected is targeted at a window that is not owned by the * instrumented application, the input injection will fail. See {@link #getUiAutomation()} for * injecting events into all windows. * <p> * This method blocks until the recipient has finished handling the event. Note that the * recipient may <em>not</em> have completely finished reacting from the event when this method * returns. For example, it may still be in the process of updating its display or UI contents * upon reacting to the injected event. * * @param event A motion event describing the pointer action. (As noted in * {@link MotionEvent#obtain(long, long, int, float, float, int)}, be sure to use Loading @@ -1155,10 +1165,10 @@ public class Instrumentation { event.setSource(InputDevice.SOURCE_TOUCHSCREEN); } syncInputTransactionsAndInjectEvent(event); syncInputTransactionsAndInjectEventIntoSelf(event); } private void syncInputTransactionsAndInjectEvent(MotionEvent event) { private void syncInputTransactionsAndInjectEventIntoSelf(MotionEvent event) { final boolean syncBefore = event.getAction() == MotionEvent.ACTION_DOWN || event.isFromSource(InputDevice.SOURCE_MOUSE); final boolean syncAfter = event.getAction() == MotionEvent.ACTION_UP; Loading @@ -1169,8 +1179,9 @@ public class Instrumentation { .syncInputTransactions(true /*waitForAnimations*/); } // Direct the injected event into windows owned by the instrumentation target. InputManager.getInstance().injectInputEvent( event, InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH); event, InputManager.INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH, Process.myUid()); if (syncAfter) { WindowManagerGlobal.getWindowManagerService() Loading @@ -1182,11 +1193,13 @@ public class Instrumentation { } /** * Dispatch a trackball event. Finished at some point after the recipient has * returned from its event processing, though it may <em>not</em> have * completely finished reacting from the event -- for example, if it needs * to update its display as a result, it may still be in the process of * doing that. * Dispatches a trackball event into the currently focused window, and waits for it to be * processed. * <p> * This method blocks until the recipient has finished handling the event. Note that the * recipient may <em>not</em> have completely finished reacting from the event when this method * returns. For example, it may still be in the process of updating its display or UI contents * upon reacting to the injected event. * * @param event A motion event describing the trackball action. (As noted in * {@link MotionEvent#obtain(long, long, int, float, float, int)}, be sure to use Loading @@ -1194,7 +1207,7 @@ public class Instrumentation { */ public void sendTrackballEventSync(MotionEvent event) { validateNotAppThread(); if ((event.getSource() & InputDevice.SOURCE_CLASS_TRACKBALL) == 0) { if (!event.isFromSource(InputDevice.SOURCE_CLASS_TRACKBALL)) { event.setSource(InputDevice.SOURCE_TRACKBALL); } InputManager.getInstance().injectInputEvent(event, Loading
core/java/android/app/SystemServiceRegistry.java +0 −11 Original line number Diff line number Diff line Loading @@ -230,8 +230,6 @@ import android.view.contentcapture.ContentCaptureManager; import android.view.contentcapture.IContentCaptureManager; import android.view.displayhash.DisplayHashManager; import android.view.inputmethod.InputMethodManager; import android.view.selectiontoolbar.ISelectionToolbarManager; import android.view.selectiontoolbar.SelectionToolbarManager; import android.view.textclassifier.TextClassificationManager; import android.view.textservice.TextServicesManager; import android.view.translation.ITranslationManager; Loading Loading @@ -365,15 +363,6 @@ public final class SystemServiceRegistry { return new TextClassificationManager(ctx); }}); registerService(Context.SELECTION_TOOLBAR_SERVICE, SelectionToolbarManager.class, new CachedServiceFetcher<SelectionToolbarManager>() { @Override public SelectionToolbarManager createService(ContextImpl ctx) { IBinder b = ServiceManager.getService(Context.SELECTION_TOOLBAR_SERVICE); return new SelectionToolbarManager(ctx.getOuterContext(), ISelectionToolbarManager.Stub.asInterface(b)); }}); registerService(Context.FONT_SERVICE, FontManager.class, new CachedServiceFetcher<FontManager>() { @Override Loading