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

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

Snap for 11975806 from a0e55bf9 to 24Q3-release

Change-Id: I9da80e8bd8f536dc609cafe29b78cb1edddb26fd
parents 4353d362 a0e55bf9
Loading
Loading
Loading
Loading
+19 −10
Original line number Diff line number Diff line
@@ -4222,6 +4222,10 @@ public class ActivityManager {
     * Return a list of {@link ApplicationStartInfo} records containing the information about the
     * most recent app startups.
     *
     * Records accessed using this path might include "incomplete" records such as in-progress app
     * starts. Accessing in-progress starts using this method lets you access start information
     * early to better optimize your startup path.
     *
     * <p class="note"> Note: System stores this historical information in a ring buffer and only
     * the most recent records will be returned. </p>
     *
@@ -4249,6 +4253,9 @@ public class ActivityManager {
     * Return a list of {@link ApplicationStartInfo} records containing the information about the
     * most recent app startups.
     *
     * Records accessed using this path might include "incomplete" records such as in-progress app
     * starts.
     *
     * <p class="note"> Note: System stores this historical information in a ring buffer and only
     * the most recent records will be returned. </p>
     *
@@ -4294,17 +4301,19 @@ public class ActivityManager {
    }

    /**
     * Adds a callback to be notified when the {@link ApplicationStartInfo} records of this startup
     * are complete.
     * Adds a callback that is notified when the {@link ApplicationStartInfo} record of this startup
     * is complete. The startup is considered complete when the first frame is drawn.
     *
     * <p class="note"> Note: callback will be removed automatically after being triggered.</p>
     * The callback doesn't wait for {@link Activity#reportFullyDrawn} to occur. Retrieve a copy
     * of {@link ApplicationStartInfo} after {@link Activity#reportFullyDrawn} is called (using this
     * callback or {@link getHistoricalProcessStartReasons}) if you need the
     * {@link ApplicationStartInfo.START_TIMESTAMP_FULLY_DRAWN} timestamp.
     *
     * <p class="note"> Note: callback will not wait for {@link Activity#reportFullyDrawn} to occur.
     * Timestamp for fully drawn may be added after callback occurs. Set callback after invoking
     * {@link Activity#reportFullyDrawn} if timestamp for fully drawn is required.</p>
     * If the current start record has already been completed (that is, the process is not currently
     * starting), the callback will be invoked immediately on the specified executor with the
     * previously completed {@link ApplicationStartInfo} record.
     *
     * <p class="note"> Note: if start records have already been retrieved, the callback will be
     * invoked immediately on the specified executor with the previously resolved AppStartInfo.</p>
     * Callback will be called at most once and removed automatically after being triggered.
     *
     * <p class="note"> Note: callback is asynchronous and should be made from a background thread.
     * </p>
@@ -4394,8 +4403,8 @@ public class ActivityManager {
     * Adds an optional developer supplied timestamp to the calling apps most recent
     * {@link ApplicationStartInfo}. This is in addition to system recorded timestamps.
     *
     * <p class="note"> Note: timestamps added after {@link Activity#reportFullyDrawn} is called
     * will be discarded.</p>
     * <p class="note"> Note: any timestamps added after {@link Activity#reportFullyDrawn} is called
     * are discarded.</p>
     *
     * <p class="note"> Note: will overwrite existing timestamp if called with same key.</p>
     *
+10 −0
Original line number Diff line number Diff line
@@ -60,6 +60,16 @@ import java.util.Objects;
 * start times, throttling, and other useful diagnostic data can be obtained from
 * {@link ApplicationStartInfo} records.
 * </p>
 *
 * <p>
*  ApplicationStartInfo objects can be retrieved via:
*  - {@link ActivityManager#getHistoricalProcessStartReasons}, which can be called during or after
 *      a application's startup. Using this method, an app can retrieve information about an
 *      in-progress app start.
*  - {@link ActivityManager#addApplicationStartInfoCompletionListener}, which returns an
 *      ApplicationStartInfo object via a callback when the startup is complete, or immediately
 *      if requested after the startup is complete.
 * </p>
 */
@FlaggedApi(Flags.FLAG_APP_START_INFO)
public final class ApplicationStartInfo implements Parcelable {
+7 −0
Original line number Diff line number Diff line
@@ -13725,6 +13725,13 @@ public class DevicePolicyManager {
     * {@link #EXTRA_PROVISIONING_SENSORS_PERMISSION_GRANT_OPT_OUT} in the provisioning parameters.
     * In that case the device owner's control will be limited to denying these permissions.
     * <p>
     * When sensor-related permissions aren't grantable due to the above cases, calling this method
     * to grant these permissions will silently fail, if device admins are built with
     * {@code targetSdkVersion} &lt; {@link android.os.Build.VERSION_CODES#VANILLA_ICE_CREAM}. If
     * they are built with {@code targetSdkVersion} &gt;=
     * {@link android.os.Build.VERSION_CODES#VANILLA_ICE_CREAM}, this method will throw a
     * {@link SecurityException}.
     * <p>
     * NOTE: On devices running {@link android.os.Build.VERSION_CODES#S} and above, control over
     * the following permissions are restricted for managed profile owners:
     * <ul>
+9 −0
Original line number Diff line number Diff line
@@ -2954,6 +2954,15 @@ public abstract class Window {
     * There is a second caption drawn underneath it that will be fast enough. By default the
     * caption is constructed from the theme. You can provide a drawable, that will be drawn instead
     * to better match your application.
     *
     * Starting in Android 15, this API is a no-op. New window decorations introduced in Android 14
     * are drawn in SystemUI process, and OEMs are responsible to make them responsive to resizing.
     * There is no need to set a background drawable to improve UX anymore since then. Additionally,
     * the foremost activity can draw in caption areas starting in Android 15. Check
     * {@link WindowInsetsController#APPEARANCE_TRANSPARENT_CAPTION_BAR_BACKGROUND},
     * {@link WindowInsetsController#APPEARANCE_LIGHT_CAPTION_BARS},
     * {@link WindowInsetsController#setSystemBarsAppearance(int, int)} and
     * {@link WindowInsets#getBoundingRects(int)}.
     */
    public abstract void setResizingCaptionDrawable(Drawable drawable);

+42 −34
Original line number Diff line number Diff line
@@ -36,11 +36,13 @@ public class GestureNavigationSettingsObserver extends ContentObserver {
    private Context mContext;
    private Runnable mOnChangeRunnable;
    private Handler mMainHandler;
    private Handler mBgHandler;

    public GestureNavigationSettingsObserver(Handler handler, Context context,
            Runnable onChangeRunnable) {
        super(handler);
        mMainHandler = handler;
    public GestureNavigationSettingsObserver(
            Handler mainHandler, Handler bgHandler, Context context, Runnable onChangeRunnable) {
        super(mainHandler);
        mMainHandler = mainHandler;
        mBgHandler = bgHandler;
        mContext = context;
        mOnChangeRunnable = onChangeRunnable;
    }
@@ -60,6 +62,7 @@ public class GestureNavigationSettingsObserver extends ContentObserver {
     * Registers the observer for all users.
     */
    public void register() {
        mBgHandler.post(() -> {
            ContentResolver r = mContext.getContentResolver();
            r.registerContentObserver(
                    Settings.Secure.getUriFor(Settings.Secure.BACK_GESTURE_INSET_SCALE_LEFT),
@@ -74,12 +77,14 @@ public class GestureNavigationSettingsObserver extends ContentObserver {
                    DeviceConfig.NAMESPACE_SYSTEMUI,
                    runnable -> mMainHandler.post(runnable),
                    mOnPropertiesChangedListener);
        });
    }

    /**
     * Registers the observer for the calling user.
     */
    public void registerForCallingUser() {
        mBgHandler.post(() -> {
            ContentResolver r = mContext.getContentResolver();
            r.registerContentObserver(
                    Settings.Secure.getUriFor(Settings.Secure.BACK_GESTURE_INSET_SCALE_LEFT),
@@ -94,11 +99,14 @@ public class GestureNavigationSettingsObserver extends ContentObserver {
                    DeviceConfig.NAMESPACE_SYSTEMUI,
                    runnable -> mMainHandler.post(runnable),
                    mOnPropertiesChangedListener);
        });
    }

    public void unregister() {
        mBgHandler.post(() -> {
            mContext.getContentResolver().unregisterContentObserver(this);
            DeviceConfig.removeOnPropertiesChangedListener(mOnPropertiesChangedListener);
        });
    }

    @Override
Loading