Commit graph

11394 commits

Author SHA1 Message Date
Eric House
bec37536f6 more data with my SMS
And catch an exception starting SMSService in background
2019-06-23 10:14:16 -07:00
Eric House
713d2e5634 make result -1 if will otherwise trip asserts. 2019-06-23 10:13:32 -07:00
Eric House
c05d8c43d2 logging toward finding who's sending or reporting 0 2019-06-23 10:13:32 -07:00
Eric House
89a5ccf4bc pull nbs port-checking over from NBSProxy 2019-06-23 10:13:32 -07:00
Eric House
7bee8120a8 logging toward tracking a rare assertion failure 2019-06-23 10:13:32 -07:00
Eric House
8fb1a8405a 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-06-23 10:13:32 -07:00
Eric House
13b789847c 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-06-23 10:13:32 -07:00
Eric House
15a1dad5ea that's already done 2019-06-23 10:13:31 -07:00
Eric House
a187fdca64 put back the nbs port 2019-06-23 10:13:31 -07:00
Eric House
a3d6dc809b some cleanup, e.g. to assert my signals are valid 2019-06-23 10:13:31 -07:00
Eric House
d5e68141bd comment out dead code I keep reading 2019-06-23 10:13:31 -07:00
Eric House
0ad1697607 fix valgrind-noted empty array cruft. 2019-06-23 10:13:31 -07:00
Eric House
8be4bd5f51 fix defines and compile that then broke 2019-06-23 10:13:31 -07:00
Eric House
27e33dda62 new version code to replace bad upload 2019-06-23 10:13:31 -07:00
Eric House
a400a62753 fix broken noSMS variant
needed SMS permissions in a new xw4 manifest
2019-06-23 10:13:31 -07:00
Eric House
f5d92735be remove SMS_BANNED stuff for now 2019-06-23 10:13:31 -07:00
Eric House
3a41be0051 up changelog 2019-06-23 10:13:31 -07:00
Eric House
9baffc93e3 exit thread when BT turned off
(The test was in the thread this replaced.)
2019-06-23 10:13:31 -07:00
Eric House
23739f57b9 put back SMS permissions
March 9's the deadline, so let's not remove it yet!
2019-06-23 10:13:31 -07:00
Eric House
5897e4c59e 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-06-23 10:13:31 -07:00
Eric House
183b221a2e each message gets a localID so logs can show progress
And rewrite toString()
2019-06-23 10:13:31 -07:00
Eric House
156c05d54c add another DeadlockWatch (and import already) 2019-06-23 10:13:31 -07:00
Eric House
614b4d3610 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-06-23 10:13:31 -07:00
Eric House
9bd95d2ccf fix NPE (by inspection, from crashlytics report) 2019-06-23 10:13:31 -07:00
Eric House
e73f1b5b88 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-06-23 10:13:31 -07:00
Eric House
0133459114 update status more often (as old code did) 2019-06-23 10:13:31 -07:00
Eric House
9eef188ebe 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-06-23 10:13:31 -07:00
Eric House
a8241cc085 change key to force new value
fixes what was probably a crash only for me, but....
2019-06-23 10:13:31 -07:00
Eric House
0d757c605f report invitation success even if dict download needed 2019-06-23 10:13:31 -07:00
Eric House
d907b4201c use https scheme for dict downloads 2019-06-23 10:13:31 -07:00
Eric House
9915c464af 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-06-23 10:13:31 -07:00
Eric House
31d8345e6b add not-again checkbox to BAD_BT_PROTO dialog
Won't help the old-build side of the exchange of course.
2019-06-23 10:13:31 -07:00
Eric House
341293dc55 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-06-23 10:13:31 -07:00
Eric House
ff2a06592f 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-06-23 10:13:31 -07:00
Eric House
1505a443ac 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-06-23 10:13:31 -07:00
Eric House
e23129c0e7 always increment failure count on send failure 2019-06-23 10:13:31 -07:00
Eric House
5cb2be33d2 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-06-23 10:13:31 -07:00
Eric House
e13d90409c 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-06-23 10:13:31 -07:00
Eric House
997aad84ff 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-06-23 10:13:31 -07:00
Eric House
54fb43ec62 double scan progress time
Since the BT stuff tends to timeout late when failing, this looks better.
2019-06-23 10:13:31 -07:00
Eric House
de9b0851d5 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-06-23 10:13:31 -07:00
naofum
f8537c6a88 Translated using Weblate (Japanese)
Currently translated at 74.3% (568 of 764 strings)
2019-06-23 10:13:31 -07:00
Eric House
989f7524d6 unselect any game moved into a closed group
Fixes GameOver game moved via "archive" checkbox remaining selected
2019-06-23 10:12:05 -07:00
Eric House
76957fe4eb 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-06-23 10:12:05 -07:00
Eric House
682501814b put GameOver view layout into a ScrollView
When device in landscape the archive box is otherwise unreachable on a
four-player game
2019-06-23 10:12:05 -07:00
Eric House
dc1431fd08 make GamePtr AutoCloseable and use where possible 2019-06-23 10:12:05 -07:00
Eric House
c706205cd1 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-06-23 10:12:05 -07:00
Eric House
e56770ea29 include stack of lock owner when logging failure to lock 2019-06-23 10:12:05 -07:00
Eric House
ceb68b9787 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-06-23 10:12:05 -07:00
Eric House
58882fe52f make text in new GameOver alert bigger
To match how it was when using the system-provided view.
2019-06-23 10:12:05 -07:00