Commit graph

11250 commits

Author SHA1 Message Date
Eric House
107e6d0fca add more logging around failure-to-open-intent 2019-05-16 12:06:38 -07:00
Eric House
10fff616ae try harder to respond to an intent with a rowID
Failure to immediately get a lock for a rowID in an intent meant that
other intent processing kicked in, and might have done the wrong
thing. So now if there's a rowid in it we try nothing else. And we use
the GameLock callback mechanism to deal with the case where it's
temporarily unavailable, as it will be when an incoming move is being
dispatched to it.
2019-05-15 16:44:19 -07:00
WaldiS
0157cef8d5
Translated using Weblate (Polish)
Currently translated at 6.5% (50 of 764 strings)
2019-05-02 23:48:02 +02:00
WaldiS
e9a68ba7f3
Translated using Weblate (Polish)
Currently translated at 6.4% (49 of 764 strings)
2019-05-01 22:47:51 +02:00
Eric House
4919f487eb up strings for new release 2019-04-25 15:20:21 -07:00
Eric House
622fa53c64 always log stack of lock held more than 1 minute
(DEBUG only) I'm seeing deadlocks in a non-reproducible way and need to
get at the source. This should log the stacks of long-held locks, and
notify via Toast (when possible) when it occurs.
2019-04-25 11:54:11 -07:00
WaldiS
d13d8e79cb
Translated using Weblate (Polish)
Currently translated at 2.7% (21 of 764 strings)
2019-04-12 20:03:57 +02:00
Eric House
c757ba1386 use a single queue for all nbsproto threads
No point in worrying about whether a thread exists without emptying its
queue. Instead have a thread start when something's added to the queue
and exit when it's been empty for a while. Only trick is the need to
remember the phone number[s] on behalf of which a retry's necessary
because jni code is waiting to see if combining can be done.
2019-04-09 11:45:32 -07:00
Eric House
012ebe26f7 differentiate betweeen PENDING and RECENT tiles
Should not show the new you-can-lookup-uncommitted-words hint for
already-played words, so needed to be able to tell difference between
the two. Now you can -- and on the gtk side I draw them differently
because I can.
2019-04-09 09:51:04 -07:00
Eric House
fbf810444b log msgIDs (relay only for now)
I want to track and eliminate the duplication of the 0th message.
2019-04-09 08:59:57 -07:00
Eric House
fdb0e0d14b put message back in okonly dialog 2019-04-08 18:57:18 -07:00
Eric House
8f77a87a7a preserve checkmarks when invite dialogs rotate 2019-04-08 18:46:25 -07:00
Eric House
ec5162ddce trivial changes to force a build 2019-04-05 21:13:21 -07:00
Eric House
d6710622ad replace oft-firing assertion with logging
It's crashing all the time and involves a system that only exists in
debug builds. So I should understand the root cause, but other stuff
needs to get done first.
2019-04-05 13:30:23 -07:00
Eric House
4db2fd229b add hint explaining new tap-on-pending-words feature
And bring back another BoardCanvas hint that had been commented out.
2019-04-05 13:26:49 -07:00
Eric House
660cfa83a3 remove dead code 2019-04-05 12:47:07 -07:00
Eric House
fec0124f8c allow long-tap lookup of pending words too
When a word's been formed as part of the current turn, but not yet
committed, allow long-tap to trigger an offer to look it up online same
as for already-committed words. Allows checking the legality of
potential plays AND figuring WTF the hint feature just suggested.
2019-04-05 11:54:58 -07:00
Eric House
48880281dc add empty invitee list string for Bluetooth too 2019-04-04 21:32:28 -07:00
Eric House
dbdfa0b46c fix invite dialogs for landscape layout
Scrolling's needed in some cases, and you can't easily put a ListView
inside a ScrollView. So replace the ListView with a LinearLayout whose
contents I manage manually, and wrap the whole layout in a ScrollView.
2019-04-04 21:26:24 -07:00
Eric House
163eaf9612 fix invite-how alert not scrolling
By setting a custom view I wasn't using I broke scrolling of the
AlertDialog's list view which I was using. Known bug apparently....
2019-04-04 18:51:11 -07:00
Eric House
19fa3fce05 get rid of DispatchNotify
All it did was forward intent's data to MainActivity. Only question is
whether making MainActivity singleTask is a problem. We'll see.
2019-04-04 12:52:28 -07:00
Eric House
326bda70e3 cleanup 2019-04-02 21:55:01 -07:00
Eric House
2fd647d0aa make it a single thread 2019-04-02 21:55:01 -07:00
Eric House
758f08c7f3 move SMSPhoneInfo into its own class/file 2019-04-02 21:54:55 -07:00
Eric House
5e1e285046 make a common superclass 2019-04-02 21:49:16 -07:00
Eric House
35bcc3910c Rename SMSService NBSProxy, and make it not a service
Just keep a thread for each
phone we're sending to or receiving from, and pass them packets and
other things to send or (incoming case) process. So far the threads
don't die, but they will soon once there's nothing in their queues. Just
need to be sure there's no racing there.

