mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-07 20:46:17 +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 VERSION_CODE_BASE = 151
|
||||
def VERSION_NAME = '4.4.155'
|
||||
def VERSION_CODE_BASE = 152
|
||||
def VERSION_NAME = '4.4.156'
|
||||
def FABRIC_API_KEY = System.getenv("FABRIC_API_KEY")
|
||||
def BUILD_INFO_NAME = "build-info.txt"
|
||||
|
||||
|
@ -8,19 +8,6 @@ def BUILD_INFO_NAME = "build-info.txt"
|
|||
// each other
|
||||
def XW_UUID = '"7be0d084-ff89-4d6d-9c78-594773a6f963"' // 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
|
||||
def NFC_AID_XW4 = "FC8FF510B360"
|
||||
|
@ -55,7 +42,8 @@ repositories {
|
|||
android {
|
||||
// Specify buildToolsVersion so gradle will inform when the
|
||||
// default changes and .travis.yml can be kept in sync
|
||||
buildToolsVersion '27.0.3'
|
||||
buildToolsVersion '28.0.3'
|
||||
ndkVersion '21.0.6113669'
|
||||
defaultConfig {
|
||||
// HostApduService requires 19. But is it a problem?
|
||||
minSdkVersion 14
|
||||
|
@ -113,6 +101,8 @@ android {
|
|||
buildConfigField "int", "VARIANT_CODE", "1"
|
||||
buildConfigField "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 {
|
||||
|
@ -128,6 +118,8 @@ android {
|
|||
buildConfigField "boolean", "FOR_FDROID", "true"
|
||||
buildConfigField "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 {
|
||||
dimension "variant"
|
||||
|
@ -144,6 +136,8 @@ android {
|
|||
buildConfigField "String", "KEY_FCMID", "\"FBMService_fcmid1\""
|
||||
buildConfigField "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 {
|
||||
|
@ -160,6 +154,8 @@ android {
|
|||
buildConfigField "boolean", "REPORT_LOCKS", "true"
|
||||
buildConfigField "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 {
|
||||
|
@ -174,6 +170,8 @@ android {
|
|||
buildConfigField "int", "VARIANT_CODE", "5"
|
||||
buildConfigField "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
|
||||
|
@ -210,12 +208,24 @@ android {
|
|||
}
|
||||
|
||||
buildTypes {
|
||||
all {
|
||||
externalNativeBuild {
|
||||
ndkBuild.arguments += ["INITIAL_CLIENT_VERS=" + INITIAL_CLIENT_VERS]
|
||||
}
|
||||
}
|
||||
|
||||
release {
|
||||
debuggable false
|
||||
minifyEnabled false // PENDING
|
||||
// proguard crashes when I do this (the optimize part)
|
||||
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
resValue "bool", "DEBUG", "false"
|
||||
externalNativeBuild {
|
||||
ndkBuild.arguments += ['BUILD_TARGET=release']
|
||||
}
|
||||
ndk {
|
||||
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
||||
}
|
||||
}
|
||||
debug {
|
||||
debuggable true
|
||||
|
@ -224,6 +234,23 @@ android {
|
|||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
// This doesn't work on marshmallow: duplicate permission error
|
||||
// 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 {
|
||||
implementation "com.android.support:support-v4:$SUPPORT_LIB_VERSION"
|
||||
implementation "com.android.support:support-compat:$SUPPORT_LIB_VERSION"
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'androidx.core:core:1.0.0'
|
||||
|
||||
implementation "android.arch.lifecycle:extensions:1.1.1"
|
||||
annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
|
||||
annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.0.0'
|
||||
|
||||
// 2.6.8 is probably as far forward as I can go without upping my
|
||||
// min-supported SDK version
|
||||
|
@ -330,23 +357,11 @@ task cleanLocStrings(type: Exec) {
|
|||
}
|
||||
clean.dependsOn cleanLocStrings
|
||||
|
||||
task ndkSetupDebug(type: Exec) {
|
||||
workingDir '../'
|
||||
// remove ', "--arm-only"' for Genymotion builds
|
||||
|
||||
// I'm putting ARM back for a while. It's too much trouble having
|
||||
// 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']) {
|
||||
task myPreBuild(dependsOn: ['mkImages',
|
||||
'copyLocStrings',
|
||||
'mkXml',
|
||||
'copyStringsXw4D',
|
||||
'copyStringsXw4DNoSMS']) {
|
||||
}
|
||||
preBuild.dependsOn myPreBuild
|
||||
|
||||
|
@ -357,64 +372,18 @@ task mkXml(type: Exec) {
|
|||
'-t', "debug"
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
ArrayList<String> cleanCmdLst = new ArrayList<>(["rm", "-rf"])
|
||||
android.applicationVariants.all { variant ->
|
||||
// print "variant: " + variant.name + "\n"
|
||||
String BUILD = variant.getBuildType().getName()
|
||||
// println "type: " + BUILD
|
||||
String FLAVOR = variant.getFlavorName()
|
||||
// print "flavor: " + variant.getFlavorName() + "\n"
|
||||
// print "variant: " + variant + "\n"
|
||||
task copyStringsXw4D(type: Exec) {
|
||||
workingDir './'
|
||||
environment.put('APPNAME', 'CrossDbg')
|
||||
commandLine 'make', '-f', '../scripts/Variant.mk',
|
||||
"src/xw4d/res/values/strings.xml"
|
||||
}
|
||||
|
||||
String ndkSetup = "ndkSetup" + BUILD.capitalize()
|
||||
// println "ndkSetup: " + ndkSetup
|
||||
|
||||
String variantCaps = variant.name.capitalize()
|
||||
String nameLC = variant.getBuildType().getName().toLowerCase()
|
||||
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 copyStringsXw4DNoSMS(type: Exec) {
|
||||
workingDir './'
|
||||
environment.put('APPNAME', 'CrossDbg')
|
||||
commandLine 'make', '-f', '../scripts/Variant.mk',
|
||||
"src/xw4dNoSMS/res/values/strings.xml"
|
||||
}
|
||||
|
||||
task makeBuildAssets() {
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
android:theme="@style/AppTheme"
|
||||
>
|
||||
|
||||
<provider android:name="android.support.v4.content.FileProvider"
|
||||
<provider android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.provider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true"
|
||||
|
@ -55,7 +55,7 @@
|
|||
|
||||
<activity android:name="MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTask"
|
||||
android:launchMode="standard"
|
||||
>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
</style>
|
||||
</head>
|
||||
<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">
|
||||
<p>Please <a href="https://www.surveymonkey.com/s/GX3XLHR">take
|
||||
|
@ -25,16 +25,10 @@
|
|||
|
||||
<h3>New with this release</h3>
|
||||
<ul>
|
||||
<li>Fix stall that was sometimes triggered by an ill-timed Undo </li>
|
||||
<li>Make some on-board icons smoother</li>
|
||||
<li>Fix crash receiving in-game chat message that's too long</li>
|
||||
<li>Make the board look a bit better on tall&narrow screens</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>
|
||||
<li>Fix so game list entries collapse correctly again</li>
|
||||
<li>Fix so bringing app to front keeps the open game open</li>
|
||||
<li>Show name in scoreboard as "Not here yet" until invitee connects</li>
|
||||
<li>Include more Norwegian translations</li>
|
||||
</ul>
|
||||
|
||||
<p>(The full changelog
|
||||
|
|
|
@ -25,8 +25,6 @@ import android.content.Context;
|
|||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.view.View;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ public class BTService extends XWJIService {
|
|||
|
||||
public static void onACLConnected( Context context )
|
||||
{
|
||||
Log.d( TAG, "onACLConnected()" );
|
||||
Log.d( TAG, "onACLConnected(); enqueuing work" );
|
||||
enqueueWork( context,
|
||||
getIntentTo( context, BTAction.ACL_CONN ) );
|
||||
}
|
||||
|
|
|
@ -165,6 +165,17 @@ public class ConnStatusHandler {
|
|||
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,
|
||||
CommsConnTypeSet connTypes,
|
||||
CommsAddrRec addr )
|
||||
|
@ -179,7 +190,10 @@ public class ConnStatusHandler {
|
|||
sb.append( LocUtils.getString( context,
|
||||
R.string.connstat_net_fmt,
|
||||
connTypes.toString( context, true )));
|
||||
for ( CommsConnType typ : connTypes.getTypes() ) {
|
||||
for ( CommsConnType typ : sDisplayOrder ) {
|
||||
if ( !connTypes.contains(typ) ) {
|
||||
continue;
|
||||
}
|
||||
SuccessRecord record = recordFor( context, typ, false );
|
||||
|
||||
// Don't show e.g. NFC unless it's been used
|
||||
|
|
|
@ -20,15 +20,8 @@
|
|||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.os.Bundle;
|
||||
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;
|
||||
|
||||
|
|
|
@ -1123,6 +1123,7 @@ public class DBUtils {
|
|||
}
|
||||
setCached( rowid, result );
|
||||
}
|
||||
Assert.assertTrueNR( null != result );
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,10 +27,7 @@ import android.content.DialogInterface.OnCancelListener;
|
|||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -44,7 +41,6 @@ import android.widget.EditText;
|
|||
import android.widget.TextView;
|
||||
|
||||
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.DlgClickNotify;
|
||||
import org.eehouse.android.xw4.DlgDelegate.NotAgainBuilder;
|
||||
|
|
|
@ -22,15 +22,9 @@ package org.eehouse.android.xw4;
|
|||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface.OnCancelListener;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.View;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ 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.DlgClickNotify;
|
||||
|
|
|
@ -29,7 +29,7 @@ import java.util.Iterator;
|
|||
import java.util.Map;
|
||||
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
|
||||
// obtainable when other read locks are granted but not when a
|
||||
|
|
|
@ -19,14 +19,10 @@
|
|||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.widget.Button;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -34,11 +30,8 @@ import java.util.List;
|
|||
|
||||
import org.eehouse.android.xw4.DBUtils.SentInvitesInfo;
|
||||
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.NotAgainBuilder;
|
||||
import org.eehouse.android.xw4.Perms23.Perm;
|
||||
import org.eehouse.android.xw4.loc.LocUtils;
|
||||
|
||||
public class InviteChoicesAlert extends DlgDelegateAlert {
|
||||
|
||||
|
|
|
@ -21,10 +21,7 @@ package org.eehouse.android.xw4;
|
|||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
import org.eehouse.android.xw4.loc.LocUtils;
|
||||
|
|
|
@ -22,12 +22,10 @@ package org.eehouse.android.xw4;
|
|||
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Point;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import android.text.TextUtils;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.view.ContextMenu;
|
||||
|
|
|
@ -19,20 +19,11 @@
|
|||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
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.loc.LocUtils;
|
||||
|
||||
public class NotAgainAlert extends DlgDelegateAlert {
|
||||
private static final String TAG = NotAgainAlert.class.getSimpleName();
|
||||
|
||||
|
|
|
@ -19,20 +19,11 @@
|
|||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
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.loc.LocUtils;
|
||||
|
||||
public class OkOnlyAlert extends DlgDelegateAlert {
|
||||
private static final String TAG = OkOnlyAlert.class.getSimpleName();
|
||||
|
||||
|
|
|
@ -21,19 +21,15 @@ package org.eehouse.android.xw4;
|
|||
|
||||
import android.Manifest;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.PermissionInfo;
|
||||
import android.os.Build;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
@ -41,7 +37,6 @@ import java.util.Set;
|
|||
import org.eehouse.android.nbsplib.NBSProxy;
|
||||
|
||||
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.loc.LocUtils;
|
||||
|
||||
|
|
|
@ -25,7 +25,6 @@ import android.app.Dialog;
|
|||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
|
||||
|
||||
import org.eehouse.android.xw4.DlgDelegate.Action;
|
||||
|
|
|
@ -25,10 +25,9 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import org.eehouse.android.xw4.FBMService;
|
||||
import org.eehouse.android.xw4.GameUtils.BackMoveResult;
|
||||
import org.eehouse.android.xw4.MultiService.DictFetchOwner;
|
||||
import org.eehouse.android.xw4.MultiService.MultiEvent;
|
||||
|
@ -58,7 +57,6 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
|
|
@ -25,9 +25,6 @@ import android.app.Dialog;
|
|||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
|
|
@ -23,12 +23,10 @@ package org.eehouse.android.xw4;
|
|||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
|
@ -39,11 +37,10 @@ import android.database.Cursor;
|
|||
import android.media.Ringtone;
|
||||
import android.media.RingtoneManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Looper;
|
||||
import android.provider.ContactsContract.PhoneLookup;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import android.support.v4.content.FileProvider;
|
||||
import androidx.core.app.NotificationCompat;
|
||||
import androidx.core.content.FileProvider;
|
||||
import android.telephony.PhoneNumberUtils;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.text.ClipboardManager;
|
||||
|
@ -56,7 +53,6 @@ import android.widget.EditText;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
|
@ -69,7 +65,6 @@ import java.io.ObjectInputStream;
|
|||
import java.io.ObjectOutputStream;
|
||||
import java.io.Serializable;
|
||||
import java.security.MessageDigest;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
|
|
@ -23,13 +23,12 @@ package org.eehouse.android.xw4;
|
|||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.Menu;
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.app.Application;
|
||||
import android.arch.lifecycle.Lifecycle;
|
||||
import android.arch.lifecycle.LifecycleObserver;
|
||||
import android.arch.lifecycle.LifecycleOwner;
|
||||
import android.arch.lifecycle.OnLifecycleEvent;
|
||||
import android.arch.lifecycle.ProcessLifecycleOwner;
|
||||
import androidx.lifecycle.Lifecycle;
|
||||
import androidx.lifecycle.LifecycleObserver;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
import androidx.lifecycle.OnLifecycleEvent;
|
||||
import androidx.lifecycle.ProcessLifecycleOwner;
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
|
@ -39,7 +39,7 @@ import org.eehouse.android.xw4.jni.XwJNI;
|
|||
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
|
||||
implements LifecycleObserver, NBSProxy.Callbacks {
|
||||
|
|
|
@ -20,10 +20,8 @@
|
|||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.View;
|
||||
|
||||
|
|
|
@ -20,10 +20,9 @@
|
|||
|
||||
package org.eehouse.android.xw4;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
|
|
|
@ -23,12 +23,11 @@ package org.eehouse.android.xw4;
|
|||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.JobIntentService;
|
||||
import androidx.core.app.JobIntentService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
|
@ -121,6 +121,7 @@ public class DUtilCtxt {
|
|||
private static final int STR_DUP_MOVED = 27;
|
||||
private static final int STRD_DUP_TRADED = 28;
|
||||
private static final int STRSD_DUP_ONESCORE = 29;
|
||||
private static final int STR_PENDING_PLAYER = 30;
|
||||
|
||||
public String getUserString( int stringCode )
|
||||
{
|
||||
|
@ -207,6 +208,10 @@ public class DUtilCtxt {
|
|||
id = R.string.dup_onescore_fmt;
|
||||
break;
|
||||
|
||||
case STR_PENDING_PLAYER:
|
||||
id = R.string.missing_player;
|
||||
break;
|
||||
|
||||
default:
|
||||
Log.w( TAG, "no such stringCode: %d", stringCode );
|
||||
}
|
||||
|
|
|
@ -39,8 +39,9 @@
|
|||
android:paddingRight="8dip"
|
||||
>
|
||||
<ImageView android:id="@+id/game_type_marker"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/ic_multigame"
|
||||
/>
|
||||
<ImageView android:id="@+id/has_chat_marker"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
android:paddingLeft="8dp"
|
||||
/>
|
||||
|
||||
<ListView android:id="@+id/android:list"
|
||||
<ListView android:id="@id/android:list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:drawSelectorOnTop="false"
|
||||
|
|
|
@ -2092,6 +2092,7 @@
|
|||
<string name="prev_player">Your opponent</string>
|
||||
<!-- formatting for last move summary in notifications -->
|
||||
<string name="lmi_pass_fmt">%1$s passed (0 points)</string>
|
||||
<!-- Example: Eric played BINGO for 58 points -->
|
||||
<plurals name="lmi_move_fmt">
|
||||
<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>
|
||||
|
@ -2103,9 +2104,10 @@
|
|||
<string name="lmi_phony_fmt">%1$s lost a turn</string>
|
||||
<string name="lmi_tiles_fmt">Tiles assigned to %1$s</string>
|
||||
<string name="bt_no_devs">You currently have no paired Bluetooth
|
||||
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
|
||||
to open it on the device you want to pair with.)</string>
|
||||
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
|
||||
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
|
||||
to CrossWords on the device %1$s. Please check that the device is
|
||||
within Bluetooth range and that CrossWords is installed on
|
||||
|
@ -2394,7 +2396,8 @@
|
|||
<string name="summary_enable_stallnotify">Notify when Android\'s
|
||||
slow to process outgoing invitations and moves</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
|
||||
\nIf it happens again, e-mail the developer logs and info about your device.
|
||||
\n
|
||||
|
|
|
@ -7,7 +7,7 @@ buildscript {
|
|||
maven { url 'https://maven.fabric.io/public' } // rm-for-fdroid
|
||||
}
|
||||
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 'com.google.gms:google-services:4.2.0' // google-services plugin
|
||||
|
|
|
@ -15,4 +15,7 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryErro
|
|||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# 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
|
||||
# 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
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
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 STRD_DUP_TRADED 28
|
||||
# define STRSD_DUP_ONESCORE 29
|
||||
|
||||
# define N_AND_USER_STRINGS 29
|
||||
# define STR_PENDING_PLAYER 30
|
||||
# define N_AND_USER_STRINGS 30
|
||||
#endif
|
||||
|
|
|
@ -964,7 +964,7 @@ comms_writeToStream( CommsCtxt* comms, XWStreamCtxt* stream,
|
|||
static void
|
||||
resetBackoff( CommsCtxt* comms )
|
||||
{
|
||||
XP_LOGFF( "%s", "resetting backoff" );
|
||||
XP_LOGFF( "resetting backoff" );
|
||||
comms->resendBackoff = 0;
|
||||
comms->nextResend = 0;
|
||||
}
|
||||
|
|
|
@ -63,10 +63,6 @@ typedef enum {
|
|||
} CommsRelayState;
|
||||
|
||||
#ifdef XWFEATURE_BLUETOOTH
|
||||
# ifndef XW_BT_UUID
|
||||
# define XW_BT_UUID "7be0d084-ff89-4d6d-9c78-594773a6f963"
|
||||
# endif
|
||||
|
||||
# define XW_BT_NAME "CrossWords"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ typedef struct _PlayerDicts {
|
|||
|
||||
#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_RETURN_VOID() LOG_RETURNF("%s","void")
|
||||
#define XP_LOGLOC() XP_LOGF( "%s(), line %d", __func__, __LINE__ )
|
||||
|
|
|
@ -559,7 +559,7 @@ engine_findMove( EngineCtxt* engine, const ModelCtxt* model,
|
|||
engine_reset( engine );
|
||||
if ( !isRetry ) {
|
||||
isRetry = XP_TRUE;
|
||||
XP_LOGFF( "%s", "no moves found so retrying" );
|
||||
XP_LOGFF( "no moves found so retrying" );
|
||||
goto retry;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "game.h"
|
||||
#include "strutils.h"
|
||||
#include "dbgutil.h"
|
||||
#include "LocalizedStrIncludes.h"
|
||||
|
||||
#ifdef CPLUS
|
||||
extern "C" {
|
||||
|
@ -244,8 +245,10 @@ drawScoreBoard( BoardCtxt* board )
|
|||
/* figure spacing for each scoreboard entry */
|
||||
XP_MEMSET( &datum, 0, sizeof(datum) );
|
||||
totalDim = 0;
|
||||
XP_U16 missingPlayers = server_getMissingPlayers( board->server );
|
||||
for ( dp = datum, ii = 0; ii < nPlayers; ++ii, ++dp ) {
|
||||
LocalPlayer* lp = &board->gi->players[ii];
|
||||
XP_Bool isMissing = 0 != ((1 << ii) & missingPlayers);
|
||||
|
||||
/* This is a hack! */
|
||||
dp->dsi.lsc = board_ScoreCallback;
|
||||
|
@ -258,11 +261,16 @@ drawScoreBoard( BoardCtxt* board )
|
|||
dp->dsi.playerNum = ii;
|
||||
dp->dsi.totalScore = scores.arr[ii];
|
||||
dp->dsi.isTurn = server_isPlayersTurn( board->server, ii );
|
||||
dp->dsi.name = emptyStringIfNull(lp->name);
|
||||
dp->dsi.selected = board->trayVisState != TRAY_HIDDEN
|
||||
&& ii==selPlayer;
|
||||
dp->dsi.isRobot = LP_IS_ROBOT(lp);
|
||||
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:
|
||||
model_getNumTilesTotal( model, ii );
|
||||
|
||||
|
|
|
@ -2530,7 +2530,7 @@ nextTurn( ServerCtxt* server, XP_S16 nxtTurn )
|
|||
nxtTurn = model_getNextTurn( server->vol.model );
|
||||
}
|
||||
} else {
|
||||
XP_LOGFF( "%s", "turn == -1 so dropping" );
|
||||
XP_LOGFF( "turn == -1 so dropping" );
|
||||
}
|
||||
} else {
|
||||
/* 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 */
|
||||
moreToDo = XP_TRUE;
|
||||
} 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 );
|
||||
/* I'm the client. Do ++nothing++. */
|
||||
}
|
||||
|
@ -2930,7 +2930,7 @@ reflectMove( ServerCtxt* server, XWStreamCtxt* stream )
|
|||
XP_LOGFF( "BAD: currentTurn %d < 0", server->nv.currentTurn );
|
||||
} else if ( ! readMoveInfo( server, stream, &whoMoved, &isTrade, &newTiles,
|
||||
&tradedTiles, &isLegal, &badStack ) ) { /* modifies model */
|
||||
XP_LOGFF( "%s", "BAD: readMoveInfo() failed" );
|
||||
XP_LOGFF( "BAD: readMoveInfo() failed" );
|
||||
} else {
|
||||
moveOk = XP_TRUE;
|
||||
}
|
||||
|
@ -4072,7 +4072,7 @@ server_receiveMessage( ServerCtxt* server, XWStreamCtxt* incoming )
|
|||
XP_LOGF( "%s: somebody's registering!!!", __func__ );
|
||||
accepted = handleRegistrationMsg( server, incoming );
|
||||
} else {
|
||||
XP_LOGFF( "%s", "WTF: I'm not a server!!" );
|
||||
XP_LOGFF( "WTF: I'm not a server!!" );
|
||||
}
|
||||
break;
|
||||
case XWPROTO_CLIENT_SETUP:
|
||||
|
|
|
@ -648,7 +648,7 @@ savePartials( SMSProto* state )
|
|||
|
||||
XP_U16 newSize = stream_getSize( stream );
|
||||
if ( state->lastStoredSize == 2 && newSize == 2 ) {
|
||||
XP_LOGFF( "%s", "not storing empty again" );
|
||||
XP_LOGFF( "not storing empty again" );
|
||||
} else {
|
||||
dutil_storeStream( state->dutil, KEY_PARTIALS, stream );
|
||||
state->lastStoredSize = newSize;
|
||||
|
|
|
@ -30,8 +30,7 @@ enum {
|
|||
STR_SUBMIT_CONFIRM,
|
||||
STRD_TURN_SCORE,
|
||||
STR_BONUS_ALL,
|
||||
STR_NONLOCAL_NAME,
|
||||
STR_LOCAL_NAME,
|
||||
STR_PENDING_PLAYER,
|
||||
STRD_TIME_PENALTY_SUB,
|
||||
|
||||
STRD_CUMULATIVE_SCORE,
|
||||
|
@ -46,10 +45,6 @@ enum {
|
|||
STR_ROBOT_MOVED,
|
||||
STRS_REMOTE_MOVED,
|
||||
|
||||
STR_LOCALPLAYERS,
|
||||
STR_TOTALPLAYERS,
|
||||
STR_REMOTE,
|
||||
|
||||
STRS_VALUES_HEADER,
|
||||
STRD_REMAINS_HEADER,
|
||||
STRD_REMAINS_EXPL,
|
||||
|
@ -64,6 +59,11 @@ enum {
|
|||
STRD_DUP_TRADED,
|
||||
STRSD_DUP_ONESCORE,
|
||||
|
||||
/* These three aren't in Android */
|
||||
STR_LOCALPLAYERS,
|
||||
STR_TOTALPLAYERS,
|
||||
STR_REMOTE,
|
||||
|
||||
STR_LAST
|
||||
};
|
||||
|
||||
|
|
|
@ -150,7 +150,8 @@ ifeq ($(STANDALONE),)
|
|||
|
||||
# Bluetooth support
|
||||
ifndef NO_BLUETOOTH
|
||||
BLUETOOTH = -DXWFEATURE_BLUETOOTH -DBT_USE_L2CAP
|
||||
BLUETOOTH = -DXWFEATURE_BLUETOOTH -DBT_USE_L2CAP -DXW_BT_UUID=\"7be0d084-ff89-4d6d-9c78-594773a6f963\"
|
||||
|
||||
endif
|
||||
#BLUETOOTH = -DXWFEATURE_BLUETOOTH -DBT_USE_RFCOMM
|
||||
# DEFINES += -DXWFEATURE_IR
|
||||
|
|
|
@ -1297,7 +1297,7 @@ cursesDevIDReceived( void* closure, const XP_UCHAR* devID,
|
|||
}
|
||||
(void)g_timeout_add_seconds( maxInterval, keepalive_timer, aGlobals );
|
||||
} else {
|
||||
XP_LOGFF( "%s", "bad relayid" );
|
||||
XP_LOGFF( "bad relayid" );
|
||||
db_remove( pDb, KEY_RDEVID );
|
||||
|
||||
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";
|
||||
case STR_BONUS_ALL:
|
||||
return (XP_UCHAR*)"Bonus for using all tiles: 50\n";
|
||||
case STR_LOCAL_NAME:
|
||||
return (XP_UCHAR*)"%s";
|
||||
case STR_NONLOCAL_NAME:
|
||||
return (XP_UCHAR*)"%s (remote)";
|
||||
case STR_PENDING_PLAYER:
|
||||
return (XP_UCHAR*)"(remote)";
|
||||
case STRD_TIME_PENALTY_SUB:
|
||||
return (XP_UCHAR*)" - %d [time]";
|
||||
/* added.... */
|
||||
|
|
|
@ -771,7 +771,7 @@ secondTimerFired( gpointer data )
|
|||
XP_U16 undoRatio = cGlobals->params->undoRatio;
|
||||
if ( 0 != undoRatio ) {
|
||||
if ( (XP_RANDOM() % 1000) < undoRatio ) {
|
||||
XP_LOGFF( "%s", "calling server_handleUndo()" );
|
||||
XP_LOGFF( "calling server_handleUndo()" );
|
||||
if ( server_handleUndo( game->server, 1 ) ) {
|
||||
board_draw( game->board );
|
||||
}
|
||||
|
|
|
@ -678,7 +678,7 @@ process( RelayConStorage* storage, XP_U8* buf, ssize_t nRead )
|
|||
break;
|
||||
}
|
||||
case XWPDEV_GOTINVITE: {
|
||||
XP_LOGFF( "%s", "got XWPDEV_GOTINVITE" );
|
||||
XP_LOGFF( "got XWPDEV_GOTINVITE" );
|
||||
#ifdef DEBUG
|
||||
XP_U32 sender =
|
||||
#endif
|
||||
|
|
|
@ -78,7 +78,7 @@ extern void linux_debugf(const char*, ...)
|
|||
extern void linux_debugff(const char* func, const char* file, const char* fmt, ...)
|
||||
__attribute__ ((format (printf, 3, 4)));
|
||||
# define XP_LOGFF( FMT, ... ) \
|
||||
linux_debugff( __func__, __FILE__, FMT, __VA_ARGS__ )
|
||||
linux_debugff( __func__, __FILE__, FMT, ##__VA_ARGS__ )
|
||||
#define XP_LOG(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))
|
||||
|
||||
#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 );
|
||||
# define XP_BACKTRACE linux_backtrace
|
||||
#else
|
||||
|
|
Loading…
Add table
Reference in a new issue