Merge "Add the return branch when ringtone position is POS_UNKNOWN" am: 1e97308138
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1426650 Change-Id: Id6f84fa9147af94d5923d8892e30233e9fa5f6fe
This commit is contained in:
@@ -584,15 +584,19 @@ public final class RingtonePickerActivity extends AlertActivity implements
|
||||
}
|
||||
|
||||
private Uri getCurrentlySelectedRingtoneUri() {
|
||||
if (getCheckedItem() == mDefaultRingtonePos) {
|
||||
// Use the default Uri that they originally gave us.
|
||||
return mUriForDefaultItem;
|
||||
} else if (getCheckedItem() == mSilentPos) {
|
||||
// Use a null Uri for the 'Silent' item.
|
||||
return null;
|
||||
} else {
|
||||
return mRingtoneManager.getRingtoneUri(getRingtoneManagerPosition(getCheckedItem()));
|
||||
}
|
||||
if (getCheckedItem() == POS_UNKNOWN) {
|
||||
// When the getCheckItem is POS_UNKNOWN, it is not the case we expected.
|
||||
// We return null for this case.
|
||||
return null;
|
||||
} else if (getCheckedItem() == mDefaultRingtonePos) {
|
||||
// Use the default Uri that they originally gave us.
|
||||
return mUriForDefaultItem;
|
||||
} else if (getCheckedItem() == mSilentPos) {
|
||||
// Use a null Uri for the 'Silent' item.
|
||||
return null;
|
||||
} else {
|
||||
return mRingtoneManager.getRingtoneUri(getRingtoneManagerPosition(getCheckedItem()));
|
||||
}
|
||||
}
|
||||
|
||||
private void saveAnyPlayingRingtone() {
|
||||
|
||||
Reference in New Issue
Block a user