Commit graph

10973 commits

Author SHA1 Message Date
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
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
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