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

Commit 4c55afd7 authored by Alex Buynytskyy's avatar Alex Buynytskyy
Browse files

Allow shell command to accept std input stream.

Incremental and pm installs use stdin to provide APK data. This change
allows Jetpack to test incremental installs.

Bug: 162316399
Test: API change, already used in CTS
Test: atest PackageManagerShellCommandTest
Change-Id: I0a891535a7ff0b2a3459b03be56c6798e30086b6
parent a3e52bf4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6515,6 +6515,7 @@ package android.app {
    method public void dropShellPermissionIdentity();
    method public android.view.accessibility.AccessibilityEvent executeAndWaitForEvent(Runnable, android.app.UiAutomation.AccessibilityEventFilter, long) throws java.util.concurrent.TimeoutException;
    method public android.os.ParcelFileDescriptor executeShellCommand(String);
    method @NonNull public android.os.ParcelFileDescriptor[] executeShellCommandRw(@NonNull String);
    method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
    method public android.view.accessibility.AccessibilityNodeInfo getRootInActiveWindow();
    method public android.accessibilityservice.AccessibilityServiceInfo getServiceInfo();
+0 −1
Original line number Diff line number Diff line
@@ -539,7 +539,6 @@ package android.app {

  public final class UiAutomation {
    method public void destroy();
    method @NonNull public android.os.ParcelFileDescriptor[] executeShellCommandRw(@NonNull String);
    method @NonNull public android.os.ParcelFileDescriptor[] executeShellCommandRwe(@NonNull String);
    method @Deprecated public boolean grantRuntimePermission(String, String, android.os.UserHandle);
    method @Deprecated public boolean revokeRuntimePermission(String, String, android.os.UserHandle);
+1 −3
Original line number Diff line number Diff line
@@ -1242,10 +1242,8 @@ public final class UiAutomation {
     *
     * @param command The command to execute.
     * @return File descriptors (out, in) to the standard output/input streams.
     *
     * @hide
     */
    @TestApi
    @SuppressLint("ArrayReturn") // For consistency with other APIs
    public @NonNull ParcelFileDescriptor[] executeShellCommandRw(@NonNull String command) {
        return executeShellCommandInternal(command, false /* includeStderr */);
    }
+1 −0
Original line number Diff line number Diff line
@@ -6515,6 +6515,7 @@ package android.app {
    method public void dropShellPermissionIdentity();
    method public android.view.accessibility.AccessibilityEvent executeAndWaitForEvent(Runnable, android.app.UiAutomation.AccessibilityEventFilter, long) throws java.util.concurrent.TimeoutException;
    method public android.os.ParcelFileDescriptor executeShellCommand(String);
    method @NonNull public android.os.ParcelFileDescriptor[] executeShellCommandRw(@NonNull String);
    method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
    method public android.view.accessibility.AccessibilityNodeInfo getRootInActiveWindow();
    method public android.accessibilityservice.AccessibilityServiceInfo getServiceInfo();