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 26 // Flags related to NotificationAssistant 27 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 50 /** 51 * Whether the Notification Assistant can change ranking. 52 */ 53 public static final String ENABLE_NAS_RANKING = "enable_nas_ranking"; 54 55 /** 56 * Whether the Notification Assistant can prioritize notification. 57 */ 58 public static final String ENABLE_NAS_PRIORITIZER = "enable_nas_prioritizer"; 59 60 /** 61 * Whether to enable feedback UI for Notification Assistant 62 */ 63 public static final String ENABLE_NAS_FEEDBACK = "enable_nas_feedback"; 64 65 /** 66 * Whether the Notification Assistant can label a notification not a conversation 67 */ 68 public static final String ENABLE_NAS_NOT_CONVERSATION = "enable_nas_not_conversation"; 69 70 // Flags related to screenshot intelligence 71 72 /** 73 * (bool) Whether to enable smart actions in screenshot notifications. 74 */ 75 public static final String ENABLE_SCREENSHOT_NOTIFICATION_SMART_ACTIONS = 76 "enable_screenshot_notification_smart_actions"; 77 78 /** 79 * (int) Timeout value in ms to get smart actions for screenshot notification. 80 */ 81 public static final String SCREENSHOT_NOTIFICATION_SMART_ACTIONS_TIMEOUT_MS = 82 "screenshot_notification_smart_actions_timeout_ms"; 83 84 /** 85 * (int) Timeout value in ms to get Quick Share actions for screenshot notification. 86 */ 87 public static final String SCREENSHOT_NOTIFICATION_QUICK_SHARE_ACTIONS_TIMEOUT_MS = 88 "screenshot_notification_quick_share_actions_timeout_ms"; 89 90 // Flags related to Smart Suggestions - these are read in SmartReplyConstants. 91 92 /** (boolean) Whether to enable smart suggestions in notifications. */ 93 public static final String SSIN_ENABLED = "ssin_enabled"; 94 95 /** 96 * (boolean) Whether apps need to target at least P to provide their own smart replies (this 97 * doesn't apply to actions!). 98 */ 99 public static final String SSIN_REQUIRES_TARGETING_P = "ssin_requires_targeting_p"; 100 101 /** 102 * (int) The number of times we'll try to find a better line-break for double-line smart 103 * suggestion buttons. 104 */ 105 public static final String SSIN_MAX_SQUEEZE_REMEASURE_ATTEMPTS = 106 "ssin_max_squeeze_remeasure_attempts"; 107 108 /** (boolean) Whether to let the user edit smart replies before sending. */ 109 public static final String SSIN_EDIT_CHOICES_BEFORE_SENDING = 110 "ssin_edit_choices_before_sending"; 111 112 /** (boolean) Whether smart suggestions should be enabled in heads-up notifications. */ 113 public static final String SSIN_SHOW_IN_HEADS_UP = "ssin_show_in_heads_up"; 114 115 /** (int) Minimum number of system generated replies to show in a notification. */ 116 public static final String SSIN_MIN_NUM_SYSTEM_GENERATED_REPLIES = 117 "ssin_min_num_system_generated_replies"; 118 119 /** 120 * (int) Maximum number of actions to show in a notification, -1 if there shouldn't be a limit 121 */ 122 public static final String SSIN_MAX_NUM_ACTIONS = "ssin_max_num_actions"; 123 124 /** 125 * (int) The amount of time (ms) before smart suggestions are clickable, since the suggestions 126 * were added. 127 */ 128 public static final String SSIN_ONCLICK_INIT_DELAY = "ssin_onclick_init_delay"; 129 130 /** 131 * The default component of 132 * {@link android.service.notification.NotificationAssistantService}. 133 */ 134 public static final String NAS_DEFAULT_SERVICE = "nas_default_service"; 135 136 // Flags related to media notifications 137 138 /** 139 * (int) Maximum number of days to retain the salt for hashing direct share targets in logging 140 */ 141 public static final String HASH_SALT_MAX_DAYS = "hash_salt_max_days"; 142 143 // Flag related to Privacy Indicators 144 145 /** 146 * Whether to show the complete ongoing app ops chip. 147 */ 148 public static final String PROPERTY_PERMISSIONS_HUB_ENABLED = "permissions_hub_2_enabled"; 149 150 /** 151 * Whether to show app ops chip for just microphone + camera. 152 */ 153 public static final String PROPERTY_MIC_CAMERA_ENABLED = "camera_mic_icons_enabled"; 154 155 /** 156 * Whether to show app ops chip for location. 157 */ 158 public static final String PROPERTY_LOCATION_INDICATORS_ENABLED = "location_indicators_enabled"; 159 160 // Flags related to Assistant 161 162 /** 163 * (String) Which behavior mode for the Assistant Handles to use. 164 */ 165 public static final String ASSIST_HANDLES_BEHAVIOR_MODE = "assist_handles_behavior_mode"; 166 167 /** 168 * (long) How long, in milliseconds, to display Assist Handles when showing them temporarily. 169 */ 170 public static final String ASSIST_HANDLES_SHOW_AND_GO_DURATION_MS = 171 "assist_handles_show_and_go_duration_ms"; 172 173 /** 174 * (long) How long, in milliseconds, to wait before showing the Assist Handles temporarily when 175 * performing a short delayed show. 176 */ 177 public static final String ASSIST_HANDLES_SHOW_AND_GO_DELAYED_SHORT_DELAY_MS = 178 "assist_handles_show_and_go_delayed_short_delay_ms"; 179 180 /** 181 * (long) How long, in milliseconds, to wait before showing the Assist Handles temporarily when 182 * performing a long delayed show. 183 */ 184 public static final String ASSIST_HANDLES_SHOW_AND_GO_DELAYED_LONG_DELAY_MS = 185 "assist_handles_show_and_go_delayed_long_delay_ms"; 186 187 /** 188 * (long) How long, in milliseconds, to wait before resetting delayed show delay times. 189 */ 190 public static final String ASSIST_HANDLES_SHOW_AND_GO_DELAY_RESET_TIMEOUT_MS = 191 "assist_handles_show_and_go_delay_reset_timeout_ms"; 192 193 /** 194 * (long) How long, in milliseconds, to wait before displaying Assist Handles temporarily after 195 * hiding them. 196 */ 197 public static final String ASSIST_HANDLES_SHOWN_FREQUENCY_THRESHOLD_MS = 198 "assist_handles_shown_frequency_threshold_ms"; 199 200 /** 201 * (long) How long, in milliseconds, for teaching behaviors to wait before considering the user 202 * taught. 203 */ 204 public static final String ASSIST_HANDLES_LEARN_TIME_MS = "assist_handles_learn_time_ms"; 205 206 /** 207 * (int) How many times for teaching behaviors to see the user perform an action to consider it 208 * taught. 209 */ 210 public static final String ASSIST_HANDLES_LEARN_COUNT = "assist_handles_learn_count"; 211 212 /** 213 * (bool) Whether to suppress handles on lockscreen." 214 */ 215 public static final String ASSIST_HANDLES_SUPPRESS_ON_LOCKSCREEN = 216 "assist_handles_suppress_on_lockscreen"; 217 218 /** 219 * (bool) Whether to suppress handles on launcher." 220 */ 221 public static final String ASSIST_HANDLES_SUPPRESS_ON_LAUNCHER = 222 "assist_handles_suppress_on_launcher"; 223 224 /** 225 * (bool) Whether to suppress handles on apps." 226 */ 227 public static final String ASSIST_HANDLES_SUPPRESS_ON_APPS = 228 "assist_handles_suppress_on_apps"; 229 230 /** 231 * Allow touch passthrough above assist area during a session. 232 */ 233 public static final String ASSIST_TAP_PASSTHROUGH = "assist_tap_passthrough"; 234 235 /** 236 * (bool) Whether to show handles when taught. 237 */ 238 public static final String ASSIST_HANDLES_SHOW_WHEN_TAUGHT = "assist_handles_show_when_taught"; 239 240 /** 241 * (long) Duration per pixel, in milliseconds, of scrolling text at fast speed. 242 */ 243 public static final String ASSIST_TRANSCRIPTION_DURATION_PER_PX_FAST = 244 "assist_transcription_duration_per_px_fast"; 245 246 /** 247 * (long) Duration per pixel, in milliseconds, of scrolling text at regular speed. 248 */ 249 public static final String ASSIST_TRANSCRIPTION_DURATION_PER_PX_REGULAR = 250 "assist_transcription_duration_per_px_regular"; 251 252 /** 253 * (long) Duration, in milliseconds, over which text fades in. 254 */ 255 public static final String ASSIST_TRANSCRIPTION_FADE_IN_DURATION = 256 "assist_transcription_fade_in_duration"; 257 258 /** 259 * (long) Maximum total duration, in milliseconds, for a given transcription. 260 */ 261 public static final String ASSIST_TRANSCRIPTION_MAX_DURATION = 262 "assist_transcription_max_duration"; 263 264 /** 265 * (long) Minimum total duration, in milliseconds, for a given transcription. 266 */ 267 public static final String ASSIST_TRANSCRIPTION_MIN_DURATION = 268 "assist_transcription_min_duration"; 269 270 /** 271 * (boolean) Whether or not to enable an extra section in the notification shade which 272 * filters for "people" related messages. 273 */ 274 public static final String NOTIFICATIONS_USE_PEOPLE_FILTERING = 275 "notifications_use_people_filtering"; 276 277 /** 278 * (boolean) Whether or not to enable user dismissing of foreground service notifications 279 * into a new section at the bottom of the notification shade. 280 */ 281 public static final String NOTIFICATIONS_ALLOW_FGS_DISMISSAL = 282 "notifications_allow_fgs_dismissal"; 283 284 // Flags related to brightline falsing 285 286 /** 287 * (bool) Whether to use the new BrightLineFalsingManager. 288 */ 289 public static final String BRIGHTLINE_FALSING_MANAGER_ENABLED = 290 "brightline_falsing_manager_enabled"; 291 /** 292 * (float) Maximum fraction of the screen required to qualify as a real swipe. 293 */ 294 public static final String BRIGHTLINE_FALSING_DISTANCE_SCREEN_FRACTION_MAX_DISTANCE = 295 "brightline_falsing_distance_screen_fraction_max_distance"; 296 297 /** 298 * (float) Multiplier for swipe velocity to convert it to pixels for a fling. 299 */ 300 public static final String BRIGHTLINE_FALSING_DISTANCE_VELOCITY_TO_DISTANCE = 301 "brightline_falsing_distance_velcoity_to_distance"; 302 303 /** 304 * (float) How far, in inches, must a fling travel horizontally to qualify as intentional. 305 */ 306 public static final String BRIGHTLINE_FALSING_DISTANCE_HORIZONTAL_FLING_THRESHOLD_IN = 307 "brightline_falsing_distance_horizontal_fling_threshold_in"; 308 309 /** 310 * (float) Maximum fraction of the screen required to qualify as a real swipe. 311 */ 312 public static final String BRIGHTLINE_FALSING_DISTANCE_VERTICAL_FLING_THRESHOLD_IN = 313 "brightline_falsing_distance_vertical_fling_threshold_in"; 314 315 /** 316 * (float) How far, in inches, must a continuous swipe travel horizontally to be intentional. 317 */ 318 public static final String BRIGHTLINE_FALSING_DISTANCE_HORIZONTAL_SWIPE_THRESHOLD_IN = 319 "brightline_falsing_distance_horizontal_swipe_threshold_in"; 320 321 /** 322 * (float) How far, in inches, must a continuous swipe travel vertically to be intentional. 323 */ 324 public static final String BRIGHTLINE_FALSING_DISTANCE_VERTICAL_SWIPE_THRESHOLD_IN = 325 "brightline_falsing_distance_horizontal_swipe_threshold_in"; 326 327 /** 328 * (float) Percentage of swipe with the proximity sensor covered that triggers a higher 329 * swipe distance requirement. 330 */ 331 public static final String BRIGHTLINE_FALSING_PROXIMITY_PERCENT_COVERED_THRESHOLD = 332 "brightline_falsing_proximity_percent_covered_threshold"; 333 334 /** 335 * (float) Angle, in radians, that a swipe can vary from horizontal and sill be intentional. 336 */ 337 public static final String BRIGHTLINE_FALSING_DIAGONAL_HORIZONTAL_ANGLE_RANGE = 338 "brightline_falsing_diagonal_horizontal_angle_range"; 339 340 /** 341 * (float) Angle, in radians, that a swipe can vary from vertical and sill be intentional. 342 */ 343 public static final String BRIGHTLINE_FALSING_DIAGONAL_VERTICAL_ANGLE_RANGE = 344 "brightline_falsing_diagonal_horizontal_angle_range"; 345 346 /** 347 * (float) Distance, in inches, that a swipe is allowed to vary in the horizontal direction for 348 * horizontal swipes. 349 */ 350 public static final String BRIGHTLINE_FALSING_ZIGZAG_X_PRIMARY_DEVIANCE = 351 "brightline_falsing_zigzag_x_primary_deviance"; 352 353 /** 354 * (float) Distance, in inches, that a swipe is allowed to vary in the vertical direction for 355 * vertical swipes. 356 */ 357 public static final String BRIGHTLINE_FALSING_ZIGZAG_Y_PRIMARY_DEVIANCE = 358 "brightline_falsing_zigzag_y_primary_deviance"; 359 360 /** 361 * (float) Distance, in inches, that a swipe is allowed to vary in the horizontal direction for 362 * horizontal swipes. 363 */ 364 public static final String BRIGHTLINE_FALSING_ZIGZAG_X_SECONDARY_DEVIANCE = 365 "brightline_falsing_zigzag_x_secondary_deviance"; 366 367 /** 368 * (float) Distance, in inches, that a swipe is allowed to vary in the vertical direction for 369 * vertical swipes. 370 */ 371 public static final String BRIGHTLINE_FALSING_ZIGZAG_Y_SECONDARY_DEVIANCE = 372 "brightline_falsing_zigzag_y_secondary_deviance"; 373 374 375 // Flags related to screenshots 376 377 /** 378 * (boolean) Whether screenshot flow going to the corner (instead of shown in a notification) 379 * is enabled. 380 */ 381 public static final String SCREENSHOT_CORNER_FLOW = "enable_screenshot_corner_flow"; 382 383 // Flags related to Nav Bar 384 385 /** 386 * (boolean) Whether to force the Nav Bar handle to remain opaque. 387 */ 388 public static final String NAV_BAR_HANDLE_FORCE_OPAQUE = "nav_bar_handle_force_opaque"; 389 390 /** 391 * (boolean) Whether to force the Nav Bar handle to remain visible over the lockscreen. 392 */ 393 public static final String NAV_BAR_HANDLE_SHOW_OVER_LOCKSCREEN = 394 "nav_bar_handle_show_over_lockscreen"; 395 396 /** 397 * (int) Timeout threshold, in millisecond, that Sharesheet waits for direct share targets. 398 */ 399 public static final String SHARE_SHEET_DIRECT_SHARE_TIMEOUT = 400 "share_sheet_direct_share_timeout"; 401 402 /** 403 * (boolean) Whether append direct share on Sharesheet is enabled. 404 */ 405 public static final String APPEND_DIRECT_SHARE_ENABLED = "append_direct_share_enabled"; 406 407 /** 408 * (boolean) Whether ChooserTargets ranking on Sharesheet is enabled. 409 */ 410 public static final String CHOOSER_TARGET_RANKING_ENABLED = "chooser_target_ranking_enabled"; 411 412 /** 413 * (boolean) Whether dark launch of remote prediction service is enabled. 414 */ 415 public static final String DARK_LAUNCH_REMOTE_PREDICTION_SERVICE_ENABLED = 416 "dark_launch_remote_prediction_service_enabled"; 417 418 /** 419 * (boolean) Whether to enable pinch resizing for PIP. 420 */ 421 public static final String PIP_PINCH_RESIZE = "pip_pinch_resize"; 422 423 /** 424 * (boolean) Whether to enable stashing for PIP. 425 */ 426 public static final String PIP_STASHING = "pip_stashing"; 427 428 /** 429 * (float) The threshold velocity to cause PiP to be stashed when flinging from one edge to the 430 * other. 431 */ 432 public static final String PIP_STASH_MINIMUM_VELOCITY_THRESHOLD = "pip_velocity_threshold"; 433 434 /** 435 * (float) Bottom height in DP for Back Gesture. 436 */ 437 public static final String BACK_GESTURE_BOTTOM_HEIGHT = "back_gesture_bottom_height"; 438 439 /** 440 * (float) Edge width in DP where touch down is allowed for Back Gesture. 441 */ 442 public static final String BACK_GESTURE_EDGE_WIDTH = "back_gesture_edge_width"; 443 444 /** 445 * (float) Slop multiplier for Back Gesture. 446 */ 447 public static final String BACK_GESTURE_SLOP_MULTIPLIER = "back_gesture_slop_multiplier"; 448 449 /** 450 * (long) Screenshot keychord delay (how long the buttons must be pressed), in ms 451 */ 452 public static final String SCREENSHOT_KEYCHORD_DELAY = "screenshot_keychord_delay"; 453 454 /** 455 * (boolean) Whether to use an ML model for the Back Gesture. 456 */ 457 public static final String USE_BACK_GESTURE_ML_MODEL = "use_back_gesture_ml_model"; 458 459 /** 460 * (string) The name of the ML model for Back Gesture. 461 */ 462 public static final String BACK_GESTURE_ML_MODEL_NAME = "back_gesture_ml_model_name"; 463 464 /** 465 * (float) Threshold for Back Gesture ML model prediction. 466 */ 467 public static final String BACK_GESTURE_ML_MODEL_THRESHOLD = "back_gesture_ml_model_threshold"; 468 469 /** 470 * (boolean) Sharesheet - Whether to use the deprecated 471 * {@link android.service.chooser.ChooserTargetService} API for 472 * direct share targets. If true, both CTS and Shortcuts will be used to find Direct 473 * Share targets. If false, only Shortcuts will be used. 474 */ 475 public static final String SHARE_USE_SERVICE_TARGETS = "share_use_service_targets"; 476 477 /** 478 * (boolean) If true, SysUI provides guardrails for app usage of Direct Share by enforcing 479 * limits on number of targets per app & adjusting scores for apps providing many targets. If 480 * false, this step is skipped. This should be true unless the ranking provider configured by 481 * [some other flag] is expected to manage these incentives. 482 */ 483 public static final String APPLY_SHARING_APP_LIMITS_IN_SYSUI = 484 "apply_sharing_app_limits_in_sysui"; 485 486 /* 487 * (long) The duration that the home button must be pressed before triggering Assist 488 */ 489 public static final String HOME_BUTTON_LONG_PRESS_DURATION_MS = 490 "home_button_long_press_duration_ms"; 491 492 /** 493 * (boolean) Whether shortcut integration over app search service is enabled. 494 */ 495 public static final String SHORTCUT_APPSEARCH_INTEGRATION = 496 "shortcut_appsearch_integration"; 497 SystemUiDeviceConfigFlags()498 private SystemUiDeviceConfigFlags() { 499 } 500 } 501