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

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

Snap for 11789350 from d41e8b3c to 24Q3-release

Change-Id: Ib5846cc2fc33bab4a53672064a796983e34b2c34
parents e43c31b6 d41e8b3c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -41,10 +41,10 @@
            ]
        },
        {
            "name": "CtsHostsideNetworkTests",
            "name": "CtsHostsideNetworkPolicyTests",
            "options": [
                {"include-filter": "com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testMeteredNetworkAccess_expeditedJob"},
                {"include-filter": "com.android.cts.net.HostsideRestrictBackgroundNetworkTests#testNonMeteredNetworkAccess_expeditedJob"}
                {"include-filter": "com.android.cts.netpolicy.HostsideRestrictBackgroundNetworkTests#testMeteredNetworkAccess_expeditedJob"},
                {"include-filter": "com.android.cts.netpolicy.HostsideRestrictBackgroundNetworkTests#testNonMeteredNetworkAccess_expeditedJob"}
            ]
        },
        {
+4 −0
Original line number Diff line number Diff line
@@ -1104,6 +1104,10 @@ public final class LoadedApk {
            return true;
        }

        if (mDataDir == null) {
            return false;
        }

        // Temporarily disable logging of disk reads on the Looper thread as this is necessary -
        // and the loader will access the directory anyway if we don't check it.
        StrictMode.ThreadPolicy oldThreadPolicy = allowThreadDiskReads();
+47 −15
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package android.app;
import static android.annotation.Dimension.DP;
import static android.app.Flags.evenlyDividedCallStyleActionLayout;
import static android.app.Flags.updateRankingTime;
import static android.app.admin.DevicePolicyResources.Drawables.Source.NOTIFICATION;
import static android.app.admin.DevicePolicyResources.Drawables.Style.SOLID_COLORED;
import static android.app.admin.DevicePolicyResources.Drawables.WORK_PROFILE_ICON;
@@ -897,15 +896,16 @@ public class Notification implements Parcelable
    /**
     * Sphere of visibility of this notification, which affects how and when the SystemUI reveals
     * the notification's presence and contents in untrusted situations (namely, on the secure
     * lockscreen).
     * lockscreen and during screen sharing).
     *
     * The default level, {@link #VISIBILITY_PRIVATE}, behaves exactly as notifications have always
     * done on Android: The notification's {@link #icon} and {@link #tickerText} (if available) are
     * shown in all situations, but the contents are only available if the device is unlocked for
     * the appropriate user.
     * the appropriate user and there is no active screen sharing session.
     *
     * A more permissive policy can be expressed by {@link #VISIBILITY_PUBLIC}; such a notification
     * can be read even in an "insecure" context (that is, above a secure lockscreen).
     * can be read even in an "insecure" context (that is, above a secure lockscreen or while
     * screen sharing with a remote viewer).
     * To modify the public version of this notification—for example, to redact some portions—see
     * {@link Builder#setPublicVersion(Notification)}.
     *
@@ -924,7 +924,8 @@ public class Notification implements Parcelable
    public @interface Visibility {}
    /**
     * Notification visibility: Show this notification in its entirety on all lockscreens.
     * Notification visibility: Show this notification in its entirety on all lockscreens and while
     * screen sharing.
     *
     * {@see #visibility}
     */
@@ -932,14 +933,16 @@ public class Notification implements Parcelable
    /**
     * Notification visibility: Show this notification on all lockscreens, but conceal sensitive or
     * private information on secure lockscreens.
     * private information on secure lockscreens. Conceal sensitive or private information while
     * screen sharing.
     *
     * {@see #visibility}
     */
    public static final int VISIBILITY_PRIVATE = 0;
    /**
     * Notification visibility: Do not reveal any part of this notification on a secure lockscreen.
     * Notification visibility: Do not reveal any part of this notification on a secure lockscreen
     * or while screen sharing.
     *
     * {@see #visibility}
     */
@@ -2596,7 +2599,7 @@ public class Notification implements Parcelable
    public Notification()
    {
        this.when = System.currentTimeMillis();
        if (updateRankingTime()) {
        if (Flags.sortSectionByTime()) {
            creationTime = when;
            extras.putBoolean(EXTRA_SHOW_WHEN, true);
        } else {
@@ -2612,7 +2615,7 @@ public class Notification implements Parcelable
    public Notification(Context context, int icon, CharSequence tickerText, long when,
            CharSequence contentTitle, CharSequence contentText, Intent contentIntent)
    {
        if (updateRankingTime()) {
        if (Flags.sortSectionByTime()) {
            creationTime = when;
            extras.putBoolean(EXTRA_SHOW_WHEN, true);
        }
@@ -2645,7 +2648,7 @@ public class Notification implements Parcelable
        this.icon = icon;
        this.tickerText = tickerText;
        this.when = when;
        if (updateRankingTime()) {
        if (Flags.sortSectionByTime()) {
            creationTime = when;
            extras.putBoolean(EXTRA_SHOW_WHEN, true);
        } else {
@@ -5981,21 +5984,22 @@ public class Notification implements Parcelable
                }
                if (mN.extras.getBoolean(EXTRA_SHOW_CHRONOMETER)) {
                    contentView.setViewVisibility(R.id.chronometer, View.VISIBLE);
                    contentView.setLong(R.id.chronometer, "setBase",
                            mN.when + (SystemClock.elapsedRealtime() - System.currentTimeMillis()));
                    contentView.setLong(R.id.chronometer, "setBase", mN.getWhen()
                            + (SystemClock.elapsedRealtime() - System.currentTimeMillis()));
                    contentView.setBoolean(R.id.chronometer, "setStarted", true);
                    boolean countsDown = mN.extras.getBoolean(EXTRA_CHRONOMETER_COUNT_DOWN);
                    contentView.setChronometerCountDown(R.id.chronometer, countsDown);
                    setTextViewColorSecondary(contentView, R.id.chronometer, p);
                } else {
                    contentView.setViewVisibility(R.id.time, View.VISIBLE);
                    contentView.setLong(R.id.time, "setTime", mN.when);
                    contentView.setLong(R.id.time, "setTime", mN.getWhen());
                    setTextViewColorSecondary(contentView, R.id.time, p);
                }
            } else {
                // We still want a time to be set but gone, such that we can show and hide it
                // on demand in case it's a child notification without anything in the header
                contentView.setLong(R.id.time, "setTime", mN.when != 0 ? mN.when : mN.creationTime);
                contentView.setLong(R.id.time, "setTime", mN.getWhen() != 0 ? mN.getWhen() :
                        mN.creationTime);
                setTextViewColorSecondary(contentView, R.id.time, p);
            }
        }
@@ -7162,7 +7166,7 @@ public class Notification implements Parcelable
                }
            }
            if (!updateRankingTime()) {
            if (!Flags.sortSectionByTime()) {
                mN.creationTime = System.currentTimeMillis();
            }
@@ -7614,11 +7618,30 @@ public class Notification implements Parcelable
        return mLargeIcon != null || largeIcon != null;
    }
    /**
     * Returns #when, unless it's set to 0, which should be shown as/treated as a 'current'
     * notification. 0 is treated as a special value because it was special in an old version of
     * android, and some apps are still (incorrectly) using it.
     *
     * @hide
     */
    public long getWhen() {
        if (Flags.sortSectionByTime()) {
            if (when == 0) {
                return creationTime;
            }
        }
        return when;
    }
    /**
     * @return true if the notification will show the time; false otherwise
     * @hide
     */
    public boolean showsTime() {
        if (Flags.sortSectionByTime()) {
            return extras.getBoolean(EXTRA_SHOW_WHEN);
        }
        return when != 0 && extras.getBoolean(EXTRA_SHOW_WHEN);
    }
@@ -7627,6 +7650,9 @@ public class Notification implements Parcelable
     * @hide
     */
    public boolean showsChronometer() {
        if (Flags.sortSectionByTime()) {
            return extras.getBoolean(EXTRA_SHOW_CHRONOMETER);
        }
        return when != 0 && extras.getBoolean(EXTRA_SHOW_CHRONOMETER);
    }
@@ -9770,6 +9796,12 @@ public class Notification implements Parcelable
     * You can opt-out of this behavior by using {@link Notification.Builder#setColorized(boolean)}.
     * <p>
     *
     * <p>
     * Starting at {@link android.os.Build.VERSION_CODES#VANILLA_ICE_CREAM Android V} the
     * {@link Notification#FLAG_NO_CLEAR NO_CLEAR flag} will be set for valid MediaStyle
     * notifications.
     * <p>
     *
     * To use this style with your Notification, feed it to
     * {@link Notification.Builder#setStyle(android.app.Notification.Style)} like so:
     * <pre class="prettyprint">
+19 −0
Original line number Diff line number Diff line
@@ -1197,6 +1197,25 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac
    /**
     * Callback called when a particular foreground service type has timed out.
     *
     * <p>This callback is meant to give the app a small grace period of a few seconds to finish
     * the foreground service of the associated type - if it fails to do so, the app will be
     * declared an ANR.
     *
     * <p>The foreground service of the associated type can be stopped within the time limit by
     * {@link android.app.Service#stopSelf()},
     * {@link android.content.Context#stopService(android.content.Intent)} or their overloads.
     * {@link android.app.Service#stopForeground(int)} can be used as well, which demotes the
     * service to a "background" service, which will soon be stopped by the system.
     *
     * <p>The specific time limit for each type (if one exists) is mentioned in the documentation
     * for that foreground service type. See
     * {@link ServiceInfo#FOREGROUND_SERVICE_TYPE_DATA_SYNC dataSync} for example.
     *
     * <p>Note: time limits are restricted to a rolling 24-hour window - for example, if a
     * foreground service type has a time limit of 6 hours, that time counter begins as soon as the
     * foreground service starts. This time limit will only be reset once every 24 hours or if the
     * app comes into the foreground state.
     *
     * @param startId the startId passed to {@link #onStartCommand(Intent, int, int)} when
     *                the service started.
     * @param fgsType the {@link ServiceInfo.ForegroundServiceType foreground service type} which
+11 −0
Original line number Diff line number Diff line
@@ -1347,6 +1347,17 @@ public class ActivityInfo extends ComponentInfo implements Parcelable {
    @TestApi
    public static final long OVERRIDE_MIN_ASPECT_RATIO = 174042980L; // buganizer id

    /**
     * This change id restricts treatments that force a given min aspect ratio to
     * only when an app is connected to the camera
     *
     * @hide
     */
    @ChangeId
    @Overridable
    @Disabled
    public static final long OVERRIDE_MIN_ASPECT_RATIO_ONLY_FOR_CAMERA = 325586858L; // buganizer id

    /**
     * This change id restricts treatments that force a given min aspect ratio to activities
     * whose orientation is fixed to portrait.
Loading