Commit graph

11240 commits

Author SHA1 Message Date
Eric House
fce0eb2acc add git rev to crashlytics reports 2019-06-23 10:12:05 -07:00
Eric House
0cd0bd4c03 plug leak 2019-06-23 10:12:05 -07:00
Eric House
2afce586a3 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-06-23 10:12:05 -07:00
Eric House
601eaf395c don't create threads we won't use 2019-06-23 10:12:05 -07:00
Eric House
7ba2f92645 null listener thread ref so will be restarted
Once it died it stayed dead: bad.
2019-06-23 10:12:05 -07:00
Eric House
ef602baa18 cleanup 2019-06-23 10:12:05 -07:00
Eric House
7ccb576214 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-06-23 10:12:05 -07:00
Eric House
438e134870 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-06-23 10:12:05 -07:00
Eric House
136fa6ac7d remove some logging 2019-06-23 10:12:05 -07:00
Eric House
842509d84a remove methods overridden just for logging
looks like I've fixed the crash I wanted to diagnose.
2019-06-23 10:12:05 -07:00
Eric House
29661d2a7e 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-06-23 10:12:05 -07:00
Eric House
34b462b97c pass context and use to post lock-failure toast 2019-06-23 10:12:05 -07:00
Eric House
888109ce4e tweak/reduce logging 2019-06-23 10:12:05 -07:00
Eric House
c4d21b7b59 move constant from XWApp to build.gradle 2019-06-23 10:12:05 -07:00
Eric House
781da8ccb6 avoid NPE (and log to root-cause it later) 2019-06-23 10:12:05 -07:00
Eric House
37085b0ba1 ensure writer gets run every time OS schedules via onHandleWork() 2019-06-23 10:12:05 -07:00
Eric House
130487f7df remove some logging 2019-06-23 10:12:05 -07:00
Eric House
122b270025 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-06-23 10:12:05 -07:00
Eric House
6193c376db move invite button above button bar.
(It's more frequently used)
2019-06-23 10:12:05 -07:00
Eric House
2a5c3b11a0 add context comment for new string 2019-06-23 10:12:05 -07:00
Eric House
4ce20a49a6 cleanup via new macro 2019-06-23 10:10:49 -07:00
Eric House
1e6fdd1f70 remove logging 2019-06-23 10:10:49 -07:00
Eric House
0a50a721dd fix malformed xml string
Weblate bug?
2019-06-23 10:10:49 -07:00
Eric House
aab36efdac 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-06-23 10:10:00 -07:00
Eric House
0ad21783b8 add rowid to NoSuchGameException 2019-06-23 10:10:00 -07:00
Eric House
8ff23294e6 fix NPE (and tweak logging) 2019-06-23 10:10:00 -07:00
Eric House
fd122148b8 add flavor to toasted got-fcm message
So I can tell the apps apart
2019-06-23 10:10:00 -07:00
Eric House
d067b867a2 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-06-23 10:10:00 -07:00
Eric House
b198091490 make script executable 2019-06-23 10:10:00 -07:00
Eric House
ac5cbea83f display latest FCM receipt as part of netstats for relay 2019-06-23 10:10:00 -07:00
Eric House
c67bda8683 use a constant jobID for enqueueWork()
That each VM instance had a different id might be why I was
crashing. We'll see.
2019-06-23 10:10:00 -07:00
Eric House
41bcaa69cb fix so success detected from new API 2019-06-23 10:10:00 -07:00
Eric House
b5ab8803c4 remove debug-only assert I'm seeing
Good to know it's happening; now don't crash!
2019-06-23 10:10:00 -07:00
Eric House
40eab8690b put back pref controlling whether FCM receives are Toasted 2019-06-23 10:10:00 -07:00
Eric House
272204223e 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-06-23 10:10:00 -07:00
Eric House
f28c21206c 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-06-23 10:10:00 -07:00
Your Name
fc0480376b pull and display new field 2019-06-23 10:10:00 -07:00
Eric House
940977718e 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-06-23 10:10:00 -07:00
Eric House
6853b203a1 make https the default for prefs-alterable strings
And change the keys so all local changes get reset
2019-06-23 10:10:00 -07:00
Eric House
2c4ce83a5b use https everywhere. And rewrite URLs if necessary. 2019-06-23 10:10:00 -07:00
Eric House
5d36470e50 add some logging around RelayService lifecycle 2019-06-23 10:10:00 -07:00
Eric House
7fba555d33 fix just the warnings; VSIZE is safe 2019-06-23 10:10:00 -07:00
Eric House
bbe69f6398 Revert "toward compiling with gcc8"
This reverts commit d293517e7c.
2019-06-23 10:10:00 -07:00
Eric House
e8ab9e0b8b 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-06-23 10:10:00 -07:00
Eric House
36b21aa7ed remove the last critical error 2019-06-23 10:10:00 -07:00
Eric House
a2aafc8b93 fix another critical warning 2019-06-23 10:10:00 -07:00
Eric House
71fb14bce1 fix gtk critical errors 2019-06-23 10:10:00 -07:00
Eric House
5f9d39ef8d communicate variant to relay, and store in new column 2019-06-23 10:10:00 -07:00
Eric House
a49c8c89ba fcm config file for xw4 variant 2019-06-23 10:09:59 -07:00
Eric House
d950ad695c remove debug toast that can't work from that class 2019-06-23 10:09:59 -07:00
Eric House
4bac49b76a rewrite of gcm_loop.py to use FCM
Works on my test VM. Untested on production.
2019-06-23 10:09:59 -07:00
Eric House
0c52d4e550 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-06-23 10:09:59 -07:00
Eric House
6ecfd2f20b add app-side support for firebase messaging
Works for xw4d variant only so far -- xw4 builds are broken!!!
2019-06-23 10:09:00 -07:00
Eric House
305f45dfc0 add variant option to build scripts
xw4 won't build for a while...
2019-06-23 10:09:00 -07:00
Eric House
7500e2f396 track and log lock owners correctly
Was assuming LIFO behavior, but with refcounting that's wrong and so I
was likely logging the wrong leaker in the case I'm trying to
duplicate. This simplifies the class while fixing that by tracking
owners as a Set.
2019-06-22 07:16:48 -07:00
WaldiS
6aad6d259b
Translated using Weblate (Polish)
Currently translated at 89.4% (683 of 764 strings)
2019-06-20 21:00:29 +02:00
WaldiS
c612570c12
Translated using Weblate (Polish)
Currently translated at 89.1% (681 of 764 strings)
2019-06-18 21:02:46 +02:00
Julio Yagami
6bf8fcef17
Translated using Weblate (Portuguese)
Currently translated at 51.6% (394 of 764 strings)
2019-06-18 21:01:45 +02:00
AB
36927380e2
Translated using Weblate (Ukrainian)
Currently translated at 0.5% (4 of 764 strings)
2019-06-18 21:01:44 +02:00
THANOS SIOURDAKIS
800292dfee
Translated using Weblate (Greek)
Currently translated at 0.9% (7 of 764 strings)
2019-06-18 21:01:43 +02:00
Eric House
63407ce5b5 wip: don't print stats header without stats 2019-06-14 16:37:29 -07:00
Eric House
93dd92c027 up strings for new release 2019-06-13 20:53:11 -07:00
Eric House
43c349cb2c make fdroid's flag explicit for variant 2019-06-13 20:52:45 -07:00
Eric House
44612c7177 cleanup: remove logging and comment 2019-06-13 20:40:38 -07:00
WaldiS
1b2750ef4d Translated using Weblate (Polish)
Currently translated at 26.8% (205 of 764 strings)
2019-06-13 10:30:08 -07:00
THANOS SIOURDAKIS
ab82aeb2c7 Added translation using Weblate (Greek) 2019-06-13 10:30:08 -07:00
AB
92f6eefc8d Added translation using Weblate (Ukrainian) 2019-06-13 10:30:08 -07:00
WaldiS
5a38089702 Translated using Weblate (Polish)
Currently translated at 6.5% (50 of 764 strings)
2019-06-13 10:30:08 -07:00
WaldiS
315a801d1d Translated using Weblate (Polish)
Currently translated at 6.4% (49 of 764 strings)
2019-06-13 10:30:08 -07:00
WaldiS
7b4654e522 Translated using Weblate (Polish)
Currently translated at 2.7% (21 of 764 strings)
2019-06-13 10:30:08 -07:00
Eric House
a8c45ee0ae include service delay stats for DEBUG builds
A start at determining of often there's a problem with Service not
scheduling work quickly enough.
2019-06-10 18:25:36 -07:00
WaldiS
981baed19d
Translated using Weblate (Polish)
Currently translated at 26.8% (205 of 764 strings)
2019-06-09 12:01:14 +02:00
Eric House
896d63bc48 build from new wordlist 2019-06-07 21:16:56 -07:00
THANOS SIOURDAKIS
d610102f26
Added translation using Weblate (Greek) 2019-06-07 19:35:25 +02:00
Eric House
a90ce05cd4 fix race condition leading to NPE 2019-06-03 20:47:36 -07:00
Eric House
c211b95070 wip: cleanup (not related to duplicate) 2019-06-03 20:47:25 -07:00
Eric House
3a4a8baf70 offer to email when unable to lock game
Only on non-shipping builds. This is attempting to catch a non-repro
lock-forever I'm trying to fix.
2019-06-02 09:02:25 -07:00
AB
6688ef08f7
Added translation using Weblate (Ukrainian) 2019-06-02 09:24:42 +02:00
Eric House
52d2694bc7 add support for 64-bit ARM
Add a third processor type to the .so, and fix first compile-time
warnings and then a few dumb bugs based on assumptions about ptr sizes.
Works to play networked games and browse wordlists, but is not
extensively tested and needs to be before release.
2019-05-29 19:19:00 -07:00
Eric House
fb15039b60 assert refcount never climbs after reaching 0
Looking for a common but not-yet-reproducible situation where the
gamelock gets stuck preventing a game from being opened, usually related
to a move arriving. One thing that looked wrong is it seemed possible to
have the refcount drop to 0 then get increased again, causing somebody
to thing he has a lock when it's actually unlocked. So assert to try to
catch that case (and synchronize to make it much harder.)
2019-05-29 15:51:09 -07:00
Eric House
d92c2b87c8 show SMS status in (fixes always-red indicator)
(Not duplicate-specific)
2019-05-29 09:43:12 -07:00
Eric House
30fd27aa53 change engine to optionally look at pending tiles
option not used ... yet
2019-05-26 17:59:00 -07:00
Eric House
838d0e5cc2 Makefile for CSW19 ... ish 2019-05-22 19:24:44 -07:00
Eric House
53e10ebafb add DBUtils utility for saving/restoring Serializables 2019-05-22 18:51:16 -07:00
Eric House
95bea0a13f fix npe sending relay invites to self
Needed to handle the case where both are null. Can't reproduce this in
release builds so likely doesn't justify a new release.
2019-05-21 13:18:27 -07:00
Eric House
fb88dfda8a show toast when dropping duplicate invite if DEBUG
I forget to enable that option too often. (No impact on release builds.)
2019-05-21 13:16:00 -07:00
Eric House
3aa1ed0187 remove exif data from image files
command: find . -name '*.jp*g' -o -name '*.png' | xargs exiftool -all=
Did this because fdroid is complaining about metadata and I can't see
any obvious changes in the appearance of the app, but it's not
well-considered. Back this out if there are problems.
2019-05-20 06:41:47 -07:00
Eric House
b65cff4c31 remove wince files 2019-05-20 06:26:57 -07:00
Eric House
e2cf25fc0a add menuitem to copy relayid to gtk clipboard
(I'm tired of typing it manually.)
2019-05-18 09:48:22 -07:00
Eric House
9b01d044f1 try to fix assertion by catching null UDP socket
I think there's a rare race condition here. Assuming it results from a
bad network state rather than two sends coming too quickly, respond to
not having a connection by killing the thread so the next send will
retry.
2019-05-16 12:23:33 -07:00
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