mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-12 08:47:50 +01:00
Merge branch 'android_branch' into android_translate
This commit is contained in:
commit
0b9703ca67
49 changed files with 171 additions and 248 deletions
|
@ -1,6 +1,6 @@
|
||||||
def INITIAL_CLIENT_VERS = 9
|
def INITIAL_CLIENT_VERS = 9
|
||||||
def VERSION_CODE_BASE = 151
|
def VERSION_CODE_BASE = 152
|
||||||
def VERSION_NAME = '4.4.155'
|
def VERSION_NAME = '4.4.156'
|
||||||
def FABRIC_API_KEY = System.getenv("FABRIC_API_KEY")
|
def FABRIC_API_KEY = System.getenv("FABRIC_API_KEY")
|
||||||
def BUILD_INFO_NAME = "build-info.txt"
|
def BUILD_INFO_NAME = "build-info.txt"
|
||||||
|
|
||||||
|
@ -8,19 +8,6 @@ def BUILD_INFO_NAME = "build-info.txt"
|
||||||
// each other
|
// each other
|
||||||
def XW_UUID = '"7be0d084-ff89-4d6d-9c78-594773a6f963"' // from comms.h
|
def XW_UUID = '"7be0d084-ff89-4d6d-9c78-594773a6f963"' // from comms.h
|
||||||
def XWD_UUID = '"b079b640-35fe-11e5-a432-0002a5d5c51b"' // from comms.h
|
def XWD_UUID = '"b079b640-35fe-11e5-a432-0002a5d5c51b"' // from comms.h
|
||||||
def BT_UUIDS = [
|
|
||||||
'xw4fdroidDebug' : XW_UUID,
|
|
||||||
'xw4fdroidRelease' : XW_UUID,
|
|
||||||
'xw4NoSMSDebug' : XW_UUID,
|
|
||||||
'xw4NoSMSRelease' : XW_UUID,
|
|
||||||
'xw4SMSDebug' : XW_UUID,
|
|
||||||
'xw4SMSRelease' : XW_UUID,
|
|
||||||
|
|
||||||
'xw4dRelease' : XWD_UUID,
|
|
||||||
'xw4dDebug' : XWD_UUID,
|
|
||||||
'xw4dNoSMSRelease' : XWD_UUID,
|
|
||||||
'xw4dNoSMSDebug' : XWD_UUID,
|
|
||||||
]
|
|
||||||
|
|
||||||
// AID must start with F (first 4 bits) and be from 5 to 16 bytes long
|
// AID must start with F (first 4 bits) and be from 5 to 16 bytes long
|
||||||
def NFC_AID_XW4 = "FC8FF510B360"
|
def NFC_AID_XW4 = "FC8FF510B360"
|
||||||
|
@ -55,7 +42,8 @@ repositories {
|
||||||
android {
|
android {
|
||||||
// Specify buildToolsVersion so gradle will inform when the
|
// Specify buildToolsVersion so gradle will inform when the
|
||||||
// default changes and .travis.yml can be kept in sync
|
// default changes and .travis.yml can be kept in sync
|
||||||
buildToolsVersion '27.0.3'
|
buildToolsVersion '28.0.3'
|
||||||
|
ndkVersion '21.0.6113669'
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// HostApduService requires 19. But is it a problem?
|
// HostApduService requires 19. But is it a problem?
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
|
@ -113,6 +101,8 @@ android {
|
||||||
buildConfigField "int", "VARIANT_CODE", "1"
|
buildConfigField "int", "VARIANT_CODE", "1"
|
||||||
buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4}\""
|
buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4}\""
|
||||||
resValue "string", "nfc_aid", "$NFC_AID_XW4"
|
resValue "string", "nfc_aid", "$NFC_AID_XW4"
|
||||||
|
externalNativeBuild.ndkBuild.cFlags += ['-DVARIANT_xw4NoSMS']
|
||||||
|
externalNativeBuild.ndkBuild.arguments += ['XW_BT_UUID=' + XW_UUID]
|
||||||
}
|
}
|
||||||
|
|
||||||
xw4fdroid {
|
xw4fdroid {
|
||||||
|
@ -128,6 +118,8 @@ android {
|
||||||
buildConfigField "boolean", "FOR_FDROID", "true"
|
buildConfigField "boolean", "FOR_FDROID", "true"
|
||||||
buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4}\""
|
buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4}\""
|
||||||
resValue "string", "nfc_aid", "$NFC_AID_XW4"
|
resValue "string", "nfc_aid", "$NFC_AID_XW4"
|
||||||
|
externalNativeBuild.ndkBuild.cFlags += ['-DVARIANT_xw4fdroid']
|
||||||
|
externalNativeBuild.ndkBuild.arguments += ['XW_BT_UUID=' + XW_UUID]
|
||||||
}
|
}
|
||||||
xw4d {
|
xw4d {
|
||||||
dimension "variant"
|
dimension "variant"
|
||||||
|
@ -144,6 +136,8 @@ android {
|
||||||
buildConfigField "String", "KEY_FCMID", "\"FBMService_fcmid1\""
|
buildConfigField "String", "KEY_FCMID", "\"FBMService_fcmid1\""
|
||||||
buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4d}\""
|
buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4d}\""
|
||||||
resValue "string", "nfc_aid", "$NFC_AID_XW4d"
|
resValue "string", "nfc_aid", "$NFC_AID_XW4d"
|
||||||
|
externalNativeBuild.ndkBuild.cFlags += ['-DVARIANT_xw4d']
|
||||||
|
externalNativeBuild.ndkBuild.arguments += ['XW_BT_UUID=' + XWD_UUID]
|
||||||
}
|
}
|
||||||
|
|
||||||
xw4dNoSMS {
|
xw4dNoSMS {
|
||||||
|
@ -160,6 +154,8 @@ android {
|
||||||
buildConfigField "boolean", "REPORT_LOCKS", "true"
|
buildConfigField "boolean", "REPORT_LOCKS", "true"
|
||||||
buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4d}\""
|
buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4d}\""
|
||||||
resValue "string", "nfc_aid", "$NFC_AID_XW4d"
|
resValue "string", "nfc_aid", "$NFC_AID_XW4d"
|
||||||
|
externalNativeBuild.ndkBuild.cFlags += ['-DVARIANT_xw4dNoSMS']
|
||||||
|
externalNativeBuild.ndkBuild.arguments += ['XW_BT_UUID=' + XWD_UUID]
|
||||||
}
|
}
|
||||||
|
|
||||||
xw4SMS {
|
xw4SMS {
|
||||||
|
@ -174,6 +170,8 @@ android {
|
||||||
buildConfigField "int", "VARIANT_CODE", "5"
|
buildConfigField "int", "VARIANT_CODE", "5"
|
||||||
buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4}\""
|
buildConfigField "String", "NFC_AID", "\"${NFC_AID_XW4}\""
|
||||||
resValue "string", "nfc_aid", "$NFC_AID_XW4"
|
resValue "string", "nfc_aid", "$NFC_AID_XW4"
|
||||||
|
externalNativeBuild.ndkBuild.cFlags += ['-DVARIANT_xw4SMS']
|
||||||
|
externalNativeBuild.ndkBuild.arguments += ['XW_BT_UUID=' + XW_UUID]
|
||||||
}
|
}
|
||||||
|
|
||||||
// WARNING: "all" breaks things. Seems to be a keyword. Need
|
// WARNING: "all" breaks things. Seems to be a keyword. Need
|
||||||
|
@ -210,12 +208,24 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
all {
|
||||||
|
externalNativeBuild {
|
||||||
|
ndkBuild.arguments += ["INITIAL_CLIENT_VERS=" + INITIAL_CLIENT_VERS]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
release {
|
release {
|
||||||
debuggable false
|
debuggable false
|
||||||
minifyEnabled false // PENDING
|
minifyEnabled false // PENDING
|
||||||
// proguard crashes when I do this (the optimize part)
|
// proguard crashes when I do this (the optimize part)
|
||||||
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
resValue "bool", "DEBUG", "false"
|
resValue "bool", "DEBUG", "false"
|
||||||
|
externalNativeBuild {
|
||||||
|
ndkBuild.arguments += ['BUILD_TARGET=release']
|
||||||
|
}
|
||||||
|
ndk {
|
||||||
|
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
debug {
|
debug {
|
||||||
debuggable true
|
debuggable true
|
||||||
|
@ -224,6 +234,23 @@ android {
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
// This doesn't work on marshmallow: duplicate permission error
|
// This doesn't work on marshmallow: duplicate permission error
|
||||||
// applicationIdSuffix ".debug"
|
// applicationIdSuffix ".debug"
|
||||||
|
|
||||||
|
externalNativeBuild {
|
||||||
|
ndkBuild {
|
||||||
|
cFlags += ['-DDEBUG']
|
||||||
|
arguments += ['BUILD_TARGET=debug']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ndk {
|
||||||
|
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
externalNativeBuild {
|
||||||
|
ndkBuild {
|
||||||
|
path "../jni/Android.mk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,11 +320,11 @@ ext {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "com.android.support:support-v4:$SUPPORT_LIB_VERSION"
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
implementation "com.android.support:support-compat:$SUPPORT_LIB_VERSION"
|
implementation 'androidx.core:core:1.0.0'
|
||||||
|
|
||||||
implementation "android.arch.lifecycle:extensions:1.1.1"
|
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
|
||||||
annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
|
annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.0.0'
|
||||||
|
|
||||||
// 2.6.8 is probably as far forward as I can go without upping my
|
// 2.6.8 is probably as far forward as I can go without upping my
|
||||||
// min-supported SDK version
|
// min-supported SDK version
|
||||||
|
@ -330,23 +357,11 @@ task cleanLocStrings(type: Exec) {
|
||||||
}
|
}
|
||||||
clean.dependsOn cleanLocStrings
|
clean.dependsOn cleanLocStrings
|
||||||
|
|
||||||
task ndkSetupDebug(type: Exec) {
|
task myPreBuild(dependsOn: ['mkImages',
|
||||||
workingDir '../'
|
'copyLocStrings',
|
||||||
// remove ', "--arm-only"' for Genymotion builds
|
'mkXml',
|
||||||
|
'copyStringsXw4D',
|
||||||
// I'm putting ARM back for a while. It's too much trouble having
|
'copyStringsXw4DNoSMS']) {
|
||||||
// builds, including those built by travis, that don't run on the
|
|
||||||
// emulator. Maybe remove this change before each release?
|
|
||||||
commandLine "./scripts/ndksetup.sh", "--with-clang"
|
|
||||||
// commandLine "./scripts/ndksetup.sh", "--with-clang", "--arm-only"
|
|
||||||
}
|
|
||||||
|
|
||||||
task ndkSetupRelease(type: Exec) {
|
|
||||||
workingDir '../'
|
|
||||||
commandLine "./scripts/ndksetup.sh", "--with-clang", "--arm-only"
|
|
||||||
}
|
|
||||||
|
|
||||||
task myPreBuild(dependsOn: ['mkImages', 'copyLocStrings', 'mkXml']) {
|
|
||||||
}
|
}
|
||||||
preBuild.dependsOn myPreBuild
|
preBuild.dependsOn myPreBuild
|
||||||
|
|
||||||
|
@ -357,64 +372,18 @@ task mkXml(type: Exec) {
|
||||||
'-t', "debug"
|
'-t', "debug"
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
task copyStringsXw4D(type: Exec) {
|
||||||
ArrayList<String> cleanCmdLst = new ArrayList<>(["rm", "-rf"])
|
workingDir './'
|
||||||
android.applicationVariants.all { variant ->
|
environment.put('APPNAME', 'CrossDbg')
|
||||||
// print "variant: " + variant.name + "\n"
|
commandLine 'make', '-f', '../scripts/Variant.mk',
|
||||||
String BUILD = variant.getBuildType().getName()
|
"src/xw4d/res/values/strings.xml"
|
||||||
// println "type: " + BUILD
|
}
|
||||||
String FLAVOR = variant.getFlavorName()
|
|
||||||
// print "flavor: " + variant.getFlavorName() + "\n"
|
|
||||||
// print "variant: " + variant + "\n"
|
|
||||||
|
|
||||||
String ndkSetup = "ndkSetup" + BUILD.capitalize()
|
task copyStringsXw4DNoSMS(type: Exec) {
|
||||||
// println "ndkSetup: " + ndkSetup
|
workingDir './'
|
||||||
|
environment.put('APPNAME', 'CrossDbg')
|
||||||
String variantCaps = variant.name.capitalize()
|
commandLine 'make', '-f', '../scripts/Variant.mk',
|
||||||
String nameLC = variant.getBuildType().getName().toLowerCase()
|
"src/xw4dNoSMS/res/values/strings.xml"
|
||||||
String lib = "libs-${variant.name}"
|
|
||||||
String ndkBuildTask = "ndkBuild${variantCaps}"
|
|
||||||
String btUUID = BT_UUIDS[variant.name]
|
|
||||||
task "$ndkBuildTask"(type: Exec) {
|
|
||||||
workingDir '../'
|
|
||||||
commandLine './scripts/ndkbuild.sh', '-j3',
|
|
||||||
"BUILD_TARGET=${nameLC}", "INITIAL_CLIENT_VERS=$INITIAL_CLIENT_VERS",
|
|
||||||
"VARIANT=${FLAVOR}", "NDK_LIBS_OUT=${lib}",
|
|
||||||
"NDK_OUT=./obj-${variant.name}", "XW_BT_UUID=\"${btUUID}\""
|
|
||||||
}
|
|
||||||
|
|
||||||
String compileTask = "compile${variantCaps}Ndk"
|
|
||||||
tasks.getByName(ndkBuildTask).dependsOn ndkSetup
|
|
||||||
tasks.getByName(compileTask).dependsOn ndkBuildTask
|
|
||||||
|
|
||||||
// For clean task
|
|
||||||
cleanCmdLst.add("libs-${variant.name}")
|
|
||||||
cleanCmdLst.add("./obj-${variant.name}")
|
|
||||||
}
|
|
||||||
|
|
||||||
task cleanNDK(type: Exec) {
|
|
||||||
workingDir '../'
|
|
||||||
commandLine cleanCmdLst
|
|
||||||
}
|
|
||||||
clean.dependsOn 'cleanNDK'
|
|
||||||
|
|
||||||
String copyStringsTask = "copyStringsXw4D"
|
|
||||||
task "$copyStringsTask"(type: Exec) {
|
|
||||||
workingDir './'
|
|
||||||
environment.put('APPNAME', 'CrossDbg')
|
|
||||||
commandLine 'make', '-f', '../scripts/Variant.mk',
|
|
||||||
"src/xw4d/res/values/strings.xml"
|
|
||||||
}
|
|
||||||
preBuild.dependsOn copyStringsTask
|
|
||||||
|
|
||||||
String copyStringsTaskNoSMS = "copyStringsXw4DNoSMS"
|
|
||||||
task "$copyStringsTaskNoSMS"(type: Exec) {
|
|
||||||
workingDir './'
|
|
||||||
environment.put('APPNAME', 'CrossDbg')
|
|
||||||
commandLine 'make', '-f', '../scripts/Variant.mk',
|
|
||||||
"src/xw4dNoSMS/res/values/strings.xml"
|
|
||||||
}
|
|
||||||
preBuild.dependsOn copyStringsTaskNoSMS
|
|
||||||
}
|
}
|
||||||
|
|
||||||
task makeBuildAssets() {
|
task makeBuildAssets() {
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme"
|
||||||
>
|
>
|
||||||
|
|
||||||
<provider android:name="android.support.v4.content.FileProvider"
|
<provider android:name="androidx.core.content.FileProvider"
|
||||||
android:authorities="${applicationId}.provider"
|
android:authorities="${applicationId}.provider"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:grantUriPermissions="true"
|
android:grantUriPermissions="true"
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
|
|
||||||
<activity android:name="MainActivity"
|
<activity android:name="MainActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="standard"
|
||||||
>
|
>
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h2>CrossWords 4.4.155 release</h2>
|
<h2>CrossWords 4.4.156 release</h2>
|
||||||
|
|
||||||
<p>This release fixes stalls that sometimes follow use of the Undo feature</p>
|
<p>This release fixes a couple of minor UI issues</p>
|
||||||
|
|
||||||
<div id="survey">
|
<div id="survey">
|
||||||
<p>Please <a href="https://www.surveymonkey.com/s/GX3XLHR">take
|
<p>Please <a href="https://www.surveymonkey.com/s/GX3XLHR">take
|
||||||
|
@ -25,16 +25,10 @@
|
||||||
|
|
||||||
<h3>New with this release</h3>
|
<h3>New with this release</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Fix stall that was sometimes triggered by an ill-timed Undo </li>
|
<li>Fix so game list entries collapse correctly again</li>
|
||||||
<li>Make some on-board icons smoother</li>
|
<li>Fix so bringing app to front keeps the open game open</li>
|
||||||
<li>Fix crash receiving in-game chat message that's too long</li>
|
<li>Show name in scoreboard as "Not here yet" until invitee connects</li>
|
||||||
<li>Make the board look a bit better on tall&narrow screens</li>
|
<li>Include more Norwegian translations</li>
|
||||||
<li>Tweak the game-configure dialog</li>
|
|
||||||
<li>Make some changes you shouldn't see getting ready to
|
|
||||||
support "Duplicate" play</li>
|
|
||||||
<li>New translations (via Weblate) for Catalan, Dutch, French,
|
|
||||||
German, Polish and Portuguese, and especially for Japanese
|
|
||||||
and Spanish</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>(The full changelog
|
<p>(The full changelog
|
||||||
|
|
|
@ -25,8 +25,6 @@ import android.content.Context;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
import android.content.DialogInterface.OnClickListener;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.DialogFragment;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,7 @@ public class BTService extends XWJIService {
|
||||||
|
|
||||||
public static void onACLConnected( Context context )
|
public static void onACLConnected( Context context )
|
||||||
{
|
{
|
||||||
Log.d( TAG, "onACLConnected()" );
|
Log.d( TAG, "onACLConnected(); enqueuing work" );
|
||||||
enqueueWork( context,
|
enqueueWork( context,
|
||||||
getIntentTo( context, BTAction.ACL_CONN ) );
|
getIntentTo( context, BTAction.ACL_CONN ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,6 +165,17 @@ public class ConnStatusHandler {
|
||||||
return s_downOnMe && s_rect.contains( xx, yy );
|
return s_downOnMe && s_rect.contains( xx, yy );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static final CommsConnType[] sDisplayOrder = {
|
||||||
|
CommsConnType.COMMS_CONN_RELAY,
|
||||||
|
CommsConnType.COMMS_CONN_BT,
|
||||||
|
CommsConnType.COMMS_CONN_IR,
|
||||||
|
CommsConnType.COMMS_CONN_IP_DIRECT,
|
||||||
|
CommsConnType.COMMS_CONN_SMS,
|
||||||
|
CommsConnType.COMMS_CONN_P2P,
|
||||||
|
CommsConnType.COMMS_CONN_NFC,
|
||||||
|
};
|
||||||
|
|
||||||
public static String getStatusText( Context context, XwJNI.GamePtr gamePtr,
|
public static String getStatusText( Context context, XwJNI.GamePtr gamePtr,
|
||||||
CommsConnTypeSet connTypes,
|
CommsConnTypeSet connTypes,
|
||||||
CommsAddrRec addr )
|
CommsAddrRec addr )
|
||||||
|
@ -179,7 +190,10 @@ public class ConnStatusHandler {
|
||||||
sb.append( LocUtils.getString( context,
|
sb.append( LocUtils.getString( context,
|
||||||
R.string.connstat_net_fmt,
|
R.string.connstat_net_fmt,
|
||||||
connTypes.toString( context, true )));
|
connTypes.toString( context, true )));
|
||||||
for ( CommsConnType typ : connTypes.getTypes() ) {
|
for ( CommsConnType typ : sDisplayOrder ) {
|
||||||
|
if ( !connTypes.contains(typ) ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
SuccessRecord record = recordFor( context, typ, false );
|
SuccessRecord record = recordFor( context, typ, false );
|
||||||
|
|
||||||
// Don't show e.g. NFC unless it's been used
|
// Don't show e.g. NFC unless it's been used
|
||||||
|
|
|
@ -20,15 +20,8 @@
|
||||||
package org.eehouse.android.xw4;
|
package org.eehouse.android.xw4;
|
||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.support.v4.app.DialogFragment;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
|
|
||||||
import org.eehouse.android.xw4.loc.LocUtils;
|
import org.eehouse.android.xw4.loc.LocUtils;
|
||||||
|
|
||||||
|
|
|
@ -1123,6 +1123,7 @@ public class DBUtils {
|
||||||
}
|
}
|
||||||
setCached( rowid, result );
|
setCached( rowid, result );
|
||||||
}
|
}
|
||||||
|
Assert.assertTrueNR( null != result );
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,10 +27,7 @@ import android.content.DialogInterface.OnCancelListener;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
import android.content.DialogInterface.OnClickListener;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Point;
|
|
||||||
import android.graphics.Rect;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.DialogFragment;
|
|
||||||
import android.view.ContextMenu.ContextMenuInfo;
|
import android.view.ContextMenu.ContextMenuInfo;
|
||||||
import android.view.ContextMenu;
|
import android.view.ContextMenu;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
@ -44,7 +41,6 @@ import android.widget.EditText;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.eehouse.android.xw4.DlgDelegate.Action;
|
import org.eehouse.android.xw4.DlgDelegate.Action;
|
||||||
import org.eehouse.android.xw4.DlgDelegate.ActionPair;
|
|
||||||
import org.eehouse.android.xw4.DlgDelegate.ConfirmThenBuilder;
|
import org.eehouse.android.xw4.DlgDelegate.ConfirmThenBuilder;
|
||||||
import org.eehouse.android.xw4.DlgDelegate.DlgClickNotify;
|
import org.eehouse.android.xw4.DlgDelegate.DlgClickNotify;
|
||||||
import org.eehouse.android.xw4.DlgDelegate.NotAgainBuilder;
|
import org.eehouse.android.xw4.DlgDelegate.NotAgainBuilder;
|
||||||
|
|
|
@ -22,15 +22,9 @@ package org.eehouse.android.xw4;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.Dialog;
|
|
||||||
import android.support.v4.app.DialogFragment;
|
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.Context;
|
|
||||||
import android.content.DialogInterface.OnCancelListener;
|
import android.content.DialogInterface.OnCancelListener;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.view.View;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ import android.content.Context;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
import android.content.DialogInterface.OnClickListener;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.DialogFragment;
|
|
||||||
import org.eehouse.android.xw4.DlgDelegate.Action;
|
import org.eehouse.android.xw4.DlgDelegate.Action;
|
||||||
import org.eehouse.android.xw4.DlgDelegate.ActionPair;
|
import org.eehouse.android.xw4.DlgDelegate.ActionPair;
|
||||||
import org.eehouse.android.xw4.DlgDelegate.DlgClickNotify;
|
import org.eehouse.android.xw4.DlgDelegate.DlgClickNotify;
|
||||||
|
|
|
@ -29,7 +29,7 @@ import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
// Implements read-locks and write-locks per game. A read lock is
|
// Implements read-locks and write-locks per game. A read lock is
|
||||||
// obtainable when other read locks are granted but not when a
|
// obtainable when other read locks are granted but not when a
|
||||||
|
|
|
@ -19,14 +19,10 @@
|
||||||
|
|
||||||
package org.eehouse.android.xw4;
|
package org.eehouse.android.xw4;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
import android.content.DialogInterface.OnClickListener;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
|
||||||
import android.support.v4.app.DialogFragment;
|
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -34,11 +30,8 @@ import java.util.List;
|
||||||
|
|
||||||
import org.eehouse.android.xw4.DBUtils.SentInvitesInfo;
|
import org.eehouse.android.xw4.DBUtils.SentInvitesInfo;
|
||||||
import org.eehouse.android.xw4.DlgDelegate.Action;
|
import org.eehouse.android.xw4.DlgDelegate.Action;
|
||||||
import org.eehouse.android.xw4.DlgDelegate.ActionPair;
|
|
||||||
import org.eehouse.android.xw4.DlgDelegate.DlgClickNotify.InviteMeans;
|
import org.eehouse.android.xw4.DlgDelegate.DlgClickNotify.InviteMeans;
|
||||||
import org.eehouse.android.xw4.DlgDelegate.NotAgainBuilder;
|
|
||||||
import org.eehouse.android.xw4.Perms23.Perm;
|
import org.eehouse.android.xw4.Perms23.Perm;
|
||||||
import org.eehouse.android.xw4.loc.LocUtils;
|
|
||||||
|
|
||||||
public class InviteChoicesAlert extends DlgDelegateAlert {
|
public class InviteChoicesAlert extends DlgDelegateAlert {
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,7 @@ package org.eehouse.android.xw4;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.DialogFragment;
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
|
|
||||||
import org.eehouse.android.xw4.loc.LocUtils;
|
import org.eehouse.android.xw4.loc.LocUtils;
|
||||||
|
|
|
@ -22,12 +22,10 @@ package org.eehouse.android.xw4;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.graphics.Point;
|
|
||||||
import android.graphics.Rect;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.DialogFragment;
|
|
||||||
import android.support.v4.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import android.support.v4.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.ContextMenu.ContextMenuInfo;
|
import android.view.ContextMenu.ContextMenuInfo;
|
||||||
import android.view.ContextMenu;
|
import android.view.ContextMenu;
|
||||||
|
|
|
@ -19,20 +19,11 @@
|
||||||
|
|
||||||
package org.eehouse.android.xw4;
|
package org.eehouse.android.xw4;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.support.v4.app.DialogFragment;
|
|
||||||
import org.eehouse.android.xw4.DlgDelegate.Action;
|
|
||||||
import org.eehouse.android.xw4.DlgDelegate.ActionPair;
|
import org.eehouse.android.xw4.DlgDelegate.ActionPair;
|
||||||
|
|
||||||
|
|
||||||
import org.eehouse.android.xw4.loc.LocUtils;
|
|
||||||
|
|
||||||
public class NotAgainAlert extends DlgDelegateAlert {
|
public class NotAgainAlert extends DlgDelegateAlert {
|
||||||
private static final String TAG = NotAgainAlert.class.getSimpleName();
|
private static final String TAG = NotAgainAlert.class.getSimpleName();
|
||||||
|
|
||||||
|
|
|
@ -19,20 +19,11 @@
|
||||||
|
|
||||||
package org.eehouse.android.xw4;
|
package org.eehouse.android.xw4;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.support.v4.app.DialogFragment;
|
|
||||||
import org.eehouse.android.xw4.DlgDelegate.Action;
|
|
||||||
import org.eehouse.android.xw4.DlgDelegate.ActionPair;
|
import org.eehouse.android.xw4.DlgDelegate.ActionPair;
|
||||||
|
|
||||||
|
|
||||||
import org.eehouse.android.xw4.loc.LocUtils;
|
|
||||||
|
|
||||||
public class OkOnlyAlert extends DlgDelegateAlert {
|
public class OkOnlyAlert extends DlgDelegateAlert {
|
||||||
private static final String TAG = OkOnlyAlert.class.getSimpleName();
|
private static final String TAG = OkOnlyAlert.class.getSimpleName();
|
||||||
|
|
||||||
|
|
|
@ -21,19 +21,15 @@ package org.eehouse.android.xw4;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.pm.PackageInfo;
|
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.pm.PermissionInfo;
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.support.v4.app.ActivityCompat;
|
import androidx.core.app.ActivityCompat;
|
||||||
import android.support.v4.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -41,7 +37,6 @@ import java.util.Set;
|
||||||
import org.eehouse.android.nbsplib.NBSProxy;
|
import org.eehouse.android.nbsplib.NBSProxy;
|
||||||
|
|
||||||
import org.eehouse.android.xw4.DlgDelegate.Action;
|
import org.eehouse.android.xw4.DlgDelegate.Action;
|
||||||
import org.eehouse.android.xw4.DlgDelegate.DlgClickNotify;
|
|
||||||
import org.eehouse.android.xw4.jni.CommsAddrRec.CommsConnType;
|
import org.eehouse.android.xw4.jni.CommsAddrRec.CommsConnType;
|
||||||
import org.eehouse.android.xw4.loc.LocUtils;
|
import org.eehouse.android.xw4.loc.LocUtils;
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@ import android.app.Dialog;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceActivity;
|
import android.preference.PreferenceActivity;
|
||||||
import android.support.v4.app.DialogFragment;
|
|
||||||
|
|
||||||
|
|
||||||
import org.eehouse.android.xw4.DlgDelegate.Action;
|
import org.eehouse.android.xw4.DlgDelegate.Action;
|
||||||
|
|
|
@ -25,10 +25,9 @@ import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import org.eehouse.android.xw4.FBMService;
|
|
||||||
import org.eehouse.android.xw4.GameUtils.BackMoveResult;
|
import org.eehouse.android.xw4.GameUtils.BackMoveResult;
|
||||||
import org.eehouse.android.xw4.MultiService.DictFetchOwner;
|
import org.eehouse.android.xw4.MultiService.DictFetchOwner;
|
||||||
import org.eehouse.android.xw4.MultiService.MultiEvent;
|
import org.eehouse.android.xw4.MultiService.MultiEvent;
|
||||||
|
@ -58,7 +57,6 @@ import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.LinkedBlockingQueue;
|
import java.util.concurrent.LinkedBlockingQueue;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
|
@ -25,9 +25,6 @@ import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.DialogFragment;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,10 @@ package org.eehouse.android.xw4;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.app.Notification;
|
import android.app.Notification;
|
||||||
import android.app.NotificationChannel;
|
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
|
@ -39,11 +37,10 @@ import android.database.Cursor;
|
||||||
import android.media.Ringtone;
|
import android.media.Ringtone;
|
||||||
import android.media.RingtoneManager;
|
import android.media.RingtoneManager;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.provider.ContactsContract.PhoneLookup;
|
import android.provider.ContactsContract.PhoneLookup;
|
||||||
import android.support.v4.app.NotificationCompat;
|
import androidx.core.app.NotificationCompat;
|
||||||
import android.support.v4.content.FileProvider;
|
import androidx.core.content.FileProvider;
|
||||||
import android.telephony.PhoneNumberUtils;
|
import android.telephony.PhoneNumberUtils;
|
||||||
import android.telephony.TelephonyManager;
|
import android.telephony.TelephonyManager;
|
||||||
import android.text.ClipboardManager;
|
import android.text.ClipboardManager;
|
||||||
|
@ -56,7 +53,6 @@ import android.widget.EditText;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import org.json.JSONException;
|
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
|
@ -69,7 +65,6 @@ import java.io.ObjectInputStream;
|
||||||
import java.io.ObjectOutputStream;
|
import java.io.ObjectOutputStream;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -23,13 +23,12 @@ package org.eehouse.android.xw4;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Configuration;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.DialogFragment;
|
import androidx.fragment.app.DialogFragment;
|
||||||
import android.support.v4.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import android.support.v4.app.FragmentActivity;
|
import androidx.fragment.app.FragmentActivity;
|
||||||
import android.support.v4.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import android.support.v4.app.FragmentTransaction;
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
import android.view.ContextMenu.ContextMenuInfo;
|
import android.view.ContextMenu.ContextMenuInfo;
|
||||||
import android.view.ContextMenu;
|
import android.view.ContextMenu;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
|
|
|
@ -21,11 +21,11 @@
|
||||||
package org.eehouse.android.xw4;
|
package org.eehouse.android.xw4;
|
||||||
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.arch.lifecycle.Lifecycle;
|
import androidx.lifecycle.Lifecycle;
|
||||||
import android.arch.lifecycle.LifecycleObserver;
|
import androidx.lifecycle.LifecycleObserver;
|
||||||
import android.arch.lifecycle.LifecycleOwner;
|
import androidx.lifecycle.LifecycleOwner;
|
||||||
import android.arch.lifecycle.OnLifecycleEvent;
|
import androidx.lifecycle.OnLifecycleEvent;
|
||||||
import android.arch.lifecycle.ProcessLifecycleOwner;
|
import androidx.lifecycle.ProcessLifecycleOwner;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
@ -39,7 +39,7 @@ import org.eehouse.android.xw4.jni.XwJNI;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
|
||||||
import static android.arch.lifecycle.Lifecycle.Event.ON_ANY;
|
import static androidx.lifecycle.Lifecycle.Event.ON_ANY;
|
||||||
|
|
||||||
public class XWApp extends Application
|
public class XWApp extends Application
|
||||||
implements LifecycleObserver, NBSProxy.Callbacks {
|
implements LifecycleObserver, NBSProxy.Callbacks {
|
||||||
|
|
|
@ -20,10 +20,8 @@
|
||||||
package org.eehouse.android.xw4;
|
package org.eehouse.android.xw4;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.support.v4.app.DialogFragment;
|
import androidx.fragment.app.DialogFragment;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
|
|
|
@ -20,10 +20,9 @@
|
||||||
|
|
||||||
package org.eehouse.android.xw4;
|
package org.eehouse.android.xw4;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
|
|
|
@ -23,12 +23,11 @@ package org.eehouse.android.xw4;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.JobIntentService;
|
import androidx.core.app.JobIntentService;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
|
@ -121,6 +121,7 @@ public class DUtilCtxt {
|
||||||
private static final int STR_DUP_MOVED = 27;
|
private static final int STR_DUP_MOVED = 27;
|
||||||
private static final int STRD_DUP_TRADED = 28;
|
private static final int STRD_DUP_TRADED = 28;
|
||||||
private static final int STRSD_DUP_ONESCORE = 29;
|
private static final int STRSD_DUP_ONESCORE = 29;
|
||||||
|
private static final int STR_PENDING_PLAYER = 30;
|
||||||
|
|
||||||
public String getUserString( int stringCode )
|
public String getUserString( int stringCode )
|
||||||
{
|
{
|
||||||
|
@ -207,6 +208,10 @@ public class DUtilCtxt {
|
||||||
id = R.string.dup_onescore_fmt;
|
id = R.string.dup_onescore_fmt;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case STR_PENDING_PLAYER:
|
||||||
|
id = R.string.missing_player;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Log.w( TAG, "no such stringCode: %d", stringCode );
|
Log.w( TAG, "no such stringCode: %d", stringCode );
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,8 +39,9 @@
|
||||||
android:paddingRight="8dip"
|
android:paddingRight="8dip"
|
||||||
>
|
>
|
||||||
<ImageView android:id="@+id/game_type_marker"
|
<ImageView android:id="@+id/game_type_marker"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="30dp"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="30dp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
android:src="@drawable/ic_multigame"
|
android:src="@drawable/ic_multigame"
|
||||||
/>
|
/>
|
||||||
<ImageView android:id="@+id/has_chat_marker"
|
<ImageView android:id="@+id/has_chat_marker"
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
android:paddingLeft="8dp"
|
android:paddingLeft="8dp"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ListView android:id="@+id/android:list"
|
<ListView android:id="@id/android:list"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:drawSelectorOnTop="false"
|
android:drawSelectorOnTop="false"
|
||||||
|
|
|
@ -2092,6 +2092,7 @@
|
||||||
<string name="prev_player">Your opponent</string>
|
<string name="prev_player">Your opponent</string>
|
||||||
<!-- formatting for last move summary in notifications -->
|
<!-- formatting for last move summary in notifications -->
|
||||||
<string name="lmi_pass_fmt">%1$s passed (0 points)</string>
|
<string name="lmi_pass_fmt">%1$s passed (0 points)</string>
|
||||||
|
<!-- Example: Eric played BINGO for 58 points -->
|
||||||
<plurals name="lmi_move_fmt">
|
<plurals name="lmi_move_fmt">
|
||||||
<item quantity="one">%1$s played %2$s for one point</item>
|
<item quantity="one">%1$s played %2$s for one point</item>
|
||||||
<item quantity="other">%1$s played %2$s for %3$d points</item>
|
<item quantity="other">%1$s played %2$s for %3$d points</item>
|
||||||
|
@ -2103,9 +2104,10 @@
|
||||||
<string name="lmi_phony_fmt">%1$s lost a turn</string>
|
<string name="lmi_phony_fmt">%1$s lost a turn</string>
|
||||||
<string name="lmi_tiles_fmt">Tiles assigned to %1$s</string>
|
<string name="lmi_tiles_fmt">Tiles assigned to %1$s</string>
|
||||||
<string name="bt_no_devs">You currently have no paired Bluetooth
|
<string name="bt_no_devs">You currently have no paired Bluetooth
|
||||||
devices (or Bluetooth is turned off). Would you like to open the
|
devices (or Bluetooth is turned off). Would you like to open the
|
||||||
Android Settings Panel to add one or more?\n\n(You may also need
|
Android Settings Panel to add one or more?\n\n(You may also need
|
||||||
to open it on the device you want to pair with.)</string>
|
to open the Settings panel on the device you want to pair
|
||||||
|
with.)</string>
|
||||||
<string name="app_not_found_fmt">Unable to connect via Bluetooth
|
<string name="app_not_found_fmt">Unable to connect via Bluetooth
|
||||||
to CrossWords on the device %1$s. Please check that the device is
|
to CrossWords on the device %1$s. Please check that the device is
|
||||||
within Bluetooth range and that CrossWords is installed on
|
within Bluetooth range and that CrossWords is installed on
|
||||||
|
@ -2394,7 +2396,8 @@
|
||||||
<string name="summary_enable_stallnotify">Notify when Android\'s
|
<string name="summary_enable_stallnotify">Notify when Android\'s
|
||||||
slow to process outgoing invitations and moves</string>
|
slow to process outgoing invitations and moves</string>
|
||||||
<string name="notify_stall_title">Message sending is stalled</string>
|
<string name="notify_stall_title">Message sending is stalled</string>
|
||||||
<string name="notify_stall_body_fmt">%1$s could not send outbound messages for %2$d seconds.
|
<string name="notify_stall_body_fmt">%1$s (and others?) could not send outbound messages
|
||||||
|
for %2$d seconds.
|
||||||
\n
|
\n
|
||||||
\nIf it happens again, e-mail the developer logs and info about your device.
|
\nIf it happens again, e-mail the developer logs and info about your device.
|
||||||
\n
|
\n
|
||||||
|
|
|
@ -7,7 +7,7 @@ buildscript {
|
||||||
maven { url 'https://maven.fabric.io/public' } // rm-for-fdroid
|
maven { url 'https://maven.fabric.io/public' } // rm-for-fdroid
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.1.2'
|
classpath 'com.android.tools.build:gradle:3.6.2'
|
||||||
classpath 'io.fabric.tools:gradle:1.+' // rm-for-fdroid
|
classpath 'io.fabric.tools:gradle:1.+' // rm-for-fdroid
|
||||||
|
|
||||||
classpath 'com.google.gms:google-services:4.2.0' // google-services plugin
|
classpath 'com.google.gms:google-services:4.2.0' // google-services plugin
|
||||||
|
|
|
@ -16,3 +16,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryErro
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
# org.gradle.parallel=true
|
# org.gradle.parallel=true
|
||||||
|
|
||||||
|
android.useAndroidX=true
|
||||||
|
android.enableJetifier=true
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#Sun May 06 14:11:02 PDT 2018
|
#Sat Apr 04 12:56:58 PDT 2020
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
|
||||||
|
|
|
@ -33,6 +33,6 @@
|
||||||
# define STR_DUP_MOVED 27
|
# define STR_DUP_MOVED 27
|
||||||
# define STRD_DUP_TRADED 28
|
# define STRD_DUP_TRADED 28
|
||||||
# define STRSD_DUP_ONESCORE 29
|
# define STRSD_DUP_ONESCORE 29
|
||||||
|
# define STR_PENDING_PLAYER 30
|
||||||
# define N_AND_USER_STRINGS 29
|
# define N_AND_USER_STRINGS 30
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -964,7 +964,7 @@ comms_writeToStream( CommsCtxt* comms, XWStreamCtxt* stream,
|
||||||
static void
|
static void
|
||||||
resetBackoff( CommsCtxt* comms )
|
resetBackoff( CommsCtxt* comms )
|
||||||
{
|
{
|
||||||
XP_LOGFF( "%s", "resetting backoff" );
|
XP_LOGFF( "resetting backoff" );
|
||||||
comms->resendBackoff = 0;
|
comms->resendBackoff = 0;
|
||||||
comms->nextResend = 0;
|
comms->nextResend = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,10 +63,6 @@ typedef enum {
|
||||||
} CommsRelayState;
|
} CommsRelayState;
|
||||||
|
|
||||||
#ifdef XWFEATURE_BLUETOOTH
|
#ifdef XWFEATURE_BLUETOOTH
|
||||||
# ifndef XW_BT_UUID
|
|
||||||
# define XW_BT_UUID "7be0d084-ff89-4d6d-9c78-594773a6f963"
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# define XW_BT_NAME "CrossWords"
|
# define XW_BT_NAME "CrossWords"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -309,7 +309,7 @@ typedef struct _PlayerDicts {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LOG_FUNC() XP_LOGFF( "%s", "IN" )
|
#define LOG_FUNC() XP_LOGFF( "IN" )
|
||||||
#define LOG_RETURNF(fmt, ...) XP_LOGFF( "OUT: => " fmt, __VA_ARGS__ )
|
#define LOG_RETURNF(fmt, ...) XP_LOGFF( "OUT: => " fmt, __VA_ARGS__ )
|
||||||
#define LOG_RETURN_VOID() LOG_RETURNF("%s","void")
|
#define LOG_RETURN_VOID() LOG_RETURNF("%s","void")
|
||||||
#define XP_LOGLOC() XP_LOGF( "%s(), line %d", __func__, __LINE__ )
|
#define XP_LOGLOC() XP_LOGF( "%s(), line %d", __func__, __LINE__ )
|
||||||
|
|
|
@ -559,7 +559,7 @@ engine_findMove( EngineCtxt* engine, const ModelCtxt* model,
|
||||||
engine_reset( engine );
|
engine_reset( engine );
|
||||||
if ( !isRetry ) {
|
if ( !isRetry ) {
|
||||||
isRetry = XP_TRUE;
|
isRetry = XP_TRUE;
|
||||||
XP_LOGFF( "%s", "no moves found so retrying" );
|
XP_LOGFF( "no moves found so retrying" );
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "game.h"
|
#include "game.h"
|
||||||
#include "strutils.h"
|
#include "strutils.h"
|
||||||
#include "dbgutil.h"
|
#include "dbgutil.h"
|
||||||
|
#include "LocalizedStrIncludes.h"
|
||||||
|
|
||||||
#ifdef CPLUS
|
#ifdef CPLUS
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -244,8 +245,10 @@ drawScoreBoard( BoardCtxt* board )
|
||||||
/* figure spacing for each scoreboard entry */
|
/* figure spacing for each scoreboard entry */
|
||||||
XP_MEMSET( &datum, 0, sizeof(datum) );
|
XP_MEMSET( &datum, 0, sizeof(datum) );
|
||||||
totalDim = 0;
|
totalDim = 0;
|
||||||
|
XP_U16 missingPlayers = server_getMissingPlayers( board->server );
|
||||||
for ( dp = datum, ii = 0; ii < nPlayers; ++ii, ++dp ) {
|
for ( dp = datum, ii = 0; ii < nPlayers; ++ii, ++dp ) {
|
||||||
LocalPlayer* lp = &board->gi->players[ii];
|
LocalPlayer* lp = &board->gi->players[ii];
|
||||||
|
XP_Bool isMissing = 0 != ((1 << ii) & missingPlayers);
|
||||||
|
|
||||||
/* This is a hack! */
|
/* This is a hack! */
|
||||||
dp->dsi.lsc = board_ScoreCallback;
|
dp->dsi.lsc = board_ScoreCallback;
|
||||||
|
@ -258,11 +261,16 @@ drawScoreBoard( BoardCtxt* board )
|
||||||
dp->dsi.playerNum = ii;
|
dp->dsi.playerNum = ii;
|
||||||
dp->dsi.totalScore = scores.arr[ii];
|
dp->dsi.totalScore = scores.arr[ii];
|
||||||
dp->dsi.isTurn = server_isPlayersTurn( board->server, ii );
|
dp->dsi.isTurn = server_isPlayersTurn( board->server, ii );
|
||||||
dp->dsi.name = emptyStringIfNull(lp->name);
|
|
||||||
dp->dsi.selected = board->trayVisState != TRAY_HIDDEN
|
dp->dsi.selected = board->trayVisState != TRAY_HIDDEN
|
||||||
&& ii==selPlayer;
|
&& ii==selPlayer;
|
||||||
dp->dsi.isRobot = LP_IS_ROBOT(lp);
|
dp->dsi.isRobot = LP_IS_ROBOT(lp);
|
||||||
dp->dsi.isRemote = !lp->isLocal;
|
dp->dsi.isRemote = !lp->isLocal;
|
||||||
|
XP_ASSERT( !isMissing || dp->dsi.isRemote );
|
||||||
|
if ( dp->dsi.isRemote && isMissing ) {
|
||||||
|
dp->dsi.name = dutil_getUserString( board->dutil, STR_PENDING_PLAYER );
|
||||||
|
} else {
|
||||||
|
dp->dsi.name = emptyStringIfNull( lp->name );
|
||||||
|
}
|
||||||
dp->dsi.nTilesLeft = (nTilesInPool > 0)? -1:
|
dp->dsi.nTilesLeft = (nTilesInPool > 0)? -1:
|
||||||
model_getNumTilesTotal( model, ii );
|
model_getNumTilesTotal( model, ii );
|
||||||
|
|
||||||
|
|
|
@ -2530,7 +2530,7 @@ nextTurn( ServerCtxt* server, XP_S16 nxtTurn )
|
||||||
nxtTurn = model_getNextTurn( server->vol.model );
|
nxtTurn = model_getNextTurn( server->vol.model );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
XP_LOGFF( "%s", "turn == -1 so dropping" );
|
XP_LOGFF( "turn == -1 so dropping" );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* We're doing an undo, and so won't bother figuring out who the
|
/* We're doing an undo, and so won't bother figuring out who the
|
||||||
|
@ -2552,7 +2552,7 @@ nextTurn( ServerCtxt* server, XP_S16 nxtTurn )
|
||||||
SETSTATE( server, XWSTATE_NEEDSEND_ENDGAME ); /* this is it */
|
SETSTATE( server, XWSTATE_NEEDSEND_ENDGAME ); /* this is it */
|
||||||
moreToDo = XP_TRUE;
|
moreToDo = XP_TRUE;
|
||||||
} else if ( currentTurn >= 0 ) {
|
} else if ( currentTurn >= 0 ) {
|
||||||
XP_LOGFF( "%s", "Doing nothing; waiting for server to end game" );
|
XP_LOGFF( "Doing nothing; waiting for server to end game" );
|
||||||
setTurn( server, -1 );
|
setTurn( server, -1 );
|
||||||
/* I'm the client. Do ++nothing++. */
|
/* I'm the client. Do ++nothing++. */
|
||||||
}
|
}
|
||||||
|
@ -2930,7 +2930,7 @@ reflectMove( ServerCtxt* server, XWStreamCtxt* stream )
|
||||||
XP_LOGFF( "BAD: currentTurn %d < 0", server->nv.currentTurn );
|
XP_LOGFF( "BAD: currentTurn %d < 0", server->nv.currentTurn );
|
||||||
} else if ( ! readMoveInfo( server, stream, &whoMoved, &isTrade, &newTiles,
|
} else if ( ! readMoveInfo( server, stream, &whoMoved, &isTrade, &newTiles,
|
||||||
&tradedTiles, &isLegal, &badStack ) ) { /* modifies model */
|
&tradedTiles, &isLegal, &badStack ) ) { /* modifies model */
|
||||||
XP_LOGFF( "%s", "BAD: readMoveInfo() failed" );
|
XP_LOGFF( "BAD: readMoveInfo() failed" );
|
||||||
} else {
|
} else {
|
||||||
moveOk = XP_TRUE;
|
moveOk = XP_TRUE;
|
||||||
}
|
}
|
||||||
|
@ -4072,7 +4072,7 @@ server_receiveMessage( ServerCtxt* server, XWStreamCtxt* incoming )
|
||||||
XP_LOGF( "%s: somebody's registering!!!", __func__ );
|
XP_LOGF( "%s: somebody's registering!!!", __func__ );
|
||||||
accepted = handleRegistrationMsg( server, incoming );
|
accepted = handleRegistrationMsg( server, incoming );
|
||||||
} else {
|
} else {
|
||||||
XP_LOGFF( "%s", "WTF: I'm not a server!!" );
|
XP_LOGFF( "WTF: I'm not a server!!" );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case XWPROTO_CLIENT_SETUP:
|
case XWPROTO_CLIENT_SETUP:
|
||||||
|
|
|
@ -648,7 +648,7 @@ savePartials( SMSProto* state )
|
||||||
|
|
||||||
XP_U16 newSize = stream_getSize( stream );
|
XP_U16 newSize = stream_getSize( stream );
|
||||||
if ( state->lastStoredSize == 2 && newSize == 2 ) {
|
if ( state->lastStoredSize == 2 && newSize == 2 ) {
|
||||||
XP_LOGFF( "%s", "not storing empty again" );
|
XP_LOGFF( "not storing empty again" );
|
||||||
} else {
|
} else {
|
||||||
dutil_storeStream( state->dutil, KEY_PARTIALS, stream );
|
dutil_storeStream( state->dutil, KEY_PARTIALS, stream );
|
||||||
state->lastStoredSize = newSize;
|
state->lastStoredSize = newSize;
|
||||||
|
|
|
@ -30,8 +30,7 @@ enum {
|
||||||
STR_SUBMIT_CONFIRM,
|
STR_SUBMIT_CONFIRM,
|
||||||
STRD_TURN_SCORE,
|
STRD_TURN_SCORE,
|
||||||
STR_BONUS_ALL,
|
STR_BONUS_ALL,
|
||||||
STR_NONLOCAL_NAME,
|
STR_PENDING_PLAYER,
|
||||||
STR_LOCAL_NAME,
|
|
||||||
STRD_TIME_PENALTY_SUB,
|
STRD_TIME_PENALTY_SUB,
|
||||||
|
|
||||||
STRD_CUMULATIVE_SCORE,
|
STRD_CUMULATIVE_SCORE,
|
||||||
|
@ -46,10 +45,6 @@ enum {
|
||||||
STR_ROBOT_MOVED,
|
STR_ROBOT_MOVED,
|
||||||
STRS_REMOTE_MOVED,
|
STRS_REMOTE_MOVED,
|
||||||
|
|
||||||
STR_LOCALPLAYERS,
|
|
||||||
STR_TOTALPLAYERS,
|
|
||||||
STR_REMOTE,
|
|
||||||
|
|
||||||
STRS_VALUES_HEADER,
|
STRS_VALUES_HEADER,
|
||||||
STRD_REMAINS_HEADER,
|
STRD_REMAINS_HEADER,
|
||||||
STRD_REMAINS_EXPL,
|
STRD_REMAINS_EXPL,
|
||||||
|
@ -64,6 +59,11 @@ enum {
|
||||||
STRD_DUP_TRADED,
|
STRD_DUP_TRADED,
|
||||||
STRSD_DUP_ONESCORE,
|
STRSD_DUP_ONESCORE,
|
||||||
|
|
||||||
|
/* These three aren't in Android */
|
||||||
|
STR_LOCALPLAYERS,
|
||||||
|
STR_TOTALPLAYERS,
|
||||||
|
STR_REMOTE,
|
||||||
|
|
||||||
STR_LAST
|
STR_LAST
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,8 @@ ifeq ($(STANDALONE),)
|
||||||
|
|
||||||
# Bluetooth support
|
# Bluetooth support
|
||||||
ifndef NO_BLUETOOTH
|
ifndef NO_BLUETOOTH
|
||||||
BLUETOOTH = -DXWFEATURE_BLUETOOTH -DBT_USE_L2CAP
|
BLUETOOTH = -DXWFEATURE_BLUETOOTH -DBT_USE_L2CAP -DXW_BT_UUID=\"7be0d084-ff89-4d6d-9c78-594773a6f963\"
|
||||||
|
|
||||||
endif
|
endif
|
||||||
#BLUETOOTH = -DXWFEATURE_BLUETOOTH -DBT_USE_RFCOMM
|
#BLUETOOTH = -DXWFEATURE_BLUETOOTH -DBT_USE_RFCOMM
|
||||||
# DEFINES += -DXWFEATURE_IR
|
# DEFINES += -DXWFEATURE_IR
|
||||||
|
|
|
@ -1297,7 +1297,7 @@ cursesDevIDReceived( void* closure, const XP_UCHAR* devID,
|
||||||
}
|
}
|
||||||
(void)g_timeout_add_seconds( maxInterval, keepalive_timer, aGlobals );
|
(void)g_timeout_add_seconds( maxInterval, keepalive_timer, aGlobals );
|
||||||
} else {
|
} else {
|
||||||
XP_LOGFF( "%s", "bad relayid" );
|
XP_LOGFF( "bad relayid" );
|
||||||
db_remove( pDb, KEY_RDEVID );
|
db_remove( pDb, KEY_RDEVID );
|
||||||
|
|
||||||
DevIDType typ;
|
DevIDType typ;
|
||||||
|
|
|
@ -146,10 +146,8 @@ linux_dutil_getUserString( XW_DUtilCtxt* XP_UNUSED(uc), XP_U16 code )
|
||||||
return (XP_UCHAR*)"Score for turn: %d\n";
|
return (XP_UCHAR*)"Score for turn: %d\n";
|
||||||
case STR_BONUS_ALL:
|
case STR_BONUS_ALL:
|
||||||
return (XP_UCHAR*)"Bonus for using all tiles: 50\n";
|
return (XP_UCHAR*)"Bonus for using all tiles: 50\n";
|
||||||
case STR_LOCAL_NAME:
|
case STR_PENDING_PLAYER:
|
||||||
return (XP_UCHAR*)"%s";
|
return (XP_UCHAR*)"(remote)";
|
||||||
case STR_NONLOCAL_NAME:
|
|
||||||
return (XP_UCHAR*)"%s (remote)";
|
|
||||||
case STRD_TIME_PENALTY_SUB:
|
case STRD_TIME_PENALTY_SUB:
|
||||||
return (XP_UCHAR*)" - %d [time]";
|
return (XP_UCHAR*)" - %d [time]";
|
||||||
/* added.... */
|
/* added.... */
|
||||||
|
|
|
@ -771,7 +771,7 @@ secondTimerFired( gpointer data )
|
||||||
XP_U16 undoRatio = cGlobals->params->undoRatio;
|
XP_U16 undoRatio = cGlobals->params->undoRatio;
|
||||||
if ( 0 != undoRatio ) {
|
if ( 0 != undoRatio ) {
|
||||||
if ( (XP_RANDOM() % 1000) < undoRatio ) {
|
if ( (XP_RANDOM() % 1000) < undoRatio ) {
|
||||||
XP_LOGFF( "%s", "calling server_handleUndo()" );
|
XP_LOGFF( "calling server_handleUndo()" );
|
||||||
if ( server_handleUndo( game->server, 1 ) ) {
|
if ( server_handleUndo( game->server, 1 ) ) {
|
||||||
board_draw( game->board );
|
board_draw( game->board );
|
||||||
}
|
}
|
||||||
|
|
|
@ -678,7 +678,7 @@ process( RelayConStorage* storage, XP_U8* buf, ssize_t nRead )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case XWPDEV_GOTINVITE: {
|
case XWPDEV_GOTINVITE: {
|
||||||
XP_LOGFF( "%s", "got XWPDEV_GOTINVITE" );
|
XP_LOGFF( "got XWPDEV_GOTINVITE" );
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
XP_U32 sender =
|
XP_U32 sender =
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -78,7 +78,7 @@ extern void linux_debugf(const char*, ...)
|
||||||
extern void linux_debugff(const char* func, const char* file, const char* fmt, ...)
|
extern void linux_debugff(const char* func, const char* file, const char* fmt, ...)
|
||||||
__attribute__ ((format (printf, 3, 4)));
|
__attribute__ ((format (printf, 3, 4)));
|
||||||
# define XP_LOGFF( FMT, ... ) \
|
# define XP_LOGFF( FMT, ... ) \
|
||||||
linux_debugff( __func__, __FILE__, FMT, __VA_ARGS__ )
|
linux_debugff( __func__, __FILE__, FMT, ##__VA_ARGS__ )
|
||||||
#define XP_LOG(STR) \
|
#define XP_LOG(STR) \
|
||||||
linux_debugff( __func__, __FILE__, "%s", STR )
|
linux_debugff( __func__, __FILE__, "%s", STR )
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ void linux_lowerstr( XP_UCHAR* str );
|
||||||
#define XP_ABS(a) ((a)>=0?(a):-(a))
|
#define XP_ABS(a) ((a)>=0?(a):-(a))
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
# define XP_ASSERT(B) do { if (!(B)) { XP_LOGFF( "%s", "firing assert"); } assert(B); } while (0)
|
# define XP_ASSERT(B) do { if (!(B)) { XP_LOGFF( "firing assert"); } assert(B); } while (0)
|
||||||
void linux_backtrace( void );
|
void linux_backtrace( void );
|
||||||
# define XP_BACKTRACE linux_backtrace
|
# define XP_BACKTRACE linux_backtrace
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Reference in a new issue