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

Commit 68bed30e authored by Suprabh Shukla's avatar Suprabh Shukla
Browse files

Update language in AppStateTracker to be more inclusive

Changes to comply with Android's inclusive language guidance.
See https://source.android.com/setup/contribute/respectful-code for
reference.

Test: make -j
atest FrameworksMockingServicesTests:com.android.server

Bug: 162432774
Bug: 161896447
Change-Id: I2f3b5cb6b0e2cfaf9136bf7c9d0b1f5f1f76b612
parent 4712b84d
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -803,8 +803,8 @@ public class AlarmManager {
     * <b>only</b> be used for situations where it is actually required that the alarm go off while
     * in idle -- a reasonable example would be for a calendar notification that should make a
     * sound so the user is aware of it.  When the alarm is dispatched, the app will also be
     * added to the system's temporary whitelist for approximately 10 seconds to allow that
     * application to acquire further wake locks in which to complete its work.</p>
     * added to the system's temporary power exemption list for approximately 10 seconds to allow
     * that application to acquire further wake locks in which to complete its work.</p>
     *
     * <p>These alarms can significantly impact the power use
     * of the device when idle (and thus cause significant battery blame to the app scheduling
@@ -855,8 +855,8 @@ public class AlarmManager {
     * be used for situations where it is actually required that the alarm go off while in
     * idle -- a reasonable example would be for a calendar notification that should make a
     * sound so the user is aware of it.  When the alarm is dispatched, the app will also be
     * added to the system's temporary whitelist for approximately 10 seconds to allow that
     * application to acquire further wake locks in which to complete its work.</p>
     * added to the system's temporary power exemption list for approximately 10 seconds to allow
     * that application to acquire further wake locks in which to complete its work.</p>
     *
     * <p>These alarms can significantly impact the power use
     * of the device when idle (and thus cause significant battery blame to the app scheduling
+115 −115

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -3714,7 +3714,7 @@ public class DeviceIdleController extends SystemService
    }

    private void passWhiteListsToForceAppStandbyTrackerLocked() {
        mAppStateTracker.setPowerSaveWhitelistAppIds(
        mAppStateTracker.setPowerSaveExemptionListAppIds(
                mPowerSaveWhitelistExceptIdleAppIdArray,
                mPowerSaveWhitelistUserAppIdArray,
                mTempWhitelistAppIdArray);
+1 −1
Original line number Diff line number Diff line
@@ -2089,7 +2089,7 @@ public class AlarmManagerService extends SystemService {
            } else if (workSource == null && (callingUid < Process.FIRST_APPLICATION_UID
                    || UserHandle.isSameApp(callingUid, mSystemUiUid)
                    || ((mAppStateTracker != null)
                        && mAppStateTracker.isUidPowerSaveUserWhitelisted(callingUid)))) {
                        && mAppStateTracker.isUidPowerSaveUserExempt(callingUid)))) {
                flags |= AlarmManager.FLAG_ALLOW_WHILE_IDLE_UNRESTRICTED;
                flags &= ~AlarmManager.FLAG_ALLOW_WHILE_IDLE;
            }
+5 −5
Original line number Diff line number Diff line
@@ -91,9 +91,9 @@ public final class BackgroundJobsController extends StateController {
            pw.print(" from ");
            UserHandle.formatUid(pw, uid);
            pw.print(mAppStateTracker.isUidActive(uid) ? " active" : " idle");
            if (mAppStateTracker.isUidPowerSaveWhitelisted(uid) ||
                    mAppStateTracker.isUidTempPowerSaveWhitelisted(uid)) {
                pw.print(", whitelisted");
            if (mAppStateTracker.isUidPowerSaveExempt(uid)
                    || mAppStateTracker.isUidTempPowerSaveExempt(uid)) {
                pw.print(", exempted");
            }
            pw.print(": ");
            pw.print(sourcePkg);
@@ -132,8 +132,8 @@ public final class BackgroundJobsController extends StateController {

            proto.write(TrackedJob.IS_IN_FOREGROUND, mAppStateTracker.isUidActive(sourceUid));
            proto.write(TrackedJob.IS_WHITELISTED,
                    mAppStateTracker.isUidPowerSaveWhitelisted(sourceUid) ||
                    mAppStateTracker.isUidTempPowerSaveWhitelisted(sourceUid));
                    mAppStateTracker.isUidPowerSaveExempt(sourceUid)
                            || mAppStateTracker.isUidTempPowerSaveExempt(sourceUid));

            proto.write(TrackedJob.CAN_RUN_ANY_IN_BACKGROUND,
                    mAppStateTracker.isRunAnyInBackgroundAppOpsAllowed(sourceUid, sourcePkg));
Loading