don't allow devid of 0

This commit is contained in:
Eric House 2019-12-28 09:43:01 -08:00
parent d4d4693def
commit 42da9b1ebf

View file

@ -154,7 +154,7 @@ public class DevID {
synchronized ( sNFCDevID ) {
if ( 0 == sNFCDevID[0] ) {
int devid = DBUtils.getIntFor( context, NFC_DEVID_KEY, 0 );
if ( 0 == devid ) {
while ( 0 == devid ) {
devid = Utils.nextRandomInt();
DBUtils.setIntFor( context, NFC_DEVID_KEY, devid );
}