Commit graph

9949 commits

Author SHA1 Message Date
Eric House
e6561cbcac debugging aids
commented-out logging of drawCell, with flags; debug-build checks that
static rects passed to java draw code aren't being used by multiple
threads at once.
2016-11-12 07:20:28 -08:00
Eric House
41581cbddb cleanup: remove unused variable, unnecessary final 2016-11-12 07:07:19 -08:00
Eric House
92e413fa06 make boardBegin() a no-op in C
instead of a no-op in java, which takes more work to get to.
2016-11-12 06:57:05 -08:00
Eric House
f394bcef64 use max backoff time if no relay games 2016-11-11 06:31:54 -08:00
Eric House
edcafe1c45 housekeeping
gitignore new files; try to limit projectile searches
2016-11-11 06:30:55 -08:00
Eric House
7087ae96ff cleanup: resolve diffs between AndroidManifest.xml versions 2016-11-09 08:40:17 -08:00
Eric House
6d1d4abdd5 add backoff to relay pings
Current code is hitting the relay every 60 seconds, at least on
non-google-play installs like f-droid. Switch to using a backoff timer
that maxes out at once per hour. Eventually may want to not run the
timer at all when there aren't any unfinished relay games present.
2016-11-09 07:53:24 -08:00
Eric House
9cd76d887d fix weird double-bang thing 2016-11-09 07:45:39 -08:00
Eric House
55d86d5ca2 don't try drawing snapshot in curses mode
Was crashing on game save. Add to main launchParams struct whether we're
in curses or gtk mode and only save snapshot in latter case.
2016-11-09 07:38:41 -08:00
Eric House
154e428fa8 more work on wifi direct
Now sends and receives a single packet more often than not. Disabled for
non-DEBUG devices, and new permissions that are required are commented
out so I don't accidentally ship before the sdk-23 permissions stuff
makes additions less scary.
2016-11-07 07:02:27 -08:00
Eric House
85c12d6a85 new file to wrap sockets
Untested class that wraps a bi-directional tcp socket using a
length-plus-data stream format. Just checking it in for now.
2016-11-04 20:36:11 -07:00
Eric House
1c93d908cd progress on wifi direct
group is formed and ip addresses assigned! But fragile: need to reboot
devices occasionally before things will happen again.
2016-11-03 21:20:03 -07:00
Eric House
ff01e78dee first commit on wifi direct
Disabled at compile time, and missing permissions required, but if
enabled is able to discover other devices running same app. Next: try to
open a socket.
2016-11-03 06:25:48 -07:00
Eric House
3ccdd5a6e2 fix printStack()
logi() stuff isn't showing up, so use logd().
2016-11-01 07:51:00 -07:00
Eric House
da9ee4195c re-add lollipop-friendly notification icon
This one looks better white-on-black, but still needs work! Had been
added before, in ref 885b375a55.
2016-10-31 08:00:04 -07:00
Eric House
b56c4d13b4 build with SDK version 23
Meant using NotificationCompat, dropping FloatMath, and changing a bunch
of build config stuff. Not done for gradle builds yet. Currently crashes
on a new install until you go into Apps/Crosswords/Permissions and turn
on the four "dangerous" ones it's using. Now the work is to check for
and request missing permissions on demand.
2016-10-31 07:46:04 -07:00
Eric House
832ff8e850 Merge branch 'android_branch' into android_translate 2016-10-25 20:28:05 -07:00
Eric House
579f11613f Merge branch 'android_release' into android_branch 2016-10-25 20:15:00 -07:00
Eric House
540a720fb7 up release strings 2016-10-25 20:06:10 -07:00
Eric House
1a43ab0adb fix jni crash on Nexus 9: give boolean default value
Crash occurs when creating new game: because there's no turn set yet the
jboolean has no set value (whatever was on the stack). Apparently the
java runtime accepts only 1 and 0 for jbooleans.
2016-10-25 08:35:11 -07:00
Eric House
c80665bf41 Merge tag 'android_beta_111' into android_release
new release
2016-10-25 08:34:50 -07:00
Eric House
45a6ddf8ec fix jni crash on Nexus 9: give boolean default value
Crash occurs when creating new game: because there's no turn set yet the
jboolean has no set value (whatever was on the stack). Apparently the
java runtime accepts only 1 and 0 for jbooleans.
2016-10-25 08:03:18 -07:00
Eric House
c3c2795f67 Merge remote-tracking branch 'sf/android_branch' into android_branch 2016-10-25 06:14:33 -07:00
Eric House
1a830fbff2 use clang instead of gcc for ndk builds
And make changes to C code to fix resulting warning. The .so file
basically works but is not thoroughly tested.
2016-10-25 06:09:40 -07:00
naofum
3db6abba30 Translated using Weblate (Japanese)
Currently translated at 75.8% (566 of 746 strings)
2016-10-14 18:45:24 +02:00
Sylvia van Os
953ea6aa15 Translated using Weblate (Dutch)
Currently translated at 75.2% (561 of 746 strings)
2016-10-14 15:44:27 +02:00
Eric House
abf4aa4d80 switch to clang
add option, and invoke it, to build jni code with clang rather than gcc.
2016-09-30 11:13:30 -07:00
Eric House
a710bdd46e Merge remote-tracking branch 'maidu2/android_branch' into android_branch 2016-09-28 21:46:17 -07:00
Eric House
123b3007cb get rid of remaining logf calls
This completes moving to using traditional logging. At least to having
each file provide a TAG. Class rather than TAG is passed in, and format
strings are preferred to contatenation, but now adb can work with the
output.
2016-09-28 21:42:16 -07:00
Eric House
59796c59b8 loge -> logex (so loge can be reused) 2016-09-27 19:42:48 -07:00
Eric House
68650ebfea first change toward using traditional TAGs with Log class 2016-09-27 19:35:24 -07:00
Eric House
3174705d63 gtk: remove assertion failure creating new games
I think this was related to changing the order in which save operations
happen and that it's no longer valid to insist that there already be a
rowid at this point, but could be wrong....
2016-09-26 08:24:47 -07:00
Eric House
e07686491c gtk: summarize before saving
Fixes problem with list view always being a move behind, since it's
saving not summarizing that was triggering the refresh, but summarizing
that added the data from which refresh/list view drew.
2016-09-20 08:27:17 -07:00
Eric House
5742c5cb12 gtk: save game on every turn change
Idea is to have the games list stay in sync, but in fact it stays one
move behind, at least in a typical standalone human-vs-robot game. So
this is incomplete.
2016-09-19 09:12:23 -07:00
Eric House
a6992c373f fix broken notagain alert
I screwed up when converting to using builder.
2016-09-15 21:32:25 -07:00
Eric House
7994c42691 allow board cells to be wider than tall
There are some screen dimensions, especially with dual-pane mode, where
the board is just bit narrower than the screen. Rather than have narrow
white borders, allow the cells to take up the slack. The API takes an
upper bound on the ratio of width to height so things shouldn't get too
odd looking.
2016-09-15 20:37:29 -07:00
Eric House
39c49c3d8d Set AS upgrade gradle 2016-09-15 20:33:20 -07:00
Eric House
baf825e7db add gtk-3 to set of debs Makefile knows to install 2016-09-13 19:45:29 -07:00
Eric House
809e962765 tweak to intent handling
Change logic to always handle intent when it's safe to commit
transactions rather than when there aren't any pending. This still needs
work.
2016-09-09 05:46:08 -07:00
Eric House
95d147d9c3 add logging; fix NPE
Running into a case where views haven't been added to the layout yet but
I'm searching there for their associated fragments. Fix to NPE stops a
crash, but intents still aren't being handled. I need to try to handle
them later, but am unsure when to start trying.
2016-09-05 20:29:16 -07:00
Eric House
bd2fbdeb88 fix NPE reported by crittercism
Not sure why it's happening, but testing and dropping is a fine fix.
2016-09-05 14:11:06 -07:00
Eric House
5e90ed0073 put tiny bit of padding around the board container 2016-09-04 21:57:58 -07:00
Eric House
b1ce992d23 gtk: don't resize scrollbar
Mistaken option to gtk_box_pack_start() meant the scrollbar got
allocated space along with the board when the container expands, not
what you want with a scrollbar.
2016-09-04 20:46:25 -07:00
Eric House
7358c1a185 simplify intent dispatch
Too-clever double loop had an no-exit path. Now it's simpler: find a
fragment that can handle the intent, pop all fragments to its right
until it becomes top-most (there may be none), and then give it the
intent. Use of popBackStackImmediate() is required so old fragments are
gone before intent handling wants to create new ones.
2016-09-04 16:49:40 -07:00
Eric House
c0eb827b77 generated files: should have gone with prev commit 2016-09-04 09:42:00 -07:00
Eric House
cdf22ec913 remove dual-pane toast from startup 2016-09-04 09:40:46 -07:00
Eric House
c16fda23af up strings for new release 2016-09-02 21:37:37 -07:00
Eric House
575e64ed25 reverse sort order: newer listed first 2016-09-02 21:32:31 -07:00
Eric House
8a00b1ab47 reorder list when game saved
Since display is now by whose turn it is and how recently there's been a
move in the game, the order can change on every save. So in the listener
for saves, redraw the group the saved game belongs to. The best way to
do this without flicker seems to be to mimic closing then re-expanding
the group, so that's what I'm doing.
2016-09-01 08:16:21 -07:00
Eric House
5a91b2819c cleanup: pass size to constructor 2016-09-01 07:21:13 -07:00