Commit graph

9916 commits

Author SHA1 Message Date
Eric House
8c7e1646fa get permission before downloading
Trying to download an update, and likely a wordlist, fails if STORAGE
permission isn't acquired first.
2016-12-31 15:56:24 -08:00
Eric House
503ea46ca5 fix crash rematching SMS without PHONE permission
You need PHONE permission to start and play an SMS game but not to have
started it in response to an invitation. But to rematch you need it. So
ask, including offering a rationale that differs depending on whether
there's a way for the game to communicate once SMS is removed.
2016-12-31 15:05:39 -08:00
Eric House
a24b3396b3 save rematch info across orientation changes
(and the os restarting us because a permission was changed while we're in
background.)
2016-12-31 14:31:20 -08:00
Eric House
6a363dbbd7 up revision number; new release required 2016-12-31 14:21:32 -08:00
Eric House
4990d31eda fix assertion on emulator 2016-12-31 14:21:00 -08:00
Eric House
f88ac1a9d0 another changelog tweak 2016-12-30 20:38:24 -08:00
Eric House
5260c3de90 catch -dbg build up with SDK 23 2016-12-30 20:12:23 -08:00
Eric House
250f4b0139 get rid of raw-string toast error messages
They were hacks for debugging SMS early on, probably infrequently
seen. Instead post messages. BUT: they aren't being received because of
how listeners get cleared in onPause(). Needs to be fixed, but there's
no harm in having them dangle for now.
2016-12-30 20:11:02 -08:00
Eric House
62aabc8cbc replace %{d,s} in german strings 2016-12-30 19:44:41 -08:00
Eric House
04a39f9251 force re-layout of board when toolbar populated
Sometimes when a new game is created the board winds up with the toolbar
drawn over the tray. That's because when it was laid out the game wasn't
running yet and so none of the toolbar buttons was enabled, giving the
toolbar a height of 0. So now the first time the updated toolbar reports
that at least one button is enabled we force the board to lay itself out
again.
2016-12-30 13:53:18 -08:00
Eric House
f488e727f8 fix invitations!
Little hack to dismiss a game when the invitations dialog was cancelled
broke invitations altogether. Revert that change, and simply check on
getting focus whether all players are present; if they're not, put up
the "invite or wait" dialog. This is a big change, but in 10 minutes of
testing I can't get the wrong thing to happen.
2016-12-30 13:09:51 -08:00
Eric House
ee042ff3cd better test for GSM phone
This one doesn't think a wifi-only tablet can send SMS messages.
2016-12-30 11:40:15 -08:00
Eric House
e5166a62e8 tweak string 2016-12-30 11:02:04 -08:00
Eric House
39828bfaf8 fix problems with localized files
Remove strings that no longer exist in English, add missing "other"
quantities in Japanese (taking a guess from context that it's ok to use
generic counters), and in a couple of languages fix typos in format
specifiers that would have caused crashes.
2016-12-30 11:01:51 -08:00
Eric House
fea31e9e3b fix script checking localized strings
It wasn't even checking all languages. Now it does, lets you specify
which ones if a subset's desired, and differentiates between sets of
format specifiers mismatching in a way that'll cause a
crash (e.g. expecting int in one and string in another) and just having
some missing.
2016-12-30 09:57:33 -08:00
Eric House
83fbbdc3ee fix compile-time warning
Flag has a different name in clang. Debug-only, so no risk.
2016-12-30 06:49:52 -08:00
Eric House
096fff1f4c Merge branch 'android_translate' into android_release 2016-12-30 06:49:06 -08:00
Eric House
f5db80e43f Merge android_translate
merge remote-tracking branch 'weblate/android_translate' into
android_translate
2016-12-30 06:42:14 -08:00
Eric House
7b30a0229a add button to launch BT settings
Let's make it easier to add to the set of available BT devices from the
place where the user sees the need. TODO: update the descriptive text,
but not this release since it'll break existing localizations.
2016-12-30 06:35:45 -08:00
Eric House
74d1967f23 cleanup from code review
Mostly removing TAG where isn't being used in the file, but other tweaks
too, none of which changes executed code.
2016-12-29 21:07:00 -08:00
Eric House
4cdc917cf5 tweak changelog 2016-12-29 17:27:33 -08:00
Eric House
c0784fe8b7 fix crash on Android 2.3
Channel wasn't a thing back then. Catch the ClassNotFound exception and
set the same boolean as when permissions aren't available (in manifest),
which means nothing else tries to run.
2016-12-29 17:17:27 -08:00
Eric House
531f30aae8 cleanup: use import more for new class 2016-12-28 13:52:04 -08:00
Eric House
497567ac2d check items newly imported from contacts
I figure if you just brought it in it's probably to send an invitation
to it, and this is how it worked before the refactoring anyway.
2016-12-27 13:23:39 -08:00
Eric House
0fc528a074 cleanup up logging 2016-12-27 13:22:37 -08:00
Eric House
57c71f4c82 invitations: disable remove when nothing checked
Subclass needs to do this one: overrides tryEnable() to handle its
button-bar buttons.
2016-12-27 11:46:15 -08:00
Eric House
216dc757ad up version strings and changelog for release 2016-12-27 11:17:03 -08:00
Eric House
f989212926 close pending game's board when invite cancelled
Add cancelled notification to invite choices dialog. Look for that in
board delegate and close the game. Makes the inviting experience more
consistent, the goal being that you never look at a game that's missing
players without some intervening dialog preventing you from trying to
play.
2016-12-26 16:06:44 -08:00
Eric House
84e8f0927c invitations cleanup: layout and reinvite
Fix a layout to be centered when one string not displayed. Fix to
pre-check by default the most recent device choice when re-inviting.
2016-12-26 15:21:10 -08:00
Eric House
f9f872695d improve checkbox handling in invite dialogs
Use an array of actual objects rather than indices, and add an equals()
method, so checkbox status can survive changes in the set of available
items and even be reproduced when the objects backing them change (as
happens after a new BT scan finishes.)
2016-12-24 12:51:39 -08:00
Joan Montané
b59d7bc3c9 Translated using Weblate (Catalan)
Currently translated at 70.1% (523 of 746 strings)
2016-12-24 15:44:15 +01:00
Eric House
92029b2443 fix to build with CURSES_ONLY flag 2016-12-22 08:57:54 -08:00
Eric House
e945bde663 Merge branch 'android_branch' into android_translate 2016-12-21 08:29:06 -08:00
Eric House
432b738257 wifi: move setting into build.xml
Control whether wifi direct is enabled from build.xml, a file that's
already different for the two variants. The point here is to do a
release with permissions changes but without having to fix everything
wrong with wifi direct.
2016-12-21 08:25:57 -08:00
Eric House
ecdec9cfd8 build system change for sdk version 23 2016-12-21 07:48:19 -08:00
Eric House
68104bcf83 remove logging 2016-12-19 22:21:51 -08:00
Eric House
994de23145 perms: use stored pairs when don't have
If user hasn't granted READ_CONTACTS permission, use the pairing of
numbers/names that's come from Contacts via the SMS invitation dialog.
Sometimes it'll have names for numbers that arrived via invitations. Do
some cleanup while at it to prevent stored BT mac addresses from being
looked up as phone numbers.
2016-12-19 22:11:26 -08:00
Eric House
f8ec19b35c perms: use remove to avoid leak 2016-12-19 21:14:45 -08:00
Eric House
2a1c7de18b permissions: get rid of instance variables
I think the params mechanism for DlgDelegate does the same thing better.
2016-12-19 06:48:13 -08:00
Eric House
f199aef738 permissions: ask for READ_CONTACTS
On launching SMS invite dialog, ask for READ_CONTACTS permission. Where
it's needed, though, is for the user-invisible process of translating
phone numbers to names (not launching the Contacts app via an
Intent). This just seems like the best place to ask since the user's
thinking about contacts and phone numbers.
2016-12-19 06:34:20 -08:00
Eric House
09188bc704 Merge branch 'android_branch' into android_sdk_23_take_3 2016-12-17 16:38:39 -08:00
Eric House
f59918bf50 cleanup: remove unnecessary methods
InviteDelegate superclass now tracks whether something is checked,
though it's not doing as well as subclasses did before, e.g. when SMS
would uncheck everything but a newly added contact.
2016-12-17 16:36:17 -08:00
Eric House
29afb19cb4 permissions: ask when opening SMS game
Add post-open test for SMS and then ask for SMS permission, giving
rationale if the OS says I should. Meant adding a new interface for
rationales and wiring that in. It's a bit spaghetti and I may think of a
cleaner way later.
2016-12-16 21:04:15 -08:00
Eric House
3a53abce52 add params option to showOKOnlyDialogThen 2016-12-16 20:57:30 -08:00
Eric House
52c2973d8f remove compile-time switch
SMS rocks and I won't be removing it.
2016-12-16 07:44:55 -08:00
Eric House
5f6cf35d93 permissions: move opening game to BoardDelegate
When opening a game that sends via SMS, check if it has permission and
offer to remove the config if it doesn't, removing a similar check from
pre-opening code. (Here it'll catch e.g. games opened from the
GameConfig process.) Sends/receives without SMS permission are already
caught by existing catch{} blocks, so there's no crash.
2016-12-16 07:35:30 -08:00
Eric House
e9d0b61254 Merge branch 'android_branch' into android_sdk_23_take_3 2016-12-15 08:10:06 -08:00
Eric House
ca0ee429bb logging and string changes 2016-12-15 08:09:28 -08:00
Eric House
9503491890 invitations: tweak file and class names
No behavior changes, just cleanup
2016-12-15 08:02:06 -08:00
Eric House
9f7975d471 rename file
And change something that was using custom layout for just its checkbox
to just use a checkbox.
2016-12-15 07:28:44 -08:00