mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-08 20:46:12 +01:00
don't capture lock stack in release builds
This commit is contained in:
parent
085963b76c
commit
565f688252
1 changed files with 7 additions and 1 deletions
|
@ -52,7 +52,9 @@ import android.support.annotation.NonNull;
|
||||||
public class GameLock implements AutoCloseable, Serializable {
|
public class GameLock implements AutoCloseable, Serializable {
|
||||||
private static final String TAG = GameLock.class.getSimpleName();
|
private static final String TAG = GameLock.class.getSimpleName();
|
||||||
|
|
||||||
|
private static final boolean GET_OWNER_STACK = BuildConfig.DEBUG;
|
||||||
private static final boolean DEBUG_LOCKS = false;
|
private static final boolean DEBUG_LOCKS = false;
|
||||||
|
|
||||||
// private static final long ASSERT_TIME = 2000;
|
// private static final long ASSERT_TIME = 2000;
|
||||||
private static final long THROW_TIME = 1000;
|
private static final long THROW_TIME = 1000;
|
||||||
private long m_rowid;
|
private long m_rowid;
|
||||||
|
@ -65,7 +67,11 @@ public class GameLock implements AutoCloseable, Serializable {
|
||||||
Owner()
|
Owner()
|
||||||
{
|
{
|
||||||
mThread = Thread.currentThread();
|
mThread = Thread.currentThread();
|
||||||
|
if ( GET_OWNER_STACK ) {
|
||||||
mTrace = android.util.Log.getStackTraceString(new Exception());
|
mTrace = android.util.Log.getStackTraceString(new Exception());
|
||||||
|
} else {
|
||||||
|
mTrace = "<untracked>";
|
||||||
|
}
|
||||||
setStamp();
|
setStamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue