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

Commit f87b353f authored by Kweku Adams's avatar Kweku Adams Committed by Android (Google) Code Review
Browse files

Merge "Allow users to set custom Doze settings." into main

parents eb8cfbba 44e8739b
Loading
Loading
Loading
Loading
+177 −181
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.app.ActivityManagerInternal;
import android.app.AlarmManager;
import android.app.BroadcastOptions;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
import android.content.IIntentReceiver;
import android.content.Intent;
@@ -41,6 +42,7 @@ import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.PackageManagerInternal;
import android.content.res.Resources;
import android.database.ContentObserver;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
@@ -81,6 +83,7 @@ import android.os.Trace;
import android.os.UserHandle;
import android.os.WearModeManagerInternal;
import android.provider.DeviceConfig;
import android.provider.Settings;
import android.telephony.TelephonyCallback;
import android.telephony.TelephonyManager;
import android.telephony.emergency.EmergencyNumber;
@@ -109,6 +112,7 @@ import com.android.server.deviceidle.DeviceIdleConstraintTracker;
import com.android.server.deviceidle.IDeviceIdleConstraint;
import com.android.server.deviceidle.TvConstraintController;
import com.android.server.net.NetworkPolicyManagerInternal;
import com.android.server.utils.UserSettingDeviceConfigMediator;
import com.android.server.wm.ActivityTaskManagerInternal;

