Merge "Add strings for default apps"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 79c9c49..130b9cd 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -721,7 +721,7 @@
     <!-- Text shown for title of settings checkbox to enable widgets [CHAR LIMIT=20]-->
     <string name="security_enable_widgets_title">Enable widgets</string>
     <!-- Summary for settings checkbox to disable widgets when the setting has been disabled by an installed device admin [CHAR LIMIT=50] -->
-    <string name="security_enable_widgets_disabled_summary">Disabled by administrator</string>
+    <string name="security_enable_widgets_disabled_summary">Disabled by admin</string>
     <!-- Text shown for summary of owner info setting (if none set) [CHAR LIMIT=40]-->
     <string name="owner_info_settings_summary">None</string>
     <!-- Description of how many characters are used in owner info [CHAR LIMIT=40]-->
@@ -758,7 +758,7 @@
     <!-- In the security screen, the header title for settings related to  Passwords-->
     <string name="security_passwords_title">Privacy</string>
     <!-- Summary for settings preference disabled by administrator [CHAR LIMIT=50] -->
-    <string name="disabled_by_administrator_summary">Disabled by administrator</string>
+    <string name="disabled_by_administrator_summary">Disabled by admin</string>
     <!-- In the security screen, the header title for security statuses -->
     <string name="security_status_title">Security status</string>
     <!-- Summary for Security settings, explaining a few important settings under it [CHAR LIMIT=NONE]-->
@@ -870,7 +870,11 @@
     <!-- Text shown in fingerprint settings explaining what the fingerprint can be used for. [CHAR LIMIT=NONE] -->
     <string name="security_settings_fingerprint_enroll_disclaimer">In addition to unlocking your phone, you can also use your fingerprint to authorize purchases and app access. <annotation id="url">Learn more</annotation></string>
     <!-- Text shown in fingerprint settings explaining what the fingerprint can be used for in the case unlocking is disabled [CHAR LIMIT=NONE] -->
-    <string name="security_settings_fingerprint_enroll_disclaimer_lockscreen_disabled">Screen lock option disabled. Contact your organization\'s administrator to learn more. <annotation id="admin_details">More details</annotation>\n\nYou can still use your fingerprint to authorize purchases and app access. <annotation id="url">Learn more</annotation></string>
+    <string name="security_settings_fingerprint_enroll_disclaimer_lockscreen_disabled">
+        The screen lock option is disabled. To learn more, contact your organization\'s admin.
+        <annotation id="admin_details">More details</annotation>\n\nYou can still use your
+        fingerprint to authorize purchases and app access.
+        <annotation id="url">Learn more</annotation></string>
     <!-- Text shown in fingerprint enroll when we didn't observe progress for a few seconds. [CHAR LIMIT=100] -->
     <string name="security_settings_fingerprint_enroll_lift_touch_again">Lift finger, then touch sensor again</string>
 
@@ -885,8 +889,11 @@
     <string name="fingerprint_last_delete_title">Remove all fingerprints?</string>
 
     <!-- Message shown in a dialog which asks the user to confirm when the last fingerprint gets deleted by him. [CHAR LIMIT=NONE]-->
-    <string name="fingerprint_last_delete_message">You won\'t be able to use your fingerprints to unlock your phone, authorize purchases, or sign in to apps with them.</string>
-    <string name="fingerprint_last_delete_message_profile_challenge">You won\'t be able to use your fingerprints to unlock your work profile, authorize purchases, or sign in to work apps.</string>
+    <string name="fingerprint_last_delete_message">You won\'t be able to use your fingerprints to
+        unlock your phone, authorize purchases, or sign in to apps with them</string>
+    <string name="fingerprint_last_delete_message_profile_challenge">You won\'t be able to use your
+        fingerprints to unlock your work profile, authorize purchases, or sign in to work
+        apps</string>
 
     <!-- Button to confirm the last removing the last fingerprint. [CHAR LIMIT=20]-->
     <string name="fingerprint_last_delete_confirm">Yes, remove</string>
@@ -1137,7 +1144,8 @@
     <string name="fingerprint_unlock_title">You can unlock your phone using your fingerprint. For security, this option requires a backup screen lock.</string>
 
     <!-- Summary for preference that has been disabled by because of the DevicePolicyAdmin, or because device encryption is enabled, or because there are credentials in the credential storage [CHAR LIMIT=50] -->
-    <string name="unlock_set_unlock_disabled_summary">Disabled by administrator, encryption policy, or credential storage</string>
+    <string name="unlock_set_unlock_disabled_summary">Disabled by admin, encryption policy, or
+        credential storage</string>
 
     <!-- Summary for "Configure lockscreen" when lock screen is off [CHAR LIMIT=45] -->
     <string name="unlock_set_unlock_mode_off">None</string>
@@ -1231,15 +1239,17 @@
     <string name="lockpassword_continue_label">Continue</string>
 
     <!-- Error shown in popup when password is too long -->
-    <string name="lockpassword_password_too_long">Must be fewer than <xliff:g id="number" example="17">%d</xliff:g> characters.</string>
+    <string name="lockpassword_password_too_long">Must be fewer than
+        <xliff:g id="number" example="17">%d</xliff:g> characters</string>
     <!-- Error shown in popup when PIN is too long -->
-    <string name="lockpassword_pin_too_long">Must be fewer than <xliff:g id="number" example="17">%d</xliff:g> digits.</string>
+    <string name="lockpassword_pin_too_long">Must be fewer than
+        <xliff:g id="number" example="17">%d</xliff:g> digits</string>
 
     <!-- Error shown when in PIN mode and user enters a non-digit -->
-    <string name="lockpassword_pin_contains_non_digits">Must contain only digits 0-9.</string>
+    <string name="lockpassword_pin_contains_non_digits">Must contain only digits 0-9</string>
 
     <!-- Error shown when in PIN mode and PIN has been used recently. Please keep this string short! -->
-    <string name="lockpassword_pin_recently_used">Device administrator doesn\u2019t allow using a recent PIN.</string>
+    <string name="lockpassword_pin_recently_used">Device admin doesn\'t allow using a recent PIN</string>
 
     <!-- Error shown when in PASSWORD mode and user enters an invalid character -->
     <string name="lockpassword_illegal_character">This can\'t include an invalid character</string>
@@ -1290,10 +1300,12 @@
     </plurals>
 
     <!-- Error shown when in PASSWORD mode and password has been used recently. Please keep this string short! -->
-    <string name="lockpassword_password_recently_used">Device administrator doesn\u2019t allow using a recent password.</string>
+    <string name="lockpassword_password_recently_used">Device admin doesn\'t allow using a recent
+        password</string>
 
     <!-- [CHAR_LIMIT=NONE] Error shown when the user tries to set an ascending or descending sequence of digits -->
-    <string name="lockpassword_pin_no_sequential_digits">An ascending, descending or repeated sequence of digits is forbidden</string>
+    <string name="lockpassword_pin_no_sequential_digits">Ascending, descending, or repeated sequence
+        of digits isn\'t allowed</string>
 
     <!-- Label for ChoosePassword/PIN OK button -->
     <string name="lockpassword_ok_label">OK</string>
@@ -1310,13 +1322,13 @@
     <!-- Toast shown when lock pattern or password successfully setup. [CHAR LIMIT=64] -->
     <string name="lock_setup" msgid="5507462851158901718">Setup is complete.</string>
 
-    <!-- Title of preference to manage device admins -->
+    <!-- Title of preference to manage device admin apps, which are used by IT admins to manage devices -->
     <string name="manage_device_admin">Device admin apps</string>
 
-    <!-- Summary of preference to manage device administrators, informing the user that currently no device administrator apps are installed and active -->
+    <!-- Summary of preference to manage device admin apps, informing the user that currently no device admin apps are installed and active -->
     <string name="number_of_device_admins_none">No active apps</string>
 
-    <!-- Summary of preference to manage device administrators, informing the user how many device administrator apps are installed and active -->
+    <!-- Summary of preference to manage device admin apps, informing the user how many device admin apps are installed and active -->
     <plurals name="number_of_device_admins">
         <item quantity="one"><xliff:g id="count">%d</xliff:g> active app</item>
         <item quantity="other"><xliff:g id="count">%d</xliff:g> active apps</item>
@@ -2123,8 +2135,8 @@
          the same as the incoming call volume. -->
     <string name="checkbox_notification_same_as_incoming_call">Use incoming call volume for notifications</string>
 
-    <!-- Home settings screen, text indicating that a launcer does not support work profiles [CHAR LIMIT=100] -->
-    <string name="home_work_profile_not_supported">Doesn\u2019t support work profiles</string>
+    <!-- Home settings screen, text indicating that a launcher does not support work profiles [CHAR LIMIT=100] -->
+    <string name="home_work_profile_not_supported">Doesn\'t support work profiles</string>
 
     <!-- Sound settings screen, setting option title-->
     <string name="notification_sound_dialog_title">Default notification sound</string>
@@ -3637,7 +3649,7 @@
     <string name="invalid_location">Install location isn\u2019t valid.</string>
     <string name="system_package">System updates can\u2019t be installed on external media.</string>
     <!-- Error message shown when trying to move device administrators to external disks, such as SD card [CHAR_LIMIT=none] -->
-    <string name="move_error_device_admin">Device Administrator can\u2019t be installed on external media.</string>
+    <string name="move_error_device_admin">Device admin app can\'t be installed on external media</string>
 
     <string name="force_stop_dlg_title">Force stop?</string>
     <!-- [CHAR LIMIT=200] Manage applications, text for dialog when killing persistent apps-->
@@ -4768,6 +4780,18 @@
     <!-- [CHAR LIMIT=50] Name for the button that goes to the voice selection screen. -->
     <string name="tts_install_voice_title">Voices</string>
 
