Fix KeySpinner on cursor change

This commit is contained in:
mar-v-in 2014-08-14 16:14:16 +02:00
parent a6118877ff
commit eebd480e8d

View File

@ -133,7 +133,12 @@ public abstract class KeySpinner extends Spinner {
@Override
public long getItemId(int position) {
return ((Cursor) getItem(position)).getLong(mIndexMasterKeyId);
try {
return ((Cursor) getItem(position)).getLong(mIndexMasterKeyId);
} catch (Exception e) {
// This can happen on concurrent modification :(
return Constants.key.none;
}
}
};
}