Merge "Remove weird divider from confirm_lock_pattern" into lmp-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 1e5a14f..1790226 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -98,6 +98,7 @@
<receiver android:name="ManagedProfileSetup">
<intent-filter>
<action android:name="android.intent.action.USER_INITIALIZE"/>
+ <action android:name="android.intent.action.PRE_BOOT_COMPLETED"/>
</intent-filter>
</receiver>
diff --git a/src/com/android/settings/notification/NotificationSettings.java b/src/com/android/settings/notification/NotificationSettings.java
index 3094032..6899440 100644
--- a/src/com/android/settings/notification/NotificationSettings.java
+++ b/src/com/android/settings/notification/NotificationSettings.java
@@ -37,6 +37,7 @@
import android.preference.SeekBarVolumizer;
import android.preference.TwoStatePreference;
import android.provider.MediaStore;
+import android.provider.OpenableColumns;
import android.provider.SearchIndexableResource;
import android.provider.Settings;
import android.util.Log;
@@ -238,11 +239,16 @@
if (ringtoneUri == null) {
summary = context.getString(com.android.internal.R.string.ringtone_silent);
} else {
- // Fetch the ringtone title from the media provider
Cursor cursor = null;
try {
- cursor = context.getContentResolver().query(ringtoneUri,
- new String[] { MediaStore.Audio.Media.TITLE }, null, null, null);
+ if (MediaStore.AUTHORITY.equals(ringtoneUri.getAuthority())) {
+ // Fetch the ringtone title from the media provider
+ cursor = context.getContentResolver().query(ringtoneUri,
+ new String[] { MediaStore.Audio.Media.TITLE }, null, null, null);
+ } else if (ContentResolver.SCHEME_CONTENT.equals(ringtoneUri.getScheme())) {
+ cursor = context.getContentResolver().query(ringtoneUri,
+ new String[] { OpenableColumns.DISPLAY_NAME }, null, null, null);
+ }
if (cursor != null) {
if (cursor.moveToFirst()) {
summary = cursor.getString(0);
@@ -250,6 +256,8 @@
}
} catch (SQLiteException sqle) {
// Unknown title for the ringtone
+ } catch (IllegalArgumentException iae) {
+ // Some other error retrieving the column from the provider
} finally {
if (cursor != null) {
cursor.close();