mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
make it possible to build without knowing the GCM sender ID.
This commit is contained in:
parent
daf5a89a0e
commit
0bea58b128
3 changed files with 5 additions and 3 deletions
|
@ -61,6 +61,7 @@
|
||||||
</exec>
|
</exec>
|
||||||
<exec dir="." executable="../scripts/gen_gcmid.sh"
|
<exec dir="." executable="../scripts/gen_gcmid.sh"
|
||||||
output="src/org/eehouse/android/xw4/GCMConsts.java"
|
output="src/org/eehouse/android/xw4/GCMConsts.java"
|
||||||
|
logError="true"
|
||||||
/>
|
/>
|
||||||
<exec dir=".." executable="./scripts/genvers.sh" output="ant_out.txt">
|
<exec dir=".." executable="./scripts/genvers.sh" output="ant_out.txt">
|
||||||
<arg value="XWords4"/>
|
<arg value="XWords4"/>
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class GCMIntentService extends GCMBaseIntentService {
|
||||||
public static void init( Application app )
|
public static void init( Application app )
|
||||||
{
|
{
|
||||||
int sdkVersion = Integer.valueOf( android.os.Build.VERSION.SDK );
|
int sdkVersion = Integer.valueOf( android.os.Build.VERSION.SDK );
|
||||||
if ( 8 <= sdkVersion ) {
|
if ( 8 <= sdkVersion && 0 < GCMConsts.SENDER_ID.length() ) {
|
||||||
try {
|
try {
|
||||||
GCMRegistrar.checkDevice( app );
|
GCMRegistrar.checkDevice( app );
|
||||||
// GCMRegistrar.checkManifest( app );
|
// GCMRegistrar.checkManifest( app );
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e -u
|
||||||
|
|
||||||
if [ -z "$GCM_SENDER_ID" ]; then
|
if [ -z "$GCM_SENDER_ID" ]; then
|
||||||
echo "GCM_SENDER_ID not in env"
|
echo "GCM_SENDER_ID empty; GCM use will be disabled" >&2
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
Loading…
Add table
Reference in a new issue