up strings for new release and cleanup

This commit is contained in:
Eric House 2019-12-27 15:44:23 -08:00
parent 29480d2867
commit 8b06cde971
11 changed files with 41 additions and 57 deletions

View file

@ -1,10 +1,10 @@
def INITIAL_CLIENT_VERS = 9
def VERSION_CODE_BASE = 146
def VERSION_NAME = '4.4.150'
def VERSION_CODE_BASE = 147
def VERSION_NAME = '4.4.151'
def FABRIC_API_KEY = System.getenv("FABRIC_API_KEY")
def BUILD_INFO_NAME = "build-info.txt"
// AID must start with F (first 4 bits) and be at 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_XW4d = "FDDA0A3EB5E5"

View file

@ -13,11 +13,11 @@
</style>
</head>
<body>
<h2>CrossWords 4.4.150 release</h2>
<h2>CrossWords 4.4.151 release</h2>
<p>This release speeds move delivery for newly-installed games and
hides invite-via-NFC on Android 10 (since it doesn't work
there).</p>
<p>This release fixes a bad crash, adds a lot of translations in
several languages, and lets you invite and exchange moves via
NFC on any Android version.</p>
<div id="survey">
<p>Please <a href="https://www.surveymonkey.com/s/GX3XLHR">take
@ -27,11 +27,13 @@
<h3>New with this release</h3>
<ul>
<li>Improve message delivery for new installs</li>
<li>Don't offer NFC on Android 10, where it's broken</li>
<li>Improve board layout on taller, narrower screens</li>
<li>Fix occasional stall sending chat messages</li>
<li>Fix another (very rare!) type of stall</li>
<li>Fix crash dragging tiles</li>
<li>Fix invite-via-NFC for Android 10 (and improve for earlier
Android versions)</li>
<li>Add ability to send moves via NFC</li>
<li>More translations (via Weblate) in Catalan, French, German,
Japanese, Norwegian, Polish, and Spanish</li>
<li>Fix a couple of other crashes reported via Google (thanks!)</li>
</ul>
<p>(The full changelog
@ -39,7 +41,7 @@
<h3>Next up</h3>
<ul>
<li>Fix email invitations</li>
<li>Improve move-via-NFC</li>
<li>Support duplicate-style play (popular in France)</li>
<li>Improve play-by-data-sms workaround
using <a href="https://github.com/eehouse/nbsproxy">NBSProxy</a></li>

View file

@ -689,7 +689,7 @@ public class BTService extends XWJIService {
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
if ( null != adapter ) {
for ( BluetoothDevice dev : adapter.getBondedDevices() ) {
Log.d( TAG, "%s => %s", dev.getName(), dev.getAddress() );
// Log.d( TAG, "%s => %s", dev.getName(), dev.getAddress() );
if ( btName.equals( dev.getName() ) ) {
btAddr = dev.getAddress();
s_namesToAddrs.put( btName, btAddr );

View file

@ -1102,10 +1102,6 @@ public class BoardDelegate extends DelegateBase
case LOOKUP_ACTION:
launchLookup( m_mySIS.words, m_gi.dictLang );
break;
case NFC_TO_SELF:
Assert.assertFalse( BuildConfig.DEBUG );
// GamesListDelegate.sendNFCToSelf( m_activity, makeNFCMessage() );
break;
case DROP_RELAY_ACTION:
dropConViaAndRestart(CommsConnType.COMMS_CONN_RELAY);
break;

View file

@ -76,7 +76,6 @@ public class DlgDelegate {
VALUES_ACTION,
SMS_CONFIG_ACTION,
BUTTON_BROWSEALL_ACTION,
NFC_TO_SELF,
DROP_RELAY_ACTION,
DROP_SMS_ACTION,
INVITE_SMS_DATA,

View file

@ -64,7 +64,6 @@ import org.eehouse.android.xw4.loc.LocUtils;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;

View file

@ -81,7 +81,6 @@ public class MultiMsgSink implements TransportProcs {
int sendViaNFC( byte[] buf, int gameID )
{
Log.d( TAG, "sendViaNFC(gameID=%d, len=%d)", gameID, buf.length );
return NFCUtils.addMsgFor( buf, gameID );
}
@ -113,7 +112,6 @@ public class MultiMsgSink implements TransportProcs {
nSent = sendViaP2P( buf, gameID, addr );
break;
case COMMS_CONN_NFC:
Log.d( TAG, "transportSend(): got for NFC" );
nSent = sendViaNFC( buf, gameID );
break;
default:

View file

@ -241,11 +241,9 @@ public class NFCCardService extends HostApduService {
if ( null != apdu ) {
if ( HEX_STR.CMD_MSG_PART.matchesFrom( apdu ) ) {
resStr = HEX_STR.STATUS_SUCCESS;
int[] msgID = {0};
byte[] all = reassemble( this, apdu, msgID, HEX_STR.CMD_MSG_PART );
byte[] all = reassemble( this, apdu, HEX_STR.CMD_MSG_PART );
if ( null != all ) {
addToMsgThread( this, all );
setLatestAck( msgID[0] );
}
} else {
Log.d( TAG, "processCommandApdu(): aid case?" );
@ -379,20 +377,19 @@ public class NFCCardService extends HostApduService {
private static byte[][] sParts = null;
private static int sMsgID = 0;
private synchronized static byte[] reassemble( Context context, byte[] part,
int[] msgIDOut, HEX_STR cmd )
HEX_STR cmd )
{
return reassemble( context, part, msgIDOut, cmd.length() );
return reassemble( context, part, cmd.length() );
}
private synchronized static byte[] reassemble( Context context, byte[] part,
int[] msgIDOut, int offset )
int offset )
{
part = Arrays.copyOfRange( part, offset, part.length );
return reassemble( context, part, msgIDOut );
return reassemble( context, part );
}
private synchronized static byte[] reassemble( Context context,
byte[] part, int[] msgIDOut )
private synchronized static byte[] reassemble( Context context, byte[] part )
{
byte[] result = null;
try {
@ -438,10 +435,10 @@ public class NFCCardService extends HostApduService {
sParts = null;
result = baos.toByteArray();
msgIDOut[0] = sMsgID;
setLatestAck( sMsgID );
if ( 0 != sMsgID ) {
Log.d( TAG, "reassemble(): done reassembling msgID=%d: %s",
msgIDOut[0], DbgUtils.hexDump(result) );
sMsgID, DbgUtils.hexDump(result) );
}
}
}
@ -495,7 +492,8 @@ public class NFCCardService extends HostApduService {
int latestAck = getLatestAck();
baos.write( numTo( latestAck ) );
}
Assert.assertTrue( HEADER_SIZE >= baos.toByteArray().length );
Assert.assertTrue( HEADER_SIZE >= baos.toByteArray().length
|| !BuildConfig.DEBUG );
int thisLen = Math.min( maxLen - HEADER_SIZE, length - offset );
if ( 0 < thisLen ) {
@ -533,8 +531,9 @@ public class NFCCardService extends HostApduService {
public static Wrapper init( Activity activity, Procs procs, int devID )
{
Wrapper instance = null;
if ( null != NfcAdapter.getDefaultAdapter( activity ) ) {
instance = new Wrapper( activity, procs, devID );
NfcAdapter adapter = NfcAdapter.getDefaultAdapter( activity );
if ( null != adapter ) {
instance = new Wrapper( activity, adapter, procs, devID );
}
Log.d( TAG, "Wrapper.init(devID=%d) => %s", devID, instance );
return instance;
@ -554,12 +553,13 @@ public class NFCCardService extends HostApduService {
}
}
private Wrapper( Activity activity, Procs procs, int devID )
private Wrapper( Activity activity, NfcAdapter adapter, Procs procs,
int devID )
{
mActivity = activity;
mAdapter = adapter;
mProcs = procs;
mMyDevID = devID;
mAdapter = NfcAdapter.getDefaultAdapter( activity );
}
private void setResumed( boolean resumed )
@ -681,16 +681,18 @@ public class NFCCardService extends HostApduService {
if ( statusOK ) {
int offset = HEX_STR.STATUS_SUCCESS.length();
if ( HEX_STR.CMD_MSG_PART.matchesFrom( response, offset ) ) {
int[] msgID = {0};
byte[] all = reassemble( mActivity, response, msgID,
byte[] all = reassemble( mActivity, response,
offset + HEX_STR.CMD_MSG_PART.length() );
Log.d( TAG, "receiveAny(%s) => %b", DbgUtils.hexDump( response ), statusOK );
if ( null != all ) {
addToMsgThread( mActivity, all );
setLatestAck( msgID[0] );
}
}
}
Log.d( TAG, "receiveAny(%s) => %b", DbgUtils.hexDump( response ), statusOK );
if ( !statusOK ) {
Log.d( TAG, "receiveAny(%s) => %b", DbgUtils.hexDump( response ), statusOK );
}
return statusOK;
}
@ -729,16 +731,6 @@ public class NFCCardService extends HostApduService {
} catch ( InterruptedException ie ) {
Log.d( TAG, "run interrupted" );
}
// toggle();
// try {
// // How long to sleep.
// int intervalMS = mMinMS + (Math.abs(mRandom.nextInt())
// % (mMaxMS - mMinMS));
// // Log.d( TAG, "sleeping for %d ms", intervalMS );
// Thread.sleep( intervalMS );
// } catch ( InterruptedException ie ) {
// Log.d( TAG, "run interrupted" );
// }
}
// Kill read mode on the way out

View file

@ -89,7 +89,7 @@ public class NFCUtils {
result = intent.getByteArrayExtra( NFC_TO_SELF_DATA );
}
Log.d( TAG, "getFromIntent() => %s", result );
// Log.d( TAG, "getFromIntent() => %s", result );
return result;
}

View file

@ -148,7 +148,6 @@ and_xport_sendNoConn( const XP_U8* buf, XP_U16 len, const XP_UCHAR* msgNo,
static void
and_xport_countChanged( void* closure, XP_U16 count )
{
XP_LOGF( "%s(count=%d)", __func__, count );
AndTransportProcs* aprocs = (AndTransportProcs*)closure;
if ( NULL != aprocs && NULL != aprocs->jxport ) {
JNIEnv* env = ENVFORME( aprocs->ti );

View file

@ -2385,14 +2385,12 @@ coordToCell( const BoardCtxt* board, XP_S16 xx, XP_S16 yy, XP_U16* colP,
const XP_U16 maxCols = model_numCols( board->model );
XP_S16 gotCol = -1;
XP_S16 gotRow = -1;
const ScrollData* hsd = &board->sd[SCROLL_H];
const ScrollData* vsd = &board->sd[SCROLL_V];
xx -= board->boardBounds.left;
yy -= board->boardBounds.top;
if ( xx >= 0 && yy >= 0 ) {
const ScrollData* hsd = &board->sd[SCROLL_H];
for ( XP_U16 col = hsd->offset; col < maxCols; ++col ) {
xx -= hsd->dims[col];
if ( xx <= 0 ) {
@ -2401,6 +2399,7 @@ coordToCell( const BoardCtxt* board, XP_S16 xx, XP_S16 yy, XP_U16* colP,
}
}
const ScrollData* vsd = &board->sd[SCROLL_V];
for ( XP_U16 row = vsd->offset; row < maxCols; ++row ) {
yy -= vsd->dims[row];
if ( yy <= 0 ) {