Merge "qt-r1-bubbles-dev @ build 5835883" into qt-qpr1-dev-plus-aosp
diff --git a/res/values-en-rCA/strings.xml b/res/values-en-rCA/strings.xml
index a5cdab0..69b1b71 100644
--- a/res/values-en-rCA/strings.xml
+++ b/res/values-en-rCA/strings.xml
@@ -423,13 +423,13 @@
     <string name="security_settings_face_settings_require_attention" msgid="1638445716306615123">"Eyes open to unlock"</string>
     <string name="security_settings_face_settings_require_attention_details" msgid="5749808567341263288">"When using face authentication, your eyes must be open"</string>
     <string name="security_settings_face_settings_require_confirmation" msgid="2559602923985027572">"Always require confirmation"</string>
-    <string name="security_settings_face_settings_require_confirmation_details" msgid="2002651109571928756">"When authenticating in apps, always require confirmation"</string>
-    <string name="security_settings_face_settings_remove_face_data" msgid="3477772641643318370">"Remove face data"</string>
-    <string name="security_settings_face_settings_footer" msgid="8056977398747222768">"Your face can be used to unlock your device and access apps. "<annotation id="url">"Learn more"</annotation></string>
-    <!-- no translation found for security_settings_face_settings_remove_dialog_title (4829278778459836075) -->
-    <skip />
-    <!-- no translation found for security_settings_face_settings_remove_dialog_details (2609671025686003946) -->
-    <skip />
+    <string name="security_settings_face_settings_require_confirmation_details" msgid="6466094680756211420">"When using Face Unlock in apps, always require confirmation step"</string>
+    <string name="security_settings_face_settings_remove_face_data" msgid="304401377141467791">"Delete face data"</string>
+    <string name="security_settings_face_settings_enroll" msgid="495403103503629382">"Set up Face Unlock"</string>
+    <string name="security_settings_face_settings_footer" msgid="6072833685685070967">"Use Face Unlock to unlock your device, sign in to apps and confirm payments.\n\nKeep in mind:\nLooking at the phone can unlock it when you don’t intend to.\n\nYour phone can be unlocked by someone else if it’s held up to your face while your eyes are open.\n\nYour phone can be unlocked by someone who looks a lot like you, such as an identical sibling."</string>
+    <string name="security_settings_face_settings_remove_dialog_title" msgid="4829278778459836075">"Delete face data?"</string>
+    <string name="security_settings_face_settings_remove_dialog_details" msgid="1959642447512807205">"The images and biometric data used by Face Unlock will be permanently and securely deleted. After removal, you will need your PIN, pattern or password to unlock your phone, sign in to apps and confirm payments."</string>
+    <string name="security_settings_face_settings_context_subtitle" msgid="4381276009777294566">"Use face unlock to unlock your phone"</string>
     <string name="security_settings_fingerprint_preference_title" msgid="2488725232406204350">"Fingerprint"</string>
     <string name="fingerprint_manage_category_title" msgid="8293801041700001681">"Manage fingerprints"</string>
     <string name="fingerprint_usage_category_title" msgid="8438526918999536619">"Use fingerprint for"</string>
@@ -4352,9 +4352,13 @@
     <string name="game_driver_app_preference_default" msgid="7686384740483216333">"Default"</string>
     <string name="game_driver_app_preference_game_driver" msgid="6426312331295324606">"Game Driver"</string>
     <string name="game_driver_app_preference_system" msgid="8272672982113332753">"System Graphics Driver"</string>
+    <!-- no translation found for game_driver_all_apps_preference_values:0 (7193648562434970105) -->
+    <!-- no translation found for game_driver_all_apps_preference_values:1 (7189663725490629463) -->
+    <!-- no translation found for game_driver_all_apps_preference_values:2 (7166160247759864796) -->
     <!-- no translation found for game_driver_app_preference_values:0 (4271044622117073985) -->
     <!-- no translation found for game_driver_app_preference_values:1 (6628516810440406199) -->
     <!-- no translation found for game_driver_app_preference_values:2 (1760397725970916076) -->
+    <!-- no translation found for game_driver_app_preference_values:3 (6260984152570269090) -->
     <string name="unsupported_setting_summary" product="default" msgid="11246953620654225">"Setting isn’t supported on this phone"</string>
     <string name="unsupported_setting_summary" product="tablet" msgid="6328431665635673717">"Setting isn’t supported on this tablet"</string>
     <string name="unsupported_setting_summary" product="device" msgid="2348970994972110886">"Setting isn’t supported on this device"</string>
