Commit graph

3586 commits

Author SHA1 Message Date
Eric House
5d32fce43e don't allocate new Runnable on every draw 2014-03-20 05:18:40 -07:00
Eric House
673ab53a61 go back to extending XWListAdapter 2014-03-20 05:11:52 -07:00
Eric House
3717035150 include number to be deleted in comfirm message 2014-03-19 22:56:17 -07:00
Eric House
c7818bd364 build query a bit more effeciently 2014-03-19 22:52:33 -07:00
Eric House
38fe8ec3fd invalidate menubar when might change 2014-03-19 22:39:21 -07:00
Eric House
426e939b61 hook up onClick to launch lookup 2014-03-19 22:25:14 -07:00
Eric House
64a5aab456 hook up long click to [de]select 2014-03-19 21:36:49 -07:00
Eric House
fd817a98da implement menus, including adding crappy placeholder icons 2014-03-19 21:29:20 -07:00
Eric House
aa6fbf8605 snapshot on the way to making studylists editable: add checkbox to xwlistitem. It's to be an alterative to long tap to select. Implement selectAll and deselectAll. 2014-03-19 20:42:29 -07:00
Eric House
e7708ef439 fix NPE when serializing 2014-03-19 20:17:53 -07:00
Eric House
c333e561af use a global enum for DlgDelegate actions -- should be no real code change 2014-03-18 06:06:21 -07:00
Eric House
12e77e8c47 get rid of three Utils.format calls 2014-03-17 08:20:43 -07:00
Eric House
a5f0c797bb use one message for deletion of groups, whether one or many 2014-03-17 07:45:09 -07:00
Eric House
37b2458140 add number being reset to message 2014-03-17 06:56:10 -07:00
Eric House
cb5bb00ef0 remove LookupActivity 2014-03-14 19:21:31 -07:00
Eric House
94a838d88e give lookup alert a title 2014-03-14 18:55:06 -07:00
Eric House
be440c8abf try, again, making lookup dialog an alert rather than an activity. It's a much better experience on a nexus 5 but I've lost my records of why I made it an activity in the first place -- what phones it sucked on as an alert. Still probably doesn't bundle itself correctly and is missing a title. 2014-03-14 18:41:54 -07:00
Eric House
d4930e157b make method private 2014-03-14 07:12:53 -07:00
Eric House
ea189c5717 turn study lists on by default 2014-03-14 06:45:17 -07:00
Eric House
94d9a03d51 add enum to hold all dialogIDs so they're forced to be unique across the app. (The diff's big but there's no behavior change.) 2014-03-14 06:37:32 -07:00
Eric House
1ee16ca09d remove unnecessary import 2014-03-11 22:01:30 -07:00
Eric House
640837f318 up strings for new release 2014-03-11 19:16:41 -07:00
Eric House
dee75f5a0a don't ref dicts from dmgr_get() 2014-03-10 21:50:06 -07:00
Eric House
f601f2bf57 use dictmgr in java. This requires jni globals that live across boards being opened and that include a mempool dicts will be allocated out of. Seems to work, and to get ref counts as high as 6 or so before they drop down to one when all boards are closed. (The final is held by the dictmgr which won't give it up until the app itself is GC'd) 2014-03-10 19:14:59 -07:00
Eric House
a2671f5ef0 add global mempool that can survive individual games, and include it every game's globals. Use it instead of game's mempool to create dictionaries so they can outlive a game and not trip asserts on pool delete. Wrap dicts in a java class that refcounts them when BoardCanvas wants to keep one so that, I hope, the bug using a deleted dict will go away. 2014-03-09 14:46:33 -07:00
Eric House
9f5d470c07 no need for final 2014-03-09 14:39:18 -07:00
Eric House
9d9c822bb8 save, commented out, how to call the contstructor of a nested class -- in case I go back to doing things that way. 2014-03-09 14:23:24 -07:00
Eric House
a7c114e3f9 refcount dicts. Model "owns" its copy and so increments the refcount when gaining one and decrements the count on any being replaced (and on all on exit). This is setting up the real change, which is to let the java world wrap dicts in objects that hang onto them until they're destroyed, which should fix problems where dicts are referenced after they've been destroyed. 2014-03-08 20:57:27 -08:00
Eric House
e0c17c50b3 catch off-thrown exception. This should prevent a crash, but the fix is probably to figure out why it's happening -- later. 2014-03-08 12:55:46 -08:00
Eric House
fb7c1682b4 tweak string 2014-03-07 19:10:06 -08:00
Eric House
3b971e0153 tweak build timestamp format 2014-03-06 22:11:13 -08:00
Eric House
c31c9cb365 don't show resend menuitem unless there are moves to resend 2014-03-06 07:43:20 -08:00
Eric House
c982fb54d9 up strings and notes for new release 2014-03-06 06:47:43 -08:00
Eric House
3daa877bee Send from resend asyncTask using factored-out code in CommsTransport. Works for SMS at least. 2014-03-05 07:15:34 -08:00
Eric House
923ac6db98 show loadDB menuitem only when nothing's selected 2014-03-05 06:37:02 -08:00
Eric House
45ace48490 tweak string 2014-03-05 06:32:03 -08:00
Eric House
bcfd27ee7f don't crash when there's a SMS game with pending messages 2014-03-04 21:38:22 -08:00
Eric House
5ebbf87c24 don't kick off async task if there's nothing to send 2014-03-04 21:13:23 -08:00
Eric House
811be34a20 remove logging 2014-03-04 21:12:40 -08:00
Eric House
cfee7ef8ac resend all messages from the network change broadcast receiver itself instead of GamesList, which will not be listening if another activity is in front or if the app's in the background. 2014-03-04 19:03:39 -08:00
Eric House
3c0b4a899f resend all unacked messages each time we regain network, but only up to four times/hour. 2014-03-04 18:36:46 -08:00
Eric House
431b24409f Fix kitkat-only problem where expiring rects are clipped at top and left 2014-03-04 07:40:25 -08:00
Eric House
0a601a73a4 (commented out) line to cause ndk to be built without optimization for better source-level debugging 2014-03-04 07:07:44 -08:00
Eric House
df771f50c4 add function that resends all pending (un-ackd, at the comms level) messages for unlocked games and, for testing mostly, a menuitem on the main activity to trigger it. Probably crashes if there's a message for a game connected by other than relay. 2014-03-04 07:05:55 -08:00
Eric House
60bce8f22b add menuitems recently added to non-small-devices' menu 2014-03-02 20:34:58 -08:00
Eric House
9d174740c8 don't show "send pending messages" menuitem when there are none 2014-03-01 16:15:35 -08:00
Eric House
386c28e596 don't notify network change listeners unless a change is in fact a change and until there's been two seconds without changes. There's a lot of connection up-and-down spam when connecting and maybe with iffy connectivity, and no point in passing that through to code that will do stuff like stopping a send thread in response. 2014-03-01 15:17:14 -08:00
Eric House
23638310bc register for net state changes, and toast/log on debug builds. This is toward resending from all games with packets pending on reconnect. 2014-03-01 14:59:17 -08:00
Eric House
56c05869da allow to run from bin directory, which turns out to be useful 2014-03-01 12:39:51 -08:00
Eric House
c1e22dd3cf add summary DB column and jni code to fetch it to store and display number of unacked messages a game has. And add debug-only option to display it in the main list. In the future I want to be able to iterate over all these games and resend their packets (without opening them visually) when an internet connection comes back up. 2014-02-28 18:59:12 -08:00
Eric House
e536a6d3ee format build timestamp added to about dialog 2014-02-28 06:47:44 -08:00
Eric House
1d85a74a6c readd old assertions -- and fix compile error 2014-02-28 06:47:27 -08:00
Eric House
9a94663fb8 log when we drop a message because two possible receiving games are open 2014-02-28 06:13:52 -08:00
Eric House
61080e1b62 revert changes pausing instead of exiting JNI thread (and so not saving game data) from BoardActivity's onPause() when onFinishing() returned false. This is necessary because there are cases where moves were generated and sent without local state ever being saved because onPause() was called only once on what turned out to be activity termination. 2014-02-28 05:57:32 -08:00
Eric House
2f7839f7e0 cleanup 2014-02-28 04:35:39 -08:00
Eric House
5274a803b2 move menuitem 2014-02-27 19:13:22 -08:00
Eric House
29d08b95ce expose comms_getStats() via a debug-build-only menu and dialog 2014-02-26 21:41:49 -08:00
Eric House
1f9a4180e8 remove misleading comments 2014-02-25 07:56:22 -08:00
Eric House
fc799449e9 save game and summary in a synchronized block so lock doesn't get released halfway through 2014-02-24 21:50:17 -08:00
Eric House
a72932486b toward having networking and activity swaps work without fully
shutting down the game in onPause(): use pause() and resume() to
suspend the jnithread when the game's been unlocked.
2014-02-13 19:29:35 -08:00
Eric House
7c45e3c5b3 add pause() and resume() 2014-02-13 19:26:09 -08:00
Eric House
1e30582c3b more logging 2014-02-13 07:50:21 -08:00
Eric House
802e798180 refactor 2014-02-13 06:44:57 -08:00
Eric House
89435fc688 fix to compile 2014-02-13 06:40:39 -08:00
Eric House
b3cce8c535 reduce verbosity and add info to GameLock logging 2014-02-13 06:33:30 -08:00
Eric House
de7638525a commit sdk-generated file (might be better to ignore it?) 2014-02-13 06:31:31 -08:00
Eric House
44e52278a4 remove unused method 2014-02-12 07:52:39 -08:00
Eric House
218d232798 add dictNames() variant that takes a GameLock 2014-02-12 07:35:49 -08:00
Eric House
61334efa1a fix to generate rather than copy 2014-02-12 07:35:12 -08:00
Eric House
536a1e3b13 install dbg variant too 2014-02-11 22:11:28 -08:00
Eric House
c0e7c0bf88 only log stack for first and last attempts to get lock 2014-02-11 22:11:16 -08:00
Eric House
80c3374728 add build timestamp to about dialog (needs better formatting) 2014-02-10 19:20:35 -08:00
Eric House
ea6da8cd74 add crittercism library 2014-02-10 18:55:16 -08:00
Eric House
9b43fed03f rule for .jar files: copy 2014-02-10 18:32:00 -08:00
Eric House
bdfbb3ffca update bt build, adding new .java file and logic to copy gcm.jar rather than commit a copy of it. 2014-02-10 18:30:19 -08:00
Eric House
6332bbbcbe use ccache 2014-02-10 18:24:42 -08:00
Eric House
339e784d7c fix compile warnings 2014-02-10 18:23:03 -08:00
Eric House
4b293ac89b add Crittercism App ID if available 2014-02-10 07:32:16 -08:00
Eric House
d02481879b catch debug variant up with recent changes and lay groundwork for including crittercism in it. 2014-02-10 07:31:52 -08:00
Eric House
daa59ee03d pass Context to CrashTrack 2014-02-10 07:14:00 -08:00
Eric House
f27394ca03 framework for calling Crashlytics from debug variant 2014-02-10 06:53:39 -08:00
Eric House
f2ad4fd3d5 add StudyList activity and otherwise catch up 2014-02-10 06:19:16 -08:00
Eric House
0d80511a1a remove logging 2014-02-09 19:35:35 -08:00
Eric House
b56d990a04 go back to overriding onPause and onResume, but don't tear down the game unless isFinishing() returns true 2014-02-08 16:50:27 -08:00
Eric House
5e3c26d453 track current BoardActivity instance using HashSet rather than single instance since during transitions there can be two. Fixes asserts from recent commit. 2014-02-07 21:22:13 -08:00
Eric House
a4e65f667d add ok button to about dialog 2014-02-07 07:59:34 -08:00
Eric House
a388351219 save/load games in onStop/onStart rather than onPause/onResume so we don't do it as often, and specifically not every time the LookupActivity is pushed. This is an experiment. 2014-02-07 07:40:34 -08:00
Eric House
d97784ba13 track which dialog is blocking rather than just that there is one 2014-02-07 07:38:07 -08:00
Eric House
ed9b9646e7 launch app after installing 2014-02-07 07:34:09 -08:00
Eric House
048ae63802 make bad-words reporting dialog blocking so robot doesn't go ahead and move and put its moved dialog up on top of the bad words one before it's dismissed; also change name of string to reflect that it's a format. 2014-02-06 07:22:57 -08:00
Eric House
f6a1e06d41 create myGames group only on upgrade and only if there are existing games to put into it. 2014-02-05 19:46:42 -08:00
Eric House
ca57da44c6 fix duplicate column crash when upgrading 2014-02-05 19:34:42 -08:00
Eric House
18f31ad9d6 up strings for new version 2014-02-03 07:42:59 -08:00
Eric House
46b02d49c1 generated gitignore changes in bt directory 2014-02-03 07:29:12 -08:00
Eric House
6dfaf8127f fix reported crash: assertion copying non-network game 2014-02-03 07:28:38 -08:00
Eric House
f805d7309f modify emacs compile command to use find-and-ant.sh 2014-02-02 11:40:40 -08:00
Eric House
2b653dcf9b add build script 2014-02-02 11:27:09 -08:00
Eric House
babb02898e credit BRS 2014-01-31 18:22:32 -08:00
Eric House
f65b5fda71 don't disable button after it's used: feels as if the device is hanging 2014-01-31 18:22:21 -08:00
Eric House
b29dcb1d2c add debug-only logging toward figuring out occasional bad-dict crash 2014-01-31 07:55:07 -08:00
Eric House
57cd547078 remove apparently gratuitous second call to srandom 2014-01-31 07:54:43 -08:00
Eric House
dd38543398 add toast to confirm that word's been added 2014-01-31 07:25:28 -08:00
Eric House
cb574ca156 up version strings 2014-01-31 07:25:07 -08:00
Eric House
ff2615fbc6 Merge branch 'android_studylist' into android_branch 2014-01-31 06:43:36 -08:00
Eric House
c40cef2101 add newbie tip for studylist copy feature 2014-01-30 21:31:14 -08:00
Eric House
426b5b59b2 for better discoverability, always show the studylist menus when the feature's on and supply explantions when there's nothing to show 2014-01-30 19:16:00 -08:00
Eric House
9dc94c97b2 put some of DlgDelegate's methods into an interface that can be passed around to be called by non-activities. 2014-01-30 19:14:23 -08:00
Eric House
647282968a hide the label and spinner when there's only one language 2014-01-30 08:15:43 -08:00
Eric House
433993a384 remove early -- should not have gone out 2014-01-30 07:30:34 -08:00
Eric House
3ea86e630d add label before lang-pick spinner 2014-01-30 07:12:32 -08:00
Eric House
a8d01f6de2 remove mistaken break 2014-01-30 07:00:30 -08:00
Eric House
cd6293fbd3 ignore img_src/ -- for now anyway 2014-01-30 06:39:50 -08:00
Eric House
652ce75277 add actionbar icon for copy 2014-01-30 06:38:03 -08:00
Eric House
f78af55cd1 disable add-to-list button after adding so there's feedback 2014-01-30 06:26:40 -08:00
Eric House
8e3cbdc1e3 Merge branch 'android_branch' into android_studylist 2014-01-29 21:56:28 -08:00
Eric House
32ecd1d026 more studylist: add lookup-on-tap, show language in title bar, and add
menuitem to board menu too
2014-01-29 19:37:04 -08:00
Eric House
253be9a48e ignore more stuff 2014-01-29 19:29:43 -08:00
Eric House
11767a41e4 show toast on successful paste 2014-01-29 07:49:57 -08:00
Eric House
21f2936e87 confirm before deleting all words 2014-01-29 07:43:45 -08:00
Eric House
b5d4b6b778 implement clear (without warning) 2014-01-29 07:36:05 -08:00
Eric House
2520fb4c05 add menu and implement copy-to-clipboard 2014-01-29 07:15:25 -08:00
Eric House
d02787f591 fix capitalization 2014-01-28 18:52:35 -08:00
Eric House
42f35cb3d9 populate study list, doing the sorting in the DB query for now 2014-01-28 07:48:08 -08:00
Eric House
3f8e456db2 populate language chooser 2014-01-28 07:15:59 -08:00
Eric House
4421472391 add (empty so far) studylist browser and menu to invoke it 2014-01-28 06:50:27 -08:00
Eric House
9d19bed3b7 add studyListLangCount() 2014-01-28 06:32:25 -08:00
Eric House
aab876bf6d remove toast 2014-01-27 21:25:22 -08:00
Eric House
49d26dab07 rough out UI for adding selected or played words to study list DB. Next: add a UI for displaying it etc. 2014-01-27 21:24:57 -08:00
Eric House
af035962e6 revise release notes; up version code 2014-01-27 18:58:41 -08:00
Eric House
b3ebadfde5 test for null that should never happen but google play says does. 2014-01-25 19:03:22 -08:00
Eric House
e9ffcdbbc5 fix, by inspection, NPE reported via Play dev console 2014-01-25 18:04:32 -08:00
Eric House
843c6389cf use the same key to set and get bundle item, probably fixing a couple of recent Dev Console-reported crashes. 2014-01-25 17:56:15 -08:00
Eric House
4499639d73 up version strings 2014-01-23 19:46:21 -08:00
Eric House
acb090154d add rate-me menu 2014-01-23 19:32:06 -08:00
Eric House
cb9f095d93 remove unused variable 2014-01-23 07:48:02 -08:00
Eric House
e72beaa265 add and use isGooglePlayApp() 2014-01-23 07:47:32 -08:00
Eric House
710f9c68ff don't launch intent if null 2014-01-23 07:46:58 -08:00
Eric House
1b185d1575 use ccache for jni if present 2014-01-21 07:20:51 -08:00
Eric House
5ea1a799ec fail if script fails 2014-01-20 07:33:16 -08:00
Eric House
af801997ef update name of target SDK version (but not the version itself) 2014-01-07 07:19:47 -08:00
Eric House
633a9d190a up copyright for the new year 2014-01-07 07:07:22 -08:00
Eric House
e34cc9007d fix problems with opening and using wordlists on 64-bit linux by
making XP_U32 32 rather than 64 bits. Duh. Do same on Android jni just
in case.
2014-01-07 06:58:20 -08:00
Eric House
29d5cc5d13 fix crash when incoming sms invite includes an apostrope in the room
name -- by using rawQuery()
2013-12-28 11:30:49 -08:00
Eric House
d25e20221b update send success status 2013-12-06 08:00:16 -08:00
Eric House
bbbc8124ba uninstall based on where called from 2013-12-06 08:00:03 -08:00
Eric House
fa5649501e update send success status 2013-12-06 07:39:16 -08:00
Eric House
ad60fcc610 uninstall based on where called from 2013-12-06 07:37:56 -08:00
Eric House
1f3bd63769 Merge branch 'android_branch' into android_sms_kitkat 2013-12-05 20:03:47 -08:00
Eric House
c1bdaa13ee another directory to be cloned 2013-12-05 07:55:36 -08:00
Eric House
856474a9b9 remove mistaken echo 2013-12-05 07:55:25 -08:00
Eric House
ea3347ad4a fix to install and launch based on location run from 2013-12-05 07:47:13 -08:00
Eric House
be28630109 pass dict with bt invite and otherwise catch up with how invites work.
Can now invite and play a game.
2013-12-05 07:31:17 -08:00
Eric House
5fb2d9c82a catch up with features etc. that must be on to not crash opening a game 2013-12-05 07:17:33 -08:00
Eric House
9252705901 mods required to get bt variant compiling again. I have no idea if it works. 2013-12-04 20:45:03 -08:00
Eric House
0c15a0000e pass package to script so can work from variants 2013-12-04 20:32:15 -08:00
Eric House
2eefd14231 fix so --clean gets respected 2013-12-04 19:42:18 -08:00
Eric House
ca428d6a63 fix NPEs occurring when loading in a games DB (debug feature) whose
groups were different: recreate GameListAdapter and make it correctly
deal with having no group selection data (as that's stored in prefs)
2013-12-03 08:30:47 -08:00
Eric House
7c2b3b3d15 add clearGroupPositions 2013-12-03 08:27:29 -08:00
Eric House
0c30dd6bf4 new script to uninstall then install 2013-12-03 08:26:41 -08:00
Eric House
742a94783f launch app after installing 2013-12-03 08:26:26 -08:00
Eric House
e9efc27d7a toss cache after reading in new DB 2013-12-03 07:54:38 -08:00
Eric House
3ccc9ac0f1 use auto-generated BuildConstants class instead of my own act-alike 2013-12-03 07:15:03 -08:00
Eric House
b5d6c513a6 add canUndo to GameStateInfo and use to hide the undo menu 2013-12-03 07:06:48 -08:00
Eric House
fdc807ceb8 up version strings for new release 2013-12-03 06:41:45 -08:00
Eric House
24eb63f109 Revert "replace ARGB_8888 with RGB_565 where possible to halve memory"
This reverts commit b7e44195c6.
2013-12-03 06:28:56 -08:00
Eric House
6402ae56d2 remove now-redundant response to prefs change 2013-12-02 07:08:43 -08:00
Eric House
431ab75336 register for sms prefs changes so they can take effect immediately 2013-12-02 07:01:04 -08:00
Eric House
94216a5fb9 add canTrade to GameStateInfo, pass through to java world, and use to
determine whether to show trade menuitem
2013-12-01 21:53:41 -08:00
Eric House
40a4bf348e Merge branch 'android_branch' into android_sms_kitkat 2013-12-01 21:37:43 -08:00
Eric House
ace545a682 up version strings 2013-12-01 21:11:43 -08:00
Eric House
17dcb5c4f0 remove comment not meant to be checked in 2013-12-01 20:49:38 -08:00
Eric House
a4fe0adb62 allow missing items -- since menus are different on different devices 2013-12-01 20:40:04 -08:00
Eric House
3e6791c66f remove method and use existing Util static instead 2013-12-01 20:32:17 -08:00
Eric House
968b1ba321 fix crash on small-screen devices by adding missing menuitem 2013-12-01 20:31:35 -08:00
Eric House
9b6f8d18e0 fix timer: don't reinit secondsUsed to 0 every time game loaded 2013-12-01 19:04:44 -08:00
Eric House
041385049d add a bit of space separating explanatory text from spinner 2013-11-30 00:28:43 -08:00
Eric House
b7e44195c6 replace ARGB_8888 with RGB_565 where possible to halve memory
footprint of bitmaps
2013-11-29 16:14:18 -08:00
Eric House
dd5aaa41fa erase full divider rect to fix leftover tile bottom after it's been moved. 2013-11-29 10:21:06 -08:00
Eric House
79b60ae895 cleanup 2013-11-29 08:48:13 -08:00
Eric House
60026b6ef2 move BoardDims into jni/ 2013-11-29 08:43:34 -08:00
Eric House
26eff37c6b move BoardDims into jni/ 2013-11-29 08:43:21 -08:00
Eric House
69285d46a9 up version strings for release 2013-11-29 07:35:31 -08:00
Eric House
08b72bbc55 add asserts 2013-11-29 07:35:13 -08:00
Eric House
d3ce4aa4c7 fix NPE: jniThread gets turned to null sometimes, so test 2013-11-29 07:26:30 -08:00
Eric House
2dd56d08af tweak string 2013-11-29 07:15:47 -08:00
Eric House
991c042e78 add newbie warning against using Firefox for wordlist downloads. 2013-11-28 19:01:07 -08:00
Eric House
6a6e5b2f4f script to ... fetch screenshots 2013-11-28 11:42:07 -08:00
Eric House
11bde2b7fd remove logging 2013-11-27 07:10:08 -08:00
Eric House
07a0e0ed93 fix crash: make thumbnail BEFORE closing game 2013-11-27 07:10:00 -08:00
Eric House
72341a085a start out sending as data, but on first NPE, the symptom of CDMAness,
set the pref to send as text and do that from then on (unless the pref
is reset manually)
2013-11-27 07:08:58 -08:00
Eric House
605b45f6a0 remove logging 2013-11-27 07:06:27 -08:00
Eric House
b1d8d62c6c fix crash: make thumbnail BEFORE closing game 2013-11-27 07:06:14 -08:00
Eric House
85ae5973eb Merge branch 'android_branch' into android_sms_kitkat 2013-11-27 06:10:24 -08:00
Eric House
83bd5f773c take snapshot after feeding background messages to game, which
required making snapshotting code work with a Context rather than a
full Activity.  Untested with network play as the net's down now.
2013-11-27 06:09:49 -08:00
Eric House
f50badc428 rename script 2013-11-26 08:06:53 -08:00
Eric House
66eb96dce2 notify BoardCanvas when we're closing a game so that it won't try to
use, in callback on UI thread, a dict that may no longer be valid.
Theory is this is why I'm seeing odd crashes in the jni.
2013-11-26 08:06:38 -08:00
Eric House
8976d26f00 clear thumbnail after resetting game 2013-11-26 08:04:30 -08:00
Eric House
29a4634a40 add assertOnUIThread() 2013-11-26 07:59:20 -08:00
Eric House
eab12200af add debug preference to determine whether to use sendDataMessage() 2013-11-26 07:11:22 -08:00
Eric House
f7a09551d5 Merge branch 'android_branch' into android_sms_kitkat 2013-11-26 06:56:49 -08:00
Eric House
15cbad340a clear thumbnail after processing background move so it'll get redrawn.
Better would be to just draw it since the game is already open, but
that takes more changes.
2013-11-25 08:08:04 -08:00
Eric House
d02bbf2d50 up version strings 2013-11-25 08:03:57 -08:00
Eric House
42800851d3 combine thumbnail prefs to reduce nesting 2013-11-25 07:58:11 -08:00
Eric House
0b00f303bb cleanup after code review 2013-11-25 07:46:25 -08:00
Eric House
538fa20ffd fix broken deleteGroup() 2013-11-25 07:45:43 -08:00
Eric House
2491051f65 don't require NFC 2013-11-25 05:52:09 -08:00
Eric House
3ff241f739 Merge branch 'android_branch' into android_sms_kitkat 2013-11-24 18:18:03 -08:00
Eric House
8260fb1437 fix NPE on older phones 2013-11-24 18:13:54 -08:00
Eric House
7743fc52d5 fix assertion: rowid of -1 means all 2013-11-24 18:13:36 -08:00
Eric House
75b976449f turn SMS back on, and modify to send/receive "data" SMS rather than
text.  This works between two t-mobile devices without filling the
kitkat one's message box. TBD: does it work on CDMA?
2013-11-23 19:02:57 -08:00
Eric House
97fbbf8897 changelog for next release 2013-11-23 15:33:08 -08:00
Eric House
478ed9a12a change method name 2013-11-23 15:32:58 -08:00
Eric House
ba181221dd select newly created game too on return of focus 2013-11-23 12:17:42 -08:00
Eric House
7876e2cded use constant 2013-11-23 12:17:21 -08:00
Eric House
f85bb082fc optimization: return null quickly if param is invalid 2013-11-23 12:16:38 -08:00
Eric House
6f4cb4b0ca fix (I hope) OOM errors when there are a ton of games by doing
snapshot creation and loading sequentially on a single thread so that
peak memory consumed by bitmap operations is lower.  Remove snapshots
from GameSummary: the db is the only source now.
2013-11-22 22:58:39 -08:00
Eric House
d2c87647cd reverse test so games db can be loaded 2013-11-22 18:51:42 -08:00
Eric House
25144b8e82 script to push a .xwd file onto a device -- or mine anyway 2013-11-21 19:20:23 -08:00
Eric House
f2ff596ff3 fix NPE by checking 2013-11-21 18:57:58 -08:00
Eric House
9820f6bf6b set selection on children being reused 2013-11-21 18:57:32 -08:00
Eric House
4748d9f459 create groups opened 2013-11-21 08:08:44 -08:00
Eric House
ec2fb210be on return from opening a game, select that game after clearing the selection 2013-11-21 08:00:59 -08:00
Eric House
8be57116ab revert previous change: the right way to save selections is to add
screenSize to the list of changes handled so that Activities aren't
recreated each time, so do that instead.
2013-11-21 07:34:38 -08:00
Eric House
03b7a6d45f preserve selection across orientation changes 2013-11-21 07:10:36 -08:00
Eric House
f88e7a89f0 tweak text 2013-11-21 06:47:00 -08:00
Eric House
75d9752024 use "pct." to indicate what thumb scale choices mean. '%' triggers a
known crasher in Android.
2013-11-21 06:44:19 -08:00
Eric House
7be3a3bef8 express thumb size as percent of screen with options, generated, in 5%
increments.
2013-11-21 06:27:09 -08:00
Eric House
b874406b7b add newbie message about how NFC works 2013-11-21 05:53:38 -08:00
Eric House
c42271ee31 fix NPE 2013-11-21 05:26:45 -08:00
Eric House
08205637de disable SMS play/invite on KitKat (until workarounds found) 2013-11-21 05:26:12 -08:00
Eric House
2d7c845ebb Merge remote branch 'origin/android_branch' into android_branch 2013-11-21 05:25:23 -08:00
Eric House
8de638a047 update explaining kitkat 2013-11-21 05:24:36 -08:00
Eric House
24e015f259 don't make snapshots for non-expanded game list items; make when first
expanded instead.
2013-11-20 08:15:18 -08:00
Eric House
2e5e10ef6d move dialog asking to enable NFC into NFCUtils, and use it when
creating a new game to be invited via (disabled) NFC
2013-11-20 07:56:05 -08:00
Eric House
5f7242f01b tweak string 2013-11-20 07:34:11 -08:00
Eric House
b1ae563ae6 fix NPE when installed with existing SMS invites in inbox 2013-11-20 06:54:51 -08:00
Eric House
51a561077c when action-bar-equipped device tries to hide title bar warn and then
disable pref.
2013-11-19 07:22:14 -08:00
Eric House
63ba7d45d3 use gameID as inviteID for non-NFC invites too 2013-11-19 06:37:39 -08:00
Eric House
0cef5fce50 display gameid as hex 2013-11-19 06:26:07 -08:00
Eric House
9fa715f096 add German to what thefreedictionary.com can look up 2013-11-19 05:42:00 -08:00
Eric House
45fcd19e6e use gameID as inviteID, so that all devices in a game will be using
the same gameID -- and use that to reject as duplicates attempts to
use the same invitation more than once.
2013-11-18 21:38:59 -08:00
Eric House
d7239323bc add gameid as option for what's shown in summary (debug only) 2013-11-18 07:25:40 -08:00
Eric House
6d06197c45 hide trade menuitem when board's in invite mode 2013-11-18 06:48:12 -08:00
Eric House
7ff9496d23 remove some logging 2013-11-18 06:33:59 -08:00
Eric House
03f532374b put up NFC button even if turned off, and when it's used offer to turn
it on.
2013-11-18 06:27:24 -08:00
Eric House
37083c3ea1 fix menu titles -- were reversed 2013-11-18 06:17:26 -08:00
Eric House
3278b55819 return whether NFC *can* be enabled as well as whether it is 2013-11-17 21:21:06 -08:00
Eric House
e701af7262 tweak text 2013-11-17 21:18:33 -08:00
Eric House
0cc45ad865 add new field canHideRack to GameStateInfo and use it to disable menu. 2013-11-17 13:54:21 -08:00
Eric House
cae89a60a8 include hint in subtitle 2013-11-16 18:31:32 -08:00
Eric House
0bf28c133d always have board ready to send invite via NFC 2013-11-16 09:03:17 -08:00
Eric House
deff81cfd1 move query setup outside of synchronized blocks where possible 2013-11-16 06:30:34 -08:00
Eric House
f303fa2653 debug features and logging are always on/available for debug builds 2013-11-15 20:52:05 -08:00
Eric House
088dd1bd75 center board when it must be narrower than screen 2013-11-15 20:46:22 -08:00
Eric House
c0f6f6a959 don't enable delete menu when default group is among those selected 2013-11-15 19:14:51 -08:00
Eric House
e4e0f57676 put up different help text depending on whether user has buttons or
menus (since the text mentions them)
2013-11-15 19:02:13 -08:00
Eric House
d461268b8c tweak newbie hint 2013-11-15 18:44:11 -08:00
Eric House
d8ea672f6c now that getDefaultNewGameGroup works, allow/pass undefined group
further down where appropriate
2013-11-15 07:53:57 -08:00
Eric House
cd922ba8e2 fix getDefaultNewGameGroup to use a (new) DBUtils method that actually
works.
2013-11-15 07:47:14 -08:00
Eric House
3ba470573d when there's no default new-game group, get *some* group from the DB
and make that the default, with caution to avoid any -1==groupID games
saved by previous buggy versions
2013-11-15 06:50:34 -08:00
Eric House
edadc962f8 rename generated file; set logging on by default for debug builds 2013-11-14 21:56:37 -08:00
Eric House
8488dc1055 script to fetch db from sd card 2013-11-14 21:56:37 -08:00
Eric House
5f346d94b0 scp automatically if the right ENV variable is set 2013-11-14 21:56:37 -08:00
Eric House
53748e352a fix games created after reset of prefs from disappearing: they were
being saved with groupid of -1, so now when the default's not been sit
choose and pass in the first group.
2013-11-14 21:47:01 -08:00
Eric House
5826f080be don't hide titlebar for board if there's no menu key, since on such
devices there's no other way to get to the menu.
2013-11-14 08:07:00 -08:00
Eric House
85a533c74f use interface trick to avoid NFC code crashing on 2.1 2013-11-14 08:03:28 -08:00
Eric House
bdf5a43686 always update nMissing so invite menuitem can go away 2013-11-14 06:19:04 -08:00
Eric House
e20a72e527 remove and turn off active rect stuff 2013-11-14 05:59:51 -08:00
Eric House
4d6a37b048 don't force NFC messages to ascii -- it breaks special chars and isn't
required, even with special chars.
2013-11-14 05:46:47 -08:00
Eric House
e9bdf3c4f8 don't show trade buttons when have actionbar since they're redundant
and the AB icons are visible; hide resign menuitem when in trade mode.
2013-11-13 19:00:34 -08:00
Eric House
3b5bc3a786 fix OOB per http://stackoverflow.com/questions/12133404/indexoutofboundsexception-in-a-baseexpandablelistadapter-implementing-sectionind 2013-11-13 18:39:03 -08:00
Eric House
2fbf0fca50 up sdk version 2013-11-13 07:55:41 -08:00
Eric House
64b783da38 ignore generated file 2013-11-13 07:52:52 -08:00
Eric House
263a4d7170 move action bar stuff into its own class; in wordlist browser, show
only one of download button and download menu
2013-11-13 07:42:51 -08:00
Eric House
41f61e3748 use setNdefPushMessageCallback instead of setNdefPushMessage; seems to
make invitations work more reliably.
2013-11-13 07:11:56 -08:00
Eric House
3b3746d2e5 fix invites dialog to show the right buttons for all cases. 2013-11-13 06:52:45 -08:00
Eric House
d119033333 use resource strings and apis rather than quoted strings for nfc constants 2013-11-13 06:51:36 -08:00
Eric House
735e42cd90 launch on tap even if selected 2013-11-13 06:50:30 -08:00
Eric House
b7d756957c test also whether NFC turned on 2013-11-12 19:12:47 -08:00
Eric House
b3bc738cae move nfc stuff into separate utility class, and check API version for
whether to support it. Oddly the app runs on 2.1 emulator without
classnotfound error -- I was expecting to have to use the interface trick.
2013-11-12 19:06:26 -08:00
Eric House
f291ef7377 remove dup import 2013-11-12 18:58:13 -08:00
Eric House
e63e5b6102 Merge branch 'android_branch' into android_nfc 2013-11-12 18:39:31 -08:00
Eric House
8704efd38e add send-invites menuitem that's at top of board menu but only visible
when game's unconnected
2013-11-12 18:39:13 -08:00
Eric House
e040aa388b don't try to save to read-only lock; check for non-existant games when
summarizing: together these fix crash when deleting after opening game
whose remote partner has been deleted.
2013-11-12 08:08:30 -08:00
Eric House
6719704117 remove excessive logging 2013-11-12 08:02:14 -08:00
Eric House
10608b137f Mark the current player's wordlist in wordlists popup 2013-11-12 07:05:37 -08:00
Eric House
148da01fdc use save icon for commit/trade too 2013-11-12 06:43:56 -08:00
Eric House
e2aea4a39e call through to canvas for current score to correctly update menu 2013-11-12 06:40:40 -08:00
Eric House
f14be36bbc eliminate flicker on opening board: don't start drawing tile if can't
finish
2013-11-12 06:34:56 -08:00
Eric House
282b32396f don't log the one command that's supposed to get posted post-stop 2013-11-12 06:29:57 -08:00
Eric House
d0313d3c4b package game-start data into a json and send it via nfc, then open it
on the other end. Works to start a game!
2013-11-11 22:06:28 -08:00
Eric House
a88835a4a1 Successfully send text via NFC and log it on receiver 2013-11-11 21:36:19 -08:00
Eric House
98989abb14 don't log the one command that's supposed to get posted post-stop 2013-11-11 21:35:42 -08:00
Eric House
8099b77e52 refuse to a create second game from an invitation unless a debug pref
is set.
2013-11-11 20:44:08 -08:00
Eric House
360479bff5 string tweak 2013-11-11 20:27:50 -08:00
Eric House
7cf297ad0e fix so board still works after reloading, e.g. after turning screen
off and back on.
2013-11-11 08:09:15 -08:00
Eric House
da3215c116 reduce logging 2013-11-11 08:00:56 -08:00
Eric House
a7b1e00cc2 remove trade menuitem when game over 2013-11-11 05:31:18 -08:00
Eric House
35721975db add menuitems for back/commit for trade mode parallel to the buttons
at bottom (which should go when you have an action bar)
2013-11-11 05:23:25 -08:00
Eric House
37aa4a9adf set tile border (highlighted and not) proportional to tile size for
greater visibility on high-res devices
2013-11-10 09:05:31 -08:00
Eric House
ad464b8861 fix to work when both -e and -d passed 2013-11-10 09:01:52 -08:00
Eric House
f27e798966 need to requestLayout(), not just invalidate(), after common code
layout is finished.
2013-11-10 08:37:28 -08:00
Eric House
7457ce9b80 fix so board draws correctly when loaded in trade mode 2013-11-10 06:55:01 -08:00
Eric House
82a82b5ae1 set trade mode in canvas where it'll do some good 2013-11-10 06:41:43 -08:00
Eric House
d598dde86e inval view even if board_draw says there's more drawing to do -- as
there's probably still a lot that got drawn.
2013-11-10 06:41:12 -08:00
Eric House
f6e0febd6d fix NPE 2013-11-09 08:20:32 -08:00
Eric House
397b03b074 save thumbnail along with summary to fix reset game keeping its old
(and populated) thumbnail until opened
2013-11-09 07:27:05 -08:00
Eric House
3142069adb save bitmap after generating it 2013-11-09 07:19:54 -08:00
Eric House
26a464aae4 set a minimum width for rem tiles display based on screen width rather
than pixels
2013-11-09 07:15:28 -08:00
Eric House
3e6a7418b1 move snapshoting code into GameUtils, and use it whenever loading a
GameListItem that should have a snapshot but doesn't.  This lets games
have snapshots immediately rather than only after they've been opened
once.
2013-11-09 06:59:33 -08:00
Eric House
e0dd481393 restore missing ivar init so remaining tiles square comes back 2013-11-09 06:48:09 -08:00
Eric House
049b8247ff clear all thumbnails whenever a thumb-related pref changes 2013-11-09 06:40:31 -08:00
Eric House
82f61b43f2 add utility to erase all thumbnails 2013-11-09 06:36:47 -08:00
Eric House
dfdbd9a8a2 pass scoreWidth separately into formatting code so space can be left
for network status icon.
2013-11-09 05:34:23 -08:00
Eric House
57c887b8cd don't touch Application.mk unless it's changed to avoid recompiling every .c file each time 2013-11-09 05:20:21 -08:00
Eric House
6107400835 improve thumb strings 2013-11-08 06:34:58 -08:00
Eric House
9f6baf39c4 don't insert rowid in any prefs list except the right one 2013-11-08 06:31:20 -08:00
Eric House
0a3a1623df DRAW message not needed (using invalidate instead) 2013-11-08 06:08:09 -08:00
Eric House
ea6ad877ca draw after changing/adding dict chars -- this may be the final step
required to be able to render a board.
2013-11-08 06:06:18 -08:00
Eric House
5a555b11b0 tweak appearance of snapshots preferences 2013-11-08 05:54:30 -08:00
Eric House
b2f864c7ce frame thumbnail in grey; tweak defaults 2013-11-08 05:44:16 -08:00
Eric House
ecb225a6a8 try larger font size on high-res screens 2013-11-07 20:06:51 -08:00
Eric House
9e87a5ee92 implement getting active rect when that pref is set 2013-11-07 19:55:01 -08:00
Eric House
71d83e188e null param ok for board_getActiveRect in jni 2013-11-07 19:54:13 -08:00
Eric House
e780b536f9 obey thumb size preference. Currently "1/3" means 1/3 the size of the
smaller screen dimension.  There may be a better scale.
2013-11-07 19:28:00 -08:00
Eric House
41df94af31 new separate set of three prefs for thumbnails, and make the first,
enable/disable, work.
2013-11-07 19:07:19 -08:00
Eric House
fba7aee83a take thumb setting into account (though not in the rigth way yet, and
changes are still reflected only after the list item's been forced to
reload)
2013-11-07 07:51:57 -08:00
Eric House
a26dced506 drawing tray tiles can fail, e.g. when font info not yet available, so
only clear bits when successful. Fixes problem where tray didn't get
drawn until tiles were somehow invalidated.
2013-11-07 07:29:54 -08:00
Eric House
56f9f5f88e remove unused method 2013-11-07 05:48:39 -08:00
Eric House
16923eb27e save thumbnail in separate step, creating new square board-only
drawctxt to render it without scaling.  Draw whole board rather than
just the active rect.
2013-11-07 05:44:16 -08:00
Eric House
baba78535f fixes to the merge 2013-11-07 05:30:02 -08:00
Eric House
bb80cdfb08 Merge branch 'android_branch' into android_thumbnail
Conflicts:
	xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardCanvas.java
	xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/XwJNI.java
2013-11-07 05:25:51 -08:00
Eric House
929399793b Merge branch 'android_x86_release' into android_branch 2013-11-06 22:28:36 -08:00
Eric House
272fc6e812 Move board_layout call onto jni thread, and change order in which it's
done to make that work. This is a snapshot: not all boards draw completely,
and there's other debugging to be done.
2013-11-06 06:49:27 -08:00
Eric House
7c47c27cee dispose any existing draw ctxt before setting another. 2013-11-05 07:36:56 -08:00
Eric House
499e07d84b follow convention: width usually comes before height 2013-11-05 06:38:48 -08:00
Eric House
de284588f7 test for X86 developers too 2013-11-05 06:36:16 -08:00
Eric House
f0bfbedfb9 call script from build.xml to generate Application.mk 2013-11-04 19:23:47 -08:00
Eric House
f1f02df355 remove file to be generated by build system 2013-11-04 19:19:09 -08:00
Eric House
e6c08a83ab tweak text: including both processors after all 2013-11-04 07:40:49 -08:00
Eric House
633d41a6ef Revert "x86-only for this one release"
This reverts commit 67c6c635e4.
2013-11-04 07:35:12 -08:00
Eric House
03b023d506 dispose any existing draw ctxt before setting another. 2013-11-04 07:33:12 -08:00
Eric House
d4cf98553c Merge branch 'android_branch' into android_thumbnail 2013-11-04 06:37:13 -08:00
Eric House
2d7392a16d pass new score- and tray-size params through 2013-11-04 06:36:52 -08:00
Eric House
9c9a04025a Merge branch 'android_branch' into android_thumbnail
Conflicts:
	xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/XwJNI.java
2013-11-04 06:20:53 -08:00
Eric House
9f1b0c5121 Specify relative height of scoreboard and tray in board_figureLayout,
and allow those to be 0.
2013-11-04 06:19:33 -08:00
Eric House
ccb07a67da update strings for this x86-only release 2013-11-03 13:04:22 -08:00
Eric House
67c6c635e4 x86-only for this one release 2013-11-03 12:52:53 -08:00
Eric House
d11375b5f5 apply contributed patch adding x86 version of libxwjni.so 2013-11-03 12:21:52 -08:00
Eric House
59dc69c0d9 apply contributed patch making Makefile variable naming match required
conventions for CLEAR_VARS.
2013-11-03 12:21:28 -08:00