Fix KeySpinner on cursor change
This commit is contained in:
@@ -133,7 +133,12 @@ public abstract class KeySpinner extends Spinner {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getItemId(int position) {
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user