This is to work around the frequent failure of the OS to pass enqeued work
into the service within a reasonable amount of time (I expect seconds, but see
delays of minutes or even hours.)
2019-04-02 21:48:58 -07:00
Eric House
0251ff0b44 use mutex to synchronize access to smsproto apis
I'm seeing my simultaneous access assert fail, so might as well break
fix it the foolproof way. It's background threads only that are calling
this stuff on Android so blocking them shouldn't hurt.
2019-04-02 16:08:08 -07:00
Eric House
7cc4ad6f2a up strings for release
This is just to try yet again to get past the play store console's
past-permissions bug
2019-03-25 15:41:40 -07:00
Eric House
425bedf464 reflect bt receipts in how long since saw device
Made no sense to use explicit scans only since typically you only do
that to get things going.
2019-03-25 13:53:25 -07:00
Eric House
2f264e36ca add makefile for new wordlist 2019-03-23 18:53:48 -07:00
Eric House
603daa447f remove separate marking of permissions as banned
It's enough to check manifest for their presence
2019-03-22 16:43:18 -07:00
Eric House
e2b7aceea7 Up version code and string to try a new play store release 2019-03-22 13:58:49 -07:00
Eric House
5f29af46e0 move SMSReceiver from main manifest to the others
Theory is that the store's buggy site is presenting its
banned-permissions interface because it's detecting a Receiver that
requires SMS_RECEIVE permission even though the permissions themselves
aren't there any more.
2019-03-22 13:22:18 -07:00
Eric House
dc5b134708 up version name (but not code)
This will NOT be released on Google Play, so no need to up code.
2019-03-22 10:51:07 -07:00
Eric House
e84f7ff960 fix broken symlink 2019-03-22 10:47:20 -07:00
Eric House
12d95fdd30 fix build script for new Play Store variant name 2019-03-22 10:15:27 -07:00
Eric House
dad649474e changelog and cleanup 2019-03-22 10:05:13 -07:00
Eric House
8a620533e5 fix multi-message aspect of smsproto
passes --run-sms-test now, and works on Android occasionally combining messages.
2019-03-21 18:49:19 -07:00
Eric House
ea1cc68eb0 cut logging in test app 2019-03-21 18:40:15 -07:00
Eric House
e799474e00 always respect user's local player name 2019-03-21 09:13:38 -07:00
Eric House
eb79393dc1 fix a couple of random crashes
a race condition and a misunderstanding
2019-03-21 09:12:32 -07:00
Eric House
83b8169a6b add useful stuff to build-info.txt inside .apk 2019-03-20 15:47:20 -07:00
Eric House
9374260c59 try to address one-time assert
and remove it from shipping build
2019-03-20 15:07:04 -07:00
Eric House
a7da0e33bb show the stalled-service alert based on pref
Allow users to turn the notification on; otherwise skip it. And set
the default on/off based on DEBUG type of build.
2019-03-20 14:53:08 -07:00
Eric House
b5714fadf8 add a bool resource matching BuildConfig.DEBUG
I want to be able to have some boolean prefs default based on whether
it's a DEBUG build.
2019-03-20 14:29:37 -07:00
Eric House
52f839e899 fix null procptr crash in jni
I can't reproduce this, but while testing recovery from DatagramSocket
recreation in RelayService got enough to know that somehow a timer's
procptr's not set. So test before calling, and log instead of crashing.
2019-03-20 13:33:30 -07:00
Eric House
b03f767e6c get another DatagramSocket when ours goes bad
Fix longstanding bug triggered by something as simple as putting device
into and out of airplane mode. Once the class-variable socket was
created it was never replaced. Now respond to exceptions that mean it's
useless and set it to null so existing logic will recreate it.
2019-03-20 13:33:21 -07:00
Eric House
2916e1d6cb tweaks to logging and imports; should have no effect 2019-03-20 07:23:34 -07:00
Eric House
1eccbebb95 report inability to get locks in travis debug builds 2019-03-19 09:15:27 -07:00
Eric House
1291310a0c track all pending service Intents; warn of stalls
When enqueuing Intents for any of the three services, cache the
Intent. When onHandleWork() is called, remove the equivalent cached
intent. Then periodically check for intents that have been stored for
more than 60 seconds, and post a Notification alerting user to
stall. The user will likely have noticed that messages aren't flowing,
so this will simply explain the problem. Includes an "email author"
button.
2019-03-19 08:39:16 -07:00
Eric House
f5afba8fd4 cleanup and refactor
Move some work into superclass where instrumentation can be added to
greater effect. And remove from BTService an earlier attempt (at stall
detection.)
2019-03-19 08:16:30 -07:00
Eric House
99c6e38ff0 refactor: new constructor for common case 2019-03-19 08:06:16 -07:00
Eric House
21b0815923 make msgNo reflect srcID, not channelNo
It's more useful if it's per-device unique within a game. (Just used for
debugging now, so no impact on anything.)
2019-03-18 10:55:40 -07:00
Eric House
89cb97c3bb additions for debugging
toward tracking down relay stalls, log a bit more in resend process and
add UI to support an option where there's no reliance on
polling (i.e. FCM only)
2019-03-17 21:17:36 -07:00
Eric House
aa2564114a replace assert with logging 2019-03-17 18:26:43 -07:00
Eric House
bb9facfbd2 Merge remote-tracking branch 'weblate/android_translate' into android_translate 2019-03-17 14:01:06 -07:00
Eric House
0be3bb192d Wait for ACK to remove stored message
Bringing in a change that's been on the production relay for a while but
apparently didn't pass tests locally. Now it does.
2019-03-17 11:52:48 -07:00
Eric House
9bde550455 apply ordering and limit correctly 2019-03-17 11:38:00 -07:00
Eric House
0b0e4af977 up version strings 2019-03-16 21:11:55 -07:00
Eric House
efb6a93d7c add missing AndroidManifest.xml files for new variants 2019-03-16 20:53:16 -07:00
Eric House
9ae77bce13 use latest nbsplib 2019-03-13 14:38:03 -07:00
Eric House
e01bda552e change to work with changed NBSProxy API 2019-03-13 14:35:28 -07:00
Eric House
29ebcf0c20 API's changed 2019-03-13 14:35:23 -07:00
Eric House
61395f07e9 use the latest NBSProxy dev release 2019-03-12 07:05:51 -07:00
Eric House
91ff2175f6 add logging of CurGameInfo
Trying to track down why some player names aren't preserved
2019-03-12 07:05:12 -07:00
Eric House
79aab3ead1 override toString() for debugging 2019-03-11 10:46:56 -07:00
Eric House
21debf7af6 add missing consts 2019-03-11 10:32:22 -07:00
Eric House
7e06512e54 change emacs compile command (in comment)
No point defaulting to something that no longer exists
2019-03-11 09:57:16 -07:00
Eric House
080d14a02b fix symlinks post rename 2019-03-11 09:51:23 -07:00
Eric House
3c4cc6a1b7 fix broken symlink 2019-03-10 20:38:11 -07:00
Eric House
ab491ebcb4 change name of variant -- it's not the main one anymore 2019-03-10 19:25:57 -07:00
Eric House
f8623cd407 check if permission in manifest
I got bitten when creating a new variant leaving the permission out of
the manifest but using a config flag to claim it was there. Better to
have just one place to configure that. So check for presence in the
manifest and, for now, assert that that matches the isBanned flag. Soon
the isBanned flag can be removed.
2019-03-10 19:15:30 -07:00
Eric House
116f3f4274 add retain()/release()
Seems to work but needs testing!
2019-03-10 18:42:49 -07:00
WaldiS
5e3bedc3eb
Translated using Weblate (Polish)
Currently translated at 1.8% (14 of 764 strings)
2019-03-10 18:03:01 +01:00
Eric House
21158faa71 up version code to try another gps release 2019-03-09 17:38:18 -08:00
Eric House
5cc57919f5 add new Variant for github & sourceforge releases
and log permission check results
2019-03-09 14:07:06 -08:00
Eric House
2744649e48 one less malloc 2019-03-09 12:12:47 -08:00
Eric House
de7be6cf44 tweak UI with longer string 2019-03-09 09:20:37 -08:00
naofum
dd36d393e0 Translated using Weblate (Japanese)
Currently translated at 75.9% (580 of 764 strings)
2019-03-09 08:52:05 -08:00
Peeter Angelo
acd35c103b Translated using Weblate (Czech)
Currently translated at 14.5% (111 of 764 strings)
2019-03-09 08:51:20 -08:00
Eric House
1f195ad1e6 tweak string 2019-03-09 08:17:50 -08:00
Eric House
565f688252 don't capture lock stack in release builds 2019-03-09 06:59:31 -08:00
Eric House
085963b76c unlock lock we won't be keeping
This might fix the occasional game permalock.
2019-03-09 06:40:04 -08:00
Eric House
c2441c30f4 fix a likely-fluke NPE with a test
It seems impossible for the menu to be getting update without init()
having been called, but that must be what happened. To check for null.
2019-03-08 22:14:57 -08:00
Eric House
f890d74e63 fix invite not coming up after perms warning dismissed
or when it's not shown at all because the not-again checkbox is checked
2019-03-08 21:56:16 -08:00
Eric House
d914706ef8 cleanup 2019-03-08 21:32:52 -08:00
Eric House
f934ac3c5c up version of NBSProxy lib 2019-03-08 20:11:19 -08:00
Eric House
dbed7e29cc fix npe 2019-03-08 17:40:27 -08:00
Eric House
eb33d18390 add not-again checkbox to remove-sms-from-game alert
Some people will decide to leave SMS comms in while I look for an
alternative. Maybe. Don't show them the same alert every time they open
the game. In the process removed what seemed to be a duplicate ivar.
2019-03-08 14:18:56 -08:00
Eric House
f05c6862f9 refactor alerts code
Should be no change here, but the goal's to make it easier to mix
functionality, e.g. adding notagain checkbox to other types.
2019-03-08 13:29:30 -08:00
Eric House
0df3889030 don't show sms-failed toast when permission is banned 2019-03-08 12:58:00 -08:00
Eric House
3fd9a066cb move constant 2019-03-08 11:16:21 -08:00
Eric House
5a8e21468f add Overrides as part of sanity check 2019-03-08 11:10:16 -08:00
Eric House
21220bc839 include name of game being deleted 2019-03-08 09:46:27 -08:00
Eric House
7f405a3a40 update web page (esp. fix style for device display) 2019-03-08 09:20:48 -08:00
Eric House
0972d3d99f cleanup 2019-03-08 09:20:22 -08:00
Eric House
69046c5f2f give new variant the right icons 2019-03-08 07:18:49 -08:00
Eric House
2ba8d83cf6 update changes log 2019-03-07 18:30:52 -08:00
Eric House
d55916f583 oops 2019-03-07 18:18:50 -08:00
Eric House
ce2ec03d3e relay tracks variantCode int, not string 2019-03-07 18:12:26 -08:00
Eric House
fbba6f3247 add a case for Signal as default SMS app 2019-03-07 17:40:16 -08:00
Eric House
5eb29a0c21 display the Banned alert from invite-choice dialog 2019-03-07 09:13:50 -08:00
Eric House
a91c0e2cbf add non-mobile number if user confirms
Fix logic error that didn't proceed with the number-add in the
non-mobile case.
2019-03-07 08:39:20 -08:00
Eric House
a561899021 try various recipes for launching SMS app
There's no one way to launch an SMS app with a ready-to-send
invitation. So try the two that work on our two phone/app combinations,
iterating until startActivity() succeeds. The code's set up to have new
recipes added easily.
2019-03-07 08:06:07 -08:00
Eric House
188a5d8387 post a tip/warning when new invite-by-sms-app chosen 2019-03-07 07:48:31 -08:00
Eric House
ef27ffaa02 send an int code rather than a name 2019-03-07 06:28:46 -08:00
Eric House
8a4d4ec5bf warn when 'sms data' selected in build where it's banned 2019-03-06 22:38:53 -08:00
Eric House
a79b18b9b7 more tweaks 2019-03-06 14:31:44 -08:00
Eric House
7ffa2ed4fc remove logging 2019-03-06 14:05:15 -08:00
Eric House
d3abd31220 new method stub to fix fdroid build crash 2019-03-06 13:26:05 -08:00
Eric House
51c2ecd48a script to build all possible variants 2019-03-06 13:19:55 -08:00
Eric House
ac8ceec656 removing permissions from the Play Store version 2019-03-06 13:09:42 -08:00
Eric House
6267eb9c4f use NBSProxy if available
Lots of work dealing with banned permissions (SEND_SMS and
RECEIVE_SMS). First, if they're banned and NBSProxy is installed, just
use it as if the permissions had been granted. When it's not there,
explain at various points where users will otherwise be confused: when
they try to invite using data sms, or when they open a game that already
uses it.)
2019-03-06 12:39:08 -08:00
Eric House
7e4313e071 support setActionPair() for okOnly alerts too 2019-03-04 10:45:15 -08:00
Eric House
17e8844378 cut some logging 2019-03-04 07:43:28 -08:00
Eric House
91b7cf8bd9 remove misplaced assert
It's an error to use an env with the wrong thread, but it IS possible
for more than one thread to be associated with the same env. So don't
assert to the contrary.
2019-03-03 21:01:23 -08:00
Eric House
eeddd8d7cb fixing refcounting and adding logging
Seeing the occasional crash and trying to plug leaks that might be
contributing. I think I fixed the Gameptr.finalize() assertions I've
been seeing forever but the thread match assertion remains. Logs will
help catch that.
2019-03-03 14:40:07 -08:00
Eric House
cec379bd02 remove logging and reformat: no change 2019-03-03 14:11:44 -08:00
Eric House
1575d70ab9 return supported types as list, not set
I was seeing them displayed in different orders where I want to control
the order instead.
2019-03-03 14:07:40 -08:00
Eric House
8336a338f8 use constant APPLICATION_ID instead of method call 2019-03-03 11:39:10 -08:00
Eric House
cae90c4c07 remove some logging 2019-03-03 11:39:10 -08:00
naofum
09affc451d
Translated using Weblate (Japanese)
Currently translated at 75.9% (580 of 764 strings)
2019-03-03 11:17:45 +01:00
Eric House
4cbfde6d95 make setActionPair work for confirmThen alerts too
(To be used shortly)
2019-02-28 16:03:46 -08:00
Eric House
415ce0f5a2 recast SMSService as a JobIntentService
Didn't think it was required, but once the app started getting messages
in the background it stoped working or crashed. Changes are minimal
because this service isn't responsible for receiving messages: it
doesn't have the long-lived threads of the BT and Relay services.
2019-02-27 07:25:33 -08:00
Eric House
20cd99f73b add debug-only checking for thread safety
Lots of threads call the smsproto code now so the existing check was
failing. Replace it with one that ensures that only one thread at a time
is running the code. Debug-builds only.
2019-02-27 07:13:38 -08:00
Eric House
5207de564a Let's test this jitpack stuff on Travis
Importing a library but not using it yet
2019-02-26 21:33:39 -08:00
Eric House
b0d3383c28 more data with my SMS
And catch an exception starting SMSService in background
2019-02-26 21:27:31 -08:00
Eric House
6eb6038935 make result -1 if will otherwise trip asserts. 2019-02-26 18:46:55 -08:00
Eric House
ac0fe68ee0 logging toward finding who's sending or reporting 0 2019-02-26 15:03:55 -08:00
Eric House
5f167e2a5e pull nbs port-checking over from NBSProxy 2019-02-26 14:43:26 -08:00
Eric House
d1881e7fc4 logging toward tracking a rare assertion failure 2019-02-26 14:33:18 -08:00
Eric House
33491a5376 add extra explanatory text to phone number invite dialog
Set different expectations based on whether the invitation's by NBS or a
launch of the messaging app.
2019-02-26 12:25:17 -08:00
Eric House
c78a3afb36 distinguish between NBS and SMS
What I've been calling SMS is now "data sms" (or "nbs", in
code). There's a new way of inviting, called "User Sms" or somesuch,
that launches the user's SMS app with a URL and phone number, much like
email (save that no addressing is required by the inviter.) This new way
won't be involved in the ban on SMS permissions. (But play by NBS is
still awesome and will stay where it can.)
2019-02-26 11:28:37 -08:00
Eric House
22711e75a5 that's already done 2019-02-23 20:55:31 -08:00
Eric House
92dde5332a put back the nbs port 2019-02-23 17:32:03 -08:00
Eric House
b6551abd2f some cleanup, e.g. to assert my signals are valid 2019-02-22 21:25:26 -08:00
Eric House
97eb6018d9 comment out dead code I keep reading 2019-02-22 19:59:55 -08:00
Eric House
956e9c540f fix valgrind-noted empty array cruft. 2019-02-22 19:29:56 -08:00
Eric House
1e0db1fca7 fix defines and compile that then broke 2019-02-22 17:55:09 -08:00
Eric House
e1d05207b4 new version code to replace bad upload 2019-02-21 21:33:57 -08:00
Eric House
bad3274c9c fix broken noSMS variant
needed SMS permissions in a new xw4 manifest
2019-02-21 21:30:59 -08:00
Eric House
283bf2e285 remove SMS_BANNED stuff for now 2019-02-21 11:28:13 -08:00
Eric House
7df3d6ad9f up changelog 2019-02-21 10:51:11 -08:00
Eric House
f72a88f46e exit thread when BT turned off
(The test was in the thread this replaced.)
2019-02-21 10:45:50 -08:00
Eric House
cf8fe20e48 put back SMS permissions
March 9's the deadline, so let's not remove it yet!
2019-02-21 10:24:02 -08:00
Eric House
7d48fdd00a make packet accumulator a thread that sends
Get rid of the single sender thread and the complexity of querying
individual queues for their state (and the slowdown that happened when
successful writes had to wait for those to devices that weren't
responding). Instead each PacketAccumulator does its own waiting with
timeouts and backoffs, wakes itself when appropriate, and periodically
sends if it can make a connection. Now when there are a bunch of
messages ready they'll get sent pretty quickly once connections to the
remote device start to be successful.
2019-02-20 21:54:51 -08:00
Eric House
89338f43dc each message gets a localID so logs can show progress
And rewrite toString()
2019-02-20 12:50:29 -08:00
Eric House
3e1503e6a6 add another DeadlockWatch (and import already) 2019-02-20 12:20:39 -08:00
Eric House
c822f4b1a6 put Killer back: device can receive but never process
A device where the OS isn't servicing enqueueWork() requests won't write
back to sockets it accept()s, causing the sender's writer to block
forever. So give it 30 seconds then kill the socket.
2019-02-20 11:22:51 -08:00
Eric House
274e7c6c4b fix NPE (by inspection, from crashlytics report) 2019-02-20 10:38:27 -08:00
Eric House
c2a4c07746 don't enqueue dupes of messages already in queue
No point in giving a spot to something the receiver will drop as a
duplicate.
2019-02-20 10:29:24 -08:00
Eric House
87a27e7630 update status more often (as old code did) 2019-02-19 21:25:28 -08:00
Eric House
1a6b325722 fix concurrent access exception and too-slow sends
if we successfully send, we should reset the backoff so we try again
quickly. Especially at a time when only one message is sent per connection.
2019-02-19 21:25:28 -08:00
Eric House
76e8876df2 change key to force new value
fixes what was probably a crash only for me, but....
2019-02-19 21:25:20 -08:00
Eric House
68db5145ec report invitation success even if dict download needed 2019-02-19 20:56:24 -08:00
Eric House
d33593339f use https scheme for dict downloads 2019-02-19 20:55:31 -08:00
Eric House
e970659b9d Move back to old one-msg-per-connect() model
Add support for the old protocol, and define to use it. After the next
release has been adopted and everybody can read the new protocol another
release will turn it on.
2019-02-19 18:31:20 -08:00
Eric House
1d0ed70f9c add not-again checkbox to BAD_BT_PROTO dialog
Won't help the old-build side of the exchange of course.
2019-02-19 08:56:58 -08:00
Eric House
a38a31837b prune only those messages successfully sent
Fix race condition that would have cleared all messages including those
added after a send began. In the process, move to storing outbound
messages individually rather than concatenated in their stream format.
2019-02-19 08:31:49 -08:00
Peeter Angelo
54c0443856
Translated using Weblate (Czech)
Currently translated at 14.5% (111 of 764 strings)
2019-02-19 10:10:21 +01:00
Eric House
ff5d25a53c add alert to launch app when OS not scheduling service
Set a boolean every time app's upgraded, and clear it on first launch of
MainActivity. In between, if we try to launch the BTService but the OS
doesn't schedule it, post a notification asking user to launch the app.
2019-02-18 22:12:43 -08:00
Eric House
4c9f619a19 exit threads when BT off; add util to report deadlocks
I've seen a deadlock in the BT stuff. Now they'll be caught and reported
via Crashlytics on DEBUG builds.
2019-02-17 12:49:17 -08:00
Eric House
276abe6441 always increment failure count on send failure 2019-02-16 10:07:29 -08:00
Eric House
b5659f0e5c Rewrite BT proto to batch messages
Lots of changes. Old BT proto is no longer compatible. New one
batches messages per device and sends all on a single connection.
The queue (now a single buffer) is now a static global and the thread
that services it doesn't die (but gloms onto whatever Service instance
is most recent.) Code to pack and unpack the protocol can probably be
reused for wifi-direct or any other pass-through transport.
2019-02-16 09:07:20 -08:00
Eric House
4f4deec7ba replace some firing asserts with log messages
I'm getting crashes on a device with an iffy wifi connection and no SIM.
May need to look into these.
2019-02-16 07:28:14 -08:00
Eric House
41aef60878 don't open game just because it was created
Posting a notification is enough. And existing code already handles the
missing dict case, so GamesListDelegate doesn't even need to know.
2019-02-13 08:46:06 -08:00
Eric House
01533e6897 double scan progress time
Since the BT stuff tends to timeout late when failing, this looks better.
2019-02-13 07:29:18 -08:00
Eric House
273e66fd07 add env to map immediately, in initGame()
I'm seeing an assertion failure in cleanup that could be explained by
the cleanup happening when initGame() has been called but no subsequent
jni method that would have added the env to the map. So let's add it
immediately so that can't happen.
2019-02-13 07:13:54 -08:00
naofum
bd631db7d2 Translated using Weblate (Japanese)
Currently translated at 74.3% (568 of 764 strings)
2019-02-12 18:40:16 -08:00
Eric House
0a5d74ab2f unselect any game moved into a closed group
Fixes GameOver game moved via "archive" checkbox remaining selected
2019-02-12 18:14:57 -08:00
Eric House
b5ff337381 don't move selected games via context menu
Both ways of invoking move-to-group were working on the set of selected
games. Instead pass what's meant to be operated on as a parameter.
2019-02-12 07:51:21 -08:00
Eric House
0f8e55a260 put GameOver view layout into a ScrollView
When device in landscape the archive box is otherwise unreachable on a
four-player game
2019-02-12 07:47:57 -08:00
Eric House
eafe6cd06f make GamePtr AutoCloseable and use where possible 2019-02-12 06:13:36 -08:00
Eric House
b1a4b1a030 Make JNIThread autoclosable and use everywhere
JNIThread is somehow sticking around sometimes and holding the lock for
a game so that that game can never be opened again. On the theory that
there's some place retain() was called but not release(), use the thing
in try-with-resources wherever possible. Which is pretty much
everywhere.

