diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2020-09-14 22:44:28 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-09-14 22:44:28 +0000 |
commit | bc93881957cd39e810aa67bea67ffe6a67da9c2a (patch) | |
tree | 5f41853fd7232fa5f90f30efa058bd3e6a07b1c8 /apex/jobscheduler | |
parent | 9af4f1d3000b9d5e56ac508b76f791563205c230 (diff) | |
parent | e022945d69a3f31b9fed18c8bff2805d43914231 (diff) |
Merge "Replace 'whitelist' with 'allowlist'" am: 8ac6819c0e am: 3563eeb4ae am: 1d3e694b97 am: e022945d69
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1427048
Change-Id: I5725049a13c30e122e1f8b5e4e772b7431a4e32d
Diffstat (limited to 'apex/jobscheduler')
-rw-r--r-- | apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java | 2 | ||||
-rw-r--r-- | apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java | 19 |
2 files changed, 11 insertions, 10 deletions
diff --git a/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java b/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java index 6475f5706a6d..18643ed91276 100644 --- a/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java +++ b/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java @@ -37,7 +37,7 @@ public interface DeviceIdleInternal { String reason); // duration in milliseconds - long getNotificationWhitelistDuration(); + long getNotificationAllowlistDuration(); void setJobsActive(boolean active); diff --git a/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java b/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java index ac58f3d6a94d..67912723e7b4 100644 --- a/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java +++ b/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java @@ -891,7 +891,8 @@ public class DeviceIdleController extends SystemService "mms_temp_app_whitelist_duration"; private static final String KEY_SMS_TEMP_APP_WHITELIST_DURATION = "sms_temp_app_whitelist_duration"; - private static final String KEY_NOTIFICATION_WHITELIST_DURATION = + // TODO(b/124466289): update value to match the name + private static final String KEY_NOTIFICATION_ALLOWLIST_DURATION = "notification_whitelist_duration"; /** * Whether to wait for the user to unlock the device before causing screen-on to @@ -1125,9 +1126,9 @@ 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 Settings.Global#DEVICE_IDLE_CONSTANTS - * @see #KEY_NOTIFICATION_WHITELIST_DURATION + * @see #NOTIFICATION_ALLOWLIST_DURATION */ - public long NOTIFICATION_WHITELIST_DURATION; + public long NOTIFICATION_ALLOWLIST_DURATION; /** * Pre idle time factor use to make idle delay longer @@ -1231,8 +1232,8 @@ public class DeviceIdleController extends SystemService KEY_MMS_TEMP_APP_WHITELIST_DURATION, 60 * 1000L); SMS_TEMP_APP_WHITELIST_DURATION = mParser.getDurationMillis( KEY_SMS_TEMP_APP_WHITELIST_DURATION, 20 * 1000L); - NOTIFICATION_WHITELIST_DURATION = mParser.getDurationMillis( - KEY_NOTIFICATION_WHITELIST_DURATION, 30 * 1000L); + NOTIFICATION_ALLOWLIST_DURATION = mParser.getDurationMillis( + KEY_NOTIFICATION_ALLOWLIST_DURATION, 30 * 1000L); WAIT_FOR_UNLOCK = mParser.getBoolean(KEY_WAIT_FOR_UNLOCK, true); PRE_IDLE_FACTOR_LONG = mParser.getFloat(KEY_PRE_IDLE_FACTOR_LONG, 1.67f); PRE_IDLE_FACTOR_SHORT = mParser.getFloat(KEY_PRE_IDLE_FACTOR_SHORT, 0.33f); @@ -1344,8 +1345,8 @@ public class DeviceIdleController extends SystemService TimeUtils.formatDuration(SMS_TEMP_APP_WHITELIST_DURATION, pw); pw.println(); - pw.print(" "); pw.print(KEY_NOTIFICATION_WHITELIST_DURATION); pw.print("="); - TimeUtils.formatDuration(NOTIFICATION_WHITELIST_DURATION, pw); + pw.print(" "); pw.print(KEY_NOTIFICATION_ALLOWLIST_DURATION); pw.print("="); + TimeUtils.formatDuration(NOTIFICATION_ALLOWLIST_DURATION, pw); pw.println(); pw.print(" "); pw.print(KEY_WAIT_FOR_UNLOCK); pw.print("="); @@ -1790,8 +1791,8 @@ public class DeviceIdleController extends SystemService // duration in milliseconds @Override - public long getNotificationWhitelistDuration() { - return mConstants.NOTIFICATION_WHITELIST_DURATION; + public long getNotificationAllowlistDuration() { + return mConstants.NOTIFICATION_ALLOWLIST_DURATION; } @Override |