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

Commit 846e276b authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11865526 from 04a26d5e to 24Q3-release

Change-Id: I6ef51bec1f5d3c0a55aafd54261ba7ab44e51597
parents 89cfbfa2 04a26d5e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3344,9 +3344,9 @@ package android.accessibilityservice {
  public abstract class AccessibilityService extends android.app.Service {
    ctor public AccessibilityService();
    method public void attachAccessibilityOverlayToDisplay(int, @NonNull android.view.SurfaceControl);
    method @FlaggedApi("android.view.accessibility.a11y_overlay_callbacks") public void attachAccessibilityOverlayToDisplay(int, @NonNull android.view.SurfaceControl, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.IntConsumer);
    method @FlaggedApi("android.view.accessibility.a11y_overlay_callbacks") public final void attachAccessibilityOverlayToDisplay(int, @NonNull android.view.SurfaceControl, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.IntConsumer);
    method public void attachAccessibilityOverlayToWindow(int, @NonNull android.view.SurfaceControl);
    method @FlaggedApi("android.view.accessibility.a11y_overlay_callbacks") public void attachAccessibilityOverlayToWindow(int, @NonNull android.view.SurfaceControl, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.IntConsumer);
    method @FlaggedApi("android.view.accessibility.a11y_overlay_callbacks") public final void attachAccessibilityOverlayToWindow(int, @NonNull android.view.SurfaceControl, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.IntConsumer);
    method public boolean clearCache();
    method public boolean clearCachedSubtree(@NonNull android.view.accessibility.AccessibilityNodeInfo);
    method public final void disableSelf();
@@ -3354,7 +3354,7 @@ package android.accessibilityservice {
    method public android.view.accessibility.AccessibilityNodeInfo findFocus(int);
    method @NonNull public final android.accessibilityservice.AccessibilityButtonController getAccessibilityButtonController();
    method @NonNull public final android.accessibilityservice.AccessibilityButtonController getAccessibilityButtonController(int);
    method @FlaggedApi("android.view.accessibility.braille_display_hid") @NonNull public android.accessibilityservice.BrailleDisplayController getBrailleDisplayController();
    method @FlaggedApi("android.view.accessibility.braille_display_hid") @NonNull public final android.accessibilityservice.BrailleDisplayController getBrailleDisplayController();
    method @NonNull @RequiresPermission(android.Manifest.permission.USE_FINGERPRINT) public final android.accessibilityservice.FingerprintGestureController getFingerprintGestureController();
    method @Nullable public final android.accessibilityservice.InputMethod getInputMethod();
    method @NonNull public final android.accessibilityservice.AccessibilityService.MagnificationController getMagnificationController();
+5 −5
Original line number Diff line number Diff line
@@ -3554,8 +3554,8 @@ public abstract class AccessibilityService extends Service {
     * @see #OVERLAY_RESULT_INVALID
     * @see #OVERLAY_RESULT_INTERNAL_ERROR
     */
    @FlaggedApi("android.view.accessibility.a11y_overlay_callbacks")
    public void attachAccessibilityOverlayToDisplay(
    @FlaggedApi(android.view.accessibility.Flags.FLAG_A11Y_OVERLAY_CALLBACKS)
    public final void attachAccessibilityOverlayToDisplay(
            int displayId,
            @NonNull SurfaceControl sc,
            @NonNull @CallbackExecutor Executor executor,
@@ -3627,8 +3627,8 @@ public abstract class AccessibilityService extends Service {
     * @see #OVERLAY_RESULT_INVALID
     * @see #OVERLAY_RESULT_INTERNAL_ERROR
     */
    @FlaggedApi("android.view.accessibility.a11y_overlay_callbacks")
    public void attachAccessibilityOverlayToWindow(
    @FlaggedApi(android.view.accessibility.Flags.FLAG_A11Y_OVERLAY_CALLBACKS)
    public final void attachAccessibilityOverlayToWindow(
            int accessibilityWindowId,
            @NonNull SurfaceControl sc,
            @NonNull @CallbackExecutor Executor executor,
@@ -3645,7 +3645,7 @@ public abstract class AccessibilityService extends Service {
     */
    @FlaggedApi(android.view.accessibility.Flags.FLAG_BRAILLE_DISPLAY_HID)
    @NonNull
    public BrailleDisplayController getBrailleDisplayController() {
    public final BrailleDisplayController getBrailleDisplayController() {
        BrailleDisplayController.checkApiFlagIsEnabled();
        synchronized (mLock) {
            if (mBrailleDisplayController == null) {
+6 −1
Original line number Diff line number Diff line
@@ -1183,6 +1183,7 @@ public class Activity extends ContextThemeWrapper
     * @see #setIntent(Intent, ComponentCaller)
     */
    @FlaggedApi(android.security.Flags.FLAG_CONTENT_URI_PERMISSION_APIS)
    @SuppressLint("OnNameExpected")
    public @Nullable ComponentCaller getCaller() {
        return mCaller;
    }
@@ -1203,6 +1204,7 @@ public class Activity extends ContextThemeWrapper
     * @see #getCaller
     */
    @FlaggedApi(android.security.Flags.FLAG_CONTENT_URI_PERMISSION_APIS)
    @SuppressLint("OnNameExpected")
    public void setIntent(@Nullable Intent newIntent, @Nullable ComponentCaller newCaller) {
        internalSetIntent(newIntent, newCaller);
    }
@@ -7161,6 +7163,7 @@ public class Activity extends ContextThemeWrapper
     * @see ComponentCaller
     */
    @FlaggedApi(android.security.Flags.FLAG_CONTENT_URI_PERMISSION_APIS)
    @SuppressLint("OnNameExpected")
    public @NonNull ComponentCaller getInitialCaller() {
        return mInitialCaller;
    }
@@ -7188,10 +7191,11 @@ public class Activity extends ContextThemeWrapper
     * @see #getCaller
     */
    @FlaggedApi(android.security.Flags.FLAG_CONTENT_URI_PERMISSION_APIS)
    @SuppressLint("OnNameExpected")
    public @NonNull ComponentCaller getCurrentCaller() {
        if (mCurrentCaller == null) {
            throw new IllegalStateException("The caller is null because #getCurrentCaller should be"
                    + " called within #onNewIntent method");
                    + " called within #onNewIntent or #onActivityResult methods");
        }
        return mCurrentCaller;
    }
@@ -9634,6 +9638,7 @@ public class Activity extends ContextThemeWrapper
     *                            the default behaviour
     */
    @FlaggedApi(android.security.Flags.FLAG_ASM_RESTRICTIONS_ENABLED)
    @SuppressLint("OnNameExpected")
    public void setAllowCrossUidActivitySwitchFromBelow(boolean allowed) {
        ActivityClient.getInstance().setAllowCrossUidActivitySwitchFromBelow(mToken, allowed);
    }
+1 −9
Original line number Diff line number Diff line
@@ -103,8 +103,7 @@ public class ActivityOptions extends ComponentOptions {
    @IntDef(prefix = {"MODE_BACKGROUND_ACTIVITY_START_"}, value = {
            MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED,
            MODE_BACKGROUND_ACTIVITY_START_ALLOWED,
            MODE_BACKGROUND_ACTIVITY_START_DENIED,
            MODE_BACKGROUND_ACTIVITY_START_COMPAT})
            MODE_BACKGROUND_ACTIVITY_START_DENIED})
    public @interface BackgroundActivityStartMode {}
    /**
     * No explicit value chosen. The system will decide whether to grant privileges.
@@ -118,13 +117,6 @@ public class ActivityOptions extends ComponentOptions {
     * Deny the {@link PendingIntent} to use the background activity start privileges.
     */
    public static final int MODE_BACKGROUND_ACTIVITY_START_DENIED = 2;
    /**
     * Special behavior for compatibility.
     * Similar to {@link #MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED}
     *
     * @hide
     */
    public static final int MODE_BACKGROUND_ACTIVITY_START_COMPAT = -1;

    /**
     * The package name that created the options.
+29 −18
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package android.app;

import static android.app.ActivityOptions.BackgroundActivityStartMode;
import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED;
import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_COMPAT;
import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_DENIED;
import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED;

@@ -55,7 +54,7 @@ public class ComponentOptions {
    public static final String KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED_BY_PERMISSION =
            "android.pendingIntent.backgroundActivityAllowedByPermission";

    private Integer mPendingIntentBalAllowed = MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED;
    private @Nullable Boolean mPendingIntentBalAllowed = null;
    private boolean mPendingIntentBalAllowedByPermission = false;

    ComponentOptions() {
@@ -66,9 +65,12 @@ public class ComponentOptions {
        // results they want, which is their loss.
        opts.setDefusable(true);

        boolean pendingIntentBalAllowedIsSetExplicitly =
                opts.containsKey(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED);
        if (pendingIntentBalAllowedIsSetExplicitly) {
            mPendingIntentBalAllowed =
                opts.getInt(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED,
                        MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED);
                    opts.getBoolean(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED);
        }
        setPendingIntentBackgroundActivityLaunchAllowedByPermission(
                opts.getBoolean(
                        KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED_BY_PERMISSION, false));
@@ -83,8 +85,7 @@ public class ComponentOptions {
     * @hide
     */
    @Deprecated public void setPendingIntentBackgroundActivityLaunchAllowed(boolean allowed) {
        mPendingIntentBalAllowed = allowed ? MODE_BACKGROUND_ACTIVITY_START_ALLOWED
                : MODE_BACKGROUND_ACTIVITY_START_DENIED;
        mPendingIntentBalAllowed = allowed;
    }

    /**
@@ -97,8 +98,11 @@ public class ComponentOptions {
     * @hide
     */
    @Deprecated public boolean isPendingIntentBackgroundActivityLaunchAllowed() {
        // cannot return all detail, so return the value used up to API level 33 for compatibility
        return mPendingIntentBalAllowed != MODE_BACKGROUND_ACTIVITY_START_DENIED;
        if (mPendingIntentBalAllowed == null) {
            // cannot return null, so return the value used up to API level 33 for compatibility
            return true;
        }
        return mPendingIntentBalAllowed;
    }

    /**
@@ -115,15 +119,16 @@ public class ComponentOptions {
            @BackgroundActivityStartMode int state) {
        switch (state) {
            case MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED:
            case MODE_BACKGROUND_ACTIVITY_START_DENIED:
            case MODE_BACKGROUND_ACTIVITY_START_COMPAT:
                mPendingIntentBalAllowed = null;
                break;
            case MODE_BACKGROUND_ACTIVITY_START_ALLOWED:
                mPendingIntentBalAllowed = state;
                mPendingIntentBalAllowed = true;
                break;
            default:
                // Assume that future values are some variant of allowing the start.
                mPendingIntentBalAllowed = MODE_BACKGROUND_ACTIVITY_START_ALLOWED;
            case MODE_BACKGROUND_ACTIVITY_START_DENIED:
                mPendingIntentBalAllowed = false;
                break;
            default:
                throw new IllegalArgumentException(state + " is not valid");
        }
        return this;
    }
@@ -136,7 +141,13 @@ public class ComponentOptions {
     * @see #setPendingIntentBackgroundActivityStartMode(int)
     */
    public @BackgroundActivityStartMode int getPendingIntentBackgroundActivityStartMode() {
        return mPendingIntentBalAllowed;
        if (mPendingIntentBalAllowed == null) {
            return MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED;
        } else if (mPendingIntentBalAllowed) {
            return MODE_BACKGROUND_ACTIVITY_START_ALLOWED;
        } else {
            return MODE_BACKGROUND_ACTIVITY_START_DENIED;
        }
    }

    /**
@@ -159,8 +170,8 @@ public class ComponentOptions {
    /** @hide */
    public Bundle toBundle() {
        Bundle b = new Bundle();
        if (mPendingIntentBalAllowed != MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED) {
            b.putInt(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED, mPendingIntentBalAllowed);
        if (mPendingIntentBalAllowed != null) {
            b.putBoolean(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED, mPendingIntentBalAllowed);
        }
        if (mPendingIntentBalAllowedByPermission) {
            b.putBoolean(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED_BY_PERMISSION,
Loading