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