various changes so dbg and bt versions build again -- and may work, but

that's not tested yet.
This commit is contained in:
Eric House 2014-05-11 19:55:05 -07:00
parent 2a3b8c7a74
commit 49001c6893
18 changed files with 127 additions and 92 deletions

View file

@ -22,7 +22,7 @@
to come from a domain that you own or have control over. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.eehouse.android.xw4bt"
android:versionCode="72"
android:versionCode="76"
android:versionName="@string/app_version"
>
@ -69,7 +69,7 @@
android:name=".XWApp"
>
<activity android:name="GamesList"
<activity android:name="GamesListActivity"
android:label="@string/app_name"
android:launchMode="standard"
android:configChanges="keyboardHidden|orientation|screenSize"
@ -102,10 +102,10 @@
<activity android:name="SMSInviteActivity"
android:theme="@android:style/Theme.Dialog"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:screenOrientation="sensor"
/>
<activity android:name="GameConfig"
<activity android:name="GameConfigActivity"
android:screenOrientation="sensor"
android:configChanges="keyboardHidden|orientation|screenSize"
>
@ -130,7 +130,7 @@
android:theme="@android:style/Theme.Dialog"
/>
<activity android:name="StudyList"
<activity android:name="StudyListActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
/>
@ -197,6 +197,9 @@
<activity android:name="ChatActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
/>
<activity android:name=".loc.LocActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
/>
<service android:name="RelayService"/>
@ -226,6 +229,14 @@
<intent-filter android:priority="999" >
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.DATA_SMS_RECEIVED" />
<data android:scheme="sms" />
<data android:port="3344" />
<data android:host="*" />
</intent-filter>
</receiver>
<service android:name="SMSService"/>

View file

@ -0,0 +1 @@
/R.java

View file

@ -39,6 +39,9 @@
application and should be checked into Version Control Systems. -->
<loadproperties srcFile="project.properties" />
<!-- An attempt to define stuff to be included from multiple build.xml files -->
<import file="../scripts/common_targets.xml" />
<!-- quick check on sdk.dir -->
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
@ -49,78 +52,26 @@
<!-- extension targets. Uncomment the ones where you want to do custom work
in between standard targets -->
<property name="INITIAL_CLIENT_VERS" value="3"/>
<property name="INITIAL_CLIENT_VERS" value="4"/>
<property name="VARIANT_NAME" value="xw4bt"/>
<target name="-pre-clean">
<exec dir="." executable="../scripts/ndksetup.sh" output="/dev/null">
<arg value="${build.target}"/>
</exec>
<exec dir="." executable="../scripts/ndkbuild.sh" output="/dev/null">
<arg value="clean"/>
</exec>
<exec dir="." executable="../scripts/mkimages.sh"
failonerror="true" >
<arg value="--clean"/>
</exec>
</target>
<target name="-pre-build">
<exec dir="." executable="../scripts/mkvariant.sh" failonerror="true"
output="/dev/null">
<arg value="--variant-name"/>
<arg value="xw4bt"/>
<arg value="--app-name"/>
<arg value="cWords-BT"/>
<arg value="--dest-dir"/>
<arg value="./res"/>
<arg value="--dest-dir"/>
<arg value="./src"/>
<arg value="--dest-dir"/>
<arg value="./jni"/>
<arg value="--dest-dir"/>
<arg value="./assets"/>
<arg value="--dest-dir"/>
<arg value="./libs"/>
<arg value="--dest-dir"/>
<arg value="./img_src"/>
</exec>
<exec dir="." executable="../scripts/ndksetup.sh" output="/dev/null">
<arg value="${build.target}"/>
</exec>
<property name="CHAT_ENABLED" value="true" />
<property name="THUMBNAIL_ENABLED" value="true" />
<exec dir="." executable="../scripts/ndkbuild.sh" failonerror="true">
<arg value="BUILD_TARGET=${build.target}" />
<arg value="-j3"/>
<arg value="INITIAL_CLIENT_VERS=${INITIAL_CLIENT_VERS}" />
<arg value="CHAT_ENABLED=${CHAT_ENABLED}" />
<arg value="THUMBNAIL_ENABLED=${THUMBNAIL_ENABLED}" />
</exec>
<exec dir="." executable="../scripts/mkimages.sh"
failonerror="true" output="/dev/null"
/>
<exec dir="." executable="../scripts/mk_xml.py"
failonerror="true" output="/dev/null"
>
</exec>
<exec dir="." executable="../scripts/gen_gcmid.sh"
output="src/org/eehouse/android/xw4bt/GCMConsts.java"
failonerror="true" logError="true"
>
<arg value="xw4bt"/>
</exec>
<exec dir=".." executable="./scripts/genvers.sh" output="/dev/null">
<arg value="XWords4-bt"/>
<arg value="xw4bt"/>
<arg value="${INITIAL_CLIENT_VERS}" />
<arg value="${CHAT_ENABLED}" />
<arg value="${THUMBNAIL_ENABLED}" />
</exec>
<antcall target="my-pre-clean" />
</target>
<target name="-pre-build" depends="my-copy-src">
<antcall target="my-pre-build">
<param name="VARIANT_NAME" value="${VARIANT_NAME}"/>
<param name="APP_NAME" value="cWords-BT"/>
</antcall>
</target>
<target name="-pre-compile">
<antcall target="my-pre-compile">
<param name="VARIANT_NAME" value="${VARIANT_NAME}"/>
</antcall>
</target>
<!--
<target name="-pre-compile">
</target>