+    <!-- The text for the settings to choose the language to use on TTS.-->
+    <string name="tts_spoken_language">Spoken Language</string>
+
+    <!-- Title of the pop-up to install 3P voices on first use. -->
+    <string name="tts_install_voices_title">Install Voices</string>
+    <!-- Text of the pop-up to install 3P voices on first use. -->
+    <string name="tts_install_voices_text">Continue to the <xliff:g id="tts_app_name">%s</xliff:g> app to install voices</string>
+    <!-- Text of the button on the pop-up to install 3P voices on first use to procedd to the 3p app. -->
+    <string name="tts_install_voices_open">Open App</string>
+    <!-- Text of the button on the pop-up to install 3P voices on first use to cancel the operation. -->
+    <string name="tts_install_voices_cancel">Cancel</string>
+
     <!-- Name for button that resets speech rate and pitch for synthesized voice to default values in the text to speech settings.-->
     <string name="tts_reset">Reset</string>
 
@@ -4899,7 +4923,7 @@
     <!-- Summary text of the "automatic restore" setting -->
     <string name="auto_restore_summary">When reinstalling an app, restore backed up settings and data</string>
     <!-- Title of the preference informing the user about the backup service being inactive [CHAR LIMIT=50]-->
-    <string name="backup_inactive_title">Backup service is inactive.</string>
+    <string name="backup_inactive_title">Backup service isn\'t active</string>
     <!-- Default summary text of the "Configure backup account" setting [CHAR LIMIT=80]-->
     <string name="backup_configure_account_default_summary">No account is currently storing backed up data</string>
 
@@ -4911,52 +4935,55 @@
     <string name="fullbackup_erase_dialog_message">Stop backing up device data (such as Wi-Fi passwords and call history) and app data (such as settings and files stored by apps), plus erase all copies on remote servers?</string>
     <!-- Summary for explanation of what full app data backup means. Manufacturers may wish to overlay this resource with their own text  -->
     <string name="fullbackup_data_summary">Automatically back up device data (such as Wi-Fi passwords and call history) and app data (such as settings and files stored by apps) remotely.\n\nWhen you turn on automatic backup, device and app data is periodically saved remotely. App data can be any data that an app has saved (based on developer settings), including potentially sensitive data such as contacts, messages, and photos.</string>
-    <!-- Device admin settings screen --><skip />
-    <!-- Device admin settings activity title -->
-    <string name="device_admin_settings_title">Device administration settings</string>
-    <!-- Label for screen showing the active device policy -->
-    <string name="active_device_admin_msg">Device administrator</string>
-    <!-- Label for button to remove the active device admin [CHAR LIMIT=80] -->
-    <string name="remove_device_admin">Deactivate this device administrator</string>
-    <!-- Label for button to uninstall the device admin application [CHAR LIMIT=80] -->
+    <!-- Device admin app settings screen --><skip />
+    <!-- Device admin app settings activity title -->
+    <string name="device_admin_settings_title">Device admin settings</string>
+    <!-- Label for screen showing the active device admin apps -->
+    <string name="active_device_admin_msg">Device admin app</string>
+    <!-- Label for button to remove the active device admin app [CHAR LIMIT=80] -->
+    <string name="remove_device_admin">Deactivate this device admin app</string>
+    <!-- Label for button to uninstall the device admin app [CHAR LIMIT=80] -->
     <string name="uninstall_device_admin">Uninstall app</string>
-    <!-- Label for button to deactivate and uninstall the device admin [CHAR_LIMIT=50]-->
-    <string name="remove_and_uninstall_device_admin">Deactivate and Uninstall</string>
-    <!-- Label for screen showing to select device policy -->
-    <string name="select_device_admin_msg">Device administrators</string>
-    <!-- Message when there are no available device admins to display -->
-    <string name="no_device_admins">No available device administrators</string>
-    <!-- Message displayed when the device admin can only be disabled by deleting the work profile [CHAR_LIMIT=120] -->
-    <!-- Title for personal device admins on the list [CHAR_LIMIT=25] -->
+    <!-- Label for button to deactivate and uninstall the device admin app [CHAR_LIMIT=50]-->
+    <string name="remove_and_uninstall_device_admin">Deactivate &amp; uninstall</string>
+    <!-- Label for screen showing to select device admin apps -->
+    <string name="select_device_admin_msg">Device admin apps</string>
+    <!-- Message when there are no available device admin apps to display -->
+    <string name="no_device_admins">No device admin apps available</string>
+    <!-- Title for personal device admin apps on the list [CHAR_LIMIT=25] -->
     <string name="personal_device_admin_title">Personal</string>
-    <!-- Title for managed device admins on the list [CHAR_LIMIT=25] -->
+    <!-- Title for managed device admin apps on the list [CHAR_LIMIT=25] -->
     <string name="managed_device_admin_title">Work</string>
 
     <!-- Message when there are no available trust agents to display -->
     <string name="no_trust_agents">No available trust agents</string>
 
-    <!-- Label for screen showing to add device policy -->
-    <string name="add_device_admin_msg">Activate device administrator?</string>
+    <!-- Title for screen to add a device admin app [CHAR LIMIT=40] -->
+    <string name="add_device_admin_msg">Activate device admin app?</string>
     <!-- Label for button to set the active device admin [CHAR_LIMIT=80] -->
-    <string name="add_device_admin">Activate this device administrator</string>
+    <string name="add_device_admin">Activate this device admin app</string>
     <!-- Device admin add activity title -->
-    <string name="device_admin_add_title">Device administrator</string>
+    <string name="device_admin_add_title">Device admin</string>
     <!-- Device admin warning message about policies an admin can use -->
-    <string name="device_admin_warning">Activating this administrator will allow
+    <string name="device_admin_warning">Activating this admin app will allow
         the app <xliff:g id="app_name">%1$s</xliff:g> to perform the
         following operations:</string>
     <!-- Device admin warning message about policies an admin can use -->
-    <string name="device_admin_status">This administrator is active and allows
+    <string name="device_admin_status">This admin app is active and allows
         the app <xliff:g id="app_name">%1$s</xliff:g> to perform the
         following operations:</string>
 
     <!-- Title for screen to set a profile owner [CHAR LIMIT=40] -->
     <string name="profile_owner_add_title">Activate Profile Manager?</string>
     <!-- Warning when trying to add a profile owner admin after setup has completed. [CHAR LIMIT=none] -->
-    <string name="adding_profile_owner_warning">By proceeding, your User will be managed by your Administrator which may also be able to store associated data, in addition to your personal data.\n\nYour Administrator has the ability to monitor and manage settings, access, apps, and data associated with this User, including network activity and your device\u2019s location information.</string>
+    <string name="adding_profile_owner_warning">By proceeding, your user will be managed by your
+        admin which may also be able to store associated data, in addition to your personal
+        data.\n\nYour admin has the ability to monitor and manage settings, access, apps,
+        and data associated with this user, including network activity and your device\'s location
+        information.</string>
 
     <!-- Message displayed to let the user know that some of the options are disabled by admin. [CHAR LIMIT=NONE] -->
-    <string name="admin_disabled_other_options">Other options are disabled by your administrator.</string>
+    <string name="admin_disabled_other_options">Other options are disabled by your admin</string>
     <string name="admin_more_details">More details</string>
 
     <!-- Name to assign to a Network Access Point that was saved without a name -->
@@ -5168,7 +5195,7 @@
     <!-- Remove account message in dialog [CHAR LIMIT=NONE] -->
     <string name="really_remove_account_message" product="default">Removing this account will delete all of its messages, contacts, and other data from the phone!</string>
     <!-- This is shown if the autheticator for a given account fails to remove it. [CHAR LIMIT=NONE] -->
-    <string name="remove_account_failed">This change isn\u2019t allowed by your administrator</string>
+    <string name="remove_account_failed">This change isn\'t allowed by your admin</string>
     <!-- What to show in messaging that refers to this provider, e.g. AccountSyncSettings -->
     <string name="provider_label">Push subscriptions</string>
     <!-- Formatter in AccountSyncSettings for each application we wish to synchronize, e.g. "Sync Calendar" -->
@@ -5477,7 +5504,7 @@
     <!-- Dialog title to connect to a VPN profile. [CHAR LIMIT=40] -->
     <string name="vpn_connect_to">Connect to <xliff:g id="profile" example="School">%s</xliff:g></string>
     <!-- Dialog message body to disconnect from a VPN profile. -->
-    <string name="vpn_disconnect_confirm">Disconnect this VPN.</string>
+    <string name="vpn_disconnect_confirm">Disconnect this VPN?</string>
     <!-- Button label to disconnect from a VPN profile. [CHAR LIMIT=40] -->
     <string name="vpn_disconnect">Disconnect</string>
     <!-- Field label to show the version number for a VPN app. [CHAR LIMIT=40] -->
@@ -5501,7 +5528,7 @@
     <!-- Dialog mesage title when the user can't connect an always-on vpn [CHAR LIMIT=NONE] -->
     <string name="vpn_cant_connect_title"><xliff:g id="vpn_name" example="OpenVPN">%1$s</xliff:g> can\'t connect</string>
     <!-- Dialog message subtitle when the user can't connect an always-on vpn [CHAR LIMIT=NONE] -->
-    <string name="vpn_cant_connect_message">This app doesn\'t support always-on VPN.</string>
+    <string name="vpn_cant_connect_message">This app doesn\'t support always-on VPN</string>
     <!-- Preference title for VPN settings. [CHAR LIMIT=40] -->
     <string name="vpn_title">VPN</string>
     <!-- Preference title to create a new VPN profile. [CHAR LIMIT=40] -->
