Commit graph

9799 commits

Author SHA1 Message Date
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
Eric House
f8bba60798 invitations: track multiple per device in superclass 2016-12-15 07:10:54 -08:00
Eric House
502888ee03 wifi: add reset() that will help troubleshoot 2016-12-15 06:44:40 -08:00
Eric House
721ee381a5 wifi: fix invitation dialog 2016-12-15 06:40:45 -08:00
Eric House
4f43acf9cb remove unused variable 2016-12-14 08:16:05 -08:00
Eric House
cd14001db1 start rewrite of invitation dialogs
Moving stuff into superclass and trying in general to simplify
things. BT and SMS invitation work, but the option to have more than one
player per device isn't available. RelayID invitation is a mess, but was
before I think.  WiDir invitation crashes in assert because I can't
debug it on this branch. Lots of work and cleanup still required.
2016-12-14 08:14:00 -08:00
Bernard Massot
d85733f97f Translated using Weblate (French)
Currently translated at 100.0% (746 of 746 strings)
2016-12-13 15:44:46 +01:00
PapaPedro
cc2594986f Translated using Weblate (Czech)
Currently translated at 14.7% (110 of 746 strings)
2016-12-13 03:44:23 +01:00
Eric House
c398af2ac9 perms: ask for the set needed to open a game
rewrite perms23 class to use Builder pattern, making it easier to pass
more than one required permission. Use that (with hard-coded set for
now) to check and ask for permissions a game needs to communicate. Offer
to remove the comms methods the user doesn't want to permit (but that's
not implemented yet.)
2016-12-11 20:54:24 -08:00
Eric House
dfb22c13fa make gradle's suggested config changes 2016-12-11 13:33:57 -08:00
Eric House
36a0737654 fix ant build for sdk 23
pull in new version of support library .jar
2016-12-11 13:33:06 -08:00
Bernard Massot
980ac33604 Translated using Weblate (French)
Currently translated at 100.0% (746 of 746 strings)
2016-12-11 11:33:30 +01:00
Eric House
d136dd65e6 check phone permission before putting up sms choice
First, needed to remove some state caching since though a non-SMS
phone will never become one my ability to ask changes over time. Then
changed population of communication options to first ask for the
permission needed in order to find out what's supported, then to find
out what's supported via methods that will return false without
permission. Can't think of a better way right now....
2016-12-10 16:06:18 -08:00
Eric House
3389e928cc check for phone permission on boot to avoid crash
Some permission checks won't fall back to asking if it doesn't make
sense given what the user's doing at the time.
2016-12-10 15:08:09 -08:00
Eric House
39f08bd3d3 remove verbose flag 2016-12-10 14:58:24 -08:00