View file

@ -32,3 +32,5 @@ smsinviter.xml
confirm_sms.xml
game_list_group.xml
studylist.xml
loc_list_item.xml
loc_main.xml

View file

@ -5,3 +5,4 @@ games_list_item_menu.xml
games_list_menu.xml
dicts_menu.xml
studylist.xml
loc_menu.xml

View file

@ -0,0 +1 @@
/strings.xml

View file

@ -0,0 +1 @@
/strings.xml

View file

@ -85,3 +85,20 @@ DlgID.java
GamesListActivity.java
GamesListDelegate.java
LookupAlert.java
BoardDelegate.java
BTInviteDelegate.java
ChatDelegate.java
DictBrowseDelegate.java
DictImportDelegate.java
DictsDelegate.java
DrawSelDelegate.java
GameConfigActivity.java
GameConfigDelegate.java
InviteDelegate.java
ListDelegateBase.java
NewGameDelegate.java
PrefsDelegate.java
RelayGameDelegate.java
SMSInviteDelegate.java
StudyListActivity.java
StudyListDelegate.java

View file

@ -1,4 +1,4 @@
/* -*- compile-command: "cd ../../../../../; ant debug install"; -*- */
/* -*- compile-command: "find-and-ant.sh debug install"; -*- */
/*
* Copyright 2010 - 2011 by Eric House (xwords@eehouse.org). All
* rights reserved.
@ -24,6 +24,8 @@ import android.app.Application;
import android.content.Context;
import android.graphics.Color;
import android.os.Build;
import android.preference.PreferenceManager;
import java.util.UUID;
import org.eehouse.android.xw4bt.jni.XwJNI;
@ -62,6 +64,17 @@ public class XWApp extends Application {
ConnStatusHandler.loadState( this );
RelayReceiver.RestartTimer( this );
boolean mustCheck = Utils.firstBootThisVersion( this );
PreferenceManager.setDefaultValues( this, R.xml.xwprefs, mustCheck );
if ( mustCheck ) {
XWPrefs.setHaveCheckedUpgrades( this, false );
} else {
mustCheck = ! XWPrefs.getHaveCheckedUpgrades( this );
}
if ( mustCheck ) {
UpdateCheckReceiver.checkVersions( this, false );
}
UpdateCheckReceiver.restartTimer( this );
BTService.startService( this );
@ -70,6 +83,15 @@ public class XWApp extends Application {
GCMIntentService.init( this );
}
// This is called on emulator only, but good for ensuring no memory leaks
// by forcing JNI cleanup
public void onTerminate()
{
DbgUtils.logf( "XwApp.onTerminate() called" );
XwJNI.cleanGlobals();
super.onTerminate();
}
public static UUID getAppUUID()
{
if ( null == s_UUID ) {

View file

@ -0,0 +1,9 @@
LocActivity.java
LocDelegate.java
LocIDsData.java
LocIDs.java
LocListAdapter.java
LocListItem.java
LocSearcher.java
LocUtils.java
XlatingSpinnerAdapter.java

View file

@ -22,7 +22,7 @@
to come from a domain that you own or have control over. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.eehouse.android.xw4dbg"
android:versionCode="73"
android:versionCode="76"
android:versionName="@string/app_version"
>
@ -100,7 +100,7 @@
<activity android:name="SMSInviteActivity"
android:theme="@android:style/Theme.Dialog"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:screenOrientation="sensor"
/>
<activity android:name="GameConfigActivity"

View file

@ -0,0 +1 @@
/R.java

View file

@ -52,16 +52,28 @@
<!-- extension targets. Uncomment the ones where you want to do custom work
in between standard targets -->
<property name="INITIAL_CLIENT_VERS" value="3"/>
<target name="-pre-clean" depends="my-pre-clean"/>
<property name="INITIAL_CLIENT_VERS" value="4"/>
<property name="VARIANT_NAME" value="xw4dbg"/>
<property name="APP_NAME" value="cWords-DBG"/>
<target name="-pre-build" depends="my-copy-src,my-pre-build"/>
<target name="-pre-clean">
<antcall target="my-pre-clean" />
</target>
<target name="-pre-build" depends="my-copy-src">
<antcall target="my-pre-build">
<param name="VARIANT_NAME" value="${VARIANT_NAME}"/>
<param name="APP_NAME" value="cWords-DBG"/>
</antcall>
</target>
<target name="-pre-compile">
<antcall target="my-pre-compile">
<param name="VARIANT_NAME" value="${VARIANT_NAME}"/>
</antcall>
</target>
<!--
<target name="-pre-compile">
</target>
/* This is typically used for code obfuscation.
Compiled code location: ${out.classes.absolute.dir}
If this is not done in place, override ${out.dex.input.absolute.dir} */

