diff --git a/res/values/strings.xml b/res/values/strings.xml
index d5a4189..bdf59f6 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -8622,9 +8622,16 @@
     <string name="autofill_app">Autofill service</string>
     <!-- Keywords for the auto-fill feature. [CHAR LIMIT=NONE] -->
     <string name="autofill_keywords">auto, fill, autofill</string>
-    <!-- Title of the warning dialog for setting the auto-fill app. [CHAR_LIMIT=NONE] -->
+
+    <!-- Message of the warning dialog for setting the auto-fill app. [CHAR_LIMIT=NONE] -->
     <string name="autofill_confirmation_message">
-        Make <xliff:g id="app_name">%1$s</xliff:g> your autofill app? <xliff:g id="app_name">%1$s</xliff:g> will be able to read your screen and fill fields in other apps.
+        <![CDATA[
+        <b>Make sure you trust this app</b>
+        <br/>
+        <br/>
+        <xliff:g id="app_name" example="Google Autofill">%1$s</xliff:g> uses what\'s on
+        your screen to determine what can be autofilled.
+        ]]>
     </string>
 
     <!-- Name of setting for switching device theme [CHAR LIMIT=60] -->
diff --git a/src/com/android/settings/applications/defaultapps/DefaultAppPickerFragment.java b/src/com/android/settings/applications/defaultapps/DefaultAppPickerFragment.java
index 98557ee..9ab704e 100644
--- a/src/com/android/settings/applications/defaultapps/DefaultAppPickerFragment.java
+++ b/src/com/android/settings/applications/defaultapps/DefaultAppPickerFragment.java
@@ -50,7 +50,7 @@
     @Override
     public void onRadioButtonClicked(RadioButtonPreference selected) {
         final String selectedKey = selected.getKey();
-        final String confirmationMessage = getConfirmationMessage(getCandidate(selectedKey));
+        final CharSequence confirmationMessage = getConfirmationMessage(getCandidate(selectedKey));
         final Activity activity = getActivity();
         if (TextUtils.isEmpty(confirmationMessage)) {
             super.onRadioButtonClicked(selected);
@@ -74,7 +74,7 @@
         }
     }
 
-    protected String getConfirmationMessage(CandidateInfo info) {
+    protected CharSequence getConfirmationMessage(CandidateInfo info) {
         return null;
     }
 
@@ -91,11 +91,11 @@
         }
 
         public static ConfirmationDialogFragment newInstance(DefaultAppPickerFragment parent,
-                String key, String message) {
+                String key, CharSequence message) {
             final ConfirmationDialogFragment fragment = new ConfirmationDialogFragment();
             final Bundle argument = new Bundle();
             argument.putString(EXTRA_KEY, key);
-            argument.putString(EXTRA_MESSAGE, message);
+            argument.putCharSequence(EXTRA_MESSAGE, message);
             fragment.setArguments(argument);
             fragment.setTargetFragment(parent, 0);
             return fragment;
@@ -105,7 +105,7 @@
         public Dialog onCreateDialog(Bundle savedInstanceState) {
             final Bundle bundle = getArguments();
             final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())
-                    .setMessage(bundle.getString(EXTRA_MESSAGE))
+                    .setMessage(bundle.getCharSequence(EXTRA_MESSAGE))
                     .setPositiveButton(android.R.string.ok, this)
                     .setNegativeButton(android.R.string.cancel, null);
             return builder.create();
diff --git a/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java b/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java
index d943de7..8eb1fc6 100644
--- a/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java
+++ b/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java
@@ -24,6 +24,7 @@
 import android.provider.Settings;
 import android.service.autofill.AutofillService;
 import android.service.autofill.AutofillServiceInfo;
+import android.text.Html;
 import android.text.TextUtils;
 
 import com.android.internal.logging.nano.MetricsProto;
@@ -65,12 +66,14 @@
     }
 
     @Override
-    protected String getConfirmationMessage(CandidateInfo appInfo) {
+    protected CharSequence getConfirmationMessage(CandidateInfo appInfo) {
         if (appInfo == null) {
             return null;
         }
         final CharSequence appName = appInfo.loadLabel();
-        return getContext().getString(R.string.autofill_confirmation_message, appName);
+        final String message = getContext().getString(
+                R.string.autofill_confirmation_message, appName);
+        return Html.fromHtml(message);
     }
 
     @Override
