am e984bbe4: (-s ours) am d2397fbc: (-s ours) Import translations. DO NOT MERGE
* commit 'e984bbe47e0b246b2e255b829a7d07e704c966b3':
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 24fd6f3..657a1ba 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -96,6 +96,12 @@
<string name="callFailed_outOfService">Cellular network not available</string>
<!-- In-call screen: call failure reason (call denied because of current FDN setting) -->
<string name="callFailed_fdn_only">Outgoing calls are restricted by FDN.</string>
+ <!-- In-call screen: call failure reason (call modified to USSD request) -->
+ <string name="callFailed_dialToUssd">DIAL request modified to USSD request.</string>
+ <!-- In-call screen: call failure reason (call modified to SS request) -->
+ <string name="callFailed_dialToSs">DIAL request modified to SS request.</string>
+ <!-- In-call screen: call failure reason (call modified to call with modified data) -->
+ <string name="callFailed_dialToDial">DIAL request modified to DIAL with different number.</string>
<!-- In-call screen: call failure reason (call denied because call barring is on) -->
<string name="callFailed_cb_enabled">Can\'t make outgoing calls while call barring is on.</string>
<!-- In-call screen: call failure reason (call denied because domain specific access control is on) -->
diff --git a/src/com/android/phone/common/util/SettingsUtil.java b/src/com/android/phone/common/util/SettingsUtil.java
index e473947..c297e1e 100644
--- a/src/com/android/phone/common/util/SettingsUtil.java
+++ b/src/com/android/phone/common/util/SettingsUtil.java
@@ -20,6 +20,7 @@
import android.content.SharedPreferences;
import android.database.Cursor;
import android.database.sqlite.SQLiteException;
+import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Handler;
@@ -82,17 +83,16 @@
summary = context.getString(R.string.ringtone_silent);
} else {
// Fetch the ringtone title from the media provider
- try {
- Cursor cursor = context.getContentResolver().query(ringtoneUri,
- new String[] { MediaStore.Audio.Media.TITLE }, null, null, null);
- if (cursor != null) {
- if (cursor.moveToFirst()) {
- summary = cursor.getString(0);
+ final Ringtone ringtone = RingtoneManager.getRingtone(context, ringtoneUri);
+ if (ringtone != null) {
+ try {
+ final String title = ringtone.getTitle(context);
+ if (!TextUtils.isEmpty(title)) {
+ summary = title;
}
- cursor.close();
+ } catch (SQLiteException sqle) {
+ // Unknown title for the ringtone
}
- } catch (SQLiteException sqle) {
- // Unknown title for the ringtone
}
}
if (defaultRingtone) {