View file

@ -0,0 +1 @@
/strings.xml

View file

@ -0,0 +1 @@
/strings.xml

View file

@ -102,3 +102,8 @@ NewGameDelegate.java
RelayGameDelegate.java
StudyListActivity.java
StudyListDelegate.java
BTInviteDelegate.java
InviteDelegate.java
ListDelegateBase.java
PrefsDelegate.java
SMSInviteDelegate.java

View file

@ -6,3 +6,4 @@ LocListAdapter.java
LocListItem.java
LocSearcher.java
LocUtils.java
XlatingSpinnerAdapter.java

View file

@ -3,18 +3,16 @@
<project name="XWords4">
<target name="my-pre-clean">
<exec dir="." executable="../scripts/rm-non-git.sh" output="/dev/null"
failonerror="true" >
<arg value="--except" />
<arg value="./local.properties" />
</exec>
<exec dir="." executable="../scripts/ndksetup.sh" output="/dev/null"
failonerror="true" >
<arg value="${build.target}"/>
</exec>
<exec dir="." executable="../scripts/ndkbuild.sh" failonerror="true" >
<arg value="clean"/>
</exec>
<exec dir="." executable="../scripts/mkimages.sh"
failonerror="true" output="/dev/null" >
<arg value="--clean"/>
</exec>
</target>
<target name="my-pre-build">
@ -54,7 +52,7 @@
>
<arg value="${VARIANT_NAME}"/>
</exec>
<exec dir="." executable="../scripts/genvers.sh" output="ant_out.txt"
<exec dir="." executable="../scripts/genvers.sh" output="/dev/null"
failonerror="true">
<arg value="${VARIANT_NAME}"/>
<arg value="${INITIAL_CLIENT_VERS}" />