Also added age to the lock-holder report being uploaded.
2019-02-11 20:39:17 -08:00
Eric House
9fe01047b1 include stack of lock owner when logging failure to lock 2019-02-11 07:52:22 -08:00
Eric House
88838d6c0c Fix NPE when url for delete game has changed
I think it's only an issue for debug builds where I've manually pointed
at a different server, but just in case.
2019-02-11 07:32:17 -08:00
Eric House
ec4711f3ba make text in new GameOver alert bigger
To match how it was when using the system-provided view.
2019-02-11 07:29:34 -08:00
naofum
67cc88ea4e
Translated using Weblate (Japanese)
Currently translated at 74.3% (568 of 764 strings)
2019-02-11 12:09:26 +01:00
Eric House
7f2e3207be report stack of lock owner to crashlytics when can't get it
I'm seeing something permanently lock a game so it can't be opened. So
add code to report the stack of the owner to Crashlytics when opening
fails 3 times in a row. It's stubbed out for non-debug builds.
2019-02-10 20:02:43 -08:00
Eric House
813cf4f961 Add custom GameOver alert for GameOver with Archive checkbox
I didn't like having to re-open a game to archive it after
rematching, so now there's a checkbox that lets you archive it after
either rematching OR just using OK to dismiss the alert. Also fixed
rematch of a solo game causing new game to be created in Archive
group if that's where the source game was.

