diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2020-09-14 21:27:14 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-09-14 21:27:14 +0000 |
commit | 1d3e694b97b107e6dfbb92395cc041839c4e14b7 (patch) | |
tree | bca3cc4358a97b0d04cfa2597d96df0db44de9a6 /apex | |
parent | 584c1588a6ffad6fee3cf78198c1312ebd33309d (diff) | |
parent | 3563eeb4ae49b6bab9be63f311a70058158082d2 (diff) |
Merge "Replace 'whitelist' with 'allowlist'" am: 8ac6819c0e am: 3563eeb4ae
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1427048
Change-Id: I70eb21c1ea9411974a1c07f6aaaf611760110c34
Diffstat (limited to 'apex')
-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 |