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

Commit 201f2cf8 authored by Xin Li's avatar Xin Li Committed by Gerrit Code Review
Browse files

Merge "DO NOT MERGE - Merge Android R QPR1"

parents a086c295 8f9b6894
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ class BlobStoreConfig {
         */
        public static final String KEY_USE_REVOCABLE_FD_FOR_READS =
                "use_revocable_fd_for_reads";
        public static final boolean DEFAULT_USE_REVOCABLE_FD_FOR_READS = true;
        public static final boolean DEFAULT_USE_REVOCABLE_FD_FOR_READS = false;
        public static boolean USE_REVOCABLE_FD_FOR_READS =
                DEFAULT_USE_REVOCABLE_FD_FOR_READS;

+19 −4
Original line number Diff line number Diff line
@@ -455,9 +455,6 @@ public class AppStandbyController implements AppStandbyInternal {

            mSystemServicesReady = true;

            // Offload to handler thread to avoid boot time impact.
            mHandler.post(AppStandbyController.this::updatePowerWhitelistCache);

            boolean userFileExists;
            synchronized (mAppIdleLock) {
                userFileExists = mAppIdleHistory.userFileExists(UserHandle.USER_SYSTEM);
@@ -474,7 +471,9 @@ public class AppStandbyController implements AppStandbyInternal {
            setChargingState(mInjector.isCharging());

            // Offload to handler thread after boot completed to avoid boot time impact. This means
            // that headless system apps may be put in a lower bucket until boot has completed.
            // that app standby buckets may be slightly out of date and headless system apps may be
            // put in a lower bucket until boot has completed.
            mHandler.post(AppStandbyController.this::updatePowerWhitelistCache);
            mHandler.post(this::loadHeadlessSystemAppCache);
        }
    }
@@ -1121,6 +1120,10 @@ public class AppStandbyController implements AppStandbyInternal {
            if (isDeviceProvisioningPackage(packageName)) {
                return STANDBY_BUCKET_EXEMPTED;
            }

            if (mInjector.isWellbeingPackage(packageName)) {
                return STANDBY_BUCKET_WORKING_SET;
            }
        }

        // Check this last, as it can be the most expensive check
@@ -1930,6 +1933,7 @@ public class AppStandbyController implements AppStandbyInternal {
         */
        @GuardedBy("mPowerWhitelistedApps")
        private final ArraySet<String> mPowerWhitelistedApps = new ArraySet<>();
        private String mWellbeingApp = null;

        Injector(Context context, Looper looper) {
            mContext = context;
@@ -1963,6 +1967,9 @@ public class AppStandbyController implements AppStandbyInternal {
                if (activityManager.isLowRamDevice() || ActivityManager.isSmallBatteryDevice()) {
                    mAutoRestrictedBucketDelayMs = 12 * ONE_HOUR;
                }

                final PackageManager packageManager = mContext.getPackageManager();
                mWellbeingApp = packageManager.getWellbeingPackageName();
            }
            mBootPhase = phase;
        }
@@ -2007,6 +2014,14 @@ public class AppStandbyController implements AppStandbyInternal {
            }
        }

        /**
         * Returns {@code true} if the supplied package is the wellbeing app. Otherwise,
         * returns {@code false}.
         */
        boolean isWellbeingPackage(String packageName) {
            return mWellbeingApp != null && mWellbeingApp.equals(packageName);
        }

        void updatePowerWhitelistCache() {
            try {
                // Don't call out to DeviceIdleController with the lock held.
+1 −1
Original line number Diff line number Diff line
{
  "name": "com.android.permission",
  "version": 300900700
  "version": 300000000
}
+4 −0
Original line number Diff line number Diff line
@@ -554,6 +554,10 @@ status_t IncidentService::command(FILE* in, FILE* out, FILE* err, Vector<String8
            return NO_ERROR;
        }
        if (!args[0].compare(String8("section"))) {
            if (argCount == 1) {
                fprintf(out, "Not enough arguments for section\n");
                return NO_ERROR;
            }
            int id = atoi(args[1]);
            int idx = 0;
            while (SECTION_LIST[idx] != NULL) {
+1 −1
Original line number Diff line number Diff line
@@ -45167,7 +45167,7 @@ package android.telephony {
    method public long getNci();
    method @IntRange(from=0, to=3279165) public int getNrarfcn();
    method @IntRange(from=0, to=1007) public int getPci();
    method @IntRange(from=0, to=16777215) public int getTac();
    method @IntRange(from=0, to=65535) public int getTac();
    method public void writeToParcel(android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CellIdentityNr> CREATOR;
  }
Loading