Merge "Add the return branch when ringtone position is POS_UNKNOWN"

This commit is contained in:
Treehugger Robot
2020-09-22 07:59:07 +00:00
committed by Gerrit Code Review

View File

@@ -584,7 +584,11 @@ public final class RingtonePickerActivity extends AlertActivity implements
} }
private Uri getCurrentlySelectedRingtoneUri() { private Uri getCurrentlySelectedRingtoneUri() {
if (getCheckedItem() == mDefaultRingtonePos) { 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. // Use the default Uri that they originally gave us.
return mUriForDefaultItem; return mUriForDefaultItem;
} else if (getCheckedItem() == mSilentPos) { } else if (getCheckedItem() == mSilentPos) {