import org.xmlpull.v1.XmlPullParser;
@@ -1020,7 +1024,8 @@ public class DeviceIdleController extends SystemService
     * global Settings. Any access to this class or its fields should be done while
     * holding the DeviceIdleController lock.
     */
    public final class Constants implements DeviceConfig.OnPropertiesChangedListener {
    public final class Constants extends ContentObserver
            implements DeviceConfig.OnPropertiesChangedListener {
        // Key names stored in the settings value.
        private static final String KEY_FLEX_TIME_SHORT = "flex_time_short";
        private static final String KEY_LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT =
@@ -1396,6 +1401,7 @@ public class DeviceIdleController extends SystemService
        /**
         * Amount of time we would like to whitelist an app that is handling a
         * {@link android.app.PendingIntent} triggered by a {@link android.app.Notification}.
         *
         * @see #KEY_NOTIFICATION_ALLOWLIST_DURATION_MS
         */
        public long NOTIFICATION_ALLOWLIST_DURATION_MS = mDefaultNotificationAllowlistDurationMs;
@@ -1413,9 +1419,14 @@ public class DeviceIdleController extends SystemService
         */
        public boolean USE_MODE_MANAGER = mDefaultUseModeManager;

        private final ContentResolver mResolver;
        private final boolean mSmallBatteryDevice;
        private final UserSettingDeviceConfigMediator mUserSettingDeviceConfigMediator =
                new UserSettingDeviceConfigMediator.SettingsOverridesIndividualMediator(',');

        public Constants() {
        public Constants(Handler handler, ContentResolver resolver) {
            super(handler);
            mResolver = resolver;
            initDefault();
            mSmallBatteryDevice = ActivityManager.isSmallBatteryDevice();
            if (mSmallBatteryDevice) {
@@ -1424,8 +1435,14 @@ public class DeviceIdleController extends SystemService
            }
            DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_DEVICE_IDLE,
                    AppSchedulingModuleThread.getExecutor(), this);
            mResolver.registerContentObserver(
                    Settings.Global.getUriFor(Settings.Global.DEVICE_IDLE_CONSTANTS),
                    false, this);
            // Load all the constants.
            onPropertiesChanged(DeviceConfig.getProperties(DeviceConfig.NAMESPACE_DEVICE_IDLE));
            updateSettingsConstantLocked();
            mUserSettingDeviceConfigMediator.setDeviceConfigProperties(
                    DeviceConfig.getProperties(DeviceConfig.NAMESPACE_DEVICE_IDLE));
            updateConstantsLocked();
        }

        private void initDefault() {
@@ -1574,186 +1591,164 @@ public class DeviceIdleController extends SystemService
            return (!COMPRESS_TIME || defTimeout < compTimeout) ? defTimeout : compTimeout;
        }

        @Override
        public void onChange(boolean selfChange, Uri uri) {
            synchronized (DeviceIdleController.this) {
                updateSettingsConstantLocked();
                updateConstantsLocked();
            }
        }

        private void updateSettingsConstantLocked() {
            try {
                mUserSettingDeviceConfigMediator.setSettingsString(
                        Settings.Global.getString(mResolver,
                                Settings.Global.DEVICE_IDLE_CONSTANTS));
            } catch (IllegalArgumentException e) {
                // Failed to parse the settings string, log this and move on with previous values.
                Slog.e(TAG, "Bad device idle settings", e);
            }
        }

        @Override
        public void onPropertiesChanged(DeviceConfig.Properties properties) {
            synchronized (DeviceIdleController.this) {
                for (String name : properties.getKeyset()) {
                    if (name == null) {
                        continue;
                mUserSettingDeviceConfigMediator.setDeviceConfigProperties(properties);
                updateConstantsLocked();
            }
        }
                    switch (name) {
                        case KEY_FLEX_TIME_SHORT:
                            FLEX_TIME_SHORT = properties.getLong(

        private void updateConstantsLocked() {
            if (mSmallBatteryDevice) return;
            FLEX_TIME_SHORT = mUserSettingDeviceConfigMediator.getLong(
                    KEY_FLEX_TIME_SHORT, mDefaultFlexTimeShort);
                            break;
                        case KEY_LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT:
                            LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT = properties.getLong(

            LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT = mUserSettingDeviceConfigMediator.getLong(
                    KEY_LIGHT_IDLE_AFTER_INACTIVE_TIMEOUT,
                    mDefaultLightIdleAfterInactiveTimeout);
                            break;
                        case KEY_LIGHT_IDLE_TIMEOUT:
                            LIGHT_IDLE_TIMEOUT = properties.getLong(

            LIGHT_IDLE_TIMEOUT = mUserSettingDeviceConfigMediator.getLong(
                    KEY_LIGHT_IDLE_TIMEOUT, mDefaultLightIdleTimeout);
                            break;
                        case KEY_LIGHT_IDLE_TIMEOUT_INITIAL_FLEX:
                            LIGHT_IDLE_TIMEOUT_INITIAL_FLEX = properties.getLong(

            LIGHT_IDLE_TIMEOUT_INITIAL_FLEX = mUserSettingDeviceConfigMediator.getLong(
                    KEY_LIGHT_IDLE_TIMEOUT_INITIAL_FLEX,
                    mDefaultLightIdleTimeoutInitialFlex);
                            break;
                        case KEY_LIGHT_IDLE_TIMEOUT_MAX_FLEX:
                            LIGHT_IDLE_TIMEOUT_MAX_FLEX = properties.getLong(

            LIGHT_IDLE_TIMEOUT_MAX_FLEX = mUserSettingDeviceConfigMediator.getLong(
                    KEY_LIGHT_IDLE_TIMEOUT_MAX_FLEX,
                    mDefaultLightIdleTimeoutMaxFlex);
                            break;
                        case KEY_LIGHT_IDLE_FACTOR:
                            LIGHT_IDLE_FACTOR = Math.max(1, properties.getFloat(

            LIGHT_IDLE_FACTOR = Math.max(1, mUserSettingDeviceConfigMediator.getFloat(
                    KEY_LIGHT_IDLE_FACTOR, mDefaultLightIdleFactor));
                            break;
                        case KEY_LIGHT_IDLE_INCREASE_LINEARLY:
                            LIGHT_IDLE_INCREASE_LINEARLY = properties.getBoolean(

            LIGHT_IDLE_INCREASE_LINEARLY = mUserSettingDeviceConfigMediator.getBoolean(
                    KEY_LIGHT_IDLE_INCREASE_LINEARLY,
                    mDefaultLightIdleIncreaseLinearly);
                            break;
                        case KEY_LIGHT_IDLE_LINEAR_INCREASE_FACTOR_MS:
                            LIGHT_IDLE_LINEAR_INCREASE_FACTOR_MS = properties.getLong(

            LIGHT_IDLE_LINEAR_INCREASE_FACTOR_MS = mUserSettingDeviceConfigMediator.getLong(
                    KEY_LIGHT_IDLE_LINEAR_INCREASE_FACTOR_MS,
                    mDefaultLightIdleLinearIncreaseFactorMs);
                            break;
                        case KEY_LIGHT_IDLE_FLEX_LINEAR_INCREASE_FACTOR_MS:
                            LIGHT_IDLE_FLEX_LINEAR_INCREASE_FACTOR_MS = properties.getLong(

            LIGHT_IDLE_FLEX_LINEAR_INCREASE_FACTOR_MS = mUserSettingDeviceConfigMediator.getLong(
                    KEY_LIGHT_IDLE_FLEX_LINEAR_INCREASE_FACTOR_MS,
                    mDefaultLightIdleFlexLinearIncreaseFactorMs);
                            break;
                        case KEY_LIGHT_MAX_IDLE_TIMEOUT:
                            LIGHT_MAX_IDLE_TIMEOUT = properties.getLong(

            LIGHT_MAX_IDLE_TIMEOUT = mUserSettingDeviceConfigMediator.getLong(
                    KEY_LIGHT_MAX_IDLE_TIMEOUT, mDefaultLightMaxIdleTimeout);
                            break;
                        case KEY_LIGHT_IDLE_MAINTENANCE_MIN_BUDGET:
                            LIGHT_IDLE_MAINTENANCE_MIN_BUDGET = properties.getLong(

            LIGHT_IDLE_MAINTENANCE_MIN_BUDGET = mUserSettingDeviceConfigMediator.getLong(
                    KEY_LIGHT_IDLE_MAINTENANCE_MIN_BUDGET,
                    mDefaultLightIdleMaintenanceMinBudget);
                            break;
                        case KEY_LIGHT_IDLE_MAINTENANCE_MAX_BUDGET:
                            LIGHT_IDLE_MAINTENANCE_MAX_BUDGET = properties.getLong(

            LIGHT_IDLE_MAINTENANCE_MAX_BUDGET = mUserSettingDeviceConfigMediator.getLong(
                    KEY_LIGHT_IDLE_MAINTENANCE_MAX_BUDGET,
                    mDefaultLightIdleMaintenanceMaxBudget);
                            break;
                        case KEY_MIN_LIGHT_MAINTENANCE_TIME:
                            MIN_LIGHT_MAINTENANCE_TIME = properties.getLong(

            MIN_LIGHT_MAINTENANCE_TIME = mUserSettingDeviceConfigMediator.getLong(
                    KEY_MIN_LIGHT_MAINTENANCE_TIME,
                    mDefaultMinLightMaintenanceTime);
                            break;
                        case KEY_MIN_DEEP_MAINTENANCE_TIME:
                            MIN_DEEP_MAINTENANCE_TIME = properties.getLong(

            MIN_DEEP_MAINTENANCE_TIME = mUserSettingDeviceConfigMediator.getLong(
                    KEY_MIN_DEEP_MAINTENANCE_TIME,
                    mDefaultMinDeepMaintenanceTime);
                            break;
                        case KEY_INACTIVE_TIMEOUT:

            final long defaultInactiveTimeout = mSmallBatteryDevice
                    ? DEFAULT_INACTIVE_TIMEOUT_SMALL_BATTERY
                    : mDefaultInactiveTimeout;
                            INACTIVE_TIMEOUT = properties.getLong(
            INACTIVE_TIMEOUT = mUserSettingDeviceConfigMediator.getLong(
                    KEY_INACTIVE_TIMEOUT, defaultInactiveTimeout);
                            break;
                        case KEY_SENSING_TIMEOUT:
                            SENSING_TIMEOUT = properties.getLong(

            SENSING_TIMEOUT = mUserSettingDeviceConfigMediator.getLong(
                    KEY_SENSING_TIMEOUT, mDefaultSensingTimeout);
                            break;
                        case KEY_LOCATING_TIMEOUT:
                            LOCATING_TIMEOUT = properties.getLong(

            LOCATING_TIMEOUT = mUserSettingDeviceConfigMediator.getLong(
                    KEY_LOCATING_TIMEOUT, mDefaultLocatingTimeout);
                            break;
                        case KEY_LOCATION_ACCURACY:
                            LOCATION_ACCURACY = properties.getFloat(

            LOCATION_ACCURACY = mUserSettingDeviceConfigMediator.getFloat(
                    KEY_LOCATION_ACCURACY, mDefaultLocationAccuracy);
                            break;
                        case KEY_MOTION_INACTIVE_TIMEOUT:
                            MOTION_INACTIVE_TIMEOUT = properties.getLong(

            MOTION_INACTIVE_TIMEOUT = mUserSettingDeviceConfigMediator.getLong(
                    KEY_MOTION_INACTIVE_TIMEOUT, mDefaultMotionInactiveTimeout);
                            break;
                        case KEY_MOTION_INACTIVE_TIMEOUT_FLEX:
                            MOTION_INACTIVE_TIMEOUT_FLEX = properties.getLong(

            MOTION_INACTIVE_TIMEOUT_FLEX = mUserSettingDeviceConfigMediator.getLong(
                    KEY_MOTION_INACTIVE_TIMEOUT_FLEX,
                    mDefaultMotionInactiveTimeoutFlex);
                            break;
                        case KEY_IDLE_AFTER_INACTIVE_TIMEOUT:

            final long defaultIdleAfterInactiveTimeout = mSmallBatteryDevice
                    ? DEFAULT_IDLE_AFTER_INACTIVE_TIMEOUT_SMALL_BATTERY
                    : mDefaultIdleAfterInactiveTimeout;
                            IDLE_AFTER_INACTIVE_TIMEOUT = properties.getLong(
            IDLE_AFTER_INACTIVE_TIMEOUT = mUserSettingDeviceConfigMediator.getLong(
                    KEY_IDLE_AFTER_INACTIVE_TIMEOUT,
                    defaultIdleAfterInactiveTimeout);
                            break;
                        case KEY_IDLE_PENDING_TIMEOUT:
                            IDLE_PENDING_TIMEOUT = properties.getLong(

            IDLE_PENDING_TIMEOUT = mUserSettingDeviceConfigMediator.getLong(
                    KEY_IDLE_PENDING_TIMEOUT, mDefaultIdlePendingTimeout);
                            break;
                        case KEY_MAX_IDLE_PENDING_TIMEOUT:
                            MAX_IDLE_PENDING_TIMEOUT = properties.getLong(

            MAX_IDLE_PENDING_TIMEOUT = mUserSettingDeviceConfigMediator.getLong(
                    KEY_MAX_IDLE_PENDING_TIMEOUT, mDefaultMaxIdlePendingTimeout);
                            break;
                        case KEY_IDLE_PENDING_FACTOR:
                            IDLE_PENDING_FACTOR = properties.getFloat(

            IDLE_PENDING_FACTOR = mUserSettingDeviceConfigMediator.getFloat(
                    KEY_IDLE_PENDING_FACTOR, mDefaultIdlePendingFactor);
                            break;
                        case KEY_QUICK_DOZE_DELAY_TIMEOUT:
                            QUICK_DOZE_DELAY_TIMEOUT = properties.getLong(

            QUICK_DOZE_DELAY_TIMEOUT = mUserSettingDeviceConfigMediator.getLong(
                    KEY_QUICK_DOZE_DELAY_TIMEOUT, mDefaultQuickDozeDelayTimeout);
                            break;
                        case KEY_IDLE_TIMEOUT:
                            IDLE_TIMEOUT = properties.getLong(

            IDLE_TIMEOUT = mUserSettingDeviceConfigMediator.getLong(
                    KEY_IDLE_TIMEOUT, mDefaultIdleTimeout);
                            break;
                        case KEY_MAX_IDLE_TIMEOUT:
                            MAX_IDLE_TIMEOUT = properties.getLong(

            MAX_IDLE_TIMEOUT = mUserSettingDeviceConfigMediator.getLong(
                    KEY_MAX_IDLE_TIMEOUT, mDefaultMaxIdleTimeout);
                            break;
                        case KEY_IDLE_FACTOR:
                            IDLE_FACTOR = properties.getFloat(KEY_IDLE_FACTOR, mDefaultIdleFactor);
                            break;
                        case KEY_MIN_TIME_TO_ALARM:
                            MIN_TIME_TO_ALARM = properties.getLong(

            IDLE_FACTOR = mUserSettingDeviceConfigMediator.getFloat(KEY_IDLE_FACTOR,
                    mDefaultIdleFactor);

            MIN_TIME_TO_ALARM = mUserSettingDeviceConfigMediator.getLong(
                    KEY_MIN_TIME_TO_ALARM, mDefaultMinTimeToAlarm);
                            break;
                        case KEY_MAX_TEMP_APP_ALLOWLIST_DURATION_MS:
                            MAX_TEMP_APP_ALLOWLIST_DURATION_MS = properties.getLong(

            MAX_TEMP_APP_ALLOWLIST_DURATION_MS = mUserSettingDeviceConfigMediator.getLong(
                    KEY_MAX_TEMP_APP_ALLOWLIST_DURATION_MS,
                    mDefaultMaxTempAppAllowlistDurationMs);
                            break;
                        case KEY_MMS_TEMP_APP_ALLOWLIST_DURATION_MS:
                            MMS_TEMP_APP_ALLOWLIST_DURATION_MS = properties.getLong(

            MMS_TEMP_APP_ALLOWLIST_DURATION_MS = mUserSettingDeviceConfigMediator.getLong(
                    KEY_MMS_TEMP_APP_ALLOWLIST_DURATION_MS,
                    mDefaultMmsTempAppAllowlistDurationMs);
                            break;
                        case KEY_SMS_TEMP_APP_ALLOWLIST_DURATION_MS:
                            SMS_TEMP_APP_ALLOWLIST_DURATION_MS = properties.getLong(

            SMS_TEMP_APP_ALLOWLIST_DURATION_MS = mUserSettingDeviceConfigMediator.getLong(
                    KEY_SMS_TEMP_APP_ALLOWLIST_DURATION_MS,
                    mDefaultSmsTempAppAllowlistDurationMs);
                            break;
                        case KEY_NOTIFICATION_ALLOWLIST_DURATION_MS:
                            NOTIFICATION_ALLOWLIST_DURATION_MS = properties.getLong(

            NOTIFICATION_ALLOWLIST_DURATION_MS = mUserSettingDeviceConfigMediator.getLong(
                    KEY_NOTIFICATION_ALLOWLIST_DURATION_MS,
                    mDefaultNotificationAllowlistDurationMs);
                            break;
                        case KEY_WAIT_FOR_UNLOCK:
                            WAIT_FOR_UNLOCK = properties.getBoolean(

            WAIT_FOR_UNLOCK = mUserSettingDeviceConfigMediator.getBoolean(
                    KEY_WAIT_FOR_UNLOCK, mDefaultWaitForUnlock);
                            break;
                        case KEY_USE_WINDOW_ALARMS:
                            USE_WINDOW_ALARMS = properties.getBoolean(

            USE_WINDOW_ALARMS = mUserSettingDeviceConfigMediator.getBoolean(
                    KEY_USE_WINDOW_ALARMS, mDefaultUseWindowAlarms);
                            break;
                        case KEY_USE_MODE_MANAGER:
                            USE_MODE_MANAGER = properties.getBoolean(

            USE_MODE_MANAGER = mUserSettingDeviceConfigMediator.getBoolean(
                    KEY_USE_MODE_MANAGER, mDefaultUseModeManager);
                            break;
                        default:
                            Slog.e(TAG, "Unknown configuration key: " + name);
                            break;
                    }
                }
            }
        }

        void dump(PrintWriter pw) {
@@ -2490,9 +2485,10 @@ public class DeviceIdleController extends SystemService
            return mConnectivityManager;
        }

        Constants getConstants(DeviceIdleController controller) {
        Constants getConstants(DeviceIdleController controller, Handler handler,
                ContentResolver resolver) {
            if (mConstants == null) {
                mConstants = controller.new Constants();
                mConstants = controller.new Constants(handler, resolver);
            }
            return mConstants;
        }
@@ -2650,7 +2646,7 @@ public class DeviceIdleController extends SystemService
                }
            }

            mConstants = mInjector.getConstants(this);
            mConstants = mInjector.getConstants(this, mHandler, getContext().getContentResolver());

            readConfigFileLocked();
            updateWhitelistAppIdsLocked();
+42 −43

File changed.

Preview size limit exceeded, changes collapsed.

+14 −21
Original line number Diff line number Diff line
@@ -33,9 +33,9 @@ import android.content.ContentResolver;
import android.provider.DeviceConfig;
import android.provider.Settings;
import android.util.IndentingPrintWriter;
import android.util.KeyValueListParser;

import com.android.internal.annotations.VisibleForTesting;
import com.android.server.utils.UserSettingDeviceConfigMediator;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -197,10 +197,17 @@ public abstract class EconomicPolicy {
    }

    protected final InternalResourceService mIrs;
    protected final UserSettingDeviceConfigMediator mUserSettingDeviceConfigMediator;
    private static final Modifier[] COST_MODIFIER_BY_INDEX = new Modifier[NUM_COST_MODIFIERS];

    EconomicPolicy(@NonNull InternalResourceService irs) {
        mIrs = irs;
        // Don't cross the streams! Mixing Settings/local user config changes with DeviceConfig
        // config can cause issues since the scales may be different, so use one or the other.
        // If user settings exist, then just stick with the Settings constants, even if there
        // are invalid values.
        mUserSettingDeviceConfigMediator =
                new UserSettingDeviceConfigMediator.SettingsOverridesAllMediator(',');
        for (int mId : getCostModifiers()) {
            initModifier(mId, irs);
        }
@@ -464,28 +471,14 @@ public abstract class EconomicPolicy {
        return "UNKNOWN_REWARD:" + Integer.toHexString(eventId);
    }

    protected long getConstantAsCake(@NonNull KeyValueListParser parser,
            @Nullable DeviceConfig.Properties properties, String key, long defaultValCake) {
        return getConstantAsCake(parser, properties, key, defaultValCake, 0);
    protected long getConstantAsCake(String key, long defaultValCake) {
        return getConstantAsCake(key, defaultValCake, 0);
    }

    protected long getConstantAsCake(@NonNull KeyValueListParser parser,
            @Nullable DeviceConfig.Properties properties, String key, long defaultValCake,
            long minValCake) {
        // Don't cross the streams! Mixing Settings/local user config changes with DeviceConfig
        // config can cause issues since the scales may be different, so use one or the other.
        if (parser.size() > 0) {
            // User settings take precedence. Just stick with the Settings constants, even if there
            // are invalid values. It's not worth the time to evaluate all the key/value pairs to
            // make sure there are valid ones before deciding.
    protected long getConstantAsCake(String key, long defaultValCake, long minValCake) {
        return Math.max(minValCake,
                parseCreditValue(parser.getString(key, null), defaultValCake));
        }
        if (properties != null) {
            return Math.max(minValCake,
                parseCreditValue(properties.getString(key, null), defaultValCake));
        }
        return Math.max(minValCake, defaultValCake);
                parseCreditValue(
                        mUserSettingDeviceConfigMediator.getString(key, null), defaultValCake));
    }

    @VisibleForTesting
+50 −51

File changed.

Preview size limit exceeded, changes collapsed.

+32 −0
Original line number Diff line number Diff line
@@ -14974,6 +14974,38 @@ public final class Settings {
        @Readable
        public static final String APP_OPS_CONSTANTS = "app_ops_constants";
        /**
         * Device Idle (Doze) specific settings.
         * This is encoded as a key=value list, separated by commas. Ex:
         *
         * "inactive_to=60000,sensing_to=400000"
         *
         * The following keys are supported:
         *
         * <pre>
         * inactive_to                      (long)
         * sensing_to                       (long)
         * motion_inactive_to               (long)
         * idle_after_inactive_to           (long)
         * idle_pending_to                  (long)
         * max_idle_pending_to              (long)
         * idle_pending_factor              (float)
         * quick_doze_delay_to              (long)
         * idle_to                          (long)
         * max_idle_to                      (long)
         * idle_factor                      (float)
         * min_time_to_alarm                (long)
         * max_temp_app_whitelist_duration  (long)
         * notification_whitelist_duration  (long)
         * </pre>
         *
         * <p>
         * Type: string
         * @hide
         * @see com.android.server.DeviceIdleController.Constants
         */
        public static final String DEVICE_IDLE_CONSTANTS = "device_idle_constants";
        /**
         * Battery Saver specific settings
         * This is encoded as a key=value list, separated by commas. Ex:
Loading