mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-03 23:04:08 +01:00
set quarantine count to 1 for debug builds
This commit is contained in:
parent
be9d80533e
commit
34a72705c0
2 changed files with 4 additions and 3 deletions
|
@ -132,6 +132,7 @@ android {
|
||||||
buildConfigField "boolean", "NO_NEW_RELAY", "true"
|
buildConfigField "boolean", "NO_NEW_RELAY", "true"
|
||||||
buildConfigField "boolean", "LOCUTILS_ENABLED", "false"
|
buildConfigField "boolean", "LOCUTILS_ENABLED", "false"
|
||||||
buildConfigField "String", "LAST_COMMIT_FILE", "\"$LAST_COMMIT_FILE\""
|
buildConfigField "String", "LAST_COMMIT_FILE", "\"$LAST_COMMIT_FILE\""
|
||||||
|
buildConfigField "int", "BAD_COUNT", "2"
|
||||||
}
|
}
|
||||||
|
|
||||||
xw4GPlay {
|
xw4GPlay {
|
||||||
|
@ -188,6 +189,7 @@ android {
|
||||||
resValue "string", "nfc_aid", "$NFC_AID_XW4d"
|
resValue "string", "nfc_aid", "$NFC_AID_XW4d"
|
||||||
externalNativeBuild.ndkBuild.cFlags += ['-DVARIANT_xw4d']
|
externalNativeBuild.ndkBuild.cFlags += ['-DVARIANT_xw4d']
|
||||||
externalNativeBuild.ndkBuild.arguments += ['XW_BT_UUID=' + XWD_UUID]
|
externalNativeBuild.ndkBuild.arguments += ['XW_BT_UUID=' + XWD_UUID]
|
||||||
|
buildConfigField "int", "BAD_COUNT", "1"
|
||||||
}
|
}
|
||||||
|
|
||||||
xw4dGPlay {
|
xw4dGPlay {
|
||||||
|
|
|
@ -32,7 +32,6 @@ import java.util.Map;
|
||||||
public class Quarantine {
|
public class Quarantine {
|
||||||
private static final String TAG = Quarantine.class.getSimpleName();
|
private static final String TAG = Quarantine.class.getSimpleName();
|
||||||
private static final String DATA_KEY = TAG + "/key";
|
private static final String DATA_KEY = TAG + "/key";
|
||||||
private static final int BAD_COUNT = 2;
|
|
||||||
private static QData[] sDataRef = {null};
|
private static QData[] sDataRef = {null};
|
||||||
|
|
||||||
public static int getCount( long rowid )
|
public static int getCount( long rowid )
|
||||||
|
@ -47,7 +46,7 @@ public class Quarantine {
|
||||||
public synchronized static boolean safeToOpen( long rowid )
|
public synchronized static boolean safeToOpen( long rowid )
|
||||||
{
|
{
|
||||||
int count = getCount( rowid );
|
int count = getCount( rowid );
|
||||||
boolean result = count < BAD_COUNT;
|
boolean result = count < BuildConfig.BAD_COUNT;
|
||||||
if ( !result ) {
|
if ( !result ) {
|
||||||
Log.d( TAG, "safeToOpen(%d) => %b (count=%d)", rowid, result, count );
|
Log.d( TAG, "safeToOpen(%d) => %b (count=%d)", rowid, result, count );
|
||||||
if ( BuildConfig.NON_RELEASE ) {
|
if ( BuildConfig.NON_RELEASE ) {
|
||||||
|
@ -96,7 +95,7 @@ public class Quarantine {
|
||||||
public static void markBad( long rowid )
|
public static void markBad( long rowid )
|
||||||
{
|
{
|
||||||
synchronized ( sDataRef ) {
|
synchronized ( sDataRef ) {
|
||||||
for ( int ii = 0; ii < BAD_COUNT; ++ii ) {
|
for ( int ii = 0; ii < BuildConfig.BAD_COUNT; ++ii ) {
|
||||||
get().increment( rowid );
|
get().increment( rowid );
|
||||||
}
|
}
|
||||||
store();
|
store();
|
||||||
|
|
Loading…
Reference in a new issue