@@ -5513,7 +5540,7 @@
     <!-- Menu item to select always-on VPN profile. [CHAR LIMIT=40] -->
     <string name="vpn_menu_lockdown">Always-on VPN</string>
     <!-- Placeholder when VPN settings is open but no VPNs have been created. [CHAR LIMIT=100] -->
-    <string name="vpn_no_vpns_added">No VPNs added.</string>
+    <string name="vpn_no_vpns_added">No VPNs added</string>
     <!-- Preference summary for active always-on vpn [CHAR LIMIT=40] -->
     <string name="vpn_always_on_active">Always-on active</string>
     <!-- Preference summary for inactive always-on vpn [CHAR LIMIT=40] -->
@@ -5543,7 +5570,7 @@
     <!-- Seting subtext indicating the device is not currently connected to any VPN [CHAR LIMIT=40]-->
     <string name="vpn_disconnected_summary">None</string>
     <!-- Toast message when a certificate is missing. [CHAR LIMIT=100] -->
-    <string name="vpn_missing_cert">A certificate is missing. Please edit the profile.</string>
+    <string name="vpn_missing_cert">A certificate is missing. Try editing the profile.</string>
 
     <!-- Tab label for built-in system CA certificates. -->
     <string name="trusted_credentials_system_tab">System</string>
@@ -5575,9 +5602,11 @@
     <!-- Item found in thee PKCS12 keystore being investigated [CHAR LIMIT=NONE]-->
     <string name="n_cacrts">%d CA certificates</string>
     <!-- Alert dialog when viewing a set of user credentials. -->
-    <string name="user_credential_title">Credential Details</string>
+    <string name="user_credential_title">Credential details</string>
     <!-- Announcement to confirm a user credential being removed. [CHAR LIMIT=NONE] -->
     <string name="user_credential_removed">Removed credential: <xliff:g id="credential_name" example="signing key">%s</xliff:g></string>
+    <!-- Placeholder for the list of installed user credentials (private keys) when the list is empty. [CHAR LIMIT=120] -->
+    <string name="user_credential_none_installed">No user credentials installed</string>
 
     <!--  Title for spell checker settings -->
     <string name="spellcheckers_settings_title">Spell checker</string>
@@ -6271,9 +6300,6 @@
     <!-- Sound: Other sounds: Title for the option enabling boot sounds. [CHAR LIMIT=30] -->
     <string name="boot_sounds_title">Power on sounds</string>
 
-    <!-- Sound: Title for the Do not Disturb option and associated settings page. [CHAR LIMIT=50]-->
-    <string name="zen_mode_settings_title">Do Not Disturb preferences</string>
-
     <!-- Sound: Summary for the Do not Disturb option when there is no automatic rules turned on. [CHAR LIMIT=NONE]-->
     <string name="zen_mode_settings_summary_off">No automatic rules turned on</string>
 
@@ -6283,6 +6309,9 @@
         <item quantity="other"><xliff:g id="on_count" example="10">%d</xliff:g> automatic rules turned on</item>
     </plurals>
 
+    <!-- Sound: Title for the Do not Disturb option and associated settings page. [CHAR LIMIT=50]-->
+    <string name="zen_mode_settings_title">Do Not Disturb</string>
+
     <!-- Do not disturb: Title for the Priority interruptions option and associated settings page. [CHAR LIMIT=30] -->
     <string name="zen_mode_priority_settings_title">Priority only allows</string>
 
@@ -6353,7 +6382,7 @@
     <string name="other_sound_category_preference_title">Other sounds and vibrations</string>
 
     <!-- Configure Notifications Settings title. [CHAR LIMIT=30] -->
-    <string name="configure_notification_settings">Notification preferences</string>
+    <string name="configure_notification_settings">Notifications</string>
 
     <!-- Configure Notifications: Advanced section header [CHAR LIMIT=30] -->
     <string name="advanced_section_header">Advanced</string>
@@ -6362,7 +6391,7 @@
     <string name="profile_section_header">Work notifications</string>
 
     <!-- Configure Notifications: Title for the pulse notification light option. [CHAR LIMIT=30] -->
-    <string name="notification_pulse_title">Pulse notification light</string>
+    <string name="notification_pulse_title">Blink light</string>
 
     <!-- Configure Notifications: Title for the option controlling notifications on the lockscreen. [CHAR LIMIT=30] -->
     <string name="lock_screen_notifications_title">On the lock screen</string>
@@ -6413,32 +6442,38 @@
     <!-- [CHAR LIMIT=100] Notification importance slider title -->
     <string name="notification_importance_title">Importance</string>
 
-    <!-- [CHAR LIMIT=100] Notification Importance slider: unset importance level description -->
-    <string name="notification_importance_none">Not set</string>
-
-    <!-- [CHAR LIMIT=100] Notification Importance slider: unspecified importance level description -->
+    <!-- [CHAR LIMIT=100] Notification Importance: unspecified importance level description -->
     <string name="notification_importance_unspecified">Let the app decide</string>
 
-    <!-- [CHAR LIMIT=100] Notification Importance slider: blocked importance level description -->
+    <!-- [CHAR LIMIT=100] Notification Importance: blocked importance level description -->
     <string name="notification_importance_blocked">Never show notifications</string>
 
-    <!-- [CHAR LIMIT=100] Notification Importance slider: min importance level description -->
+    <!-- [CHAR LIMIT=100] Notification Importance: min importance level description -->
     <string name="notification_importance_min">No sound or visual interruption</string>
 
-    <!-- [CHAR LIMIT=100] Notification Importance slider: low importance level description -->
-    <string name="notification_importance_low">Show silently</string>
+    <!-- [CHAR LIMIT=100] Notification Importance: low importance level description -->
+    <string name="notification_importance_low">No sound</string>
 
-    <!-- [CHAR LIMIT=100] Notification Importance slider: normal importance level description -->
+    <!-- [CHAR LIMIT=100] Notification Importance: normal importance level description -->
     <string name="notification_importance_default">Make sound</string>
 
-    <!-- [CHAR LIMIT=100] Notification Importance slider: high importance level description -->
+    <!-- [CHAR LIMIT=100] Notification Importance: high importance level description -->
     <string name="notification_importance_high">Make sound and pop on screen</string>
 
-    <!-- [CHAR LIMIT=60] Notification importance reset button -->
-    <string name="importance_reset">Reset</string>
+    <!-- [CHAR LIMIT=100] Notification Importance summary: min importance level description -->
+    <string name="notification_importance_min_summary">Low: No sound or visual interruption</string>
+
+    <!-- [CHAR LIMIT=100] Notification Importance summary: low importance level description -->
+    <string name="notification_importance_low_summary">Medium: No sound</string>
+
+    <!-- [CHAR LIMIT=100] Notification Importance summary: normal importance level description -->
+    <string name="notification_importance_default_summary">High: Make sound</string>
+
+    <!-- [CHAR LIMIT=100] Notification Importance summary: high importance level description -->
+    <string name="notification_importance_high_summary">Urgent: Make sound and pop on screen</string>
 
     <!-- [CHAR LIMIT=40] Notification importance title -->
-    <string name="show_silently">Show silently</string>
+    <string name="allow_sound">Allow Sound</string>
 
     <!-- [CHAR LIMIT=180] Notification importance summary -->
     <string name="show_silently_summary">Don\'t make sound, vibrate, or peek these notifications into view on the current screen.</string>
@@ -6552,12 +6587,29 @@
     <!-- [CHAR LIMIT=NONE] App notification settings: link to app notification settings-->
     <string name="app_settings_link">Additional settings in the app</string>
 
+    <!-- [CHAR LIMIT=45] App notification listing summary, blocked apps -->
+    <string name="app_notification_listing_summary_zero">Turned on for all apps</string>
+    <!-- [CHAR LIMIT=45] App notification listing summary, blocked apps -->
+    <plurals name="app_notification_listing_summary_others">
+        <item quantity="one">Turned off for <xliff:g id="count" example="1">%d</xliff:g> app</item>
+        <item quantity="other">Turned off for <xliff:g id="count" example="10">%d</xliff:g> apps</item>
+    </plurals>
+
     <!-- [CHAR LIMIT=NONE] Footer listing a count of deleted channels. -->
     <plurals name="deleted_channels">
-        <item quantity="one">%d category deleted</item>
-        <item quantity="other">%d categories deleted</item>
+        <item quantity="one"><xliff:g id="count" example="1">%d</xliff:g> category deleted</item>
+        <item quantity="other"><xliff:g id="count" example="10">%d</xliff:g> categories deleted</item>
     </plurals>
 