diff --git a/res/values-en-rXC/strings.xml b/res/values-en-rXC/strings.xml
index d046143..44a3c94 100644
--- a/res/values-en-rXC/strings.xml
+++ b/res/values-en-rXC/strings.xml
@@ -422,13 +422,13 @@
     <string name="security_settings_face_settings_require_attention" msgid="1638445716306615123">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‎‏‏‎‏‎‏‏‏‏‎‎‏‏‏‎‏‏‎‏‏‎‏‏‎‎‏‎‏‎‏‏‏‎‎‎‎‎‏‏‎‏‏‏‎‏‎‏‏‎‏‏‎‏‎‏‎‎‏‏‎Eyes open to unlock‎‏‎‎‏‎"</string>
     <string name="security_settings_face_settings_require_attention_details" msgid="5749808567341263288">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‎‏‏‏‏‏‏‎‎‏‎‏‏‎‏‏‎‏‏‎‎‎‏‏‎‏‏‎‏‏‎‎‏‏‏‏‎‏‏‎‏‏‏‏‏‏‎‏‎‏‎‎‏‏‎‏‏‏‎‎‎‎When using face authentication, your eyes must be open‎‏‎‎‏‎"</string>
     <string name="security_settings_face_settings_require_confirmation" msgid="2559602923985027572">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‎‎‎‏‏‏‎‎‎‎‏‎‏‏‎‎‎‏‎‎‏‎‏‎‎‏‏‎‎‎‏‎‎‏‎‏‎‎‎‏‎‏‏‎‏‏‏‎‎‎‎‎‏‏‏‏‏‎‏‎‎‎Always require confirmation‎‏‎‎‏‎"</string>