squash me
2019-02-10 14:22:22 -08:00
Eric House
ab69cd8b1f Merge remote-tracking branch 'weblate/android_translate' into android_translate 2019-02-10 09:01:14 -08:00
Eric House
d53ea5c433 up copyright year 2019-02-09 16:16:54 -08:00
Eric House
2eaf86ed14 add git rev to crashlytics reports 2019-02-09 11:13:32 -08:00
Eric House
01d74e91de plug leak 2019-02-08 22:29:18 -08:00
Eric House
8f6745a308 avoid crashes when BT turned off
Test at enqueueWork() and onHandleWorkImpl(). Seems to do it. Maybe
turning it off mid-send will still crash...
2019-02-08 22:22:03 -08:00
João Vitor Ferreira Cavalcante
cfc9466efd
Translated using Weblate (Portuguese)
Currently translated at 51.6% (394 of 764 strings)
2019-02-09 02:09:26 +01:00
Eric House
30f70db59b don't create threads we won't use 2019-02-08 14:37:58 -08:00
Eric House
6b449bb079 null listener thread ref so will be restarted
Once it died it stayed dead: bad.
2019-02-08 14:11:35 -08:00
Eric House
3023ae1af6 cleanup 2019-02-08 13:48:40 -08:00
Eric House
fe721edb97 Recast BTService as a JobIntentService
Got tired of the space the forground-service notification icons were
taking. So now BT sends and receives are done via static threads and
onHandleWork(). The send thread times itself out quickly. The receive
thread doesn't yet. We'll see how long the OS lets it run and what
needs to be done to deal with that.
2019-02-08 13:23:07 -08:00
Eric House
e6b59ea11d add debug-only option for invitee players to be robots
It's useful when testing to have the remote device play without human
interaction. So add an option, and UI to trigger it, for the players
created remotely in response to an invitation to be robots. There are
guards in place to catch the feature slipping into a release build.
2019-02-07 08:17:54 -08:00
Eric House
c97e167e1e remove some logging 2019-02-06 22:55:31 -08:00
Eric House
ff45340eb8 remove methods overridden just for logging
looks like I've fixed the crash I wanted to diagnose.
2019-02-06 22:37:52 -08:00
Eric House
9a4fb44e72 fix relay interactions again
Eliminate the writer thread, since onHandleWork() is already getting
called on a thread and can process the outbound queue itself. And get
rid of reader thread needing to wait for an instance of the RelayService
to be available to process a packet (which was taking 5-10 seconds all
the time): just post received packets via an enqueueWork() call using
the app context that's always available.
2019-02-06 22:32:46 -08:00
Eric House
e62e51f9cd pass context and use to post lock-failure toast 2019-02-06 19:43:54 -08:00
Eric House
f5c9962b66 tweak/reduce logging 2019-02-06 19:36:17 -08:00
Eric House
895b19a097 move constant from XWApp to build.gradle 2019-02-06 10:44:21 -08:00
Eric House
f92b0d7ac0 avoid NPE (and log to root-cause it later) 2019-02-06 09:06:25 -08:00
Eric House
ab0469fe39 ensure writer gets run every time OS schedules via onHandleWork() 2019-02-05 09:58:39 -08:00
Eric House
bf2ab49c20 remove some logging 2019-02-05 09:37:39 -08:00
Eric House
bd35503daa fix NPE and let GameSummary stay until replaced
GameListItem was clearing its summary when kicking off a replacement
load. Instead keep the old around in case somebody wants it (e.g. to
figure out what menus to enable) until the reload finishes.

