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

Commit 17868453 authored by Sooraj Sasindran's avatar Sooraj Sasindran Committed by android-build-merger
Browse files

Merge "Allow UiAutomation to adopt the shell permission indentity"

am: 9f0115bb

Change-Id: I2f3d34f78446de60d51b84fcc81110585c9f2c81
parents 0287ddfd 9f0115bb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -6117,8 +6117,10 @@ package android.app {
  }
  public final class UiAutomation {
    method public void adoptShellPermissionIdentity();
    method public void clearWindowAnimationFrameStats();
    method public boolean clearWindowContentFrameStats(int);
    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 public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
+2 −0
Original line number Diff line number Diff line
@@ -263,7 +263,9 @@ package android.content.pm {
    method public abstract String getPermissionControllerPackageName();
    method @NonNull public abstract String getServicesSystemSharedLibraryPackageName();
    method @NonNull public abstract String getSharedSystemSharedLibraryPackageName();
    method @RequiresPermission("android.permission.GRANT_RUNTIME_PERMISSIONS") public abstract void grantRuntimePermission(@NonNull String, @NonNull String, @NonNull android.os.UserHandle);
    method public abstract boolean isPermissionReviewModeEnabled();
    method @RequiresPermission("android.permission.REVOKE_RUNTIME_PERMISSIONS") public abstract void revokeRuntimePermission(@NonNull String, @NonNull String, @NonNull android.os.UserHandle);
    field public static final String FEATURE_ADOPTABLE_STORAGE = "android.software.adoptable_storage";
    field public static final String FEATURE_FILE_BASED_ENCRYPTION = "android.software.file_based_encryption";
    field public static final int MATCH_FACTORY_ONLY = 2097152; // 0x200000
+1 −1
Original line number Diff line number Diff line
@@ -2513,7 +2513,7 @@ public class AppOpsManager {
     */
    public int noteProxyOpNoThrow(int op, String proxiedPackageName) {
        try {
            return mService.noteProxyOperation(op, mContext.getOpPackageName(),
            return mService.noteProxyOperation(op, Process.myUid(), mContext.getOpPackageName(),
                    Binder.getCallingUid(), proxiedPackageName);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
+43 −0
Original line number Diff line number Diff line
@@ -18,12 +18,55 @@ package android.app;

import android.util.SparseIntArray;

import com.android.internal.util.function.QuadFunction;
import com.android.internal.util.function.TriFunction;

/**
 * App ops service local interface.
 *
 * @hide Only for use within the system server.
 */
public abstract class AppOpsManagerInternal {
    /** Interface to override app ops checks via composition */
    public interface CheckOpsDelegate {
        /**
         * Allows overriding check operation behavior.
         *
         * @param code The op code to check.
         * @param uid The UID for which to check.
         * @param packageName The package for which to check.
         * @param superImpl The super implementation.
         * @return The app op check result.
         */
        int checkOperation(int code, int uid, String packageName,
                TriFunction<Integer, Integer, String, Integer> superImpl);

        /**
         * Allows overriding check audio operation behavior.
         *
         * @param code The op code to check.
         * @param usage The audio op usage.
         * @param uid The UID for which to check.
         * @param packageName The package for which to check.
         * @param superImpl The super implementation.
         * @return The app op check result.
         */
        int checkAudioOperation(int code, int usage, int uid, String packageName,
                QuadFunction<Integer, Integer, Integer, String, Integer> superImpl);

        /**
         * Allows overriding note operation behavior.
         *
         * @param code The op code to note.
         * @param uid The UID for which to note.
         * @param packageName The package for which to note.
         * @param superImpl The super implementation.
         * @return The app op note result.
         */
        int noteOperation(int code, int uid, String packageName,
                TriFunction<Integer, Integer, String, Integer> superImpl);
    }

    /**
     * Set the currently configured device and profile owners.  Specifies the package uid (value)
     * that has been configured for each user (key) that has one.  These will be allowed privileged
+15 −0
Original line number Diff line number Diff line
@@ -714,4 +714,19 @@ interface IActivityManager {

    /** @see android.app.ActivityManager#alwaysShowUnsupportedCompileSdkWarning */
    void alwaysShowUnsupportedCompileSdkWarning(in ComponentName activity);

    /**
     * Method for the shell UID to start deletating its permission identity to an
     * active instrumenation. The shell can delegate permissions only to one active
     * instrumentation at a time. An active instrumentation is one running and
     * started from the shell.
     */
    void startDelegateShellPermissionIdentity(int uid);

    /**
     * Method for the shell UID to stop deletating its permission identity to an
     * active instrumenation. An active instrumentation is one running and
     * started from the shell.
     */
    void stopDelegateShellPermissionIdentity();
}
Loading