+    <!-- [CHAR LIMIT=45\ Global notification badge setting -->
+    <string name="notification_badges">Notification badges</string>
+
+    <!-- [CHAR LIMIT=NONE] App notification settings: notifications enabled-->
+    <string name="notification_toggle_on">On</string>
+
+    <!-- [CHAR LIMIT=NONE] App notification settings: notifications disabled-->
+    <string name="notification_toggle_off">Off</string>
+
     <!-- [CHAR LIMIT=NONE] App notification settings: Block option title -->
     <string name="app_notification_block_title">Block all</string>
 
@@ -6571,7 +6623,7 @@
     <string name="notification_content_block_summary">Never show notifications in the shade or on peripheral devices</string>
 
     <!-- [CHAR LIMIT=NONE] Channel notification settings: Badging option title -->
-    <string name="notification_badge_title">Show badge</string>
+    <string name="notification_badge_title">Badge app icon</string>
 
     <!-- [CHAR LIMIT=NONE] Channel notification settings: Badge option description-->
     <string name="notification_badge_summary">Show notifications as badges on the Home app, if supported.</string>
@@ -6601,10 +6653,19 @@
     <string name="app_notification_importance_title">Importance</string>
 
     <!-- [CHAR LIMIT=180] Notification settings: lights -->
-    <string name="notification_show_lights_title">Always pulse notification light</string>
+    <string name="notification_show_lights_title">Blink light</string>
 
     <!-- [CHAR LIMIT=180] Notification settings: vibration -->
-    <string name="notification_vibrate_title">Always vibrate</string>
+    <string name="notification_vibrate_title">Vibrate</string>
+
+    <!-- [CHAR LIMIT=180] Notification settings: sound -->
+    <string name="notification_channel_sound_title">Sound</string>
+
+    <!-- [CHAR LIMIT=40] Zen mode settings: Rule delete button -->
+    <string name="zen_mode_rule_delete_button">Delete</string>
+
+    <!-- [CHAR LIMIT=40] Zen mode settings: Rule name edit button -->
+    <string name="zen_mode_rule_rename_button">Rename</string>
 
     <!-- [CHAR LIMIT=40] Zen mode settings: Rule name option and edit dialog title -->
     <string name="zen_mode_rule_name">Rule name</string>
@@ -6616,7 +6677,7 @@
     <string name="zen_mode_rule_name_warning">Rule name already in use</string>
 
     <!-- [CHAR LIMIT=40] Zen mode settings: Add rule menu option name -->
-    <string name="zen_mode_add_rule">Add rule</string>
+    <string name="zen_mode_add_rule">Add more</string>
 
     <!-- [CHAR LIMIT=40] Zen mode settings: Delete rule menu option name -->
     <string name="zen_mode_delete_rule">Delete rule</string>
@@ -6833,7 +6894,7 @@
     <string name="oem_preferred_feedback_reporter" translatable="false"></string>
 
     <!-- PIN entry dialog title for entering the administrator PIN [CHAR LIMIT=none] -->
-    <string name="restr_pin_enter_admin_pin">Enter administrator PIN</string>
+    <string name="restr_pin_enter_admin_pin">Enter admin PIN</string>
 
     <!-- Switch On/Off  -->
     <string name="switch_on_text">On</string>
@@ -6973,11 +7034,13 @@
    <string name="change_storage">Change storage</string>
 
    <!-- Label for notification settings for an specific app [CHAR LIMIT=40] -->
-   <string name="notifications_label">Notifications</string>
-   <!-- App notification summary with notifications enabled [CHAR LIMIT=40] -->
-   <string name="notifications_enabled">Normal</string>
-   <!-- App notification summary with notifications disabled [CHAR LIMIT=40] -->
-   <string name="notifications_disabled">Blocked</string>
+     <string name="notifications_label">App notifications</string>
+    <!-- App notification summary with notifications enabled [CHAR LIMIT=40] -->
+    <string name="notifications_enabled">On</string>
+    <!-- Label for showing apps with blocked notifications in list [CHAR LIMIT=30] -->
+    <string name="notifications_disabled">Everything turned off</string>
+    <!-- Label for showing apps with some blocked notifications in list [CHAR LIMIT=30] -->
+    <string name="notifications_partly_blocked"><xliff:g id="count" example="1">%1$d</xliff:g> of <xliff:g id="count" example="10">%2$d</xliff:g> categories turned off</string>
     <!-- App notification summary with notifications silenced [CHAR LIMIT=40] -->
     <string name="notifications_silenced">Silenced</string>
     <!-- App notification summary with notifications redacted [CHAR LIMIT=70] -->
@@ -6990,12 +7053,15 @@
     <string name="notifications_summary_divider">\u00A0/\u00A0</string>
     <!-- App notification summary for advanced controls -->
     <string name="notification_summary_level">Level %d</string>
+    <!-- App notification summary channel divider-->
+    <string name="notification_summary_channel"><xliff:g id="channel_name">%1$s</xliff:g> \u2022 <xliff:g id="group_name">%2$s</xliff:g></string>
+
 
    <!-- Permissions preference summary [CHAR LIMIT=40] -->
-   <plurals name="permissions_summary">
+    <plurals name="permissions_summary">
        <item quantity="one"><xliff:g id="count" example="1">%d</xliff:g> permission granted</item>
        <item quantity="other"><xliff:g id="count" example="10">%d</xliff:g> permissions granted</item>
-   </plurals>
+    </plurals>
 
    <!-- Runtime permissions preference summary [CHAR LIMIT=40] -->
    <plurals name="runtime_permissions_summary">
@@ -7025,8 +7091,19 @@
     <string name="filter_personal_apps">Personal</string>
     <!-- Label for showing work apps in list [CHAR LIMIT=30] -->
     <string name="filter_work_apps">Work</string>
+
     <!-- Label for showing apps with blocked notifications in list [CHAR LIMIT=30] -->
-    <string name="filter_notif_blocked_apps">Blocked</string>
+    <string name="filter_notif_all_apps">Apps: All</string>
+    <!-- Label for showing apps with blocked notifications in list [CHAR LIMIT=30] -->
+    <string name="filter_notif_blocked_apps">Apps: Turned off</string>
+    <!-- Label for showing categories with urgent notifications in list [CHAR LIMIT=30] -->
+    <string name="filter_notif_urgent_channels">Categories: Urgent importance</string>
+    <!-- Label for showing categories with low importance notifications in list [CHAR LIMIT=30] -->
+    <string name="filter_notif_low_channels">Categories: Low importance</string>
+    <!-- Label for showing categories with blocked notifications in list [CHAR LIMIT=30] -->
+    <string name="filter_notif_blocked_channels">Categories: Turned off</string>
+    <!-- Label for showing categories with notifications that override dnd in list [CHAR LIMIT=30] -->
+    <string name="filter_notif_dnd_channels">Categories: Overrides Do Not Disturb</string>
 
     <!-- Title for advanced application management settings [CHAR LIMIT=30] -->
     <string name="advanced_apps">Advanced</string>
@@ -7412,7 +7489,8 @@
     <string name="app_list_preference_none">None</string>
 
     <!-- Warning message about disabling usage access on profile owner [CHAR LIMIT=NONE] -->
-    <string name="work_profile_usage_access_warning">Turning off usage access for this app doesn\u2019t prevent your administrator tracking data usage for apps in your work profile.</string>
+    <string name="work_profile_usage_access_warning">Turning off usage access for this app doesn\'t
+        prevent your admin from tracking data usage for apps in your work profile</string>
 
     <!-- Number of characters used for lock screen text [CHAR LIMIT=NONE] -->
     <string name="accessibility_lock_screen_progress"><xliff:g id="count" example="1">%1$d</xliff:g> of <xliff:g id="count" example="1">%2$d</xliff:g> characters used</string>
@@ -7605,15 +7683,22 @@
     <!-- Title for dialog displayed to tell user that screenshots are disabled by an admin [CHAR LIMIT=50] -->
     <string name="disabled_by_policy_title_screen_capture">Screenshot not allowed</string>
     <!-- Shown when the user tries to change a settings locked by an admin [CHAR LIMIT=200] -->
-    <string name="default_admin_support_msg">This action is disabled. Contact your organization\'s administrator to learn more.</string>
+    <string name="default_admin_support_msg">This action is disabled. To learn more, contact your
+        organization\'s admin.</string>
     <!-- Shown in dialog to allow user to see more information about the device admin [CHAR LIMIT=30] -->
     <string name="admin_support_more_info">More details</string>
     <!-- Shown in admin details page to warn user about policies the admin can set in a work profile. [CHAR LIMIT=NONE] -->
-    <string name="admin_profile_owner_message">Your administrator can monitor and manage apps and data associated with your work profile, including settings, permissions, corporate access, network activity, and the device\'s location information.</string>
+    <string name="admin_profile_owner_message">Your admin can monitor and manage apps and data
+        associated with your work profile, including settings, permissions, corporate access,
+        network activity, and the device\'s location information.</string>
     <!-- Shown in admin details page to warn user about policies the admin can set on a user. [CHAR LIMIT=NONE] -->
-    <string name="admin_profile_owner_user_message">Your administrator can monitor and manage apps and data associated with this user, including settings, permissions, corporate access, network activity, and the device\'s location information.</string>
+    <string name="admin_profile_owner_user_message">Your admin can monitor and manage apps and data
+        associated with this user, including settings, permissions, corporate access,
+        network activity, and the device\'s location information.</string>
     <!-- Shown in admin details page to warn user about policies the admin can set on a device. [CHAR LIMIT=NONE] -->
-    <string name="admin_device_owner_message">Your administrator can monitor and manage apps and data associated with this device, including settings, permissions, corporate access, network activity, and the device\'s location information.</string>
+    <string name="admin_device_owner_message">Your admin can monitor and manage apps and data
+        associated with this device, including settings, permissions, corporate access,
+        network activity, and the device\'s location information.</string>
 
     <!-- Turn off a conditional state of the device (e.g. airplane mode, or hotspot) [CHAR LIMIT=30] -->
     <string name="condition_turn_off">Turn off</string>
@@ -8270,9 +8355,9 @@
     <!-- Label explaining that the admin can see apps installed on the device. [CHAR LIMIT=NONE] -->
     <string name="enterprise_privacy_installed_packages">List of apps on your device</string>
     <!-- Label explaining that the admin can see app usage statistics. [CHAR LIMIT=NONE] -->
-    <string name="enterprise_privacy_usage_stats">Time and data spent in each app on your device</string>
+    <string name="enterprise_privacy_usage_stats">Amount of time and data spent in each app</string>
     <!-- Label explaining that the admin can retrieve network logs on the device. [CHAR LIMIT=NONE] -->
-    <string name="enterprise_privacy_network_logs">Network traffic logs on your device</string>
+    <string name="enterprise_privacy_network_logs">Most recent network traffic log</string>
     <!-- Label explaining that the admin can request bug reports on the device. [CHAR LIMIT=NONE] -->
     <string name="enterprise_privacy_bug_reports">Most recent bug report</string>
     <!-- Label explaining that the admin can retrieve security on from the device. [CHAR LIMIT=NONE] -->
@@ -8281,6 +8366,8 @@
     <string name="enterprise_privacy_none">None</string>
     <!-- Label indicating that the admin installed one or more apps on the device. -->
     <string name="enterprise_privacy_enterprise_installed_packages">Apps installed</string>
+    <!-- Label explaining that the the number of apps is an estimation. [CHAR LIMIT=NONE] -->
+    <string name="enterprise_privacy_apps_count_estimation_info">Number of apps is estimated. It may not include apps installed outside of the Play Store.</string>
     <!-- Summary indicating the number of apps that a label (e.g. installed apps or apps granted a particular permission) refers to. The number shown is a minimum as there may be additional apps we do not know about. [CHAR LIMIT=NONE] -->
     <plurals name="enterprise_privacy_number_packages_lower_bound">
         <item quantity="one">Minimum <xliff:g id="count">%d</xliff:g> app</item>
diff --git a/res/xml/enterprise_privacy_settings.xml b/res/xml/enterprise_privacy_settings.xml
index e6246c2..aee897d 100644
--- a/res/xml/enterprise_privacy_settings.xml
+++ b/res/xml/enterprise_privacy_settings.xml
@@ -27,21 +27,19 @@
 
     <PreferenceCategory android:title="@string/enterprise_privacy_exposure_category">
         <com.android.settings.DividerPreference
-                android:key="enterprise_data"
                 android:layout_height="wrap_content"
                 android:title="@string/enterprise_privacy_enterprise_data"
                 settings:multiLine="true"/>
         <com.android.settings.DividerPreference
-                android:key="installed_packages"
                 android:title="@string/enterprise_privacy_installed_packages"
                 settings:multiLine="true"/>
         <com.android.settings.DividerPreference
-                android:key="usage_stats"
                 android:title="@string/enterprise_privacy_usage_stats"
                 settings:multiLine="true"/>
         <com.android.settings.DividerPreference
                 android:key="network_logs"
                 android:title="@string/enterprise_privacy_network_logs"
+                android:visibility="gone"
                 settings:multiLine="true"/>
         <com.android.settings.DividerPreference
                 android:key="bug_reports"
@@ -50,6 +48,7 @@
         <com.android.settings.DividerPreference
                 android:key="security_logs"
                 android:title="@string/enterprise_privacy_security_logs"
+                android:visibility="gone"
                 settings:multiLine="true"/>
     </PreferenceCategory>
 
@@ -57,58 +56,70 @@
         <com.android.settings.DividerPreference
                 android:key="number_enterprise_installed_packages"
                 android:title="@string/enterprise_privacy_enterprise_installed_packages"
+                android:visibility="gone"
                 settings:multiLine="true"/>
         <com.android.settings.DividerPreference
                 android:key="enterprise_privacy_number_location_access_packages"
                 android:title="@string/enterprise_privacy_location_access"
+                android:visibility="gone"
                 settings:multiLine="true"/>
         <com.android.settings.DividerPreference
                 android:key="enterprise_privacy_number_microphone_access_packages"
                 android:title="@string/enterprise_privacy_microphone_access"
+                android:visibility="gone"
                 settings:multiLine="true"/>
         <com.android.settings.DividerPreference
                 android:key="enterprise_privacy_number_camera_access_packages"
                 android:title="@string/enterprise_privacy_camera_access"
+                android:visibility="gone"
                 settings:multiLine="true"/>
         <com.android.settings.DividerPreference
                 android:key="number_enterprise_set_default_apps"
                 android:title="@string/enterprise_privacy_enterprise_set_default_apps"
+                android:visibility="gone"
                 settings:multiLine="true"/>
         <com.android.settings.DividerPreference
                 android:key="always_on_vpn_primary_user"
+                android:visibility="gone"
                 settings:multiLine="true"/>
         <com.android.settings.DividerPreference
                 android:key="always_on_vpn_managed_profile"
                 android:title="@string/enterprise_privacy_always_on_vpn_work"
+                android:visibility="gone"
                 settings:multiLine="true"/>
         <com.android.settings.DividerPreference
                 android:key="input_method"
                 android:title="@string/enterprise_privacy_input_method"
+                android:visibility="gone"
                 settings:multiLine="true"/>
         <com.android.settings.DividerPreference
                 android:key="global_http_proxy"
                 android:title="@string/enterprise_privacy_global_http_proxy"
+                android:visibility="gone"
                 settings:multiLine="true"/>
         <com.android.settings.DividerPreference
                 android:key="ca_certs"
                 android:title="@string/enterprise_privacy_ca_certs"
+                android:visibility="gone"
                 settings:multiLine="true"/>
     </PreferenceCategory>
 
     <PreferenceCategory android:title="@string/enterprise_privacy_device_access_category">
         <com.android.settings.DividerPreference
-                android:key="lock_device"
                 android:title="@string/enterprise_privacy_lock_device"
                 settings:multiLine="true"/>
         <com.android.settings.DividerPreference
-                android:key="wipe_device"
                 android:title="@string/enterprise_privacy_wipe_device"
                 settings:multiLine="true"/>
         <com.android.settings.DividerPreference
                 android:key="failed_password_wipe_primary_user"
+                android:title="@string/enterprise_privacy_failed_password_wipe_device"
+                android:visibility="gone"
                 settings:multiLine="true"/>
         <com.android.settings.DividerPreference
                 android:key="failed_password_wipe_managed_profile"
+                android:title="@string/enterprise_privacy_failed_password_wipe_work"
+                android:visibility="gone"
                 settings:multiLine="true"/>
     </PreferenceCategory>
 </PreferenceScreen>
diff --git a/src/com/android/settings/applications/ApplicationFeatureProvider.java b/src/com/android/settings/applications/ApplicationFeatureProvider.java
index 51e79d8..1855308 100644
--- a/src/com/android/settings/applications/ApplicationFeatureProvider.java
+++ b/src/com/android/settings/applications/ApplicationFeatureProvider.java
@@ -30,22 +30,13 @@
     AppHeaderController newAppHeaderController(Fragment fragment, View appHeader);
 
     /**
-     * Count all installed packages, irrespective of install reason.
-     */
-    public static final int IGNORE_INSTALL_REASON = -1;
-
-    /**
-     * Calculates the total number of apps installed on the device, across all users and managed
-     * profiles.
+     * Calculates the total number of apps installed on the device via policy across all users
+     * and managed profiles.
      *
-     * @param installReason Only consider apps with this install reason; may be any install reason
-     *         defined in {@link android.content.pm.PackageManager} or
-     *         {@link #IGNORE_INSTALL_REASON} to count all apps, irrespective of install reason.
      * @param async Whether to count asynchronously in a background thread
      * @param callback The callback to invoke with the result
      */
-    void calculateNumberOfInstalledApps(int installReason, boolean async,
-            NumberOfAppsCallback callback);
+    void calculateNumberOfPolicyInstalledApps(boolean async, NumberOfAppsCallback callback);
 
     /**
      * Asynchronously calculates the total number of apps installed on the device, across all users
diff --git a/src/com/android/settings/applications/ApplicationFeatureProviderImpl.java b/src/com/android/settings/applications/ApplicationFeatureProviderImpl.java
index 77c9f3e..ca19dca 100644
--- a/src/com/android/settings/applications/ApplicationFeatureProviderImpl.java
+++ b/src/com/android/settings/applications/ApplicationFeatureProviderImpl.java
@@ -20,6 +20,7 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.ComponentInfo;
+import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.content.pm.UserInfo;
 import android.os.RemoteException;
@@ -56,10 +57,9 @@
     }
 
     @Override
-    public void calculateNumberOfInstalledApps(int installReason, boolean async,
-            NumberOfAppsCallback callback) {
-        final AllUserInstalledAppCounter counter = new AllUserInstalledAppCounter(mContext,
-                installReason, mPm, callback);
+    public void calculateNumberOfPolicyInstalledApps(boolean async, NumberOfAppsCallback callback) {
+        final AllUserPolicyInstalledAppCounter counter =
+                new AllUserPolicyInstalledAppCounter(mContext, mPm, callback);
         if (async) {
             counter.execute();
         } else {
@@ -113,12 +113,12 @@
         return activities;
     }
 
-    private static class AllUserInstalledAppCounter extends InstalledAppCounter {
+    private static class AllUserPolicyInstalledAppCounter extends InstalledAppCounter {
         private NumberOfAppsCallback mCallback;
 
-        AllUserInstalledAppCounter(Context context, int installReason,
-                PackageManagerWrapper packageManager, NumberOfAppsCallback callback) {
-            super(context, installReason, packageManager);
+        AllUserPolicyInstalledAppCounter(Context context, PackageManagerWrapper packageManager,
+                                         NumberOfAppsCallback callback) {
+            super(context, PackageManager.INSTALL_REASON_POLICY, packageManager);
             mCallback = callback;
         }
 
diff --git a/src/com/android/settings/applications/InstalledAppCounter.java b/src/com/android/settings/applications/InstalledAppCounter.java
index 251b0a2..8065d49 100644
--- a/src/com/android/settings/applications/InstalledAppCounter.java
+++ b/src/com/android/settings/applications/InstalledAppCounter.java
@@ -25,6 +25,11 @@
 
 public abstract class InstalledAppCounter extends AppCounter {
 
+    /**
+     * Count all installed packages, irrespective of install reason.
+     */
+    public static final int IGNORE_INSTALL_REASON = -1;
+
     private final int mInstallReason;
     private final PackageManagerWrapper mPackageManager;
 
@@ -38,7 +43,7 @@
     @Override
     protected boolean includeInCount(ApplicationInfo info) {
         final int userId = UserHandle.getUserId(info.uid);
-        if (mInstallReason != ApplicationFeatureProvider.IGNORE_INSTALL_REASON
+        if (mInstallReason != IGNORE_INSTALL_REASON
                 && mPackageManager.getInstallReason(info.packageName,
                         new UserHandle(userId)) != mInstallReason) {
             return false;
diff --git a/src/com/android/settings/applications/ManageApplications.java b/src/com/android/settings/applications/ManageApplications.java
index 826e5db..f83dfeb 100644
--- a/src/com/android/settings/applications/ManageApplications.java
+++ b/src/com/android/settings/applications/ManageApplications.java
@@ -69,7 +69,6 @@
 import com.android.settings.SettingsActivity;
 import com.android.settings.Utils;
 import com.android.settings.applications.AppStateAppOpsBridge.PermissionState;
-import com.android.settings.applications.AppStateInstallAppsBridge.InstallAppsState;
 import com.android.settings.applications.AppStateUsageBridge.UsageState;
 import com.android.settings.core.InstrumentedPreferenceFragment;
 import com.android.settings.dashboard.SummaryLoader;
@@ -1398,7 +1397,7 @@
         @Override
         public void setListening(boolean listening) {
             if (listening) {
-                new InstalledAppCounter(mContext, ApplicationFeatureProvider.IGNORE_INSTALL_REASON,
+                new InstalledAppCounter(mContext, InstalledAppCounter.IGNORE_INSTALL_REASON,
                         new PackageManagerWrapperImpl(mContext.getPackageManager())) {
                     @Override
                     protected void onCountComplete(int num) {
diff --git a/src/com/android/settings/enterprise/DevicePolicyManagerWrapper.java b/src/com/android/settings/enterprise/DevicePolicyManagerWrapper.java
index ed9dd94..e988fda 100644
--- a/src/com/android/settings/enterprise/DevicePolicyManagerWrapper.java
+++ b/src/com/android/settings/enterprise/DevicePolicyManagerWrapper.java
@@ -81,6 +81,20 @@
             String permission);
 
     /**
+     * Calls {@code DevicePolicyManager.isSecurityLoggingEnabled()}.
+     *
+     * @see android.app.admin.DevicePolicyManager#isSecurityLoggingEnabled
+     */
+    boolean isSecurityLoggingEnabled(@Nullable ComponentName admin);
+
+    /**
+     * Calls {@code DevicePolicyManager.isNetworkLoggingEnabled()}.
+     *
+     * @see android.app.admin.DevicePolicyManager#isNetworkLoggingEnabled
+     */
+    boolean isNetworkLoggingEnabled(@Nullable ComponentName admin);
+
+    /**
      * Calls {@code DevicePolicyManager.getLastSecurityLogRetrievalTime()}.
      *
      * @see android.app.admin.DevicePolicyManager#getLastSecurityLogRetrievalTime
diff --git a/src/com/android/settings/enterprise/DevicePolicyManagerWrapperImpl.java b/src/com/android/settings/enterprise/DevicePolicyManagerWrapperImpl.java
index 647b4a7..2d379d9 100644
--- a/src/com/android/settings/enterprise/DevicePolicyManagerWrapperImpl.java
+++ b/src/com/android/settings/enterprise/DevicePolicyManagerWrapperImpl.java
@@ -19,6 +19,7 @@
 import android.annotation.NonNull;
 import android.app.admin.DevicePolicyManager;
 import android.content.ComponentName;
+import android.os.SystemProperties;
 import android.os.UserHandle;
 import android.support.annotation.Nullable;
 
@@ -68,6 +69,18 @@
     }
 
     @Override
+    public boolean isSecurityLoggingEnabled(@Nullable ComponentName admin) {
+        // TODO(b/36584321): Switch to DevicePolicyManager#isSecurityLoggingEnabled once that is
+        // callable by the system.
+        return SystemProperties.getBoolean("persist.logd.security", false);
+    }
+
+    @Override
+    public boolean isNetworkLoggingEnabled(@Nullable ComponentName admin) {
+        return mDpm.isNetworkLoggingEnabled(admin);
+    }
+
+    @Override
     public long getLastSecurityLogRetrievalTime() {
         return mDpm.getLastSecurityLogRetrievalTime();
     }
diff --git a/src/com/android/settings/enterprise/EnterpriseInstalledPackagesPreferenceController.java b/src/com/android/settings/enterprise/EnterpriseInstalledPackagesPreferenceController.java
index e70396d..acbcc2e 100644
--- a/src/com/android/settings/enterprise/EnterpriseInstalledPackagesPreferenceController.java
+++ b/src/com/android/settings/enterprise/EnterpriseInstalledPackagesPreferenceController.java
@@ -14,8 +14,6 @@
 package com.android.settings.enterprise;
 
 import android.content.Context;
-import android.content.pm.PackageManager;
-import android.content.res.Resources;
 import android.support.v7.preference.Preference;
 
 import com.android.settings.R;
@@ -42,8 +40,7 @@
 
     @Override
     public void updateState(Preference preference) {
-        mFeatureProvider.calculateNumberOfInstalledApps(
-                PackageManager.INSTALL_REASON_POLICY, true /* async */,
+        mFeatureProvider.calculateNumberOfPolicyInstalledApps(true /* async */,
                 (num) -> {
                     if (num == 0) {
                         preference.setVisible(false);
@@ -69,8 +66,8 @@
         // changes to the pref's visibility made in updateState() would not be seen by the indexer.
         // We block and return synchronously whether there are enterprise-installed apps or not.
         final Boolean[] haveEnterpriseInstalledPackages = { null };
-        mFeatureProvider.calculateNumberOfInstalledApps(PackageManager.INSTALL_REASON_POLICY,
-                false /* async */, (num) -> haveEnterpriseInstalledPackages[0] = num > 0);
+        mFeatureProvider.calculateNumberOfPolicyInstalledApps(false /* async */,
+                (num) -> haveEnterpriseInstalledPackages[0] = num > 0);
         return haveEnterpriseInstalledPackages[0];
     }
 
diff --git a/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProvider.java b/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProvider.java
index 4478865..4ad0f2e 100644
--- a/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProvider.java
+++ b/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProvider.java
@@ -64,6 +64,16 @@
     Date getLastNetworkLogRetrievalTime();
 
     /**
+     * Returns whether security logging is currently enabled.
+     */
+    boolean isSecurityLoggingEnabled();
+
+    /**
+     * Returns whether network logging is currently enabled.
+     */
+    boolean isNetworkLoggingEnabled();
+
+    /**
      * Returns whether the Device Owner in the primary user set an always-on VPN.
      */
     boolean isAlwaysOnVpnSetInPrimaryUser();
diff --git a/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProviderImpl.java b/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProviderImpl.java
index 69eaa2e..6d038dc 100644
--- a/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProviderImpl.java
+++ b/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProviderImpl.java
@@ -132,6 +132,16 @@
     }
 
     @Override
+    public boolean isSecurityLoggingEnabled() {
+        return mDpm.isSecurityLoggingEnabled(null);
+    }
+
+    @Override
+    public boolean isNetworkLoggingEnabled() {
+        return mDpm.isNetworkLoggingEnabled(null);
+    }
+
+    @Override
     public boolean isAlwaysOnVpnSetInPrimaryUser() {
         return VpnUtils.isAlwaysOnVpnSet(mCm, MY_USER_ID);
     }
diff --git a/src/com/android/settings/enterprise/EnterprisePrivacySettings.java b/src/com/android/settings/enterprise/EnterprisePrivacySettings.java
index 55ec3ea..9649d84 100644
--- a/src/com/android/settings/enterprise/EnterprisePrivacySettings.java
+++ b/src/com/android/settings/enterprise/EnterprisePrivacySettings.java
@@ -58,7 +58,6 @@
     private static List<PreferenceController> buildPreferenceControllers(Context context,
             Lifecycle lifecycle, boolean async) {
         final List controllers = new ArrayList<PreferenceController>();
-        controllers.add(new InstalledPackagesPreferenceController(context));
         controllers.add(new NetworkLogsPreferenceController(context));
         controllers.add(new BugReportsPreferenceController(context));
         controllers.add(new SecurityLogsPreferenceController(context));
diff --git a/src/com/android/settings/enterprise/InstalledPackagesPreferenceController.java b/src/com/android/settings/enterprise/InstalledPackagesPreferenceController.java
deleted file mode 100644
index 43436b1..0000000
--- a/src/com/android/settings/enterprise/InstalledPackagesPreferenceController.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2016 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.enterprise;
-
-import android.content.Context;
-import android.content.res.Resources;
-import android.support.v7.preference.Preference;
-
-import com.android.settings.R;
-import com.android.settings.applications.ApplicationFeatureProvider;
-import com.android.settings.core.PreferenceController;
-import com.android.settings.overlay.FeatureFactory;
-
-public class InstalledPackagesPreferenceController extends PreferenceController {
-
-    private static final String KEY_INSTALLED_PACKAGES = "installed_packages";
-    private final ApplicationFeatureProvider mFeatureProvider;
-
-    public InstalledPackagesPreferenceController(Context context) {
-        super(context);
-        mFeatureProvider = FeatureFactory.getFactory(context)
-                .getApplicationFeatureProvider(context);
-    }
-
-    @Override
-    public void updateState(Preference preference) {
-        mFeatureProvider.calculateNumberOfInstalledApps(
-                ApplicationFeatureProvider.IGNORE_INSTALL_REASON, true /* async */,
-                (num) -> {
-                    if (num == 0) {
-                        preference.setSummary("");
-                    } else {
-                        preference.setSummary(mContext.getResources().getQuantityString(
-                                R.plurals.enterprise_privacy_number_packages, num, num));
-                    }
-                });
-    }
-
-    @Override
-    public boolean isAvailable() {
-        return true;
-    }
-
-    @Override
-    public String getPreferenceKey() {
-        return KEY_INSTALLED_PACKAGES;
-    }
-}
diff --git a/src/com/android/settings/enterprise/NetworkLogsPreferenceController.java b/src/com/android/settings/enterprise/NetworkLogsPreferenceController.java
index d7da525..fd87bbe 100644
--- a/src/com/android/settings/enterprise/NetworkLogsPreferenceController.java
+++ b/src/com/android/settings/enterprise/NetworkLogsPreferenceController.java
@@ -31,6 +31,12 @@
     }
 
     @Override
+    public boolean isAvailable() {
+        return mFeatureProvider.isNetworkLoggingEnabled() ||
+                mFeatureProvider.getLastNetworkLogRetrievalTime() != null;
+    }
+
+    @Override
     public String getPreferenceKey() {
         return KEY_NETWORK_LOGS;
     }
diff --git a/src/com/android/settings/enterprise/SecurityLogsPreferenceController.java b/src/com/android/settings/enterprise/SecurityLogsPreferenceController.java
index 60baa63..482b014 100644
--- a/src/com/android/settings/enterprise/SecurityLogsPreferenceController.java
+++ b/src/com/android/settings/enterprise/SecurityLogsPreferenceController.java
@@ -31,6 +31,12 @@
     }
 
     @Override
+    public boolean isAvailable() {
+        return mFeatureProvider.isSecurityLoggingEnabled() ||
+                mFeatureProvider.getLastSecurityLogRetrievalTime() != null;
+    }
+
+    @Override
     public String getPreferenceKey() {
         return KEY_SECURITY_LOGS;
     }
diff --git a/tests/robotests/src/com/android/settings/applications/ApplicationFeatureProviderImplTest.java b/tests/robotests/src/com/android/settings/applications/ApplicationFeatureProviderImplTest.java
index a513f71..f946780 100644
--- a/tests/robotests/src/com/android/settings/applications/ApplicationFeatureProviderImplTest.java
+++ b/tests/robotests/src/com/android/settings/applications/ApplicationFeatureProviderImplTest.java
@@ -88,7 +88,7 @@
                 mPackageManagerService, mDevicePolicyManager);
     }
 
-    private void verifyCalculateNumberOfInstalledApps(boolean async) {
+    private void verifyCalculateNumberOfPolicyInstalledApps(boolean async) {
         setUpUsersAndInstalledApps();
 
         when(mPackageManager.getInstallReason(APP_1, new UserHandle(MAIN_USER_ID)))
@@ -96,18 +96,8 @@
         when(mPackageManager.getInstallReason(APP_2, new UserHandle(MANAGED_PROFILE_ID)))
                 .thenReturn(PackageManager.INSTALL_REASON_POLICY);
 
-        // Count all installed apps.
         mAppCount = -1;
-        mProvider.calculateNumberOfInstalledApps(ApplicationFeatureProvider.IGNORE_INSTALL_REASON,
-                async, (num) -> mAppCount = num);
-        if (async) {
-            ShadowApplication.runBackgroundTasks();
-        }
-        assertThat(mAppCount).isEqualTo(2);
-
-        // Count apps with specific install reason only.
-        mAppCount = -1;
-        mProvider.calculateNumberOfInstalledApps(PackageManager.INSTALL_REASON_POLICY, async,
+        mProvider.calculateNumberOfPolicyInstalledApps(async,
                 (num) -> mAppCount = num);
         if (async) {
             ShadowApplication.runBackgroundTasks();
@@ -117,12 +107,12 @@
 
     @Test
     public void testCalculateNumberOfInstalledAppsSync() {
-        verifyCalculateNumberOfInstalledApps(false /* async */);
+        verifyCalculateNumberOfPolicyInstalledApps(false /* async */);
     }
 
     @Test
     public void testCalculateNumberOfInstalledAppsAsync() {
-        verifyCalculateNumberOfInstalledApps(true /* async */);
+        verifyCalculateNumberOfPolicyInstalledApps(true /* async */);
     }
 
     private void verifyCalculateNumberOfAppsWithAdminGrantedPermissions(boolean async)
diff --git a/tests/robotests/src/com/android/settings/applications/InstalledAppCounterTest.java b/tests/robotests/src/com/android/settings/applications/InstalledAppCounterTest.java
index 8b1c9c9..1134ec5 100644
--- a/tests/robotests/src/com/android/settings/applications/InstalledAppCounterTest.java
+++ b/tests/robotests/src/com/android/settings/applications/InstalledAppCounterTest.java
@@ -156,7 +156,7 @@
                 .thenReturn(PackageManager.INSTALL_REASON_UNKNOWN);
 
         // Count the number of all apps installed, irrespective of install reason.
-        count(ApplicationFeatureProvider.IGNORE_INSTALL_REASON, async);
+        count(InstalledAppCounter.IGNORE_INSTALL_REASON, async);
         assertThat(mInstalledAppCount).isEqualTo(5);
 
         // Verify that installed packages were retrieved for the users returned by
diff --git a/tests/robotests/src/com/android/settings/enterprise/AdminActionPreferenceControllerBaseTest.java b/tests/robotests/src/com/android/settings/enterprise/AdminActionPreferenceControllerBaseTest.java
index 6442242..b5d6b7a 100644
--- a/tests/robotests/src/com/android/settings/enterprise/AdminActionPreferenceControllerBaseTest.java
+++ b/tests/robotests/src/com/android/settings/enterprise/AdminActionPreferenceControllerBaseTest.java
@@ -21,11 +21,14 @@
 import com.android.settings.SettingsRobolectricTestRunner;
 import com.android.settings.TestConfig;
 
+import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.robolectric.annotation.Config;
 
 import java.util.Date;
 
+import static com.google.common.truth.Truth.assertThat;
+
 /**
  * Tests for {@link AdminActionPreferenceControllerBase}.
  */
@@ -47,6 +50,11 @@
         mDate = date;
     }
 
+    @Test
+    public void testIsAvailable() {
+        assertThat(mController.isAvailable()).isTrue();
+    }
+
     @Override
     public String getPreferenceKey() {
         return null;
diff --git a/tests/robotests/src/com/android/settings/enterprise/BugReportsPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/enterprise/BugReportsPreferenceControllerTest.java
index ae1e264..b9c838b 100644
--- a/tests/robotests/src/com/android/settings/enterprise/BugReportsPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/enterprise/BugReportsPreferenceControllerTest.java
@@ -20,11 +20,13 @@
 import com.android.settings.TestConfig;
 import com.android.settings.testutils.FakeFeatureFactory;
 
+import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.robolectric.annotation.Config;
 
 import java.util.Date;
 
+import static com.google.common.truth.Truth.assertThat;
 import static org.mockito.Mockito.when;
 
 /**
@@ -47,6 +49,11 @@
                 .thenReturn(date);
     }
 
+    @Test
+    public void testIsAvailable() {
+        assertThat(mController.isAvailable()).isTrue();
+    }
+
     @Override
     public String getPreferenceKey() {
         return "bug_reports";
diff --git a/tests/robotests/src/com/android/settings/enterprise/EnterpriseInstalledPackagesPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/enterprise/EnterpriseInstalledPackagesPreferenceControllerTest.java
index ff884e4..4255d96 100644
--- a/tests/robotests/src/com/android/settings/enterprise/EnterpriseInstalledPackagesPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/enterprise/EnterpriseInstalledPackagesPreferenceControllerTest.java
@@ -17,8 +17,6 @@
 package com.android.settings.enterprise;
 
 import android.content.Context;
-import android.content.pm.PackageManager;
-import android.content.res.Resources;
 import android.support.v7.preference.Preference;
 
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
@@ -70,11 +68,10 @@
         doAnswer(new Answer() {
             public Object answer(InvocationOnMock invocation) {
                 ((ApplicationFeatureProvider.NumberOfAppsCallback)
-                        invocation.getArguments()[2]).onNumberOfAppsResult(number);
+                        invocation.getArguments()[1]).onNumberOfAppsResult(number);
                 return null;
             }}).when(mFeatureFactory.applicationFeatureProvider)
-                    .calculateNumberOfInstalledApps(eq(PackageManager.INSTALL_REASON_POLICY),
-                            eq(async), anyObject());
+                    .calculateNumberOfPolicyInstalledApps(eq(async), anyObject());
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProviderImplTest.java b/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProviderImplTest.java
index 2afcab9..8d78ef7 100644
--- a/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProviderImplTest.java
+++ b/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacyFeatureProviderImplTest.java
@@ -177,6 +177,24 @@
     }
 
     @Test
+    public void testIsSecurityLoggingEnabled() {
+        when(mDevicePolicyManager.isSecurityLoggingEnabled(null)).thenReturn(false);
+        assertThat(mProvider.isSecurityLoggingEnabled()).isFalse();
+
+        when(mDevicePolicyManager.isSecurityLoggingEnabled(null)).thenReturn(true);
+        assertThat(mProvider.isSecurityLoggingEnabled()).isTrue();
+    }
+
+    @Test
+    public void testIsNetworkLoggingEnabled() {
+        when(mDevicePolicyManager.isNetworkLoggingEnabled(null)).thenReturn(false);
+        assertThat(mProvider.isNetworkLoggingEnabled()).isFalse();
+
+        when(mDevicePolicyManager.isNetworkLoggingEnabled(null)).thenReturn(true);
+        assertThat(mProvider.isNetworkLoggingEnabled()).isTrue();
+    }
+
+    @Test
     public void testIsAlwaysOnVpnSetInPrimaryUser() {
         when(mConnectivityManger.getAlwaysOnVpnPackageForUser(MY_USER_ID)).thenReturn(null);
         assertThat(mProvider.isAlwaysOnVpnSetInPrimaryUser()).isFalse();
diff --git a/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacySettingsTest.java b/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacySettingsTest.java
index 8a11779..2225687 100644
--- a/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacySettingsTest.java
+++ b/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacySettingsTest.java
@@ -117,31 +117,34 @@
 
     private void verifyPreferenceControllers(List<PreferenceController> controllers) {
         assertThat(controllers).isNotNull();
-        assertThat(controllers.size()).isEqualTo(16);
-        assertThat(controllers.get(0)).isInstanceOf(InstalledPackagesPreferenceController.class);
-        assertThat(controllers.get(1)).isInstanceOf(NetworkLogsPreferenceController.class);
-        assertThat(controllers.get(2)).isInstanceOf(BugReportsPreferenceController.class);
-        assertThat(controllers.get(3)).isInstanceOf(SecurityLogsPreferenceController.class);
-        assertThat(controllers.get(4)).isInstanceOf(
+        assertThat(controllers.size()).isEqualTo(15);
+        int position = 0;
+        assertThat(controllers.get(position++)).isInstanceOf(NetworkLogsPreferenceController.class);
+        assertThat(controllers.get(position++)).isInstanceOf(BugReportsPreferenceController.class);
+        assertThat(controllers.get(position++)).isInstanceOf(
+                SecurityLogsPreferenceController.class);
+        assertThat(controllers.get(position++)).isInstanceOf(
                 EnterpriseInstalledPackagesPreferenceController.class);
-        assertThat(controllers.get(5)).isInstanceOf(
+        assertThat(controllers.get(position++)).isInstanceOf(
                 AdminGrantedLocationPermissionsPreferenceController.class);
-        assertThat(controllers.get(6)).isInstanceOf(
+        assertThat(controllers.get(position++)).isInstanceOf(
                 AdminGrantedMicrophonePermissionPreferenceController.class);
-        assertThat(controllers.get(7)).isInstanceOf(
+        assertThat(controllers.get(position++)).isInstanceOf(
                 AdminGrantedCameraPermissionPreferenceController.class);
-        assertThat(controllers.get(8)).isInstanceOf(
+        assertThat(controllers.get(position++)).isInstanceOf(
                 EnterpriseSetDefaultAppsPreferenceController.class);
-        assertThat(controllers.get(9)).isInstanceOf(
+        assertThat(controllers.get(position++)).isInstanceOf(
                 AlwaysOnVpnPrimaryUserPreferenceController.class);
-        assertThat(controllers.get(10)).isInstanceOf(
+        assertThat(controllers.get(position++)).isInstanceOf(
                 AlwaysOnVpnManagedProfilePreferenceController.class);
-        assertThat(controllers.get(11)).isInstanceOf(GlobalHttpProxyPreferenceController.class);
-        assertThat(controllers.get(12)).isInstanceOf(CaCertsPreferenceController.class);
-        assertThat(controllers.get(13)).isInstanceOf(
+        assertThat(controllers.get(position++)).isInstanceOf(
+                GlobalHttpProxyPreferenceController.class);
+        assertThat(controllers.get(position++)).isInstanceOf(
+                CaCertsPreferenceController.class);
+        assertThat(controllers.get(position++)).isInstanceOf(
                 FailedPasswordWipePrimaryUserPreferenceController.class);
-        assertThat(controllers.get(14)).isInstanceOf(
+        assertThat(controllers.get(position++)).isInstanceOf(
                 FailedPasswordWipeManagedProfilePreferenceController.class);
-        assertThat(controllers.get(15)).isInstanceOf(ImePreferenceController.class);
+        assertThat(controllers.get(position++)).isInstanceOf(ImePreferenceController.class);
     }
 }
diff --git a/tests/robotests/src/com/android/settings/enterprise/InstalledPackagesPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/enterprise/InstalledPackagesPreferenceControllerTest.java
deleted file mode 100644
index 4a5a183..0000000
--- a/tests/robotests/src/com/android/settings/enterprise/InstalledPackagesPreferenceControllerTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (C) 2016 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.enterprise;
-
-import android.content.Context;
-import android.content.res.Resources;
-import android.support.v7.preference.Preference;
-
-import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-import com.android.settings.R;
-import com.android.settings.SettingsRobolectricTestRunner;
-import com.android.settings.TestConfig;
-import com.android.settings.applications.ApplicationFeatureProvider;
-import com.android.settings.testutils.FakeFeatureFactory;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Answers;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-import org.robolectric.annotation.Config;
-
-import static com.google.common.truth.Truth.assertThat;
-import static org.mockito.Mockito.anyObject;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.when;
-
-/**
- * Tests for {@link InstalledPackagesPreferenceController}.
- */
-@RunWith(SettingsRobolectricTestRunner.class)
-@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION)
-public final class InstalledPackagesPreferenceControllerTest {
-
-    @Mock(answer = Answers.RETURNS_DEEP_STUBS)
-    private Context mContext;
-    private FakeFeatureFactory mFeatureFactory;
-
-    private InstalledPackagesPreferenceController mController;
-
-    @Before
-    public void setUp() {
-        MockitoAnnotations.initMocks(this);
-        FakeFeatureFactory.setupForTest(mContext);
-        mFeatureFactory = (FakeFeatureFactory) FakeFeatureFactory.getFactory(mContext);
-        mController = new InstalledPackagesPreferenceController(mContext);
-    }
-
-    private void setNumberOfInstalledPackages(int number) {
-        doAnswer(new Answer() {
-            public Object answer(InvocationOnMock invocation) {
-                ((ApplicationFeatureProvider.NumberOfAppsCallback)
-                        invocation.getArguments()[2]).onNumberOfAppsResult(number);
-                return null;
-            }}).when(mFeatureFactory.applicationFeatureProvider).calculateNumberOfInstalledApps(
-                    eq(ApplicationFeatureProvider.IGNORE_INSTALL_REASON), eq(true), anyObject());
-    }
-
-    @Test
-    public void testUpdateState() {
-        final Preference preference = new Preference(mContext, null, 0, 0);
-
-        setNumberOfInstalledPackages(0);
-        mController.updateState(preference);
-        assertThat(preference.getSummary()).isEqualTo("");
-
-        setNumberOfInstalledPackages(20);
-        when(mContext.getResources().getQuantityString(R.plurals.enterprise_privacy_number_packages,
-                20, 20)).thenReturn("20 packages");
-        mController.updateState(preference);
-        assertThat(preference.getSummary()).isEqualTo("20 packages");
-    }
-
-    @Test
-    public void testIsAvailable() {
-        assertThat(mController.isAvailable()).isTrue();
-    }
-
-    @Test
-    public void testHandlePreferenceTreeClick() {
-        assertThat(mController.handlePreferenceTreeClick(new Preference(mContext, null, 0, 0)))
-                .isFalse();
-    }
-
-    @Test
-    public void testGetPreferenceKey() {
-        assertThat(mController.getPreferenceKey()).isEqualTo("installed_packages");
-    }
-}
diff --git a/tests/robotests/src/com/android/settings/enterprise/NetworkLogsPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/enterprise/NetworkLogsPreferenceControllerTest.java
index fe9fcf6..33360cc 100644
--- a/tests/robotests/src/com/android/settings/enterprise/NetworkLogsPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/enterprise/NetworkLogsPreferenceControllerTest.java
@@ -20,11 +20,13 @@
 import com.android.settings.TestConfig;
 import com.android.settings.testutils.FakeFeatureFactory;
 
+import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.robolectric.annotation.Config;
 
 import java.util.Date;
 
+import static com.google.common.truth.Truth.assertThat;
 import static org.mockito.Mockito.when;
 
 /**
@@ -47,6 +49,22 @@
                 .thenReturn(date);
     }
 
+    @Test
+    public void testIsAvailable() {
+        setDate(null);
+        when(mFeatureFactory.enterprisePrivacyFeatureProvider.isNetworkLoggingEnabled())
+                .thenReturn(false);
+        assertThat(mController.isAvailable()).isFalse();
+
+        setDate(new Date());
+        assertThat(mController.isAvailable()).isTrue();
+
+        setDate(null);
+        when(mFeatureFactory.enterprisePrivacyFeatureProvider.isNetworkLoggingEnabled())
+                .thenReturn(true);
+        assertThat(mController.isAvailable()).isTrue();
+    }
+
     @Override
     public String getPreferenceKey() {
         return "network_logs";
diff --git a/tests/robotests/src/com/android/settings/enterprise/SecurityLogsPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/enterprise/SecurityLogsPreferenceControllerTest.java
index b260d61..1205b0b 100644
--- a/tests/robotests/src/com/android/settings/enterprise/SecurityLogsPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/enterprise/SecurityLogsPreferenceControllerTest.java
@@ -20,11 +20,13 @@
 import com.android.settings.TestConfig;
 import com.android.settings.testutils.FakeFeatureFactory;
 
+import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.robolectric.annotation.Config;
 
 import java.util.Date;
 
+import static com.google.common.truth.Truth.assertThat;
 import static org.mockito.Mockito.when;
 
 /**
@@ -47,6 +49,22 @@
                 .thenReturn(date);
     }
 
+    @Test
+    public void testIsAvailable() {
+        setDate(null);
+        when(mFeatureFactory.enterprisePrivacyFeatureProvider.isSecurityLoggingEnabled())
+                .thenReturn(false);
+        assertThat(mController.isAvailable()).isFalse();
+
+        setDate(new Date());
+        assertThat(mController.isAvailable()).isTrue();
+
+        setDate(null);
+        when(mFeatureFactory.enterprisePrivacyFeatureProvider.isSecurityLoggingEnabled())
+                .thenReturn(true);
+        assertThat(mController.isAvailable()).isTrue();
+    }
+
     @Override
     public String getPreferenceKey() {
         return "security_logs";