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

Commit 4e98fddf authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9381392 from 98ad6693 to tm-qpr2-release

Change-Id: If28c6df11713c00f176660eb0dc06d279de5d3c2
parents 4e7e814f 98ad6693
Loading
Loading
Loading
Loading
+13 −9
Original line number Diff line number Diff line
@@ -9134,8 +9134,9 @@ public class AppOpsManager {
     */
    public int startProxyOpNoThrow(int op, @NonNull AttributionSource attributionSource,
            @Nullable String message, boolean skipProxyOperation) {
        return startProxyOpNoThrow(op, attributionSource, message, skipProxyOperation,
                ATTRIBUTION_FLAGS_NONE, ATTRIBUTION_FLAGS_NONE, ATTRIBUTION_CHAIN_ID_NONE);
        return startProxyOpNoThrow(attributionSource.getToken(), op, attributionSource, message,
                skipProxyOperation, ATTRIBUTION_FLAGS_NONE, ATTRIBUTION_FLAGS_NONE,
                ATTRIBUTION_CHAIN_ID_NONE);
    }

    /**
@@ -9147,7 +9148,8 @@ public class AppOpsManager {
     *
     * @hide
     */
    public int startProxyOpNoThrow(int op, @NonNull AttributionSource attributionSource,
    public int startProxyOpNoThrow(@NonNull IBinder clientId, int op,
            @NonNull AttributionSource attributionSource,
            @Nullable String message, boolean skipProxyOperation, @AttributionFlags
            int proxyAttributionFlags, @AttributionFlags int proxiedAttributionFlags,
            int attributionChainId) {
@@ -9165,7 +9167,7 @@ public class AppOpsManager {
                }
            }

            SyncNotedAppOp syncOp = mService.startProxyOperation(op,
            SyncNotedAppOp syncOp = mService.startProxyOperation(clientId, op,
                    attributionSource, false, collectionMode == COLLECT_ASYNC, message,
                    shouldCollectMessage, skipProxyOperation, proxyAttributionFlags,
                    proxiedAttributionFlags, attributionChainId);
@@ -9263,9 +9265,10 @@ public class AppOpsManager {
     */
    public void finishProxyOp(@NonNull String op, int proxiedUid,
            @NonNull String proxiedPackageName, @Nullable String proxiedAttributionTag) {
        finishProxyOp(op, new AttributionSource(mContext.getAttributionSource(),
        IBinder token = mContext.getAttributionSource().getToken();
        finishProxyOp(token, op, new AttributionSource(mContext.getAttributionSource(),
                new AttributionSource(proxiedUid, proxiedPackageName,  proxiedAttributionTag,
                        mContext.getAttributionSource().getToken())), /*skipProxyOperation*/ false);
                        token)), /*skipProxyOperation*/ false);
    }

    /**
@@ -9280,10 +9283,11 @@ public class AppOpsManager {
     *
     * @hide
     */
    public void finishProxyOp(@NonNull String op, @NonNull AttributionSource attributionSource,
            boolean skipProxyOperation) {
    public void finishProxyOp(@NonNull IBinder clientId, @NonNull String op,
            @NonNull AttributionSource attributionSource, boolean skipProxyOperation) {
        try {
            mService.finishProxyOperation(strOpToOp(op), attributionSource, skipProxyOperation);
            mService.finishProxyOperation(clientId, strOpToOp(op), attributionSource,
                    skipProxyOperation);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
+14 −9
Original line number Diff line number Diff line
@@ -26,13 +26,11 @@ import android.util.SparseArray;
import android.util.SparseIntArray;

import com.android.internal.app.IAppOpsCallback;
import com.android.internal.util.function.DecFunction;
import com.android.internal.util.function.HeptFunction;
import com.android.internal.util.function.HexFunction;
import com.android.internal.util.function.QuadFunction;
import com.android.internal.util.function.QuintConsumer;
import com.android.internal.util.function.QuintFunction;
import com.android.internal.util.function.TriFunction;
import com.android.internal.util.function.UndecFunction;

/**
@@ -135,6 +133,7 @@ public abstract class AppOpsManagerInternal {
        /**
         * Allows overriding start proxy operation behavior.
         *
         * @param clientId The client calling start, represented by an IBinder
         * @param code The op code to start.
         * @param attributionSource The permission identity of the caller.
         * @param startIfModeDefault Whether to start the op of the mode is default.
@@ -148,11 +147,12 @@ public abstract class AppOpsManagerInternal {
         * @param superImpl The super implementation.
         * @return The app op note result.
         */
        SyncNotedAppOp startProxyOperation(int code, @NonNull AttributionSource attributionSource,
                boolean startIfModeDefault, boolean shouldCollectAsyncNotedOp, String message,
                boolean shouldCollectMessage, boolean skipProxyOperation, @AttributionFlags
                int proxyAttributionFlags, @AttributionFlags int proxiedAttributionFlags,
                int attributionChainId, @NonNull DecFunction<Integer, AttributionSource, Boolean,
        SyncNotedAppOp startProxyOperation(@NonNull IBinder clientId, int code,
                @NonNull AttributionSource attributionSource, boolean startIfModeDefault,
                boolean shouldCollectAsyncNotedOp, String message, boolean shouldCollectMessage,
                boolean skipProxyOperation, @AttributionFlags int proxyAttributionFlags,
                @AttributionFlags int proxiedAttributionFlags, int attributionChainId,
                @NonNull UndecFunction<IBinder, Integer, AttributionSource, Boolean,
                        Boolean, String, Boolean, Boolean, Integer, Integer, Integer,
                        SyncNotedAppOp> superImpl);

@@ -176,10 +176,15 @@ public abstract class AppOpsManagerInternal {
         *
         * @param code The op code to finish.
         * @param attributionSource The permission identity of the caller.
         * @param skipProxyOperation Whether to skip the proxy in the proxy/proxied operation
         * @param clientId The client calling finishProxyOperation
         * @param superImpl The "standard" implementation to potentially call
         */
        void finishProxyOperation(int code, @NonNull AttributionSource attributionSource,
        void finishProxyOperation(@NonNull IBinder clientId, int code,
                @NonNull AttributionSource attributionSource,
                boolean skipProxyOperation,
                @NonNull TriFunction<Integer, AttributionSource, Boolean, Void> superImpl);
                @NonNull QuadFunction<IBinder, Integer, AttributionSource, Boolean,
                        Void> superImpl);
    }

    /**
+4 −1
Original line number Diff line number Diff line
@@ -234,7 +234,10 @@ public class StatusBarManager {

    /**
     * Session flag for {@link #registerSessionListener} indicating the listener
     * is interested in sessions on the keygaurd
     * is interested in sessions on the keygaurd.
     * Keyguard Session Boundaries:
     *     START_SESSION: device starts going to sleep OR the keyguard is newly shown
     *     END_SESSION: device starts going to sleep OR keyguard is no longer showing
     * @hide
     */
    public static final int SESSION_KEYGUARD = 1 << 0;
+12 −0
Original line number Diff line number Diff line
@@ -68,6 +68,18 @@ public abstract class ControlsProviderService extends Service {
    public static final String META_DATA_PANEL_ACTIVITY =
            "android.service.controls.META_DATA_PANEL_ACTIVITY";

    /**
     * Boolean extra containing the value of
     * {@link android.provider.Settings.Secure#LOCKSCREEN_ALLOW_TRIVIAL_CONTROLS}.
     *
     * This is passed with the intent when the panel specified by {@link #META_DATA_PANEL_ACTIVITY}
     * is launched.
     *
     * @hide
     */
    public static final String EXTRA_LOCKSCREEN_ALLOW_TRIVIAL_CONTROLS =
            "android.service.controls.EXTRA_LOCKSCREEN_ALLOW_TRIVIAL_CONTROLS";

    /**
     * @hide
     */
+6 −5
Original line number Diff line number Diff line
@@ -58,11 +58,12 @@ interface IAppOpsService {
    SyncNotedAppOp noteProxyOperation(int code, in AttributionSource attributionSource,
            boolean shouldCollectAsyncNotedOp, String message, boolean shouldCollectMessage,
            boolean skipProxyOperation);
    SyncNotedAppOp startProxyOperation(int code, in AttributionSource attributionSource,
            boolean startIfModeDefault, boolean shouldCollectAsyncNotedOp, String message,
            boolean shouldCollectMessage, boolean skipProxyOperation, int proxyAttributionFlags,
            int proxiedAttributionFlags, int attributionChainId);
    void finishProxyOperation(int code, in AttributionSource attributionSource,
    SyncNotedAppOp startProxyOperation(IBinder clientId, int code,
            in AttributionSource attributionSource, boolean startIfModeDefault,
            boolean shouldCollectAsyncNotedOp, String message, boolean shouldCollectMessage,
            boolean skipProxyOperation, int proxyAttributionFlags, int proxiedAttributionFlags,
            int attributionChainId);
    void finishProxyOperation(IBinder clientId, int code, in AttributionSource attributionSource,
            boolean skipProxyOperation);

    // Remaining methods are only used in Java.
Loading