From 455373343adae2de58d7fbc73d6ec7499a86ec95 Mon Sep 17 00:00:00 2001 From: Eric House Date: Mon, 27 Nov 2017 20:23:14 -0800 Subject: [PATCH] remove requirement for gcm.jar remove from xw4d version too since it can't work anyway. --- xwords4/android/app/build.gradle | 2 +- .../java/org/eehouse/android/xw4/DevID.java | 4 +-- .../java/org/eehouse/android/xw4/GCMStub.java | 32 +++++++++++++++++++ .../java/org/eehouse/android/xw4/GCMStub.java | 29 +++++++++++++++++ .../java/org/eehouse/android/xw4/GCMStub.java | 1 + 5 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 xwords4/android/app/src/xw4/java/org/eehouse/android/xw4/GCMStub.java create mode 100644 xwords4/android/app/src/xw4d/java/org/eehouse/android/xw4/GCMStub.java create mode 120000 xwords4/android/app/src/xw4fdroid/java/org/eehouse/android/xw4/GCMStub.java diff --git a/xwords4/android/app/build.gradle b/xwords4/android/app/build.gradle index 013bbad2f..69f18db9d 100644 --- a/xwords4/android/app/build.gradle +++ b/xwords4/android/app/build.gradle @@ -197,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' diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DevID.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DevID.java index 2ba88cb9d..8a39bac03 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DevID.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DevID.java @@ -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; } diff --git a/xwords4/android/app/src/xw4/java/org/eehouse/android/xw4/GCMStub.java b/xwords4/android/app/src/xw4/java/org/eehouse/android/xw4/GCMStub.java new file mode 100644 index 000000000..1fcc593be --- /dev/null +++ b/xwords4/android/app/src/xw4/java/org/eehouse/android/xw4/GCMStub.java @@ -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 ); + } +} diff --git a/xwords4/android/app/src/xw4d/java/org/eehouse/android/xw4/GCMStub.java b/xwords4/android/app/src/xw4d/java/org/eehouse/android/xw4/GCMStub.java new file mode 100644 index 000000000..94e61ed2c --- /dev/null +++ b/xwords4/android/app/src/xw4d/java/org/eehouse/android/xw4/GCMStub.java @@ -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 ""; + } +} diff --git a/xwords4/android/app/src/xw4fdroid/java/org/eehouse/android/xw4/GCMStub.java b/xwords4/android/app/src/xw4fdroid/java/org/eehouse/android/xw4/GCMStub.java new file mode 120000 index 000000000..d409e129f --- /dev/null +++ b/xwords4/android/app/src/xw4fdroid/java/org/eehouse/android/xw4/GCMStub.java @@ -0,0 +1 @@ +../../../../../../xw4d/java/org/eehouse/android/xw4/GCMStub.java \ No newline at end of file