-    <string name="security_settings_face_settings_require_confirmation_details" msgid="2002651109571928756">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‏‎‏‏‏‏‎‎‏‎‏‎‏‏‎‏‏‎‎‎‏‎‎‏‎‎‏‎‏‏‎‏‏‎‏‏‎‎‎‏‎‎‏‏‏‎‏‎‎‎‏‎‏‎‏‏‎‏‎‎‎When authenticating in apps, always require confirmation‎‏‎‎‏‎"</string>
-    <string name="security_settings_face_settings_remove_face_data" msgid="3477772641643318370">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‏‎‎‎‎‎‏‎‎‎‎‏‏‏‎‎‎‎‏‏‏‏‏‎‎‏‎‏‎‏‎‏‎‎‎‏‎‏‎‏‏‏‎‎‎‏‏‎‎‏‏‎‎‎‏‏‎‎‎‏‎‎Remove face data‎‏‎‎‏‎"</string>
-    <string name="security_settings_face_settings_footer" msgid="8056977398747222768">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‏‏‏‏‏‏‎‏‎‎‎‎‎‎‏‎‎‎‏‎‎‏‎‎‎‎‎‏‏‎‏‎‎‏‏‏‏‎‏‎‏‏‎‏‏‏‎‏‎‎‏‎‏‏‏‏‎‎‎‎‎Your face can be used to unlock your device and access apps. ‎‏‎‎‏‏‎"<annotation id="url">"‎‏‎‎‏‏‏‎Learn more‎‏‎‎‏‏‎"</annotation>"‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
-    <!-- no translation found for security_settings_face_settings_remove_dialog_title (4829278778459836075) -->
-    <skip />
-    <!-- no translation found for security_settings_face_settings_remove_dialog_details (2609671025686003946) -->
-    <skip />
+    <string name="security_settings_face_settings_require_confirmation_details" msgid="6466094680756211420">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‏‏‎‎‏‏‎‏‏‏‏‎‎‎‎‏‎‏‏‏‎‏‏‎‏‏‎‏‎‎‏‏‏‎‎‏‎‏‎‎‎‎‏‎‎‎‏‎‎‏‏‏‎‏‏‎‏‏‏‎‎‎When using face unlock in apps, always require confirmation step‎‏‎‎‏‎"</string>
+    <string name="security_settings_face_settings_remove_face_data" msgid="304401377141467791">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‎‏‏‏‎‎‎‎‏‏‏‎‎‏‎‏‏‏‎‎‏‏‎‏‏‏‎‎‎‎‏‎‎‏‎‎‎‏‏‎‏‎‏‎‎‎‎‎‏‎‏‎‏‎‏‎‎‎‏‏‏‏‎Delete face data‎‏‎‎‏‎"</string>
+    <string name="security_settings_face_settings_enroll" msgid="495403103503629382">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‎‏‏‏‏‎‏‏‏‎‎‎‎‎‎‎‎‎‎‏‏‎‎‏‏‏‏‏‏‏‎‏‏‏‎‏‎‎‏‏‏‏‎‏‎‏‏‎‏‏‏‏‎‎‎‏‎‎‎‏‏‎‎Set up face unlock‎‏‎‎‏‎"</string>
+    <string name="security_settings_face_settings_footer" msgid="6072833685685070967">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‏‎‏‎‎‎‏‎‎‎‏‏‏‎‎‎‎‏‎‏‎‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‏‎‏‎‎‏‎‎‎‏‏‏‎‏‏‎‎‎‏‏‏‎‏‏‏‎Use face unlock to unlock your device, sign in to apps, and confirm payments.‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎Keep in mind:‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎Looking at the phone can unlock it when you don’t intend to.‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎Your phone can be unlocked by someone else if it’s held up to your face while your eyes are open.‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎Your phone can be unlocked by someone who looks a lot like you, say, an identical sibling.‎‏‎‎‏‎"</string>
+    <string name="security_settings_face_settings_remove_dialog_title" msgid="4829278778459836075">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‎‎‎‏‏‎‎‎‎‎‏‎‏‎‎‎‎‏‎‏‏‎‏‏‏‎‏‏‎‎‏‎‏‏‏‏‏‎‏‏‎‏‏‏‎‎‏‎‎‏‏‏‎‏‎‏‎‏‎‏‏‎Delete face data?‎‏‎‎‏‎"</string>
+    <string name="security_settings_face_settings_remove_dialog_details" msgid="1959642447512807205">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‏‏‎‏‏‎‎‏‏‎‎‏‎‎‎‎‎‏‏‎‎‎‏‏‎‏‏‎‎‎‏‏‎‎‎‏‎‏‏‎‎‎‏‏‏‎‎‏‎‎‏‏‏‎‎‏‎‎‏‎‏‎The images and biometric data used by face unlock will be permanently and securely deleted. After removal, you will need your PIN, pattern, or password to unlock your phone, sign in to apps, and confirm payments.‎‏‎‎‏‎"</string>
+    <string name="security_settings_face_settings_context_subtitle" msgid="4381276009777294566">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‏‏‏‎‎‏‏‎‎‏‏‎‏‎‏‏‎‏‎‏‏‎‏‎‏‎‎‎‏‎‏‏‎‎‎‎‏‏‎‏‏‎‏‏‏‎‏‏‎‏‏‎‎‏‏‏‎‎‏‏‎‎Use face unlock to unlock your phone‎‏‎‎‏‎"</string>
     <string name="security_settings_fingerprint_preference_title" msgid="2488725232406204350">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‎‎‎‏‎‏‎‎‎‏‎‎‏‏‎‏‏‏‎‏‎‎‏‏‎‏‎‎‏‏‎‏‏‏‏‎‏‎‎‎‏‏‏‏‏‏‎‎‎‏‏‏‏‏‎‏‏‏‏‏‎‎Fingerprint‎‏‎‎‏‎"</string>
     <string name="fingerprint_manage_category_title" msgid="8293801041700001681">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‎‎‏‏‎‎‎‏‏‎‎‏‏‎‎‎‎‎‎‎‎‎‎‏‏‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‏‏‎‎‎‏‎‏‏‏‏‎‎‏‎‎‎‏‎Manage fingerprints‎‏‎‎‏‎"</string>
     <string name="fingerprint_usage_category_title" msgid="8438526918999536619">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‎‏‎‏‎‎‎‏‏‎‏‏‏‎‏‎‏‎‏‏‏‎‎‎‎‏‏‎‎‎‎‎‏‎‏‎‏‎‎‎‏‎‎‏‏‏‏‏‎‎‏‏‏‏‏‎‏‎‏‏‎Use fingerprint for‎‏‎‎‏‎"</string>
