• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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     /**
161      * Whether to show privacy chip for media projection.
162      */
163     public static final String PROPERTY_MEDIA_PROJECTION_INDICATORS_ENABLED =
164             "media_projection_indicators_enabled";
165 
166     /**
167      * Whether to show old location indicator on all location accesses.
168      */
169     public static final String PROPERTY_LOCATION_INDICATORS_SMALL_ENABLED =
170             "location_indicators_small_enabled";
171 
172     /**
173      * Whether to show the location indicator for system apps.
174      */
175     public static final String PROPERTY_LOCATION_INDICATORS_SHOW_SYSTEM =
176             "location_indicators_show_system";
177 
178     // Flags related to Assistant
179 
180     /**
181      * (String) Which behavior mode for the Assistant Handles to use.
182      */
183     public static final String ASSIST_HANDLES_BEHAVIOR_MODE = "assist_handles_behavior_mode";
184 
185     /**
186      * (long) How long, in milliseconds, to display Assist Handles when showing them temporarily.
187      */
188     public static final String ASSIST_HANDLES_SHOW_AND_GO_DURATION_MS =
189             "assist_handles_show_and_go_duration_ms";
190 
191     /**
192      * (long) How long, in milliseconds, to wait before showing the Assist Handles temporarily when
193      * performing a short delayed show.
194      */
195     public static final String ASSIST_HANDLES_SHOW_AND_GO_DELAYED_SHORT_DELAY_MS =
196             "assist_handles_show_and_go_delayed_short_delay_ms";
197 
198     /**
199      * (long) How long, in milliseconds, to wait before showing the Assist Handles temporarily when
200      * performing a long delayed show.
201      */
202     public static final String ASSIST_HANDLES_SHOW_AND_GO_DELAYED_LONG_DELAY_MS =
203             "assist_handles_show_and_go_delayed_long_delay_ms";
204 
205     /**
206      * (long) How long, in milliseconds, to wait before resetting delayed show delay times.
207      */
208     public static final String ASSIST_HANDLES_SHOW_AND_GO_DELAY_RESET_TIMEOUT_MS =
209             "assist_handles_show_and_go_delay_reset_timeout_ms";
210 
211     /**
212      * (long) How long, in milliseconds, to wait before displaying Assist Handles temporarily after
213      * hiding them.
214      */
215     public static final String ASSIST_HANDLES_SHOWN_FREQUENCY_THRESHOLD_MS =
216             "assist_handles_shown_frequency_threshold_ms";
217 
218     /**
219      * (long) How long, in milliseconds, for teaching behaviors to wait before considering the user
220      * taught.
221      */
222     public static final String ASSIST_HANDLES_LEARN_TIME_MS = "assist_handles_learn_time_ms";
223 
224     /**
225      * (int) How many times for teaching behaviors to see the user perform an action to consider it
226      * taught.
227      */
228     public static final String ASSIST_HANDLES_LEARN_COUNT = "assist_handles_learn_count";
229 
230     /**
231      * (bool) Whether to suppress handles on lockscreen."
232      */
233     public static final String ASSIST_HANDLES_SUPPRESS_ON_LOCKSCREEN =
234             "assist_handles_suppress_on_lockscreen";
235 
236     /**
237      * (bool) Whether to suppress handles on launcher."
238      */
239     public static final String ASSIST_HANDLES_SUPPRESS_ON_LAUNCHER =
240             "assist_handles_suppress_on_launcher";
241 
242     /**
243      * (bool) Whether to suppress handles on apps."
244      */
245     public static final String ASSIST_HANDLES_SUPPRESS_ON_APPS =
246             "assist_handles_suppress_on_apps";
247 
248     /**
249      * Allow touch passthrough above assist area during a session.
250      */
251     public static final String ASSIST_TAP_PASSTHROUGH = "assist_tap_passthrough";
252 
253     /**
254      * (bool) Whether to show handles when taught.
255      */
256     public static final String ASSIST_HANDLES_SHOW_WHEN_TAUGHT = "assist_handles_show_when_taught";
257 
258     /**
259      * (long) Duration per pixel, in milliseconds, of scrolling text at fast speed.
260      */
261     public static final String ASSIST_TRANSCRIPTION_DURATION_PER_PX_FAST =
262             "assist_transcription_duration_per_px_fast";
263 
264     /**
265      * (long) Duration per pixel, in milliseconds, of scrolling text at regular speed.
266      */
267     public static final String ASSIST_TRANSCRIPTION_DURATION_PER_PX_REGULAR =
268             "assist_transcription_duration_per_px_regular";
269 
270     /**
271      * (long) Duration, in milliseconds, over which text fades in.
272      */
273     public static final String ASSIST_TRANSCRIPTION_FADE_IN_DURATION =
274             "assist_transcription_fade_in_duration";
275 
276     /**
277      * (long) Maximum total duration, in milliseconds, for a given transcription.
278      */
279     public static final String ASSIST_TRANSCRIPTION_MAX_DURATION =
280             "assist_transcription_max_duration";
281 
282     /**
283      * (long) Minimum total duration, in milliseconds, for a given transcription.
284      */
285     public static final String ASSIST_TRANSCRIPTION_MIN_DURATION =
286             "assist_transcription_min_duration";
287 
288     /**
289      * (boolean) Whether or not to enable an extra section in the notification shade which
290      * filters for "people" related messages.
291      */
292     public static final String NOTIFICATIONS_USE_PEOPLE_FILTERING =
293             "notifications_use_people_filtering";
294 
295     /**
296      * (boolean) Whether or not to enable user dismissing of foreground service notifications
297      * into a new section at the bottom of the notification shade.
298      */
299     public static final String NOTIFICATIONS_ALLOW_FGS_DISMISSAL =
300             "notifications_allow_fgs_dismissal";
301 
302     // Flags related to brightline falsing
303 
304     /**
305      * (bool) Whether to use the new BrightLineFalsingManager.
306      */
307     public static final String BRIGHTLINE_FALSING_MANAGER_ENABLED =
308             "brightline_falsing_manager_enabled";
309     /**
310      * (float) Maximum fraction of the screen required to qualify as a real swipe.
311      */
312     public static final String BRIGHTLINE_FALSING_DISTANCE_SCREEN_FRACTION_MAX_DISTANCE =
313             "brightline_falsing_distance_screen_fraction_max_distance";
314 
315     /**
316      * (float) Multiplier for swipe velocity to convert it to pixels for a fling.
317      */
318     public static final String BRIGHTLINE_FALSING_DISTANCE_VELOCITY_TO_DISTANCE =
319             "brightline_falsing_distance_velcoity_to_distance";
320 
321     /**
322      * (float) How far, in inches, must a fling travel horizontally to qualify as intentional.
323      */
324     public static final String BRIGHTLINE_FALSING_DISTANCE_HORIZONTAL_FLING_THRESHOLD_IN =
325             "brightline_falsing_distance_horizontal_fling_threshold_in";
326 
327     /**
328      * (float) Maximum fraction of the screen required to qualify as a real swipe.
329      */
330     public static final String BRIGHTLINE_FALSING_DISTANCE_VERTICAL_FLING_THRESHOLD_IN =
331             "brightline_falsing_distance_vertical_fling_threshold_in";
332 
333     /**
334      * (float) How far, in inches, must a continuous swipe travel horizontally to be intentional.
335      */
336     public static final String BRIGHTLINE_FALSING_DISTANCE_HORIZONTAL_SWIPE_THRESHOLD_IN =
337             "brightline_falsing_distance_horizontal_swipe_threshold_in";
338 
339     /**
340      * (float) How far, in inches, must a continuous swipe travel vertically to be intentional.
341      */
342     public static final String BRIGHTLINE_FALSING_DISTANCE_VERTICAL_SWIPE_THRESHOLD_IN =
343             "brightline_falsing_distance_horizontal_swipe_threshold_in";
344 
345     /**
346      * (float) Percentage of swipe with the proximity sensor covered that triggers a higher
347      * swipe distance requirement.
348      */
349     public static final String BRIGHTLINE_FALSING_PROXIMITY_PERCENT_COVERED_THRESHOLD =
350             "brightline_falsing_proximity_percent_covered_threshold";
351 
352     /**
353      * (float) Angle, in radians, that a swipe can vary from horizontal and sill be intentional.
354      */
355     public static final String BRIGHTLINE_FALSING_DIAGONAL_HORIZONTAL_ANGLE_RANGE =
356             "brightline_falsing_diagonal_horizontal_angle_range";
357 
358     /**
359      * (float) Angle, in radians, that a swipe can vary from vertical and sill be intentional.
360      */
361     public static final String BRIGHTLINE_FALSING_DIAGONAL_VERTICAL_ANGLE_RANGE =
362             "brightline_falsing_diagonal_horizontal_angle_range";
363 
364     /**
365      * (float) Distance, in inches, that a swipe is allowed to vary in the horizontal direction for
366      * horizontal swipes.
367      */
368     public static final String BRIGHTLINE_FALSING_ZIGZAG_X_PRIMARY_DEVIANCE =
369             "brightline_falsing_zigzag_x_primary_deviance";
370 
371     /**
372      * (float) Distance, in inches, that a swipe is allowed to vary in the vertical direction for
373      * vertical swipes.
374      */
375     public static final String BRIGHTLINE_FALSING_ZIGZAG_Y_PRIMARY_DEVIANCE =
376             "brightline_falsing_zigzag_y_primary_deviance";
377 
378     /**
379      * (float) Distance, in inches, that a swipe is allowed to vary in the horizontal direction for
380      * horizontal swipes.
381      */
382     public static final String BRIGHTLINE_FALSING_ZIGZAG_X_SECONDARY_DEVIANCE =
383             "brightline_falsing_zigzag_x_secondary_deviance";
384 
385     /**
386      * (float) Distance, in inches, that a swipe is allowed to vary in the vertical direction for
387      * vertical swipes.
388      */
389     public static final String BRIGHTLINE_FALSING_ZIGZAG_Y_SECONDARY_DEVIANCE =
390             "brightline_falsing_zigzag_y_secondary_deviance";
391 
392 
393     // Flags related to screenshots
394 
395     /**
396      * (boolean) Whether screenshot flow going to the corner (instead of shown in a notification)
397      * is enabled.
398      */
399     public static final String SCREENSHOT_CORNER_FLOW = "enable_screenshot_corner_flow";
400 
401     // Flags related to Nav Bar
402 
403     /**
404      * (boolean) Whether to force the Nav Bar handle to remain opaque.
405      */
406     public static final String NAV_BAR_HANDLE_FORCE_OPAQUE = "nav_bar_handle_force_opaque";
407 
408     /**
409      * (boolean) Whether to force the Nav Bar handle to remain visible over the lockscreen.
410      */
411     public static final String NAV_BAR_HANDLE_SHOW_OVER_LOCKSCREEN =
412             "nav_bar_handle_show_over_lockscreen";
413 
414     /**
415      * (int) Timeout threshold, in millisecond, that Sharesheet waits for direct share targets.
416      */
417     public static final String SHARE_SHEET_DIRECT_SHARE_TIMEOUT =
418             "share_sheet_direct_share_timeout";
419 
420     /**
421      * (boolean) Whether append direct share on Sharesheet is enabled.
422      */
423     public static final String APPEND_DIRECT_SHARE_ENABLED = "append_direct_share_enabled";
424 
425     /**
426      * (boolean) Whether ChooserTargets ranking on Sharesheet is enabled.
427      */
428     public static final String CHOOSER_TARGET_RANKING_ENABLED = "chooser_target_ranking_enabled";
429 
430     /**
431      * (boolean) Whether dark launch of remote prediction service is enabled.
432      */
433     public static final String DARK_LAUNCH_REMOTE_PREDICTION_SERVICE_ENABLED =
434             "dark_launch_remote_prediction_service_enabled";
435 
436     /**
437      * (boolean) Whether to enable pinch resizing for PIP.
438      */
439     public static final String PIP_PINCH_RESIZE = "pip_pinch_resize";
440 
441     /**
442      * (boolean) Whether to enable stashing for PIP.
443      */
444     public static final String PIP_STASHING = "pip_stashing";
445 
446     /**
447      * (float) The threshold velocity to cause PiP to be stashed when flinging from one edge to the
448      * other.
449      */
450     public static final String PIP_STASH_MINIMUM_VELOCITY_THRESHOLD = "pip_velocity_threshold";
451 
452     /**
453      * (float) Bottom height in DP for Back Gesture.
454      */
455     public static final String BACK_GESTURE_BOTTOM_HEIGHT = "back_gesture_bottom_height";
456 
457     /**
458      * (float) Edge width in DP where touch down is allowed for Back Gesture.
459      */
460     public static final String BACK_GESTURE_EDGE_WIDTH = "back_gesture_edge_width";
461 
462     /**
463      * (float) Slop multiplier for Back Gesture.
464      */
465     public static final String BACK_GESTURE_SLOP_MULTIPLIER = "back_gesture_slop_multiplier";
466 
467     /**
468      * (long) Screenshot keychord delay (how long the buttons must be pressed), in ms
469      */
470     public static final String SCREENSHOT_KEYCHORD_DELAY = "screenshot_keychord_delay";
471 
472     /**
473      * (boolean) Whether to use an ML model for the Back Gesture.
474      */
475     public static final String USE_BACK_GESTURE_ML_MODEL = "use_back_gesture_ml_model";
476 
477     /**
478      * (string) The name of the ML model for Back Gesture.
479      */
480     public static final String BACK_GESTURE_ML_MODEL_NAME = "back_gesture_ml_model_name";
481 
482     /**
483      * (float) Threshold for Back Gesture ML model prediction.
484      */
485     public static final String BACK_GESTURE_ML_MODEL_THRESHOLD = "back_gesture_ml_model_threshold";
486 
487     /**
488      * (boolean) Sharesheet - Whether to use the deprecated
489      * {@link android.service.chooser.ChooserTargetService} API for
490      *  direct share targets. If true, both CTS and Shortcuts will be used to find Direct
491      *  Share targets. If false, only Shortcuts will be used.
492      */
493     public static final String SHARE_USE_SERVICE_TARGETS = "share_use_service_targets";
494 
495     /**
496      * (boolean) If true, SysUI provides guardrails for app usage of Direct Share by enforcing
497      * limits on number of targets per app & adjusting scores for apps providing many targets. If
498      * false, this step is skipped. This should be true unless the ranking provider configured by
499      * [some other flag] is expected to manage these incentives.
500      */
501     public static final String APPLY_SHARING_APP_LIMITS_IN_SYSUI =
502             "apply_sharing_app_limits_in_sysui";
503 
504     /*
505      * (long) The duration that the home button must be pressed before triggering Assist
506      */
507     public static final String HOME_BUTTON_LONG_PRESS_DURATION_MS =
508             "home_button_long_press_duration_ms";
509 
510     /**
511      * (boolean) Whether shortcut integration over app search service is enabled.
512      */
513     public static final String SHORTCUT_APPSEARCH_INTEGRATION =
514             "shortcut_appsearch_integration";
515 
516     /**
517      * (boolean) Whether nearby share should be the first target in ranked apps.
518      */
519     public static final String IS_NEARBY_SHARE_FIRST_TARGET_IN_RANKED_APP =
520             "is_nearby_share_first_target_in_ranked_app";
521 
522     /**
523      * (boolean) Whether to enable the new unbundled sharesheet
524      * (com.android.intentresolver.ChooserActivity).
525      */
526     public static final String USE_UNBUNDLED_SHARESHEET = "use_unbundled_sharesheet";
527 
528     /**
529      * (int) The delay (in ms) before refreshing the Sharesheet UI after a change to the share
530      * target data model. For more info see go/sharesheet-list-view-update-delay.
531      */
532     public static final String SHARESHEET_LIST_VIEW_UPDATE_DELAY =
533             "sharesheet_list_view_update_delay";
534 
535     /**
536      * (string) Name of the default QR code scanner activity. On the eligible devices this activity
537      * is provided by GMS core.
538      */
539     public static final String DEFAULT_QR_CODE_SCANNER = "default_qr_code_scanner";
540 
541     /**
542      * (boolean) Whether the task manager entrypoint is enabled.
543      */
544     public static final String TASK_MANAGER_ENABLED = "task_manager_enabled";
545 
546     /**
547      * (boolean) Whether the task manager should show an attention grabbing dot when tasks changed.
548      */
549     public static final String TASK_MANAGER_SHOW_FOOTER_DOT = "task_manager_show_footer_dot";
550 
551     /**
552      * (boolean) Whether the task manager should show a stop button if the app is allowlisted
553      * by the user.
554      */
555     public static final String TASK_MANAGER_SHOW_STOP_BUTTON_FOR_USER_ALLOWLISTED_APPS =
556             "show_stop_button_for_user_allowlisted_apps";
557 
558     /**
559      * (boolean) Whether the task manager should show apps running user-visible jobs.
560      */
561     public static final String TASK_MANAGER_SHOW_USER_VISIBLE_JOBS =
562             "task_manager_show_user_visible_jobs";
563 
564     /**
565      * (boolean) Whether to show notification volume control slider separate from ring.
566      */
567     public static final String VOLUME_SEPARATE_NOTIFICATION = "volume_separate_notification";
568 
569     /**
570      * (boolean) Whether widget provider info would be saved to / loaded from system persistence
571      * layer as opposed to individual manifests in respective apps.
572      */
573     public static final String PERSISTS_WIDGET_PROVIDER_INFO = "persists_widget_provider_info";
574 
575     /**
576      * (boolean) Whether to show smart chips (based on TextClassifier) in the clipboard overlay.
577      */
578     public static final String CLIPBOARD_OVERLAY_SHOW_ACTIONS = "clipboard_overlay_show_actions";
579 
580     /**
581      * (boolean) Whether to ignore the source package for determining whether to use remote copy
582      * behavior in the clipboard UI.
583      */
584     public static final String CLIPBOARD_IGNORE_REMOTE_COPY_SOURCE =
585             "clipboard_ignore_remote_copy_source";
586 
587     /**
588      * (boolean) Whether to combine the broadcasts APPWIDGET_ENABLED and APPWIDGET_UPDATE
589      */
590     public static final String COMBINED_BROADCAST_ENABLED = "combined_broadcast_enabled";
591 
SystemUiDeviceConfigFlags()592     private SystemUiDeviceConfigFlags() {
593     }
594 }
595