Gustav Sennton | ddd78b2 | 2019-02-18 17:58:12 +0000 | [diff] [blame] | 1 | /** |
| 2 | * Copyright (C) 2019 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package com.android.internal.config.sysui; |
| 18 | |
| 19 | /** |
| 20 | * Keeps the flags related to the SystemUI namespace in {@link DeviceConfig}. |
| 21 | * |
| 22 | * @hide |
| 23 | */ |
| 24 | public final class SystemUiDeviceConfigFlags { |
| 25 | |
Gustav Sennton | 8fa7e95 | 2019-01-29 19:37:00 +0000 | [diff] [blame] | 26 | // Flags related to NotificationAssistant |
| 27 | |
Gustav Sennton | ddd78b2 | 2019-02-18 17:58:12 +0000 | [diff] [blame] | 28 | /** |
| 29 | * Whether the Notification Assistant should generate replies for notifications. |
| 30 | */ |
| 31 | public static final String NAS_GENERATE_REPLIES = "nas_generate_replies"; |
| 32 | |
| 33 | /** |
| 34 | * Whether the Notification Assistant should generate contextual actions for notifications. |
| 35 | */ |
| 36 | public static final String NAS_GENERATE_ACTIONS = "nas_generate_actions"; |
| 37 | |
| 38 | /** |
| 39 | * The maximum number of messages the Notification Assistant should extract from a |
| 40 | * conversation when constructing responses for that conversation. |
| 41 | */ |
| 42 | public static final String NAS_MAX_MESSAGES_TO_EXTRACT = "nas_max_messages_to_extract"; |
| 43 | |
| 44 | /** |
| 45 | * The maximum number of suggestions the Notification Assistant should provide for a |
| 46 | * messaging conversation. |
| 47 | */ |
| 48 | public static final String NAS_MAX_SUGGESTIONS = "nas_max_suggestions"; |
| 49 | |
Gustav Sennton | 8fa7e95 | 2019-01-29 19:37:00 +0000 | [diff] [blame] | 50 | // Flags related to Smart Suggestions - these are read in SmartReplyConstants. |
| 51 | |
| 52 | /** (boolean) Whether to enable smart suggestions in notifications. */ |
| 53 | public static final String SSIN_ENABLED = "ssin_enabled"; |
| 54 | |
| 55 | /** |
| 56 | * (boolean) Whether apps need to target at least P to provide their own smart replies (this |
| 57 | * doesn't apply to actions!). |
| 58 | */ |
| 59 | public static final String SSIN_REQUIRES_TARGETING_P = "ssin_requires_targeting_p"; |
| 60 | |
| 61 | /** |
| 62 | * (int) The number of times we'll try to find a better line-break for double-line smart |
| 63 | * suggestion buttons. |
| 64 | */ |
| 65 | public static final String SSIN_MAX_SQUEEZE_REMEASURE_ATTEMPTS = |
| 66 | "ssin_max_squeeze_remeasure_attempts"; |
| 67 | |
| 68 | /** (boolean) Whether to let the user edit smart replies before sending. */ |
| 69 | public static final String SSIN_EDIT_CHOICES_BEFORE_SENDING = |
| 70 | "ssin_edit_choices_before_sending"; |
| 71 | |
| 72 | /** (boolean) Whether smart suggestions should be enabled in heads-up notifications. */ |
| 73 | public static final String SSIN_SHOW_IN_HEADS_UP = "ssin_show_in_heads_up"; |
| 74 | |
| 75 | /** (int) Minimum number of system generated replies to show in a notification. */ |
| 76 | public static final String SSIN_MIN_NUM_SYSTEM_GENERATED_REPLIES = |
| 77 | "ssin_min_num_system_generated_replies"; |
| 78 | |
| 79 | /** |
| 80 | * (int) Maximum number of actions to show in a notification, -1 if there shouldn't be a limit |
| 81 | */ |
| 82 | public static final String SSIN_MAX_NUM_ACTIONS = "ssin_max_num_actions"; |
| 83 | |
Tony Mak | 9a3c1f1 | 2019-03-04 16:04:42 +0000 | [diff] [blame] | 84 | /** |
Gustav Sennton | 8a52dc3 | 2019-04-15 12:48:23 +0100 | [diff] [blame] | 85 | * (int) The amount of time (ms) before smart suggestions are clickable, since the suggestions |
| 86 | * were added. |
| 87 | */ |
| 88 | public static final String SSIN_ONCLICK_INIT_DELAY = "ssin_onclick_init_delay"; |
| 89 | |
| 90 | /** |
Tony Mak | 9a3c1f1 | 2019-03-04 16:04:42 +0000 | [diff] [blame] | 91 | * The default component of |
| 92 | * {@link android.service.notification.NotificationAssistantService}. |
| 93 | */ |
| 94 | public static final String NAS_DEFAULT_SERVICE = "nas_default_service"; |
| 95 | |
Beth Thibodeau | eab4dde | 2019-02-07 11:37:02 -0500 | [diff] [blame] | 96 | // Flags related to media notifications |
| 97 | |
| 98 | /** |
| 99 | * (boolean) If {@code true}, enables the seekbar in compact media notifications. |
| 100 | */ |
| 101 | public static final String COMPACT_MEDIA_SEEKBAR_ENABLED = |
| 102 | "compact_media_notification_seekbar_enabled"; |
| 103 | |
Susi Kharraz-Post | 14cbfcd | 2019-04-01 11:07:59 -0400 | [diff] [blame] | 104 | /** |
| 105 | * (int) Maximum number of days to retain the salt for hashing direct share targets in logging |
| 106 | */ |
| 107 | public static final String HASH_SALT_MAX_DAYS = "hash_salt_max_days"; |
| 108 | |
Govinda Wasserman | 2c11340 | 2019-05-24 14:11:24 -0400 | [diff] [blame] | 109 | // Flags related to Assistant Handles |
| 110 | |
| 111 | /** |
| 112 | * (String) Which behavior mode for the Assistant Handles to use. |
| 113 | */ |
| 114 | public static final String ASSIST_HANDLES_BEHAVIOR_MODE = "assist_handles_behavior_mode"; |
| 115 | |
| 116 | /** |
| 117 | * (long) How long, in milliseconds, to display Assist Handles when showing them temporarily. |
| 118 | */ |
| 119 | public static final String ASSIST_HANDLES_SHOW_AND_GO_DURATION_MS = |
| 120 | "assist_handles_show_and_go_duration_ms"; |
| 121 | |
| 122 | /** |
Govinda Wasserman | 48cdd68 | 2019-06-04 12:15:23 -0400 | [diff] [blame] | 123 | * (long) How long, in milliseconds, to wait before showing the Assist Handles temporarily when |
| 124 | * performing a short delayed show. |
| 125 | */ |
| 126 | public static final String ASSIST_HANDLES_SHOW_AND_GO_DELAYED_SHORT_DELAY_MS = |
| 127 | "assist_handles_show_and_go_delayed_short_delay_ms"; |
| 128 | |
| 129 | /** |
| 130 | * (long) How long, in milliseconds, to wait before showing the Assist Handles temporarily when |
| 131 | * performing a long delayed show. |
| 132 | */ |
| 133 | public static final String ASSIST_HANDLES_SHOW_AND_GO_DELAYED_LONG_DELAY_MS = |
| 134 | "assist_handles_show_and_go_delayed_long_delay_ms"; |
| 135 | |
| 136 | /** |
| 137 | * (long) How long, in milliseconds, to wait before resetting delayed show delay times. |
| 138 | */ |
| 139 | public static final String ASSIST_HANDLES_SHOW_AND_GO_DELAY_RESET_TIMEOUT_MS = |
| 140 | "assist_handles_show_and_go_delay_reset_timeout_ms"; |
| 141 | |
| 142 | /** |
Govinda Wasserman | 2c11340 | 2019-05-24 14:11:24 -0400 | [diff] [blame] | 143 | * (long) How long, in milliseconds, to wait before displaying Assist Handles temporarily after |
| 144 | * hiding them. |
| 145 | */ |
| 146 | public static final String ASSIST_HANDLES_SHOWN_FREQUENCY_THRESHOLD_MS = |
| 147 | "assist_handles_shown_frequency_threshold_ms"; |
| 148 | |
Govinda Wasserman | 1f606b0 | 2019-05-29 09:16:02 -0400 | [diff] [blame] | 149 | /** |
| 150 | * (long) How long, in milliseconds, for teaching behaviors to wait before considering the user |
| 151 | * taught. |
| 152 | */ |
| 153 | public static final String ASSIST_HANDLES_LEARN_TIME_MS = "assist_handles_learn_time_ms"; |
| 154 | |
| 155 | /** |
| 156 | * (int) How many times for teaching behaviors to see the user perform an action to consider it |
| 157 | * taught. |
| 158 | */ |
| 159 | public static final String ASSIST_HANDLES_LEARN_COUNT = "assist_handles_learn_count"; |
| 160 | |
Govinda Wasserman | 48cdd68 | 2019-06-04 12:15:23 -0400 | [diff] [blame] | 161 | /** |
| 162 | * (bool) Whether to suppress handles on lockscreen." |
| 163 | */ |
| 164 | public static final String ASSIST_HANDLES_SUPPRESS_ON_LOCKSCREEN = |
| 165 | "assist_handles_suppress_on_lockscreen"; |
| 166 | |
| 167 | /** |
| 168 | * (bool) Whether to suppress handles on launcher." |
| 169 | */ |
| 170 | public static final String ASSIST_HANDLES_SUPPRESS_ON_LAUNCHER = |
| 171 | "assist_handles_suppress_on_launcher"; |
| 172 | |
| 173 | /** |
| 174 | * (bool) Whether to suppress handles on apps." |
| 175 | */ |
| 176 | public static final String ASSIST_HANDLES_SUPPRESS_ON_APPS = |
| 177 | "assist_handles_suppress_on_apps"; |
| 178 | |
Gustav Sennton | ddd78b2 | 2019-02-18 17:58:12 +0000 | [diff] [blame] | 179 | private SystemUiDeviceConfigFlags() { } |
| 180 | } |