@@ -4351,9 +4351,13 @@
     <string name="game_driver_app_preference_default" msgid="7686384740483216333">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‏‎‏‎‏‎‏‎‏‎‏‏‏‎‎‎‎‏‏‎‎‎‏‏‎‎‏‎‎‏‏‏‏‏‏‏‎‏‏‏‏‏‎‎‎‎‏‏‎‎‏‏‏‏‎‎‏‏‎‏‎Default‎‏‎‎‏‎"</string>
     <string name="game_driver_app_preference_game_driver" msgid="6426312331295324606">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‏‏‎‎‏‎‎‏‎‏‏‏‎‏‏‎‏‏‎‎‏‎‎‎‎‎‏‎‎‎‏‏‎‏‎‏‎‏‎‎‏‎‎‎‏‏‏‏‏‏‎‎‏‏‎‏‏‏‏‏‎‎Game Driver‎‏‎‎‏‎"</string>
     <string name="game_driver_app_preference_system" msgid="8272672982113332753">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‎‎‏‎‏‏‎‎‏‏‏‎‎‏‏‏‎‎‎‎‎‎‏‏‏‏‏‏‎‎‏‎‏‎‎‏‏‏‎‏‎‏‏‎‎‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‎System Graphics Driver‎‏‎‎‏‎"</string>
+    <!-- no translation found for game_driver_all_apps_preference_values:0 (7193648562434970105) -->
+    <!-- no translation found for game_driver_all_apps_preference_values:1 (7189663725490629463) -->
+    <!-- no translation found for game_driver_all_apps_preference_values:2 (7166160247759864796) -->
     <!-- no translation found for game_driver_app_preference_values:0 (4271044622117073985) -->
     <!-- no translation found for game_driver_app_preference_values:1 (6628516810440406199) -->
     <!-- no translation found for game_driver_app_preference_values:2 (1760397725970916076) -->
+    <!-- no translation found for game_driver_app_preference_values:3 (6260984152570269090) -->
     <string name="unsupported_setting_summary" product="default" msgid="11246953620654225">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‎‏‏‎‏‎‎‏‏‏‏‏‏‏‎‏‎‏‎‎‎‎‏‎‏‏‎‏‏‏‎‎‏‏‎‏‎‏‏‏‎‏‎‏‎‎‏‎‎‎‏‎‎‏‎‎‎‏‎Setting isn’t supported on this phone‎‏‎‎‏‎"</string>
     <string name="unsupported_setting_summary" product="tablet" msgid="6328431665635673717">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‏‎‏‏‏‏‏‎‏‎‎‏‏‎‎‎‏‏‎‏‏‎‎‎‏‎‎‏‎‎‎‎‎‎‏‏‏‏‎‎‎‏‏‎‎‎‏‎‎‎‏‏‎‎‏‏‏‎‏‎‏‎Setting isn’t supported on this tablet‎‏‎‎‏‎"</string>
     <string name="unsupported_setting_summary" product="device" msgid="2348970994972110886">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‎‎‎‎‎‏‎‎‏‏‎‎‏‎‎‏‏‏‎‎‎‏‎‏‎‏‏‎‎‏‎‏‎‏‏‏‏‎‎‎‎‎‎‏‎‎‎‏‏‎‎‎‎‎‎‏‎‎‏‏‎‎Setting isn’t supported on this device‎‏‎‎‏‎"</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 9e01877..97e08a4 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -910,6 +910,10 @@
     <string name="security_settings_face_enroll_introduction_accessibility_vision"></string>
     <!-- Button text to cancel enrollment from the introduction [CHAR LIMIT=22] -->
     <string name="security_settings_face_enroll_introduction_cancel">Cancel</string>
+    <!-- Button text to cancel enrollment [CHAR LIMIT=30] -->
+    <string name="security_settings_face_enroll_introduction_no_thanks">No thanks</string>
+    <!-- Button text to start enrollment [CHAR LIMIT=30] -->
+    <string name="security_settings_face_enroll_introduction_agree">Agree</string>
     <!-- Introduction title shown in face enrollment to introduce the face unlock feature [CHAR LIMIT=40] -->
     <string name="security_settings_face_enroll_introduction_title">Unlock with your face</string>
     <!-- Introduction title shown in face enrollment to introduce the face unlock feature, when face unlock is disabled by device admin [CHAR LIMIT=60] -->
@@ -975,7 +979,7 @@
     <!-- Dialog title shown when the user removes an enrollment [CHAR LIMIT=35] -->
     <string name="security_settings_face_settings_remove_dialog_title">Delete face data?</string>
     <!-- Dialog contents shown when the user removes an enrollment [CHAR LIMIT=NONE] -->
-    <string name="security_settings_face_settings_remove_dialog_details">The images and biometric data used by face unlock will be permanently and securely deleted. After removal, you will need your PIN, pattern, or password to unlock your phone, sign in to apps, and confirm payments.</string>
+    <string name="security_settings_face_settings_remove_dialog_details">The images and face model used by face unlock will be permanently and securely deleted. After removal, you will need your PIN, pattern, or password to unlock your phone, sign in to apps, and confirm payments.</string>
     <!-- Subtitle shown for contextual setting face enrollment [CHAR LIMIT=NONE] -->
     <string name="security_settings_face_settings_context_subtitle">Use face unlock to unlock your phone</string>
 
