Remove search result regression test from Settings.
- Move the test to internal app. Bug: 116673764 Test: atest SettingsSearchResultRegressionTest Change-Id: I1d50b896c0f6d7de871f409249b55bc7bfa88f4a
This commit is contained in:
@@ -1,648 +0,0 @@
|
|||||||
1 minute;accessibility_control_timeout_1min
|
|
||||||
10 seconds;accessibility_control_timeout_10secs
|
|
||||||
2 minutes;accessibility_control_timeout_2mins
|
|
||||||
30 seconds;accessibility_control_timeout_30secs
|
|
||||||
4G Calling;4g_calling
|
|
||||||
AP Band;wifi_tether_network_ap_band
|
|
||||||
About phone;my_device_info_pref_screen
|
|
||||||
About phone;top_level_about_device
|
|
||||||
Access Point Names;telephony_apn_key
|
|
||||||
Accessibility;accessibility_settings_screen
|
|
||||||
Accessibility;top_level_accessibility
|
|
||||||
Accessibility usage;privacy_accessibility_usage
|
|
||||||
Accounts;top_level_accounts
|
|
||||||
Accounts;user_and_account_settings_screen
|
|
||||||
Active Edge;gesture_assist_application
|
|
||||||
Active Edge;gesture_assist_input_summary
|
|
||||||
Active Edge;gesture_assist_settings_page
|
|
||||||
Adaptive Battery;smart_battery
|
|
||||||
Adaptive Battery;smart_battery_manager
|
|
||||||
Adaptive Notifications;notification_assistant
|
|
||||||
Adaptive brightness;auto_brightness
|
|
||||||
Adaptive brightness;auto_brightness_entry
|
|
||||||
Adaptive notification priority;asst_capability_prioritizer
|
|
||||||
Add more;add_more
|
|
||||||
Add more;zen_mode_add_automatic_rule
|
|
||||||
Add user or profile;user_add
|
|
||||||
Add users from lock screen;security_lockscreen_add_users_when_locked
|
|
||||||
Add users from lock screen;user_settings_add_users_when_locked
|
|
||||||
Additional system updates;additional_system_update_settings
|
|
||||||
Admin can delete all device data;enterprise_privacy_wipe_device
|
|
||||||
Admin can lock the device and reset password;enterprise_privacy_lock_device
|
|
||||||
Advanced Calling;advance_call
|
|
||||||
Airplane mode;airplane_mode
|
|
||||||
Alarm volume;alarm_volume
|
|
||||||
Allow alarms;zen_mode_alarms
|
|
||||||
Allow apps to override;zen_mode_bypassing_apps
|
|
||||||
Allow calls;zen_mode_calls
|
|
||||||
Allow calls;zen_mode_calls_settings
|
|
||||||
Allow events;zen_mode_events
|
|
||||||
Allow messages;zen_mode_messages
|
|
||||||
Allow messages;zen_mode_messages_settings
|
|
||||||
Allow notification dots;notification_badging
|
|
||||||
Allow notification snoozing;show_snooze_options
|
|
||||||
Allow reminders;zen_mode_reminders
|
|
||||||
Allow repeat callers;zen_mode_repeat_callers
|
|
||||||
Allow touch sounds;zen_mode_system
|
|
||||||
Allow when screen is off;gesture_assist_wake
|
|
||||||
Always on;ambient_display_always_on
|
|
||||||
Always require confirmation;security_settings_face_require_confirmation
|
|
||||||
Always show crash dialog;show_first_crash_dialog
|
|
||||||
Always-on VPN turned on in your work profile;always_on_vpn_managed_profile
|
|
||||||
Ambient EQ;display_white_balance
|
|
||||||
Amount of time and data spent in each app;enterprise_privacy_usage_stats
|
|
||||||
Android Beam;android_beam_settings
|
|
||||||
Android security patch level;security_key
|
|
||||||
Android version;firmware_version
|
|
||||||
Android version;os_firmware_version
|
|
||||||
Animator duration scale;animator_duration_scale
|
|
||||||
App data usage;data_usage_summary
|
|
||||||
App data usage cycle;billing_cycle
|
|
||||||
App exceptions;zen_mode_bypassing_apps_screen
|
|
||||||
App info;all_app_info
|
|
||||||
App permission;app_level_permissions
|
|
||||||
App sign-in & payments;security_settings_face_app
|
|
||||||
Apps & app data;storage_settings_apps_space
|
|
||||||
Apps & notifications;apps_and_notification_screen
|
|
||||||
Apps & notifications;top_level_apps_and_notifs
|
|
||||||
Apps installed;number_enterprise_installed_packages
|
|
||||||
Assist & voice input;manage_assist_screen
|
|
||||||
Assist app;default_assist
|
|
||||||
Audio (music, ringtones, podcasts, etc.);storage_settings_music_space
|
|
||||||
Audio balance;seekbar_master_balance
|
|
||||||
Auto-rotate screen;auto_rotate
|
|
||||||
Auto-rotate screen;toggle_lock_screen_rotation_preference
|
|
||||||
Auto-sync personal data;auto_sync_personal_account_data
|
|
||||||
Auto-sync work data;auto_sync_work_account_data
|
|
||||||
Autofill;debug_autofill_category
|
|
||||||
Autofill service;default_autofill
|
|
||||||
Autofill service;default_autofill_main
|
|
||||||
Autofill service;default_autofill_work
|
|
||||||
Automatic restore;auto_restore
|
|
||||||
Automatic system updates;ota_disable_automatic_update
|
|
||||||
Automatically capture system heap dumps;automatic_system_server_heap_dumps
|
|
||||||
Automatically select network;auto_select_key
|
|
||||||
Automatically sync data;auto_sync_account_data
|
|
||||||
Available;storage_settings_memory_available
|
|
||||||
Back up my data;backup_data
|
|
||||||
Background check;background_check
|
|
||||||
Background process limit;app_process_limit
|
|
||||||
Backup;Backup
|
|
||||||
Backup;privacy_settings_screen
|
|
||||||
Backup account;configure_account
|
|
||||||
Baseband version;base_band
|
|
||||||
Battery;power_usage_summary_screen
|
|
||||||
Battery;top_level_battery
|
|
||||||
Battery Saver;battery_saver
|
|
||||||
Battery Saver;battery_saver_summary
|
|
||||||
Battery optimization;high_power_apps
|
|
||||||
Battery percentage;battery_percentage
|
|
||||||
Battery usage;power_usage_advanced_screen
|
|
||||||
Blink light;notification_pulse
|
|
||||||
Bluetooth;bluetooth_switchbar_screen
|
|
||||||
Bluetooth AVRCP Version;bluetooth_select_avrcp_version
|
|
||||||
Bluetooth Audio Bits Per Sample;bluetooth_select_a2dp_bits_per_sample
|
|
||||||
Bluetooth Audio Channel Mode;bluetooth_select_a2dp_channel_mode
|
|
||||||
Bluetooth Audio Codec;bluetooth_select_a2dp_codec
|
|
||||||
Bluetooth Audio LDAC Codec: Playback Quality;bluetooth_select_a2dp_ldac_playback_quality
|
|
||||||
Bluetooth Audio Sample Rate;bluetooth_select_a2dp_sample_rate
|
|
||||||
Bluetooth address;bt_address
|
|
||||||
Bluetooth scanning;bluetooth_always_scanning
|
|
||||||
Bluetooth tethering;enable_bluetooth_tethering
|
|
||||||
Brightness level;brightness
|
|
||||||
Bubbles;notification_bubbles
|
|
||||||
Bug report;bugreport
|
|
||||||
Bug report shortcut;bugreport_in_power
|
|
||||||
Build number;build_number
|
|
||||||
Build number;os_build_number
|
|
||||||
CA certificate;install_ca_certificate
|
|
||||||
CDMA subscription;cdma_subscription_key
|
|
||||||
Call volume;call_volume
|
|
||||||
Calls;zen_mode_behavior_calls
|
|
||||||
Calls;zen_mode_calls_settings_page
|
|
||||||
Calls preference;calls_preference
|
|
||||||
Camera Laser Sensor;camera_laser_sensor_switch
|
|
||||||
Camera access needed;adaptive_sleep_permission
|
|
||||||
Camera permissions;enterprise_privacy_number_camera_access_packages
|
|
||||||
Caption preferences;captioning_preference_screen
|
|
||||||
Capture system heap dump;system_server_heap_dump
|
|
||||||
Cards & passes;gesture_global_actions_panel_summary
|
|
||||||
Carrier settings;carrier_settings_key
|
|
||||||
Carrier video calling;video_calling_key
|
|
||||||
Cast;wifi_display_settings_screen
|
|
||||||
Cast volume;remote_volume
|
|
||||||
Charging sounds and vibration;charging_sounds
|
|
||||||
Choose network;choose_network_key
|
|
||||||
Clear credentials;credentials_reset
|
|
||||||
Color correction;daltonizer_preference
|
|
||||||
Color correction;daltonizer_preference_screen
|
|
||||||
Color inversion;toggle_inversion_preference
|
|
||||||
Colors;color_mode
|
|
||||||
Colors;color_mode_settings_screen
|
|
||||||
Connect to open networks;use_open_wifi_automatically
|
|
||||||
Connected devices;connected_devices_screen
|
|
||||||
Connected devices;top_level_connected_devices
|
|
||||||
Connection preferences;connected_devices_advanced_screen
|
|
||||||
Connection preferences;connection_preferences
|
|
||||||
Contact search;contacts_search
|
|
||||||
Convert to file encryption;convert_to_file_encryption
|
|
||||||
Cool color temperature;color_temperature
|
|
||||||
Copyright;copyright
|
|
||||||
Correction mode;type
|
|
||||||
Cross-profile calendar;cross_profile_calendar
|
|
||||||
Current screen saver;current_screensaver
|
|
||||||
Custom;zen_custom
|
|
||||||
Custom restrictions;zen_mode_block_settings_page
|
|
||||||
Dark theme;dark_ui_mode
|
|
||||||
Data Saver;data_saver_screen
|
|
||||||
Data Saver;restrict_background_parent_entry
|
|
||||||
Data associated with your work account, such as email and calendar;enterprise_privacy_enterprise_data
|
|
||||||
Data during calls;data_during_calls
|
|
||||||
Data limit;data_limit
|
|
||||||
Data warning;data_warning
|
|
||||||
Data warning & limit;billing_cycle_settings
|
|
||||||
Data warning & limit;billing_preference
|
|
||||||
Date;date
|
|
||||||
Date & time;date_time_settings
|
|
||||||
Date & time;date_time_settings_screen
|
|
||||||
Debug GPU overdraw;debug_hw_overdraw
|
|
||||||
Debug non-rectangular clip operations;show_non_rect_clip
|
|
||||||
Default;accessibility_control_timeout_default
|
|
||||||
Default USB configuration;default_usb_configuration
|
|
||||||
Default alarm sound;alarm_ringtone
|
|
||||||
Default apps;default_apps
|
|
||||||
Default apps;number_enterprise_set_default_apps
|
|
||||||
Default duration;zen_mode_duration_settings
|
|
||||||
Default for work;autofill_work_app_defaults
|
|
||||||
Default keyboard;input_method
|
|
||||||
Default notification sound;notification_default_ringtone
|
|
||||||
Default notification sound;notification_ringtone
|
|
||||||
Default work alarm sound;work_alarm_ringtone
|
|
||||||
Default work notification sound;work_notification_ringtone
|
|
||||||
Delay before click;autoclick_delay
|
|
||||||
Desktop backup password;local_backup_password
|
|
||||||
Developer options;development_prefs_screen
|
|
||||||
Device Wi-Fi MAC address;wifi_mac_address
|
|
||||||
Device admin apps;device_admin_settings
|
|
||||||
Device admin apps;device_administrators
|
|
||||||
Device admin apps;manage_device_admin
|
|
||||||
Device name;device_name
|
|
||||||
Device theme;theme
|
|
||||||
Dial pad tones;dial_pad_tones
|
|
||||||
Disable Bluetooth A2DP hardware offload;bluetooth_disable_a2dp_hw_offload
|
|
||||||
Disable HW overlays;disable_overlays
|
|
||||||
Disable USB audio routing;usb_audio
|
|
||||||
Disable absolute volume;bluetooth_disable_absolute_volume
|
|
||||||
Disabled by admin;backup_inactive
|
|
||||||
Display;display_settings_screen
|
|
||||||
Display;top_level_display
|
|
||||||
Display cutout;display_cutout_emulation
|
|
||||||
Display over other apps;system_alert_window_app_list
|
|
||||||
Display size;screen_zoom_settings
|
|
||||||
Do Not Disturb;zen_mode
|
|
||||||
Do Not Disturb;zen_mode_notifications
|
|
||||||
Do Not Disturb;zen_mode_toggle
|
|
||||||
Do Not Disturb access;zen_access
|
|
||||||
Do Not Disturb access;zen_access_screen
|
|
||||||
Dock speaker plays;dock_audio_media
|
|
||||||
Docking sounds;docking_sounds
|
|
||||||
Don't blink light;zen_effect_light
|
|
||||||
Don't pop notifications on screen;zen_effect_peek
|
|
||||||
Don't turn on screen;zen_effect_intent
|
|
||||||
Don't wake for notifications;zen_effect_ambient
|
|
||||||
Don’t keep activities;immediately_destroy_activities
|
|
||||||
Double twist for camera;camera_gesture
|
|
||||||
Double-tap to check phone;ambient_display_double_tap
|
|
||||||
Double-tap to check phone;gesture_double_tap_screen
|
|
||||||
Double-tap to check phone;gesture_double_tap_screen_input_summary
|
|
||||||
Dwell timing;autoclick_preference
|
|
||||||
Dwell timing;autoclick_preference_screen
|
|
||||||
Emergency alerts;app_and_notif_cell_broadcast_settings
|
|
||||||
Emergency dialing signal;emergency_tone
|
|
||||||
Emergency information;emergency_info
|
|
||||||
Enable Bluetooth HCI snoop log;bt_hci_snoop_log
|
|
||||||
Enable GPU debug layers;enable_gpu_debug_layers
|
|
||||||
Enable Wi-Fi Verbose Logging;wifi_verbose_logging
|
|
||||||
Enable for all apps;graphics_driver_all_apps_preference
|
|
||||||
Enable freeform windows;enable_freeform_support
|
|
||||||
Enable view attribute inspection;debug_view_attributes
|
|
||||||
Encrypt phone;encryption_and_credentials_encryption_status
|
|
||||||
Encryption & credentials;encryption_and_credential
|
|
||||||
Encryption & credentials;encryption_and_credentials_screen
|
|
||||||
End time;night_display_end_time
|
|
||||||
Equipment ID;fcc_equipment_id
|
|
||||||
Erase SIM;erase_sim
|
|
||||||
Erase all data (factory reset);factory_reset
|
|
||||||
Exceptions;zen_mode_sound_vibration_settings_page
|
|
||||||
Face unlock;face_settings
|
|
||||||
Face unlock;face_settings_profile
|
|
||||||
Face unlock;security_settings_face_settings_page
|
|
||||||
Failed password attempts before deleting all device data;failed_password_wipe_current_user
|
|
||||||
Failed password attempts before deleting work profile data;failed_password_wipe_managed_profile
|
|
||||||
Feature flags;feature_flags_settings
|
|
||||||
Files;pref_files
|
|
||||||
Files received via Bluetooth;bt_received_files
|
|
||||||
Flash screen;flash
|
|
||||||
Flashlight;flashlight
|
|
||||||
Flip camera;gesture_double_twist
|
|
||||||
Flip camera;gesture_double_twist_input_summary
|
|
||||||
Font size;font_size
|
|
||||||
Font size;font_size_setting_screen
|
|
||||||
Force 4x MSAA;force_msaa
|
|
||||||
Force RTL layout direction;force_rtl_layout_all_locales
|
|
||||||
Force activities to be resizable;force_resizable_activities
|
|
||||||
Force allow apps on external;force_allow_on_external
|
|
||||||
Force desktop mode;force_desktop_mode_on_external_displays
|
|
||||||
Force full GNSS measurements;enable_gnss_raw_meas_full_tracking
|
|
||||||
Free up space;storage_settings_free_space
|
|
||||||
Graphics Driver Preferences;graphics_driver_settings
|
|
||||||
Games;pref_games
|
|
||||||
Gestures;gesture_settings
|
|
||||||
Gestures;gesture_settings_screen
|
|
||||||
Global HTTP proxy set;global_http_proxy
|
|
||||||
Google Account;branded_account
|
|
||||||
Google Play system update;module_version
|
|
||||||
Google Play system update licenses;module_license
|
|
||||||
HDCP checking;hdcp_checking
|
|
||||||
Hardware version;hardware_info_device_revision
|
|
||||||
Hearing aids;hearing_aid_preference
|
|
||||||
Hide from pull-down shade;zen_effect_list
|
|
||||||
Hide notification dots on app icons;zen_effect_badge
|
|
||||||
Hide status bar icons at top of screen;zen_effect_status
|
|
||||||
High contrast text;toggle_high_text_contrast_preference
|
|
||||||
Hotspot & tethering;tether_prefs_screen
|
|
||||||
Hotspot & tethering;tether_settings
|
|
||||||
Hotspot name;wifi_tether_network_name
|
|
||||||
Hotspot password;wifi_tether_network_password
|
|
||||||
IMEI;imei_info
|
|
||||||
IP address;wifi_ip_address
|
|
||||||
Idle lock screen;aware_presence
|
|
||||||
Idle lock screen;aware_wake_display_page
|
|
||||||
Increase touch sensitivity;touch_sensitivity
|
|
||||||
Install a certificate;install_certificate
|
|
||||||
Install a certificate;install_certificate_from_storage
|
|
||||||
Install certificates;install_credentials
|
|
||||||
Install unknown apps;manage_external_sources
|
|
||||||
Instant Apps preferences;instant_app_web_action_pref
|
|
||||||
Instant apps;instant_app_web_action_toggle
|
|
||||||
Intensity;night_display_temperature
|
|
||||||
Internal shared storage;storage_settings_volume_private
|
|
||||||
Internal storage;storage_settings_internal_storage
|
|
||||||
Jump to camera;gesture_double_tap_power
|
|
||||||
Jump to camera;gesture_double_tap_power_input_summary
|
|
||||||
Kernel version;kernel_version
|
|
||||||
Keyboard shortcuts helper;keyboard_shortcuts_helper
|
|
||||||
Language;tts_default_lang
|
|
||||||
Languages;phone_language
|
|
||||||
Languages & input;language_and_input_settings_screen
|
|
||||||
Languages & input;language_input_settings
|
|
||||||
Large mouse pointer;toggle_large_pointer_icon
|
|
||||||
Last full charge;last_full_charge
|
|
||||||
Legal information;legal_screen
|
|
||||||
License;license
|
|
||||||
Lift to check phone;ambient_display_pick_up
|
|
||||||
Lift to check phone;gesture_pick_up
|
|
||||||
Lift to check phone;gesture_pick_up_input_summary
|
|
||||||
Lift to wake;lift_to_wake
|
|
||||||
List of apps on your device;enterprise_privacy_installed_packages
|
|
||||||
Live Caption;live_caption
|
|
||||||
Local terminal;enable_terminal
|
|
||||||
Location;location_settings
|
|
||||||
Location;top_level_location
|
|
||||||
Location for work profile;managed_profile_location_switch
|
|
||||||
Location permissions;enterprise_privacy_number_location_access_packages
|
|
||||||
Lock after screen timeout;lock_after_timeout
|
|
||||||
Lock device when unpinning;use_screen_lock
|
|
||||||
Lock screen;security_setting_lock_screen_notif
|
|
||||||
Lock screen display;lockscreen_from_display_settings
|
|
||||||
Lock screen display;security_lockscreen_settings_screen
|
|
||||||
Lock screen message;owner_info_settings
|
|
||||||
Logger buffer sizes;select_logd_size
|
|
||||||
Logging level;autofill_logging_level
|
|
||||||
MMS messages;mms_message
|
|
||||||
Magnification;magnification_preference_screen
|
|
||||||
Magnify with shortcut;screen_magnification_navbar_preference_screen
|
|
||||||
Magnify with triple-tap;screen_magnification_gestures_preference_screen
|
|
||||||
Make pattern visible;visiblepattern
|
|
||||||
Make profile pattern visible;visiblepattern_profile
|
|
||||||
Manage backup account;data_management
|
|
||||||
Manage keyboards;add_virtual_keyboard_screen
|
|
||||||
Manage keyboards;available_virtual_keyboard_page
|
|
||||||
Managed device info;enterprise_privacy
|
|
||||||
Managed device info;enterprise_privacy_settings
|
|
||||||
Manual;manual
|
|
||||||
Max requests per session;autofill_max_partitions
|
|
||||||
Max visible datasets;autofill_visible_datasets
|
|
||||||
Maximum connected Bluetooth audio devices;bluetooth_max_connected_audio_devices
|
|
||||||
Media volume;media_volume
|
|
||||||
Memory;memory
|
|
||||||
Microphone permissions;enterprise_privacy_number_microphone_access_packages
|
|
||||||
Mobile data;mobile_data_enable
|
|
||||||
Mobile data always active;mobile_data_always_on
|
|
||||||
Mobile network;mobile_network_list
|
|
||||||
Mobile network;mobile_network_list_screen
|
|
||||||
Mobile plan;manage_mobile_plan
|
|
||||||
Model;hardware_info_device_model
|
|
||||||
Model & hardware;device_model
|
|
||||||
Model & hardware;hardware_info_screen
|
|
||||||
Modify system settings;write_settings_apps
|
|
||||||
Mono audio;toggle_master_mono
|
|
||||||
Most recent bug report;bug_reports
|
|
||||||
Most recent network traffic log;network_logs
|
|
||||||
Most recent security log;security_logs
|
|
||||||
Motion Sense;aware_settings
|
|
||||||
Motion Sense;aware_toggle
|
|
||||||
Movie & TV apps;pref_movies
|
|
||||||
Multiple users;user_settings_screen
|
|
||||||
Music & audio;pref_music_audio
|
|
||||||
NFC;toggle_nfc
|
|
||||||
Network & internet;network_and_internet_screen
|
|
||||||
Network & internet;top_level_network
|
|
||||||
Network name;show_operator_name
|
|
||||||
Network rating provider;network_scorer_picker
|
|
||||||
New notifications;ambient_display_notification
|
|
||||||
Night Light;night_display_activated
|
|
||||||
Night Light tints your screen amber. This makes it easier to look at your screen or read in dim light, and may help you fall asleep more easily.;night_display_footer
|
|
||||||
No sound from notifications;zen_mute_notifications
|
|
||||||
No visuals or sound from notifications;zen_hide_notifications
|
|
||||||
Notification access;notification_access
|
|
||||||
Notification access;notification_access_screen
|
|
||||||
Notification vibration;notification_vibration_preference_screen
|
|
||||||
Notification volume;notification_volume
|
|
||||||
Notifications;all_notifications
|
|
||||||
Notifications;configure_notification_settings
|
|
||||||
Notifications on lockscreen;lock_screen_notifications
|
|
||||||
OEM unlocking;oem_unlock_enable
|
|
||||||
Open network notification;notify_open_networks
|
|
||||||
Opening links;manage_domain_url_screen
|
|
||||||
Other apps;pref_other_apps
|
|
||||||
Other files;storage_settings_misc_space
|
|
||||||
Override force-dark;hwui_force_dark
|
|
||||||
Pair new device;add_bt_devices
|
|
||||||
Payment default;nfc_payment
|
|
||||||
Permission manager;manage_perms
|
|
||||||
Permission manager;privacy_manage_perms
|
|
||||||
Personal dictionary;key_user_dictionary_settings
|
|
||||||
Personal dictionary;user_dict_list
|
|
||||||
Personal dictionary for work;user_dictionary_settings_for_work_pref
|
|
||||||
Personalize using app data;content_capture
|
|
||||||
Personalize using app data;content_capture_custom_settings
|
|
||||||
Phone number;phone_number
|
|
||||||
Phone ringtone;ringtone
|
|
||||||
Photos & videos;pref_photos_videos
|
|
||||||
Physical keyboard;physical_keyboard_screen
|
|
||||||
Picture color mode;picture_color_mode
|
|
||||||
Picture-in-picture;picture_in_picture
|
|
||||||
Picture-in-picture;picture_in_picture_screen
|
|
||||||
Pictures, videos;storage_settings_dcim_space
|
|
||||||
Pitch;tts_default_pitch
|
|
||||||
Pixel Imprint;fingerprint_settings
|
|
||||||
Pixel Imprint;fingerprint_settings_profile
|
|
||||||
Pixel uses Motion Sense to detect nearby movement. It does not use your camera, mic, or location.;wake_screen_gesture_footer
|
|
||||||
Play media sounds;zen_mode_media
|
|
||||||
Play media to;media_output
|
|
||||||
Pointer location;pointer_location
|
|
||||||
Pointer speed;pointer_speed
|
|
||||||
Power button ends call;toggle_power_button_ends_call_preference
|
|
||||||
Power button instantly locks;power_button_instantly_locks
|
|
||||||
Power on sounds;boot_sounds
|
|
||||||
Preferences;skip_gesture_footer
|
|
||||||
Preferred engine;tts_engine_picker_screen
|
|
||||||
Preferred network type;enabled_networks_key
|
|
||||||
Preferred network type;preferred_network_mode_key
|
|
||||||
Premium SMS access;premium_sms
|
|
||||||
Premium SMS access;premium_sms_screen
|
|
||||||
Prevent ringing;gesture_prevent_ringing_screen
|
|
||||||
Prevent ringing;gesture_prevent_ringing_summary
|
|
||||||
Previously connected devices;saved_device_list
|
|
||||||
Printing;print_settings_screen
|
|
||||||
Privacy;privacy_dashboard_page
|
|
||||||
Privacy;top_level_privacy
|
|
||||||
Private DNS;private_dns_settings
|
|
||||||
Profile HWUI rendering;track_frame_time
|
|
||||||
Quick settings developer tiles;development_tile_settings
|
|
||||||
Reach to check phone;ambient_display_wake_screen
|
|
||||||
Reach to check phone;gesture_wake_screen
|
|
||||||
Recent location requests;recent_location_requests_see_all
|
|
||||||
Recently opened apps;recent_open_apps
|
|
||||||
Redirect vibration;vibrate_input_devices
|
|
||||||
Regulatory labels;regulatory_info
|
|
||||||
Remove animations;toggle_disable_animations
|
|
||||||
Require eyes to be open;security_settings_face_require_attention
|
|
||||||
Reset ShortcutManager rate-limiting;reset_shortcut_manager_throttling
|
|
||||||
Reset Wi-Fi, mobile & Bluetooth;network_reset_pref
|
|
||||||
Reset app preferences;reset_app_prefs
|
|
||||||
Reset options;reset_dashboard
|
|
||||||
Reset options;reset_dashboard_fragment_screen
|
|
||||||
Reset to default values;autofill_reset_developer_options
|
|
||||||
Restrict notifications;zen_mode_block_effects_settings
|
|
||||||
Restrict notifications;zen_mode_restrict_settings_page
|
|
||||||
Restricted apps;restricted_app
|
|
||||||
Revoke USB debugging authorizations;clear_adb_keys
|
|
||||||
Ring & notification volume;ring_volume
|
|
||||||
Ring vibration;ring_vibration_preference_screen
|
|
||||||
Roaming;button_roaming_key
|
|
||||||
Running services;running_apps
|
|
||||||
SIM card lock;sim_lock_settings
|
|
||||||
SIM status;sim_status
|
|
||||||
SMS preference;sms_preference
|
|
||||||
SMS, MMS, and messaging apps;zen_mode_behavior_messages
|
|
||||||
SMS, MMS, and messaging apps;zen_mode_messages_settings_page
|
|
||||||
Safety & regulatory manual;safety_info
|
|
||||||
Schedule;night_display_auto_mode
|
|
||||||
Schedules;zen_mode_automation_settings
|
|
||||||
Schedules;zen_mode_automation_settings_page
|
|
||||||
Screen attention;adaptive_sleep
|
|
||||||
Screen attention;adaptive_sleep_entry
|
|
||||||
Screen lock;unlock_set_or_change
|
|
||||||
Screen locking sounds;screen_locking_sounds
|
|
||||||
Screen pinning;screen_pinning_settings
|
|
||||||
Screen pinning;screen_pinning_settings_screen
|
|
||||||
Screen saver;dream_overview_screen
|
|
||||||
Screen timeout;screen_timeout
|
|
||||||
Screen usage since full charge;screen_usage
|
|
||||||
Secure NFC;nfc_secure_settings
|
|
||||||
Security;security_dashboard_page
|
|
||||||
Security;top_level_security
|
|
||||||
Security;wifi_tether_security
|
|
||||||
See all;previously_connected_devices_see_all
|
|
||||||
See all exceptions;zen_sound_vibration_settings
|
|
||||||
See more;special_access_more
|
|
||||||
Select debug app;debug_app
|
|
||||||
Select mock location app;mock_location_app
|
|
||||||
Send feedback about this device;device_feedback
|
|
||||||
Sensitive notifications;lock_screen_redact
|
|
||||||
Sensitive work profile notifications;lock_screen_work_redact
|
|
||||||
Serial number;hardware_info_device_serial
|
|
||||||
Set a schedule;battery_saver_schedule
|
|
||||||
Set data limit;set_data_limit
|
|
||||||
Set data warning;set_data_warning
|
|
||||||
Set up data service;cdma_lte_data_service_key
|
|
||||||
Settings version;carrier_settings_version_key
|
|
||||||
Shortcut to prevent ringing;gesture_prevent_ringing_sound
|
|
||||||
Show Bluetooth devices without names;bluetooth_show_devices_without_names
|
|
||||||
Show background ANRs;show_all_anrs
|
|
||||||
Show cards & passes;gesture_global_actions_panel_switch
|
|
||||||
Show hardware layers updates;show_hw_layers_updates
|
|
||||||
Show layout bounds;debug_layout
|
|
||||||
Show lockdown option;security_setting_lockdown_enabled
|
|
||||||
Show notification channel warnings;show_notification_channel_warnings
|
|
||||||
Show passwords;show_password
|
|
||||||
Show surface updates;show_screen_updates
|
|
||||||
Show taps;show_touches
|
|
||||||
Show view updates;show_hw_screen_updates
|
|
||||||
Show virtual keyboard;show_virtual_keyboard_switch
|
|
||||||
Silence interruptions;gesture_silence
|
|
||||||
Silence interruptions;silence_gesture
|
|
||||||
Simulate color space;simulate_color_space
|
|
||||||
Simulate secondary displays;overlay_display_devices
|
|
||||||
Skip lock screen;security_lockscreen_bypass
|
|
||||||
Skip songs;gesture_skip
|
|
||||||
Smallest width;density
|
|
||||||
Smart Storage;toggle_asm
|
|
||||||
Sound;sound_settings
|
|
||||||
Sound;top_level_sound
|
|
||||||
Special app access;special_access
|
|
||||||
Special app access;special_app_access_screen
|
|
||||||
Speech rate;tts_default_rate
|
|
||||||
Spell checker;spellcheckers_settings
|
|
||||||
Spell checker for work;spellcheckers_settings_for_work_pref
|
|
||||||
Squeeze for silence;gesture_assist_silence
|
|
||||||
Squeeze for your Assistant;gesture_assist
|
|
||||||
Squeeze sensitivity;gesture_assist_sensitivity
|
|
||||||
Standby apps;inactive_apps
|
|
||||||
Starred contacts;zen_mode_starred_contacts_callers
|
|
||||||
Starred contacts;zen_mode_starred_contacts_messages
|
|
||||||
Start time;night_display_start_time
|
|
||||||
Stay awake;keep_screen_on
|
|
||||||
Storage;storage_dashboard_screen
|
|
||||||
Storage;storage_settings
|
|
||||||
Storage;top_level_storage
|
|
||||||
Storage type;credential_storage_type
|
|
||||||
Store logger data persistently on device;select_logpersist
|
|
||||||
Strict mode enabled;strict_mode
|
|
||||||
Styles & wallpapers;wallpaper_type
|
|
||||||
Suggested actions and replies;asst_capabilities_actions_replies
|
|
||||||
Swipe direction;gesture_skip_direction
|
|
||||||
Swipe fingerprint;gesture_swipe_down_fingerprint_screen
|
|
||||||
Swipe fingerprint for notifications;gesture_swipe_down_fingerprint
|
|
||||||
Swipe fingerprint for notifications;gesture_swipe_down_fingerprint_input_summary
|
|
||||||
Swipe fingerprint for notifications;gesture_swipe_down_fingerprint_notifications
|
|
||||||
Switch to mobile data automatically;wifi_cellular_data_fallback
|
|
||||||
System;pref_system
|
|
||||||
System;system_dashboard_screen
|
|
||||||
System;top_level_system
|
|
||||||
System UI demo mode;demo_mode
|
|
||||||
System WebView License;webview_license
|
|
||||||
System navigation;gesture_system_navigation_input_summary
|
|
||||||
System navigation;gesture_system_navigation_input_summary_accessibility
|
|
||||||
System navigation;gesture_system_navigation_screen
|
|
||||||
System select;cdma_system_select_key
|
|
||||||
System updates;system_update_settings
|
|
||||||
Take call on;take_call_on_output
|
|
||||||
Tap & pay;default_payment_app
|
|
||||||
Tap & pay;nfc_payment_settings_screen
|
|
||||||
Tap to check phone;ambient_display_tap
|
|
||||||
Tap to check phone;gesture_tap
|
|
||||||
Tap to check phone;gesture_tap_screen_input_summary
|
|
||||||
Tap to take action;gesture_tap
|
|
||||||
Tap to wake;tap_to_wake
|
|
||||||
Terms and conditions;terms
|
|
||||||
Tethering hardware acceleration;tethering_hardware_offload
|
|
||||||
Text-to-speech output;tts_settings_preference
|
|
||||||
Text-to-speech output;tts_settings_screen
|
|
||||||
Time;time
|
|
||||||
Time to take action;accessibility_control_timeout_preference
|
|
||||||
Time to take action (Accessibility timeout);accessibility_control_timeout_preference_fragment
|
|
||||||
Time zone;timezone
|
|
||||||
Tips & support;support_dashboard_activity
|
|
||||||
Tips & support;top_level_support
|
|
||||||
Total space;storage_settings_memory_size
|
|
||||||
Touch & hold delay;select_long_press_timeout_preference
|
|
||||||
Touch feedback;touch_vibration_preference_screen
|
|
||||||
Touch sounds;touch_sounds
|
|
||||||
Touch vibration;vibrate_on_touch
|
|
||||||
Transition animation scale;transition_animation_scale
|
|
||||||
Trust agents;manage_trust_agents
|
|
||||||
Trust agents;trust_agents
|
|
||||||
Trusted credentials;trusted_credentials
|
|
||||||
Trusted credentials in your personal profile;ca_certs_current_user
|
|
||||||
Trusted credentials in your work profile;ca_certs_managed_profile
|
|
||||||
Turn off hotspot automatically;wifi_tether_auto_turn_off
|
|
||||||
Turn off when fully charged;battery_saver_sticky
|
|
||||||
Turn on Bluetooth to connect to other devices.;discoverable_footer
|
|
||||||
Turn on Wi-Fi automatically;enable_wifi_wakeup
|
|
||||||
USB Preferences;usb_details_fragment
|
|
||||||
USB debugging;enable_adb
|
|
||||||
USB tethering;usb_tether_settings
|
|
||||||
Unlocking your phone;security_settings_face_keyguard
|
|
||||||
Unrestricted data;data_saver
|
|
||||||
Unrestricted data;unrestricted_access
|
|
||||||
Unrestricted data;unrestricted_data_screen
|
|
||||||
Up time;up_time
|
|
||||||
Usage access;special_app_usage_access
|
|
||||||
Use 24-hour format;24 hour
|
|
||||||
Use Battery Manager;auto_restriction
|
|
||||||
Use default;nfc_foreground
|
|
||||||
Use locale default;auto_24hour
|
|
||||||
Use network-provided time;auto_time
|
|
||||||
Use network-provided time zone;auto_zone
|
|
||||||
Use one lock;unification
|
|
||||||
Use personal profile sounds;work_use_personal_sounds
|
|
||||||
Use screenshot;screenshot
|
|
||||||
Use text from screen;context
|
|
||||||
User credentials;user_credentials
|
|
||||||
VPN;vpn_settings
|
|
||||||
VPN & app user certificate;install_user_certificate
|
|
||||||
VR helper services;enabled_vr_listeners
|
|
||||||
VR helper services;vr_listener_settings
|
|
||||||
Verify apps over USB;verify_apps_over_usb
|
|
||||||
Verify bytecode of debuggable apps;art_verifier_for_debuggable
|
|
||||||
Vibrate for calls;vibrate_when_ringing
|
|
||||||
Vibration & haptic strength;accessibility_settings_vibration_screen
|
|
||||||
Vibration & haptic strength;vibration_preference_screen
|
|
||||||
Virtual keyboard;virtual_keyboard_category
|
|
||||||
Virtual keyboard;virtual_keyboard_pref
|
|
||||||
Virtual keyboard for work;virtual_keyboards_for_work_pref
|
|
||||||
VoLTE;enhanced_4g_lte
|
|
||||||
Voice input;voice_input_settings
|
|
||||||
Volume key shortcut;accessibility_shortcut_preference
|
|
||||||
Wait for debugger;wait_for_debugger
|
|
||||||
Wallpaper;wallpaper
|
|
||||||
Wallpapers;wallpaper_attributions
|
|
||||||
WebView implementation;select_webview_provider
|
|
||||||
When there are multiple graphics drivers, you can pick to use the updated graphics driver for Apps installed on the device.;graphics_driver_footer
|
|
||||||
When device is in VR;vr_display_pref
|
|
||||||
When to start;when_to_start
|
|
||||||
Wi-Fi;main_toggle_wifi
|
|
||||||
Wi-Fi;toggle_wifi
|
|
||||||
Wi-Fi Direct;wifi_direct
|
|
||||||
Wi-Fi MAC address;saved_accesspoints_wifi_mac_address
|
|
||||||
Wi-Fi and Bluetooth scanning;location_scanning
|
|
||||||
Wi-Fi and Bluetooth scanning;scanning_screen
|
|
||||||
Wi-Fi calling;wifi_calling
|
|
||||||
Wi-Fi certificate;install_wifi_certificate
|
|
||||||
Wi-Fi control;change_wifi_state
|
|
||||||
Wi-Fi hotspot;wifi_tether
|
|
||||||
Wi-Fi preferences;wifi_configure_settings_screen
|
|
||||||
Wi-Fi scan throttling;wifi_scan_throttling
|
|
||||||
Wi-Fi scanning;wifi_always_scanning
|
|
||||||
Window animation scale;window_animation_scale
|
|
||||||
Wireless display certification;wifi_display_certification
|
|
||||||
Work phone ringtone;work_ringtone
|
|
||||||
Work profile;work_mode
|
|
||||||
Work profile lock;unlock_set_or_change_profile
|
|
||||||
Work profile settings;managed_profile_settings_screen
|
|
||||||
Work profile sounds;sound_work_settings_section
|
|
||||||
Your work policy info;work_policy_info
|
|
||||||
;accessibility_control_timeout_video
|
|
||||||
;adaptive_sleep_video
|
|
||||||
;auto_awesome_battery
|
|
||||||
;auto_brightness_video
|
|
||||||
;aware_settings_video
|
|
||||||
;battery_header
|
|
||||||
;battery_tip
|
|
||||||
;bt_nearby_slice
|
|
||||||
;notification_model_illustration
|
|
||||||
;security_settings_face_video
|
|
||||||
;use_sim_switch
|
|
@@ -1,99 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2018 The Android Open Source Project
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.android.settings.ui.search;
|
|
||||||
|
|
||||||
import android.text.TextUtils;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Data class for {@link SettingsSearchResultRegressionTest}
|
|
||||||
*/
|
|
||||||
public class SearchData {
|
|
||||||
public final String title;
|
|
||||||
public final String key;
|
|
||||||
|
|
||||||
public String getTitle() {
|
|
||||||
return title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getKey() {
|
|
||||||
return key;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final String DELIM = ";";
|
|
||||||
|
|
||||||
public static SearchData from(String searchDataString) {
|
|
||||||
String[] split = searchDataString.trim().split(DELIM, -1);
|
|
||||||
|
|
||||||
if (split.length != 2) {
|
|
||||||
throw new IllegalArgumentException("Arg is invalid: " + searchDataString);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new SearchData.Builder()
|
|
||||||
.setTitle(split[0])
|
|
||||||
.setKey(split[1])
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return title + DELIM + key;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object obj) {
|
|
||||||
if (!(obj instanceof SearchData)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
SearchData other = (SearchData) obj;
|
|
||||||
return TextUtils.equals(this.title, other.title)
|
|
||||||
&& TextUtils.equals(this.key, other.key);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(title, key);
|
|
||||||
}
|
|
||||||
|
|
||||||
private SearchData(
|
|
||||||
SearchData.Builder builder) {
|
|
||||||
this.title = builder.title;
|
|
||||||
this.key = builder.key;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Builder {
|
|
||||||
protected String title = "";
|
|
||||||
protected String key = "";
|
|
||||||
|
|
||||||
public SearchData build() {
|
|
||||||
return new SearchData(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SearchData.Builder setTitle(String title) {
|
|
||||||
this.title = title;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SearchData.Builder setKey(String key) {
|
|
||||||
this.key = key;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,233 +0,0 @@
|
|||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2018 The Android Open Source Project
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.android.settings.ui.search;
|
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
|
||||||
import static com.google.common.truth.Truth.assertWithMessage;
|
|
||||||
|
|
||||||
import android.content.ContentResolver;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.content.pm.ResolveInfo;
|
|
||||||
import android.database.Cursor;
|
|
||||||
import android.net.Uri;
|
|
||||||
import android.platform.test.annotations.Presubmit;
|
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import androidx.test.InstrumentationRegistry;
|
|
||||||
import androidx.test.filters.SmallTest;
|
|
||||||
import androidx.test.runner.AndroidJUnit4;
|
|
||||||
|
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.junit.runner.RunWith;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
@SmallTest
|
|
||||||
@RunWith(AndroidJUnit4.class)
|
|
||||||
public class SettingsSearchResultRegressionTest {
|
|
||||||
|
|
||||||
private static final String TAG = "SearchRegressionTest";
|
|
||||||
|
|
||||||
private Context mContext;
|
|
||||||
|
|
||||||
public interface IndexColumns {
|
|
||||||
String DATA_TITLE = "data_title";
|
|
||||||
String DATA_KEY_REF = "data_key_reference";
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final String ERROR_RESULTS_MISSING =
|
|
||||||
"\nSettings search results missing. \n"
|
|
||||||
+ "If the changes are intentional, we want to update the master-list.\n";
|
|
||||||
|
|
||||||
private static final String ERROR_NEW_RESULTS =
|
|
||||||
"\nNew settings search results have been found.\nIf the changes are intentional, we "
|
|
||||||
+ "want to"
|
|
||||||
+ "prevent the new results from regressing.\n";
|
|
||||||
|
|
||||||
private static final String ERROR_RERUN_TEST =
|
|
||||||
"Please re-run the test \"generate_search_result_list\" by removing the '@Ignore' "
|
|
||||||
+ "annotation above 'generate_search_result_list' test, and run: \n"
|
|
||||||
+ "$ atest SettingsSearchResultRegressionTest.java \n"
|
|
||||||
+ "and copy the output into "
|
|
||||||
+ "'packages/apps/Settings/tests/uitests/assets/search_result_list'\n";
|
|
||||||
|
|
||||||
|
|
||||||
@Before
|
|
||||||
public void setUp() {
|
|
||||||
mContext = InstrumentationRegistry.getContext();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tests that the set of search results does not regress.
|
|
||||||
* <p>
|
|
||||||
* The data set used here (/tests/unit/assets/search_results_list) needs to be updated
|
|
||||||
* every once in a while so that we can check newly added results.
|
|
||||||
* </p>
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
@Presubmit
|
|
||||||
public void searchResultsDoNotRegress() {
|
|
||||||
final ContentResolver resolver = mContext.getContentResolver();
|
|
||||||
final Uri uri = getTestProviderUri();
|
|
||||||
if (uri == null) {
|
|
||||||
Log.e(TAG, "Something is wrong getting test provider uri, skipping");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final Cursor cursor = resolver.query(uri, null, null, null, null);
|
|
||||||
|
|
||||||
if (cursor == null) {
|
|
||||||
// Assume Settings Intelligence is wrong.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
final Set<SearchData> availableSearchResults = getSearchDataFromCursor(cursor);
|
|
||||||
final Set<SearchData> registeredSearchResults = getRegisteredResults();
|
|
||||||
|
|
||||||
// Seed with results that we expect
|
|
||||||
final Set<SearchData> missingSearchResults = new HashSet<>(registeredSearchResults);
|
|
||||||
// Seed with results that are available
|
|
||||||
final Set<SearchData> newSearchResults = new HashSet<>(availableSearchResults);
|
|
||||||
|
|
||||||
// Remove all available results, leaving results that have been removed.
|
|
||||||
missingSearchResults.removeAll(availableSearchResults);
|
|
||||||
// Remove all results we expect, leaving results that have not yet been registered.
|
|
||||||
newSearchResults.removeAll(registeredSearchResults);
|
|
||||||
|
|
||||||
assertWithMessage(ERROR_RESULTS_MISSING + ERROR_RERUN_TEST)
|
|
||||||
.that(missingSearchResults).isEmpty();
|
|
||||||
assertWithMessage(ERROR_NEW_RESULTS + ERROR_RERUN_TEST).that(newSearchResults).isEmpty();
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO (b/113907111) add a test to catch duplicate title search results.
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test to generate a new list of search results. Uncomment the Test annotation and run the
|
|
||||||
* test to generate the list.
|
|
||||||
*/
|
|
||||||
@Ignore
|
|
||||||
@Test
|
|
||||||
public void generate_search_result_list() {
|
|
||||||
final ContentResolver resolver = mContext.getContentResolver();
|
|
||||||
final Uri uri = getTestProviderUri();
|
|
||||||
if (uri == null) {
|
|
||||||
Log.e(TAG, "Something is wrong getting test provider uri, skipping");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final Cursor cursor = resolver.query(uri, null, null, null, null);
|
|
||||||
final List<SearchData> availableSearchResults =
|
|
||||||
new ArrayList<>(getSearchDataFromCursor(cursor));
|
|
||||||
|
|
||||||
Collections.sort(availableSearchResults, Comparator.comparing(SearchData::getTitle)
|
|
||||||
.thenComparing(SearchData::getKey));
|
|
||||||
|
|
||||||
assertThat(generateListFromSearchData(availableSearchResults)).isNull();
|
|
||||||
}
|
|
||||||
|
|
||||||
private Set<SearchData> getSearchDataFromCursor(Cursor cursor) {
|
|
||||||
final Set<SearchData> searchData = new HashSet<>();
|
|
||||||
|
|
||||||
final int titleIndex = cursor.getColumnIndex(
|
|
||||||
IndexColumns.DATA_TITLE);
|
|
||||||
final int keyIndex = cursor.getColumnIndex(
|
|
||||||
IndexColumns.DATA_KEY_REF);
|
|
||||||
|
|
||||||
while (cursor.moveToNext()) {
|
|
||||||
String title = cursor.getString(titleIndex);
|
|
||||||
String key = cursor.getString(keyIndex);
|
|
||||||
|
|
||||||
if (TextUtils.isEmpty(title)) {
|
|
||||||
title = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (TextUtils.isEmpty(key)) {
|
|
||||||
key = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
searchData.add(new SearchData.Builder()
|
|
||||||
.setTitle(title)
|
|
||||||
.setKey(key)
|
|
||||||
.build());
|
|
||||||
}
|
|
||||||
|
|
||||||
return searchData;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Utility method to generate the list of search results that this class uses to validate
|
|
||||||
* results.
|
|
||||||
*/
|
|
||||||
private String generateListFromSearchData(List<SearchData> searchData) {
|
|
||||||
StringBuilder builder = new StringBuilder();
|
|
||||||
for (SearchData searchResult : searchData) {
|
|
||||||
builder.append(searchResult.title)
|
|
||||||
.append(
|
|
||||||
SearchData.DELIM)
|
|
||||||
.append(searchResult.key)
|
|
||||||
.append("\n");
|
|
||||||
}
|
|
||||||
return builder.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
private Uri getTestProviderUri() {
|
|
||||||
final Intent providerIntent = new Intent("com.android.settings.intelligence.DUMP_INDEX");
|
|
||||||
|
|
||||||
final List<ResolveInfo> info = mContext.getPackageManager().queryIntentContentProviders(
|
|
||||||
providerIntent, 0 /* flags */);
|
|
||||||
if (info.size() != 1) {
|
|
||||||
Log.e(TAG, "Unexpected number of DUMP_INDEX providers, skipping. Expected 1, Found "
|
|
||||||
+ info.size());
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return new Uri.Builder()
|
|
||||||
.scheme(ContentResolver.SCHEME_CONTENT)
|
|
||||||
.authority(info.get(0).providerInfo.authority)
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
private Set<SearchData> getRegisteredResults() {
|
|
||||||
final String filename = "search_results_list";
|
|
||||||
final Set<SearchData> registeredResults = new HashSet<>();
|
|
||||||
|
|
||||||
try {
|
|
||||||
final InputStream in = mContext.getAssets().open(filename);
|
|
||||||
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
|
|
||||||
String line;
|
|
||||||
while ((line = reader.readLine()) != null) {
|
|
||||||
registeredResults.add(
|
|
||||||
SearchData.from(line));
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
throw new IllegalArgumentException("Error initializing registered result list "
|
|
||||||
+ filename, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
return registeredResults;
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user