diff --git a/res/values/strings.xml b/res/values/strings.xml
index c586c3f..fb95aa3 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -12141,8 +12141,8 @@
     <string name="title_have_satellite_plan">Satellite messaging is included with your account</string>
     <!-- Title for category "Your mobile plan when satellite is not included in plan" [CHAR_LIMIT=NONE] -->
     <string name="title_no_satellite_plan">Satellite messaging isn\u2019t included with your account</string>
-    <!-- text view add satellite messaging" [CHAR_LIMIT=NONE] -->
-    <string name="summary_add_satellite_setting">Add satellite messaging</string>
+    <!-- text view "Learn more" [CHAR_LIMIT=NONE] -->
+    <string name="summary_add_satellite_setting">Learn More</string>
     <!-- Category name "How it works" [CHAR_LIMIT=NONE] -->
     <string name="category_name_how_it_works">How it works</string>
     <!-- Title for satellite connection guide [CHAR_LIMIT=NONE] -->
diff --git a/src/com/android/settings/notification/app/NotificationSoundPreference.java b/src/com/android/settings/notification/app/NotificationSoundPreference.java
index b55f9bd..4084ffe 100644
--- a/src/com/android/settings/notification/app/NotificationSoundPreference.java
+++ b/src/com/android/settings/notification/app/NotificationSoundPreference.java
@@ -24,9 +24,8 @@
 import android.net.Uri;
 import android.os.AsyncTask;
 import android.util.AttributeSet;
-
 import android.util.Log;
-import com.android.settings.R;
+
 import com.android.settings.RingtonePreference;
 
 public class NotificationSoundPreference extends RingtonePreference {
@@ -49,6 +48,20 @@
         updateRingtoneName(mRingtone);
     }
 
+    protected String generateRingtoneTitle(Uri uri) {
+        if (uri == null) {
+            return getContext().getString(com.android.internal.R.string.ringtone_silent);
+        } else if (RingtoneManager.isDefault(uri)) {
+            return getContext().getString(com.android.settings.R.string.notification_sound_default);
+        } else if (ContentResolver.SCHEME_ANDROID_RESOURCE.equals(uri.getScheme())) {
+            return getContext().getString(
+                    com.android.settings.R.string.notification_unknown_sound_title);
+        } else {
+            return Ringtone.getTitle(getContext(), uri, false /* followSettingsUri */,
+                    true /* allowRemote */);
+        }
+    }
+
     @Override
     public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
         if (data != null) {
@@ -69,16 +82,7 @@
         AsyncTask ringtoneNameTask = new AsyncTask<Object, Void, CharSequence>() {
             @Override
             protected CharSequence doInBackground(Object... params) {
-                if (uri == null) {
-                    return getContext().getString(com.android.internal.R.string.ringtone_silent);
-                } else if (RingtoneManager.isDefault(uri)) {
-                    return getContext().getString(R.string.notification_sound_default);
-                } else if(ContentResolver.SCHEME_ANDROID_RESOURCE.equals(uri.getScheme())) {
-                    return getContext().getString(R.string.notification_unknown_sound_title);
-                } else {
-                    return Ringtone.getTitle(getContext(), uri, false /* followSettingsUri */,
-                            true /* allowRemote */);
-                }
+                return generateRingtoneTitle(uri);
             }
 
             @Override