diff --git a/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java b/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java
index e15b0e3..e526417 100644
--- a/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java
+++ b/src/com/android/settings/applications/appinfo/AppButtonsPreferenceController.java
@@ -160,7 +160,7 @@
     @Override
     public int getAvailabilityStatus() {
         // TODO(b/37313605): Re-enable once this controller supports instant apps
-        return isInstantApp() || isSystemModule() ? DISABLED_FOR_USER : AVAILABLE;
+        return mFinishing || isInstantApp() || isSystemModule() ? DISABLED_FOR_USER : AVAILABLE;
     }
 
     @Override
@@ -189,7 +189,7 @@
 
     @Override
     public void onResume() {
-        if (isAvailable() && !mFinishing) {
+        if (isAvailable()) {
             mAppsControlDisallowedBySystem = RestrictedLockUtilsInternal.hasBaseUserRestriction(
                     mActivity, UserManager.DISALLOW_APPS_CONTROL, mUserId);
             mAppsControlDisallowedAdmin = RestrictedLockUtilsInternal.checkIfRestrictionEnforced(
diff --git a/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java b/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java
index 6686c96..965b8ed 100644
--- a/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java
+++ b/src/com/android/settings/biometrics/face/FaceEnrollIntroduction.java
@@ -50,7 +50,7 @@
         if (WizardManagerHelper.isAnySetupWizard(getIntent())) {
             mFooterBarMixin.setSecondaryButton(
                     new FooterButton.Builder(this)
-                            .setText(R.string.skip_label)
+                            .setText(R.string.security_settings_face_enroll_introduction_no_thanks)
                             .setListener(this::onSkipButtonClick)
                             .setButtonType(FooterButton.ButtonType.SKIP)
                             .setTheme(R.style.SudGlifButton_Secondary)
@@ -59,7 +59,7 @@
         } else {
             mFooterBarMixin.setSecondaryButton(
                     new FooterButton.Builder(this)
-                            .setText(R.string.security_settings_face_enroll_introduction_cancel)
+                            .setText(R.string.security_settings_face_enroll_introduction_no_thanks)
                             .setListener(this::onCancelButtonClick)
                             .setButtonType(FooterButton.ButtonType.CANCEL)
                             .setTheme(R.style.SudGlifButton_Secondary)
@@ -69,7 +69,7 @@
 
         mFooterBarMixin.setPrimaryButton(
                 new FooterButton.Builder(this)
-                        .setText(R.string.wizard_next)
+                        .setText(R.string.security_settings_face_enroll_introduction_agree)
                         .setListener(this::onNextButtonClick)
                         .setButtonType(FooterButton.ButtonType.NEXT)
                         .setTheme(R.style.SudGlifButton_Primary)
diff --git a/tests/robotests/src/com/android/settings/applications/appinfo/AppButtonsPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/applications/appinfo/AppButtonsPreferenceControllerTest.java
index e42c3d2..637ffbc 100644
--- a/tests/robotests/src/com/android/settings/applications/appinfo/AppButtonsPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/applications/appinfo/AppButtonsPreferenceControllerTest.java
@@ -19,8 +19,8 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doAnswer;
@@ -39,8 +39,8 @@
 import android.app.settings.SettingsEnums;
 import android.content.Context;
 import android.content.Intent;
-import android.content.om.OverlayManager;
 import android.content.om.OverlayInfo;
+import android.content.om.OverlayManager;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
@@ -49,6 +49,8 @@
 import android.util.ArraySet;
 import android.view.View;
 
+import androidx.preference.PreferenceScreen;
+
 import com.android.settings.R;
 import com.android.settings.SettingsActivity;
 import com.android.settings.core.InstrumentedPreferenceFragment;
@@ -59,7 +61,6 @@
 import com.android.settingslib.core.lifecycle.Lifecycle;
 import com.android.settingslib.widget.ActionButtonsPreference;
 
-import java.util.Set;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -70,12 +71,15 @@
 import org.mockito.MockitoAnnotations;
 import org.mockito.stubbing.Answer;
 import org.robolectric.RobolectricTestRunner;
+import org.robolectric.RuntimeEnvironment;
 import org.robolectric.annotation.Config;
 import org.robolectric.annotation.Implementation;
 import org.robolectric.annotation.Implements;
 import org.robolectric.annotation.Resetter;
 import org.robolectric.util.ReflectionHelpers;
 
+import java.util.Set;
+
 @RunWith(RobolectricTestRunner.class)
 public class AppButtonsPreferenceControllerTest {
 
@@ -112,10 +116,9 @@
     @Mock
     private UserManager mUserManager;
     @Mock
-    private Application mApplication;
-    @Mock
     private PackageInfo mPackageInfo;
 
+    private Context mContext;
     private Intent mUninstallIntent;
     private ActionButtonsPreference mButtonPrefs;
     private AppButtonsPreferenceController mController;
@@ -125,14 +128,15 @@
         MockitoAnnotations.initMocks(this);
 
         FakeFeatureFactory.setupForTest();
+        mContext = RuntimeEnvironment.application;
         doReturn(mDpm).when(mSettingsActivity).getSystemService(Context.DEVICE_POLICY_SERVICE);
         doReturn(mUserManager).when(mSettingsActivity).getSystemService(Context.USER_SERVICE);
         doReturn(mPackageManger).when(mSettingsActivity).getPackageManager();
         doReturn(mAm).when(mSettingsActivity).getSystemService(Context.ACTIVITY_SERVICE);
         doReturn(mOverlayManager).when(mSettingsActivity).
-            getSystemService(OverlayManager.class);
+                getSystemService(OverlayManager.class);
         doReturn(mAppEntry).when(mState).getEntry(anyString(), anyInt());
-        when(mSettingsActivity.getApplication()).thenReturn(mApplication);
+        doReturn(mContext).when(mSettingsActivity).getApplicationContext();
         when(mSettingsActivity.getResources().getString(anyInt())).thenReturn(RESOURCE_STRING);
 
         mController = spy(new AppButtonsPreferenceController(mSettingsActivity, mFragment,
@@ -162,6 +166,21 @@
     }
 
     @Test
+    @Config(shadows = ShadowAppUtils.class)
+    public void isAvailable_validPackageName_isTrue() {
+        assertThat(mController.isAvailable()).isTrue();
+    }
+
+    @Test
+    public void isAvailable_nullPackageName_isFalse() {
+        final AppButtonsPreferenceController controller = spy(
+                new AppButtonsPreferenceController(mSettingsActivity, mFragment,
+                        mLifecycle, null, mState, REQUEST_UNINSTALL, REQUEST_REMOVE_DEVICE_ADMIN));
+
+        assertThat(controller.isAvailable()).isFalse();
+    }
+
+    @Test
     public void retrieveAppEntry_hasAppEntry_notNull()
             throws PackageManager.NameNotFoundException {
         doReturn(mPackageInfo).when(mPackageManger).getPackageInfo(anyString(), anyInt());
@@ -306,10 +325,10 @@
 
     @Test
     public void updateUninstallButton_isNonSystemRro_setButtonDisable()
-                throws RemoteException {
+            throws RemoteException {
         when(mAppInfo.isResourceOverlay()).thenReturn(true);
         when(mOverlayManager.getOverlayInfo(anyString(), any()))
-            .thenReturn(OVERLAY_ENABLED);
+                .thenReturn(OVERLAY_ENABLED);
 
         mController.updateUninstallButton();
 
@@ -318,10 +337,10 @@
 
     @Test
     public void updateUninstallButton_isNonSystemRro_setButtonEnable()
-                throws RemoteException {
+            throws RemoteException {
         when(mAppInfo.isResourceOverlay()).thenReturn(true);
         when(mOverlayManager.getOverlayInfo(anyString(), any()))
-            .thenReturn(OVERLAY_DISABLED);
+                .thenReturn(OVERLAY_DISABLED);
 
         mController.updateUninstallButton();
 
@@ -423,7 +442,7 @@
     @Test
     public void onPackageListChanged_available_shouldRefreshUi() {
         doReturn(AppButtonsPreferenceController.AVAILABLE)
-            .when(mController).getAvailabilityStatus();
+                .when(mController).getAvailabilityStatus();
         doReturn(true).when(mController).refreshUi();
 
         mController.onPackageListChanged();
@@ -434,7 +453,7 @@
     @Test
     public void onPackageListChanged_notAvailable_shouldNotRefreshUiAndNoCrash() {
         doReturn(AppButtonsPreferenceController.DISABLED_FOR_USER)
-            .when(mController).getAvailabilityStatus();
+                .when(mController).getAvailabilityStatus();
 
         mController.onPackageListChanged();