Merge branch 'android_branch' into relay_via_http

This commit is contained in:
Eric House 2017-11-28 06:24:09 -08:00
commit 4b81b784fc
14 changed files with 180 additions and 12 deletions

View file

@ -1,6 +1,6 @@
def INITIAL_CLIENT_VERS = 8
def VERSION_CODE_BASE = 125
def VERSION_NAME = '4.4.129'
def VERSION_CODE_BASE = 127
def VERSION_NAME = '4.4.131'
def FABRIC_API_KEY = System.getenv("FABRIC_API_KEY")
def GCM_SENDER_ID = System.getenv("GCM_SENDER_ID")
def BUILD_INFO_NAME = "build-info.txt"
@ -74,6 +74,19 @@ android {
buildConfigField "String", "GCM_SENDER_ID", "\"$GCM_SENDER_ID\""
}
xw4fdroid {
dimension "variant"
applicationId "org.eehouse.android.xw4"
manifestPlaceholders = [ APP_ID: applicationId ]
resValue "string", "app_name", "CrossWords"
resValue "string", "nbs_port", "3344"
resValue "string", "invite_prefix", "/and/"
buildConfigField "boolean", "WIDIR_ENABLED", "false"
buildConfigField "boolean", "RELAYINVITE_SUPPORTED", "false"
buildConfigField "String", "GCM_SENDER_ID", "\"\""
}
xw4d {
dimension "variant"
minSdkVersion 8
@ -158,6 +171,14 @@ android {
jniLibs.srcDir "../libs-xw4dDebug"
}
}
xw4fdroid {
release {
jniLibs.srcDir "../libs-xw4fdroidRelease"
}
debug {
jniLibs.srcDir "../libs-xw4fdroidDebug"
}
}
}
lintOptions {
@ -176,7 +197,7 @@ android {
dependencies {
// Look into replacing this with a fetch too PENDING
compile files('../libs/gcm.jar')
xw4Compile files('../libs/gcm.jar')
compile 'com.android.support:support-v4:23.4.0'

View file

@ -13,9 +13,9 @@
</style>
</head>
<body>
<h2>CrossWords 4.4.129 release</h2>
<h2>CrossWords 4.4.131 release</h2>
<p>Quick fix for a another crash reported via the Play Store</p>
<p>An F-Droid-only release meeting new requirements</p>
<div id="survey">
<p>Please <a href="https://www.surveymonkey.com/s/GX3XLHR">take
@ -25,7 +25,10 @@
<h3>New with this release</h3>
<ul>
<li>Fix crash that only showed up in games using timers</li>
<li>F-Droid has stiffened their prohibition against including
proprietary Google components. This release complies by removing
&quot;Google Cloud Messaging&quot; which never worked on
f-droid installs anyway.</li>
</ul>
<p>(The full changelog

View file

@ -214,7 +214,11 @@ public class BoardDelegate extends DelegateBase
lstnr = new OnClickListener() {
public void onClick( DialogInterface dlg,
int whichButton ) {
archiveAndClose( archiveName, archiveGroup );
makeNotAgainBuilder( R.string.not_again_archive,
R.string.key_na_archive,
Action.ARCHIVE_ACTION )
.setParams( archiveName, archiveGroup )
.show();
}
};
ab.setNeutralButton( R.string.button_archive, lstnr );
@ -1107,6 +1111,12 @@ public class BoardDelegate extends DelegateBase
makeOkOnlyBuilder( R.string.after_restart ).show();
break;
case ARCHIVE_ACTION:
String archiveName = (String)params[0];
long archiveGroup = (Long)params[1];
archiveAndClose( archiveName, archiveGroup );
break;
case ENABLE_SMS_DO:
post( new Runnable() {
public void run() {

View file

@ -31,8 +31,6 @@ package org.eehouse.android.xw4;
import android.content.Context;
import com.google.android.gcm.GCMRegistrar;
public class DevID {
private static final String TAG = DevID.class.getSimpleName();
@ -137,7 +135,7 @@ public class DevID {
if ( 0 != storedVers && storedVers < curVers ) {
result = ""; // Don't trust what registrar has
} else {
result = GCMRegistrar.getRegistrationId( context );
result = GCMStub.getRegistrationId( context );
}
return result;
}

View file

@ -84,6 +84,7 @@ public class DlgDelegate {
TRAY_PICKED,
INVITE_INFO,
DISABLE_DUALPANE,
ARCHIVE_ACTION,
// Dict Browser
FINISH_ACTION,

View file

@ -113,6 +113,7 @@
<string name="key_notagain_trading">key_notagain_trading</string>
<string name="key_notagain_hidenewgamebuttons">key_notagain_hidenewgamebuttons</string>
<string name="key_na_lookup">key_na_lookup</string>
<string name="key_na_archive">key_na_archive</string>
<string name="key_na_browse">key_na_browse</string>
<string name="key_na_browseall">key_na_browseall</string>
<string name="key_na_values">key_na_values</string>

View file

@ -1743,6 +1743,14 @@
<string name="not_again_lookup">This button lets you look up,
online, the words just played.</string>
<string name="not_again_archive">Archiving uses a special group
called \"Archive\" to store finished games you want to keep. And,
since deleting an entire archive is easy, archiving is also a
great way to mark games for deletion if that\'s what you prefer
to do.\n\n(Deleting the Archive group is safe because it will be
created anew when needed.)
</string>
<!-- -->
<string name="button_move">Move</string>
<string name="button_newgroup">New group</string>

View file

@ -0,0 +1,32 @@
/* -*- compile-command: "find-and-gradle.sh insXw4Deb"; -*- */
/*
* Copyright 2010 - 2015 by Eric House (xwords@eehouse.org). All rights
* reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package org.eehouse.android.xw4;
import android.content.Context;
import com.google.android.gcm.GCMRegistrar;
class GCMStub {
public static String getRegistrationId( Context context )
{
return GCMRegistrar.getRegistrationId( context );
}
}

View file

@ -0,0 +1,29 @@
/* -*- compile-command: "find-and-gradle.sh insXw4dDeb"; -*- */
/*
* Copyright 2017 by Eric House (xwords@eehouse.org). All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package org.eehouse.android.xw4;
import android.content.Context;
class GCMStub {
public static String getRegistrationId( Context context )
{
return "";
}
}

View file

@ -0,0 +1,27 @@
/* -*- compile-command: "find-and-gradle.sh insXw4Deb"; -*- */
/*
* Copyright 2009 - 2012 by Eric House (xwords@eehouse.org). All
* rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package org.eehouse.android.xw4;
import android.content.Context;
public class CrashTrack {
public static void init( Context context ) {} // does nothing here
}

View file

@ -0,0 +1,37 @@
/* -*- compile-command: "find-and-gradle.sh -PuseCrashlytics insXw4dDeb"; -*- */
/*
* Copyright 2017 by Eric House (xwords@eehouse.org). All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package org.eehouse.android.xw4;
import android.app.Application;
/**
* The ancient GCMIntentService I copied from sample code seems to have
* trouble (burns battery using the WAKELOCK, specifically) when used with an
* app that doesn't have a registration ID. So let's not use that code.
*/
public class GCMIntentService {
private static final String TAG = GCMIntentService.class.getSimpleName();
public static void init( Application app )
{
Log.d( TAG, "doing nothing" );
}
}

View file

@ -0,0 +1 @@
../../../../../../xw4d/java/org/eehouse/android/xw4/GCMStub.java

View file

@ -754,7 +754,7 @@ android_debugf( const char* format, ... )
}
(void)__android_log_write( ANDROID_LOG_DEBUG,
# if defined VARIANT_xw4
# if defined VARIANT_xw4 || defined VARIANT_xw4fdroid
"xw4"
# elif defined VARIANT_xw4d
"x4bg"

View file

@ -648,7 +648,7 @@ Java_org_eehouse_android_xw4_jni_XwJNI_comms_1getUUID
{
jstring jstr =
#ifdef XWFEATURE_BLUETOOTH
# if defined VARIANT_xw4
# if defined VARIANT_xw4 || defined VARIANT_xw4fdroid
(*env)->NewStringUTF( env, XW_BT_UUID )
# elif defined VARIANT_xw4d
(*env)->NewStringUTF( env, XW_BT_UUID_DBG )