Also add logging of how long loading takes. I think a cache might be
called for.
2019-02-05 07:44:16 -08:00
Markus Enzenberger
7d8c013492
Translated using Weblate (German)
Currently translated at 100.0% (764 of 764 strings)
2019-02-05 10:09:17 +01:00
Eric House
38f0fc6fd1 move invite button above button bar.
(It's more frequently used)
2019-02-04 17:56:23 -08:00
Eric House
64c6d03392 add context comment for new string 2019-02-04 17:33:03 -08:00
Eric House
908f5a64e7 Merge branch 'android_branch' into android_translate 2019-02-04 17:28:06 -08:00
Eric House
ce03ab7532 cleanup via new macro 2019-02-04 14:38:40 -08:00
Eric House
3810d11e26 remove logging 2019-02-04 14:27:43 -08:00
Eric House
e1f03662c3 fix malformed xml string
Weblate bug?
2019-02-04 13:35:34 -08:00
Eric House
bdf1bd3b84 fix problems with RelayService
Darned thing was dropping packets, failing to connect games built in
response to invitations, and otherwise misbehaving. First was due to not
resheduling when exited with outbound packets in queue; second to not
overriding relayNoConnProc() (due to signature change.) Though it still
happens occasionally.... Also added timestamps to track how long it
takes a packet to be sent and ACK'd.
2019-02-04 13:28:05 -08:00
Eric House
328440abc3 add rowid to NoSuchGameException 2019-02-04 08:58:50 -08:00
Eric House
5886a97a53 fix NPE (and tweak logging) 2019-02-03 10:36:54 -08:00
Eric House
74cf4b0974 add flavor to toasted got-fcm message
So I can tell the apps apart
2019-02-02 22:39:57 -08:00
Eric House
e98519ea38 stop storing fcm keys and similar data in postgres arrays
Not sure why I was doing this, but it's not worth the
trouble (e.g. stopping updates of other data to fix an android bug
sending too many reregistration messages.) So now just use the first
element of arrays, replacing what's there instead of prepending. Ideally
those columns would not be arrays, but that's a harder change.
2019-02-02 21:49:50 -08:00
Eric House
23fe3a1dd6 make script executable 2019-02-02 15:50:17 -08:00
Eric House
49ef455e50 display latest FCM receipt as part of netstats for relay 2019-02-02 15:18:45 -08:00
Eric House
be6b74ab12 use a constant jobID for enqueueWork()
That each VM instance had a different id might be why I was
crashing. We'll see.
2019-02-02 13:35:38 -08:00
Eric House
4a335522d2 fix so success detected from new API 2019-02-01 20:51:07 -08:00
Eric House
b8dafb8178 remove debug-only assert I'm seeing
Good to know it's happening; now don't crash!
2019-02-01 19:39:23 -08:00
Eric House
1a3aa9f8d1 put back pref controlling whether FCM receives are Toasted 2019-02-01 19:27:12 -08:00
Eric House
9f7899cd7c make md5sum calculation available everywhere
I want to log sums to see when they arrive on relay. And also add some
missing @Overrides I noticed.
2019-02-01 17:01:32 -08:00
Eric House
236be21a78 put up toast when FCM message received
It's too useful to live without. So: tap into the static list of live
Delegates, and if any of them has an Activity available use it to run
Toast on UI thread. Otherwise there will be no display.
2019-02-01 16:49:12 -08:00
Your Name
cd777f3b9c pull and display new field 2019-02-02 00:20:35 +00:00
Eric House
c0783fba16 don't save duplicate devIDs
There's likely a bug in Android now where I'm registering over and
over though the fcm id hasn't been changed. That's wrong, but it's
also wrong (and filling up the db) to register a duplicate as if it
were new. So stop that.
2019-02-01 12:13:05 -08:00
Eric House
f6895aacff make https the default for prefs-alterable strings
And change the keys so all local changes get reset
2019-01-31 15:22:25 -08:00
Eric House
48c331fd56 use https everywhere. And rewrite URLs if necessary. 2019-01-31 12:57:31 -08:00
Mesut Akcan
8cd31b1250
Translated using Weblate (Turkish)
Currently translated at 0.8% (6 of 764 strings)
2019-01-31 14:09:09 +01:00
Mesut Akcan
c6ac53cb3f
Added translation using Weblate (Turkish) 2019-01-29 22:44:02 +01:00
Eric House
4c2e17064c add some logging around RelayService lifecycle 2019-01-29 11:15:46 -08:00
Eric House
e04f8d7fba fix just the warnings; VSIZE is safe 2019-01-29 09:15:56 -08:00
Eric House
15a2897112 Revert "toward compiling with gcc8"
This reverts commit d293517e7c.
2019-01-29 09:05:54 -08:00
Eric House
d293517e7c toward compiling with gcc8
My VSIZE is no longer legal, and apparently there's no workaround (no
way to safely figure the length of an array whose size is known at
compile time.) To avoid the risk of duplicating little constants, added
macros that define length in a way a new VSIZE can pick it up. Couldn't
make that work for struct field arrays, however, so there I'm using
constants.
2019-01-28 17:24:53 -08:00
Eric House
b616f79cfd remove the last critical error 2019-01-27 09:23:56 -08:00
Eric House
f7b6d30dc2 fix another critical warning 2019-01-27 09:12:58 -08:00
Eric House
2b5b4ba982 fix gtk critical errors 2019-01-27 08:46:51 -08:00
Eric House
a14b43bba0 communicate variant to relay, and store in new column 2019-01-27 06:31:21 -08:00
ssantos
8716832999
Translated using Weblate (Portuguese)
Currently translated at 51.6% (394 of 764 strings)
2019-01-27 10:04:36 +01:00
Eric House
316bf0060b fcm config file for xw4 variant 2019-01-25 11:36:24 -08:00
Eric House
96ad615a73 remove debug toast that can't work from that class 2019-01-25 09:24:21 -08:00
Eric House
b4096de8ca rewrite of gcm_loop.py to use FCM
Works on my test VM. Untested on production.
2019-01-25 09:21:37 -08:00
Eric House
a4152239f6 remove sms permissions from play store variant
and from a new debug variant so that can be tested. Add explanation to
be shown users who try to use the now-unavailable features.
2019-01-24 18:45:24 -08:00
Eric House
88a440acc3 add app-side support for firebase messaging
Works for xw4d variant only so far -- xw4 builds are broken!!!
2019-01-24 18:20:01 -08:00
Eric House
4ee76c72a6 add variant option to build scripts
xw4 won't build for a while...
2019-01-24 17:59:50 -08:00
Hosted Weblate
e20be83a58
Merge branch 'origin/android_translate' into Weblate. 2019-01-22 09:21:13 +01:00
Allan Nordhøy
fc9d1d2346
Translated using Weblate (Norwegian Bokmål)
Currently translated at 85.7% (655 of 764 strings)
2019-01-22 09:21:12 +01:00
Allan Nordhøy
4b8f39552f
Translated using Weblate (English)
Currently translated at 100.0% (764 of 764 strings)
2019-01-22 09:21:09 +01:00
Eric House
fb5fee3483 tweak string 2019-01-21 21:48:58 -08:00
Bernard Massot
6af47f9bc2 Translated using Weblate (French)
Currently translated at 97.6% (746 of 764 strings)
2019-01-21 21:48:58 -08:00
Louies
f45e001e7a Added translation using Weblate (Chinese (Traditional)) 2019-01-21 21:48:57 -08:00
Eric House
506ddc8f7a fix logic error in permissions callback
Somehow I forgot what params were and decided that array's length needed
to match another's.
2019-01-21 20:44:16 -08:00
Eric House
06fe5894b9 fix invitations creating a second activity stack
Looks like certain launches that went through DispatchNotify could
create a second "instance" of the app. Giving that Activity a launchMode
of singleTask fixes this (singleTop does not.)
2019-01-21 18:57:38 -08:00
Eric House
51c7752830 use same launch flags for all self-launches
Launching a game in response to a wordlist it needing being downloaded
went through a different Intent-creation path from the rest, and
resulted in a second instance of the app showing in the launcher. This
shoudl fix that. I don't *think* it's the only way I'm getting second
instances or stacked GamesLists, but it should get fixed.
2019-01-21 18:57:38 -08:00
Eric House
52d983e0d8 assert (on DEBUG builds) that MainActivity is never sublaunched
I think this might help catch the instance duplication I'm seeing very
rarely.
2019-01-21 18:57:38 -08:00
Bernard Massot
41f5c6afa2
Translated using Weblate (French)
Currently translated at 97.6% (746 of 764 strings)
2019-01-20 16:19:53 +01:00
Eric House
0754e0db8e remove hard-coded assumption about apk name
So can use the thing to sign-and-install local fdroid builds
2019-01-18 17:46:02 -08:00
Eric House
837ff1f8fc Give each variant a name, and include in About alert.
I modified existing translated strings, adding the new clause. Not doing
that would cause the existing strings to be stripped because they'd no
longer have the matching set of format specifiers.
2019-01-18 16:45:27 -08:00
Eric House
f072736bb8 need to call doResume() twice
Calling it only once on acquiring lock where before it'd been called
twice meant ConnStatusHandler never got initialized. Bad.
2019-01-18 07:32:58 -08:00
Eric House
4878afb185 remove misplaced assert 2019-01-18 06:51:23 -08:00
Hosted Weblate
03b9b3e499
Merge branch 'origin/android_translate' into Weblate. 2019-01-18 13:59:52 +01:00
Eric House
ae56f23f66 remove misguided Assert that's firing 2019-01-17 15:16:54 -08:00
Eric House
026d6d5c5e Change GameLock API (should be no behavior change) 2019-01-17 12:46:51 -08:00
Eric House
f436090c6f install listeners immediately after setting them
Fix a race condition introduced by making initing jnithread be
asynchronous: all the layout that was supposed to happen after listeners
were added instead happened before, so that they weren't there to be
installed as part of layout. So now, after adding them, get them hooked
up to the UI. (The complexity of this is all historical: at some point
the listeners were getting added BEFORE there were views to attach them
to, so they were cached and added later. Probably now they could simply
be installed as part of adding them. But I'm not doing that now.)
2019-01-17 12:28:01 -08:00
Eric House
95df560a40 update changes: sms will be ripped out alas. 2019-01-17 08:51:13 -08:00
Eric House
385f98f038 check for null 2019-01-16 22:17:54 -08:00
Eric House
d94217cc06 Make Board wait a bit for lock on opening
Was seeing frequent failure to open games as JNIThread.getRetained() was
unable to get a lock without waiting. Which it can't do on UI thread. So
added a method to GameLock that takes a callback to be called when the
lock's obtained, with the actual waiting done on a local thread. Then
fixed BoardDelegate a bit to not crash while waiting for the callback.
2019-01-16 21:45:39 -08:00
Eric House
a8872df5ed cleanup: I like the call-chain style better these days 2019-01-16 20:32:44 -08:00
Eric House
20359e50da log GameLock failure only when it's a result 2019-01-16 13:24:46 -08:00
Eric House
4c9ded77bf assertion says had race condition; fix it
Use a set instead of a singleton so a late clear doesn't overwrite an
early set.
2019-01-16 11:31:54 -08:00
Eric House
a93b1da6fa up client version
Will allow to distinguish on relay what clients can receive GCM.
2019-01-16 11:14:35 -08:00
Eric House
ddf12b6523 resend all when come to foreground 2019-01-15 22:13:46 -08:00
Eric House
c611919876 check for moves when come to foreground 2019-01-15 14:34:50 -08:00
Eric House
e61d7a5629 remove GCM -- crashes when invoked from server!
Once built for SDK 26 the old GCM support code crashes as it's calling
startService() from background. Duh! Will have to bring in Firebase's
replacement at some point. For now if I'm to release it has to be
without GCM.
2019-01-15 14:18:20 -08:00
Eric House
43b979ff46 cleanup: logging and method rename 2019-01-15 12:29:45 -08:00
Eric House
cf3d3bc156 cleanup from review of diffs (nothing significant) 2019-01-15 07:44:38 -08:00
Eric House
73a469a428 make logging respect force-on preference 2019-01-14 16:58:00 -08:00
Eric House
788113ee28 up versions strings for new release 2019-01-14 13:12:39 -08:00
Eric House
c976b3f595 show BT-troubleshooting hint when scan finds no devices 2019-01-14 12:20:27 -08:00
Eric House
23e58524a1 in invite dialog, confirm before deleting BT devices 2019-01-14 12:08:07 -08:00
Eric House
0da5d9dd28 improve gcm-debug toast message 2019-01-13 21:56:59 -08:00
Louies
1328f1a9a4
Added translation using Weblate (Chinese (Traditional)) 2019-01-13 14:15:27 +01:00
Eric House
e378647e36 put back explanatory progress text 2019-01-12 09:04:40 -08:00
Eric House
bfbf17252e use ProgressBar instead of Dialog for BT invite scans
I wanted to show progress, and it was just as easy to replace the
deprecated ProgressDialog as to add a timer to the thing.
2019-01-11 21:06:15 -08:00
Eric House
bdbd5bc1ee disable logging for tagged release builds 2019-01-09 20:00:20 -08:00
Eric House
1625ec9062 Merge branch 'android_branch' into android_translate 2019-01-09 19:03:21 -08:00
Eric House
48a9e830b8 remove empty string -- not legal 2019-01-09 19:02:29 -08:00
Eric House
d2cbcf1e71 tweak BT background notification icon and expl. text
The BT icon part was too thick. And the explanation was TMI.
2019-01-09 18:57:50 -08:00
Eric House
d257369639 use same invite prefix for all variants
I want to be able to invite one app to the other's games to better test
relay. Since I'm the only one using the Dbg variant should be no impact.
2019-01-09 18:25:52 -08:00
Eric House
011825e4a9 cleanup 2019-01-09 18:18:27 -08:00
Eric House
302a3a5025 accept invite even if same-gameID game open
more dev-only code, likely: if the game that's sending the invitation is
open when the invitation arrives, should still check if it's a dupe or
should be accepted.
2019-01-09 09:51:15 -08:00
Eric House
250583caea log when invite response comes back 2019-01-08 20:34:22 -08:00
Eric House
a665df7840 cleanup: test's done already 2019-01-08 20:31:27 -08:00
Eric House
f18a957ed5 kill progress when owner view goes away
BT Invite progress was sticking around when Board left because it wasn't
foreground.
2019-01-08 20:31:27 -08:00
Eric House
2c73f4ca77 don't handle duplicate invitations in DEBUG case
Was creating a second game in some cases in response to duplicated
invitations. Add a test for forceChannel: if there's already a game with
the same gameID *and* forceChannel assume the invitation is a dupe and
drop it.
2019-01-08 20:02:01 -08:00
Eric House
e0f4a028d1 remove a bunch of unused methods 2019-01-08 19:42:44 -08:00
Eric House
24fad52cd8 use second resolution in bt device display
Useful to see that a scan really did just happen
2019-01-08 11:52:31 -08:00
Eric House
7c7b80deae add net-stats dialog to log-tap games menu
So I don't have to open a game to see e.g. how it's connecting, refactor
the network status stuff so it can be called from both board and
gameslist views. Then add new context menuitem that calls it.
2019-01-08 11:37:57 -08:00
Eric House
e9e03a06a3 show toast when GameLock fails to lock (some cases) 2019-01-08 10:09:43 -08:00
Eric House
4fcc5fd99b turn off faker device (but make easy to enable) 2019-01-08 09:49:10 -08:00
Eric House
c87161307c When rematching an Archived game save in default new-game group 2019-01-08 09:41:23 -08:00
Eric House
db641c4664 log gameSeed; generate on linux too
I'm seeing a rare case where a game connectes to relay specifying a room
and somehow gets both slots, having provided different gameSeeds the two
times. This means an opponent won't connect, the room being full in that
game. I can't reproduce, so am logging seed changes better and switching
linux client to leave seed generation to comms as Android does.
2019-01-08 08:16:50 -08:00
Eric House
454e3da578 fix to compile when #define not defined 2019-01-08 07:41:22 -08:00
Eric House
7cccd1a1e6 make the fake result random 2019-01-06 17:12:11 -08:00
Eric House
59f1e1696e remove unused constant (enum) 2019-01-06 17:04:36 -08:00
Eric House
0953772673 cleanup: don't need wrapper around a List<> 2019-01-06 16:58:30 -08:00
Eric House
2a845da9b6 use List instead of array 2019-01-06 16:29:52 -08:00
Eric House
83340567b2 add and implement remove button for btinvite dialog 2019-01-06 15:20:36 -08:00
Eric House
853578eb7d don't drop known BT devices on every scan
Instead, keep them forever (for now), sorted by how long since they were
last seen. A Delete button's probably needed to prevent ex-partners from
sticking around too long. :-)
2019-01-06 14:34:43 -08:00
Eric House
c7f9fc465f persist and display most recent scan time 2019-01-06 13:40:49 -08:00
Eric House
2f508c0b5c persist BT invitee dev scan results
Only launch the scan automatically when the persisted list is empty.
2019-01-06 12:30:31 -08:00
Eric House
3a0e67c7b3 remove unreachable code 2019-01-06 12:05:30 -08:00
Eric House
d868fef0d2 revert space-only change 2019-01-06 12:04:51 -08:00
Eric House
aecce2826e revert change making userError() take an enum
The set's open-ended on the C side, meaning that an int can't be
converted to an enum reliably. Yay for asserts that caught this.
2019-01-06 11:12:59 -08:00
Eric House
5da32d93f7 fix double-launch of SMSInvite activity
Adding a second permission a while back resulted in two Actions being
received and acted on. Needed instead to group the two and receive a
single Action IFF both were granted.
2019-01-06 10:58:12 -08:00
Eric House
5a64b3b92f Fix problems inviting SMS on emulator
Likely no-ops on real devices
2019-01-06 08:59:38 -08:00
Eric House
105e8e2623 add logging
Keep some stuff added to debug problem with dict checksums on server.
2019-01-05 18:54:48 -08:00
Eric House
cace99818d remove dead code 2019-01-05 18:48:26 -08:00
Eric House
3cf8d7571b fix md5sum calc for non-utf8 wordlists
And use apache logging
2019-01-05 18:46:58 -08:00
Eric House
e77b830157 replace assert with what it was to remind me to add 2019-01-01 19:43:44 -08:00
Eric House
e30497f336 catch another exception 2018-12-29 19:56:56 -08:00
Eric House
5a7d5b80da punctuation 2018-12-29 19:52:11 -08:00
Eric House
4a90792dec If game's in Spanish, don't require 7 tiles for trade.
Put up an error message if too many tiles selected for trade
(a condition that couldn't exist when the pool was guaranteed to
have at least 7 in it.) (It's a hack: there's not even an enum
giving Spanish's code, and the lang_locale stuff in info.txt isn't
making it into the .xwd format.)
2018-12-29 18:47:48 -08:00
Eric House
e9ae36f68d fix invite via relayID (linux test app)
I broke it adding SMS invite support?
2018-12-29 07:41:03 -08:00
Eric House
e58f51a523 log, rather than toast, too-frequent debug message 2018-12-28 07:15:40 -08:00
Eric House
bdd92baf55 fix NPE when game isn't connected yet 2018-12-28 07:09:15 -08:00
Eric House
37a853c8a4 oops: use the first *remote* address 2018-12-27 22:10:24 -08:00
Eric House
320db700a9 add opponent address to net stat display
(Debug builds only)
2018-12-27 19:30:34 -08:00
Eric House
24386bd8c9 catch uncaught exception 2018-12-27 18:09:18 -08:00
Eric House
b0805b0b6a use tryLock() to avoid on-ui-thread assertions 2018-12-26 21:41:47 -08:00
Eric House
62cd90c183 remove unused interface 2018-12-26 17:45:42 -08:00
Eric House
0e2af6a836 rewrite GameLock to use wait()/notifyAll()
I've learned a bit about java since writing that class. Should be faster
now without the sleep/polling. Also making it illegal to use blocking
lock() call on UI thread. There may be some assertions to fix in the
next few days.
2018-12-26 17:41:21 -08:00
Eric House
891c73a1b7 make run() wait for gamePtr before starting loop
Was seeing race condition on slowest device where JNIThread init hadn't
finished before the event loop tried to use the gamePtr. So use
wait()/notifyAll() to fix.
2018-12-18 07:07:35 -08:00
Eric House
285f6ad34a revert diagnostic changes 2018-12-17 12:57:17 -08:00
Eric House
e10b17cec0 remove logging; diagnose git/travis problem 2018-12-17 12:35:40 -08:00
Eric House
5467941d45 start stuff when package replaced
And: Don't start the foreground service with its user-visible
notification, as that's too obtrusive and the ACL_CONNECTED stuff seems
to work well enough. Launching timers on a new install is mostly for my
own dev use, but won't hurt user experience either.
2018-12-17 08:26:39 -08:00
Eric House
d8d0065e90 remove some logging 2018-12-17 08:26:00 -08:00
Eric House
3b48ee0ed8 try a different command 2018-12-16 18:48:06 -08:00
Eric House
a2fe00368e more diagnosis 2018-12-16 18:11:09 -08:00
Eric House
b88bbcf443 diagnosing travis build problems 2018-12-16 17:53:18 -08:00
Eric House
d31c2f5513 trying another fix for travis 2018-12-16 17:43:12 -08:00
Eric House
3b0a523499 send successful pings back as they occur
rather than have the user see no feedback until the slowest-to-respond
paired device times out.
2018-12-16 13:34:28 -08:00
Eric House
2d91c133a8 new file (forgotten earlier) 2018-12-16 10:41:04 -08:00
Eric House
67fa27069a add a hint for when scan shows nothing 2018-12-15 07:20:29 -08:00
Eric House
e3f862a6eb shorten timeout for scan/ping 2018-12-15 07:07:54 -08:00
Eric House
e15fb84005 ask for SMS_RECEIVE on startup if have SMS_SEND
It's free (same group) but required on SDK_26 for invitations to work.
2018-12-14 19:33:03 -08:00
Eric House
f7ef1adcb5 add settings button to foreground service notification
On O and beyond it's possible to tweak notification channels separately,
meaning users can hide the new BT-is-running notification and still get
game event notifications. So add a button that takes you to the right
Settings app page.
2018-12-14 17:12:15 -08:00
Eric House
02897f6e36 use separate channel for background service notification
Since on newer OS versions users might want to hide it
2018-12-14 16:00:36 -08:00
Eric House
2ab04901a7 scan all paired devices at same time
One thread per device: brute force, but the threads live a few seconds
and the user just triggered the action so should be ok with it.
2018-12-12 22:32:14 -08:00
Eric House
61dc8e837e cleanup 2018-12-12 22:21:02 -08:00
Eric House
c2f5949623 use AutoCloseable rather than a hack of my own 2018-12-11 15:14:51 -08:00
Eric House
f7258f29e8 saw a crash, so gather more info if it happens again. 2018-12-11 14:40:57 -08:00
Eric House
68bb8a1268 fix bluetooth bootstrapping
Separate processing of sockets from accepting them so that when an ACL
CONN notification is received and we open a socket (but don't yet have a
Service running because the ACL thing is most likely for some other app)
we can set it aside to be processed once we do have a service. Use the
same block-until-non-null thing as in RelayService to keep that thread
free of NPEs.
2018-12-11 14:38:40 -08:00