Skip to content

Commit d7a2a42

Browse files
jsharkeyAndroid (Google) Code Review
authored andcommitted
Merge "Move RINGTONE_PICKER to handle external storage." into jb-dev
2 parents 34688bb + 6dcf382 commit d7a2a42

File tree

3 files changed

+4
-376
lines changed

3 files changed

+4
-376
lines changed

core/java/com/android/internal/app/RingtonePickerActivity.java

Lines changed: 0 additions & 362 deletions
This file was deleted.

core/res/AndroidManifest.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,16 +1658,6 @@
16581658
android:excludeFromRecents="true"
16591659
android:process=":ui">
16601660
</activity>
1661-
<activity android:name="com.android.internal.app.RingtonePickerActivity"
1662-
android:theme="@style/Theme.Holo.Dialog.Alert"
1663-
android:excludeFromRecents="true"
1664-
android:multiprocess="true"
1665-
android:process=":ui">
1666-
<intent-filter>
1667-
<action android:name="android.intent.action.RINGTONE_PICKER" />
1668-
<category android:name="android.intent.category.DEFAULT" />
1669-
</intent-filter>
1670-
</activity>
16711661

16721662
<activity android:name="android.accounts.ChooseAccountActivity"
16731663
android:excludeFromRecents="true"

media/java/android/media/RingtoneManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,13 +393,13 @@ public Ringtone getRingtone(int position) {
393393
* @return A {@link Uri} pointing to the ringtone.
394394
*/
395395
public Uri getRingtoneUri(int position) {
396-
final Cursor cursor = getCursor();
397-
398-
if (!cursor.moveToPosition(position)) {
396+
// use cursor directly instead of requerying it, which could easily
397+
// cause position to shuffle.
398+
if (mCursor == null || !mCursor.moveToPosition(position)) {
399399
return null;
400400
}
401401

402-
return getUriFromCursor(cursor);
402+
return getUriFromCursor(mCursor);
403403
}
404404

405405
private static Uri getUriFromCursor(Cursor cursor) {

0 commit comments

Comments
 (0)