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

Commit 56bab5b2 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9613276 from fe18a7bb to tm-qpr3-release

Change-Id: I1f8e4f14c6def6509ff767563715067a5981780c
parents 98c691ab fe18a7bb
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -324,6 +324,13 @@ public class ActivityOptions extends ComponentOptions {
    private static final String KEY_APPLY_MULTIPLE_TASK_FLAG_FOR_SHORTCUT =
            "android:activity.applyMultipleTaskFlagForShortcut";

    /**
     * Indicates to apply {@link Intent#FLAG_ACTIVITY_NO_USER_ACTION} to the launching shortcut.
     * @hide
     */
    private static final String KEY_APPLY_NO_USER_ACTION_FLAG_FOR_SHORTCUT =
            "android:activity.applyNoUserActionFlagForShortcut";

    /**
     * For Activity transitions, the calling Activity's TransitionListener used to
     * notify the called Activity when the shared element and the exit transitions
@@ -457,6 +464,7 @@ public class ActivityOptions extends ComponentOptions {
    private boolean mDisallowEnterPictureInPictureWhileLaunching;
    private boolean mApplyActivityFlagsForBubbles;
    private boolean mApplyMultipleTaskFlagForShortcut;
    private boolean mApplyNoUserActionFlagForShortcut;
    private boolean mTaskAlwaysOnTop;
    private boolean mTaskOverlay;
    private boolean mTaskOverlayCanResume;
@@ -1256,6 +1264,8 @@ public class ActivityOptions extends ComponentOptions {
                KEY_APPLY_ACTIVITY_FLAGS_FOR_BUBBLES, false);
        mApplyMultipleTaskFlagForShortcut = opts.getBoolean(
                KEY_APPLY_MULTIPLE_TASK_FLAG_FOR_SHORTCUT, false);
        mApplyNoUserActionFlagForShortcut = opts.getBoolean(
                KEY_APPLY_NO_USER_ACTION_FLAG_FOR_SHORTCUT, false);
        if (opts.containsKey(KEY_ANIM_SPECS)) {
            Parcelable[] specs = opts.getParcelableArray(KEY_ANIM_SPECS);
            mAnimSpecs = new AppTransitionAnimationSpec[specs.length];
@@ -1835,6 +1845,16 @@ public class ActivityOptions extends ComponentOptions {
        return mApplyMultipleTaskFlagForShortcut;
    }

    /** @hide */
    public void setApplyNoUserActionFlagForShortcut(boolean apply) {
        mApplyNoUserActionFlagForShortcut = apply;
    }

    /** @hide */
    public boolean isApplyNoUserActionFlagForShortcut() {
        return mApplyNoUserActionFlagForShortcut;
    }

    /**
     * Sets a launch cookie that can be used to track the activity and task that are launch as a
     * result of this option. If the launched activity is a trampoline that starts another activity
@@ -2167,6 +2187,9 @@ public class ActivityOptions extends ComponentOptions {
            b.putBoolean(KEY_APPLY_MULTIPLE_TASK_FLAG_FOR_SHORTCUT,
                    mApplyMultipleTaskFlagForShortcut);
        }
        if (mApplyNoUserActionFlagForShortcut) {
            b.putBoolean(KEY_APPLY_NO_USER_ACTION_FLAG_FOR_SHORTCUT, true);
        }
        if (mAnimSpecs != null) {
            b.putParcelableArray(KEY_ANIM_SPECS, mAnimSpecs);
        }
+9 −1
Original line number Diff line number Diff line
@@ -6637,6 +6637,13 @@ public class DevicePolicyManager {
     */
    public static final int KEYGUARD_DISABLE_IRIS = 1 << 8;
    /**
     * Disable all keyguard shortcuts.
     *
     * @hide
     */
    public static final int KEYGUARD_DISABLE_SHORTCUTS_ALL = 1 << 9;
    /**
     * NOTE: Please remember to update the DevicePolicyManagerTest's testKeyguardDisabledFeatures
     * CTS test when adding to the list above.
@@ -6680,7 +6687,8 @@ public class DevicePolicyManager {
     */
    public static final int ORG_OWNED_PROFILE_KEYGUARD_FEATURES_PARENT_ONLY =
            DevicePolicyManager.KEYGUARD_DISABLE_SECURE_CAMERA
                    | DevicePolicyManager.KEYGUARD_DISABLE_SECURE_NOTIFICATIONS;
                    | DevicePolicyManager.KEYGUARD_DISABLE_SECURE_NOTIFICATIONS
                    | DevicePolicyManager.KEYGUARD_DISABLE_SHORTCUTS_ALL;
    /**
     * Keyguard features that when set on a normal or organization-owned managed profile, have
+12 −1
Original line number Diff line number Diff line
@@ -9922,7 +9922,7 @@ public final class Settings {
        /**
         * If active unlock triggers on unlock intents, then also request active unlock on
         * these wake-up reasons. See PowerManager.WakeReason for value mappings.
         * these wake-up reasons. See {@link PowerManager.WakeReason} for value mappings.
         * WakeReasons should be separated by a pipe. For example: "0|3" or "0". If this
         * setting should be disabled, then this should be set to an empty string. A null value
         * will use the system default value (WAKE_REASON_UNFOLD_DEVICE).
@@ -9931,6 +9931,17 @@ public final class Settings {
        public static final String ACTIVE_UNLOCK_WAKEUPS_CONSIDERED_UNLOCK_INTENTS =
                "active_unlock_wakeups_considered_unlock_intents";
        /**
         * If active unlock triggers and succeeds on these wakeups, force dismiss keyguard on
         * these wake reasons. See {@link PowerManager#WakeReason} for value mappings.
         * WakeReasons should be separated by a pipe. For example: "0|3" or "0". If this
         * setting should be disabled, then this should be set to an empty string. A null value
         * will use the system default value (WAKE_REASON_UNFOLD_DEVICE).
         * @hide
         */
        public static final String ACTIVE_UNLOCK_WAKEUPS_TO_FORCE_DISMISS_KEYGUARD =
                "active_unlock_wakeups_to_force_dismiss_keyguard";
        /**
         * Whether the assist gesture should be enabled.
         *
+56 −33
Original line number Diff line number Diff line
@@ -170,6 +170,7 @@ public abstract class WallpaperService extends Service {
            Float.NEGATIVE_INFINITY);

    private static final int NOTIFY_COLORS_RATE_LIMIT_MS = 1000;
    private static final int PROCESS_LOCAL_COLORS_INTERVAL_MS = 1000;

    private static final boolean ENABLE_WALLPAPER_DIMMING =
            SystemProperties.getBoolean("persist.debug.enable_wallpaper_dimming", true);
@@ -275,9 +276,13 @@ public abstract class WallpaperService extends Service {
        MotionEvent mPendingMove;
        boolean mIsInAmbientMode;

        // Needed for throttling onComputeColors.
        // used to throttle onComputeColors
        private long mLastColorInvalidation;
        private final Runnable mNotifyColorsChanged = this::notifyColorsChanged;

        // used to throttle processLocalColors
        private long mLastProcessLocalColorsTimestamp;
        private AtomicBoolean mProcessLocalColorsPending = new AtomicBoolean(false);
        private final Supplier<Long> mClockFunction;
        private final Handler mHandler;

@@ -1591,7 +1596,26 @@ public abstract class WallpaperService extends Service {
            processLocalColors(xOffset, xOffsetStep);
        }

        /**
         * Thread-safe util to call {@link #processLocalColorsInternal} with a minimum interval of
         * {@link #PROCESS_LOCAL_COLORS_INTERVAL_MS} between two calls.
         */
        private void processLocalColors(float xOffset, float xOffsetStep) {
            if (mProcessLocalColorsPending.compareAndSet(false, true)) {
                final long now = mClockFunction.get();
                final long timeSinceLastColorProcess = now - mLastProcessLocalColorsTimestamp;
                final long timeToWait = Math.max(0,
                        PROCESS_LOCAL_COLORS_INTERVAL_MS - timeSinceLastColorProcess);

                mHandler.postDelayed(() -> {
                    mLastProcessLocalColorsTimestamp = now + timeToWait;
                    mProcessLocalColorsPending.set(false);
                    processLocalColorsInternal(xOffset, xOffsetStep);
                }, timeToWait);
            }
        }

        private void processLocalColorsInternal(float xOffset, float xOffsetStep) {
            // implemented by the wallpaper
            if (supportsLocalColorExtraction()) return;
            if (DEBUG) {
@@ -1625,7 +1649,7 @@ public abstract class WallpaperService extends Service {

            float finalXOffsetStep = xOffsetStep;
            float finalXOffset = xOffset;
            mHandler.post(() -> {

            Trace.beginSection("WallpaperService#processLocalColors");
            resetWindowPages();
            int xPage = xCurrentPage;
@@ -1658,7 +1682,6 @@ public abstract class WallpaperService extends Service {
            current = mWindowPages[xPage];
            updatePage(current, xPage, xPages, finalXOffsetStep);
            Trace.endSection();
            });
        }

        private void initWindowPages(EngineWindowPage[] windowPages, float step) {
+0 −7
Original line number Diff line number Diff line
@@ -572,13 +572,6 @@ public final class SystemUiDeviceConfigFlags {
     */
    public static final String PERSISTS_WIDGET_PROVIDER_INFO = "persists_widget_provider_info";

    /**
     * (boolean) Whether the clipboard overlay shows an edit button (as opposed to requiring tapping
     * the preview to send an edit intent).
     */
    public static final String CLIPBOARD_OVERLAY_SHOW_EDIT_BUTTON =
            "clipboard_overlay_show_edit_button";

    /**
     * (boolean) Whether to show smart chips (based on TextClassifier) in the clipboard overlay.
     */
Loading