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

Commit 2f7d41d3 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7478986 from 6c10325d to sc-d1-release

Change-Id: I9d7a210a8451e661f135cfc91272005e55264322
parents bf2f8639 6c10325d
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static android.app.usage.UsageStatsManager.REASON_MAIN_DEFAULT;
import static android.app.usage.UsageStatsManager.REASON_MAIN_FORCED_BY_USER;
import static android.app.usage.UsageStatsManager.REASON_MAIN_MASK;
import static android.app.usage.UsageStatsManager.REASON_MAIN_PREDICTED;
import static android.app.usage.UsageStatsManager.REASON_MAIN_TIMEOUT;
import static android.app.usage.UsageStatsManager.REASON_MAIN_USAGE;
import static android.app.usage.UsageStatsManager.REASON_SUB_MASK;
import static android.app.usage.UsageStatsManager.REASON_SUB_USAGE_USER_INTERACTION;
@@ -259,8 +260,10 @@ public class AppIdleHistory {
        int bucketingReason = REASON_MAIN_USAGE | usageReason;
        final boolean isUserUsage = isUserUsage(bucketingReason);

        if (appUsageHistory.currentBucket == STANDBY_BUCKET_RESTRICTED && !isUserUsage) {
            // Only user usage should bring an app out of the RESTRICTED bucket.
        if (appUsageHistory.currentBucket == STANDBY_BUCKET_RESTRICTED && !isUserUsage
                && (appUsageHistory.bucketingReason & REASON_MAIN_MASK) != REASON_MAIN_TIMEOUT) {
            // Only user usage should bring an app out of the RESTRICTED bucket, unless the app
            // just timed out into RESTRICTED.
            newBucket = STANDBY_BUCKET_RESTRICTED;
            bucketingReason = appUsageHistory.bucketingReason;
        } else {
+5 −0
Original line number Diff line number Diff line
hansson@google.com

# Modularization team
file:platform/packages/modules/common:/OWNERS

per-file Android.bp = file:platform/build/soong:/OWNERS
+9 −6
Original line number Diff line number Diff line
@@ -447,7 +447,7 @@ public final class ActivityThread extends ClientTransactionHandler

        @GuardedBy("mLock")
        ContentProviderHolder mHolder; // Temp holder to be used between notifier and waiter
        Object mLock; // The lock to be used to get notified when the provider is ready
        final Object mLock; // The lock to be used to get notified when the provider is ready

        public ProviderKey(String authority, int userId) {
            this.authority = authority;
@@ -1827,13 +1827,16 @@ public final class ActivityThread extends ClientTransactionHandler

        @Override
        public void notifyContentProviderPublishStatus(@NonNull ContentProviderHolder holder,
                @NonNull String auth, int userId, boolean published) {
                @NonNull String authorities, int userId, boolean published) {
            final String auths[] = authorities.split(";");
            for (String auth: auths) {
                final ProviderKey key = getGetProviderKey(auth, userId);
                synchronized (key.mLock) {
                    key.mHolder = holder;
                    key.mLock.notifyAll();
                }
            }
        }

        @Override
        public void instrumentWithoutRestart(ComponentName instrumentationName,
+1 −1
Original line number Diff line number Diff line
@@ -153,7 +153,7 @@ oneway interface IApplicationThread {
    void performDirectAction(IBinder activityToken, String actionId,
            in Bundle arguments, in RemoteCallback cancellationCallback,
            in RemoteCallback resultCallback);
    void notifyContentProviderPublishStatus(in ContentProviderHolder holder, String auth,
    void notifyContentProviderPublishStatus(in ContentProviderHolder holder, String authorities,
            int userId, boolean published);
    void instrumentWithoutRestart(in ComponentName instrumentationName,
            in Bundle instrumentationArgs,
+24 −0
Original line number Diff line number Diff line
@@ -697,6 +697,18 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac
     * service element of manifest file. The value of attribute
     * {@link android.R.attr#foregroundServiceType} can be multiple flags ORed together.</p>
     *
     * <div class="caution">
     * <p><strong>Note:</strong>
     * Beginning with SDK Version {@link android.os.Build.VERSION_CODES#S},
     * apps targeting SDK Version {@link android.os.Build.VERSION_CODES#S}
     * or higher are not allowed to start foreground services from the background.
     * See
     * <a href="{@docRoot}/about/versions/12/behavior-changes-12">
     * Behavior changes: Apps targeting Android 12
     * </a>
     * for more details.
     * </div>
     *
     * @throws ForegroundServiceStartNotAllowedException
     * If the app targeting API is
     * {@link android.os.Build.VERSION_CODES#S} or later, and the service is restricted from
@@ -733,6 +745,18 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac
   * {@link android.content.pm.ServiceInfo#FOREGROUND_SERVICE_TYPE_MANIFEST} to use all flags that
   * is specified in manifest attribute foregroundServiceType.</p>
   *
   * <div class="caution">
   * <p><strong>Note:</strong>
   * Beginning with SDK Version {@link android.os.Build.VERSION_CODES#S},
   * apps targeting SDK Version {@link android.os.Build.VERSION_CODES#S}
   * or higher are not allowed to start foreground services from the background.
   * See
   * <a href="{@docRoot}/about/versions/12/behavior-changes-12">
   * Behavior changes: Apps targeting Android 12
   * </a>
   * for more details.
   * </div>
   *
   * @param id The identifier for this notification as per
   * {@link NotificationManager#notify(int, Notification)
   * NotificationManager.notify(int, Notification)}; must not be 0.
Loading