mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-01-31 23:20:20 -05:00
Fix KeySpinner on cursor change
This commit is contained in:
parent
a6118877ff
commit
eebd480e8d
@ -133,7 +133,12 @@ public abstract class KeySpinner extends Spinner {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getItemId(int position) {
|
public long getItemId(int position) {
|
||||||
|
try {
|
||||||
return ((Cursor) getItem(position)).getLong(mIndexMasterKeyId);
|
return ((Cursor) getItem(position)).getLong(mIndexMasterKeyId);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// This can happen on concurrent modification :(
|
||||||
|
return Constants.key.none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user