Commit graph

9963 commits

Author SHA1 Message Date
Eric House
f5ebee89da fix duplicate permissions
Merging of AndroidManifest.xml files meant the dbg flavor was getting
its C2D_MESSAGE permission and the main flavor's, which on recent OS
versions meant it couldn't be installed. Use substitution from gradle to
fix.
2017-01-19 06:22:12 -08:00
Eric House
995da3a0b2 remove last from old directories 2017-01-18 19:44:17 -08:00
Eric House
ea3a8b4034 include relay hostname in debug conn status 2017-01-18 19:30:03 -08:00
Eric House
22ca219347 Merge branch 'android_json' into android_branch
Accidentally did a bunch of gradle work on the wrong branch, but it's a
trivial merge as I hadn't done anything else with it yet.
2017-01-18 19:25:58 -08:00
Eric House
8ade997e8c remove the rest of XWords4-dbg 2017-01-18 19:24:59 -08:00
Eric House
9eed2ca608 auto-update emacs compile-command to use gradle 2017-01-18 19:22:32 -08:00
Eric House
1f5ffaa712 more cleanup. Get Crittercism stuff compiling. 2017-01-18 19:03:36 -08:00
Eric House
0d1e22fc83 move wordlists and other assets over 2017-01-18 08:47:33 -08:00
Eric House
aaf153006e move and incorporate localized strings
This will require a reconfig on the weblate side!
2017-01-18 08:44:23 -08:00
Eric House
3ac0039b4d fix jni build. Full .apk now produced.
But it gets confused about downloading wordlists.
2017-01-18 08:33:49 -08:00
Eric House
0750a771c3 move java files and get them to compile 2017-01-18 08:27:48 -08:00
Eric House
f090e86e26 move res files 2017-01-18 07:34:32 -08:00
Eric House
fcdb66eb87 forgot a file 2017-01-18 07:28:19 -08:00
Eric House
49242f78cf more script fixes; move jni code 2017-01-18 07:27:23 -08:00
Eric House
ad5d451ef3 fix image generation 2017-01-18 07:15:08 -08:00
Eric House
451e9e04ab fix path in script 2017-01-18 07:05:18 -08:00
Eric House
612ff0259c move and start processing res .xml files 2017-01-18 07:01:25 -08:00
Eric House
975d114f41 move some gradle files 2017-01-18 06:33:00 -08:00
Eric House
26b4c7da8e log values showing up in the occasional crash 2017-01-09 20:55:14 -08:00
Eric House
084a45296e invalidate menu when board destroyed; shorten rematch name
GamesList menu was in a bad state after a game closed because hadn't
been rebuilt. It's simplest to invalidate it surgically, when the
BoardDelegate notifies that the board's closed, though doing in in
onWindowFocusChanged() might catch more edge cases. We'll see. I want a
low-risk impact right now.
2017-01-09 07:04:58 -08:00
Eric House
8c680b50f7 fix mystery crash on my phone
but not on emulator running same OS version (or close). And in spite of
an exception being thrown the work being done, hiding a preference,
still succeeds. Whatever.
2017-01-08 14:40:18 -08:00
Eric House
fac8c2b943 resend all pending SMS messages on getting permission
Fixes case where user has received invitations but not allowed SMS then
decides to do so. It's a hack giving Perms23 class knowledge of how to
send moves etc. Instead I should be letting interested parties register
for perms-granted events, but that can happen later, and is less
valueable while SMS is the only "dangerous" permission and the only one
that blocks message sends.
2017-01-08 14:23:23 -08:00
Eric House
f41b77b8ee fix conversion of contacts from old format
JSONObject(<string>, null) clears out any existing entry but doesn't add
a new one. So store missing names as "" instead. Not sure how this
worked when I first tested it....
2017-01-08 13:26:29 -08:00
Eric House
8349ffc126 tweak changelog 2017-01-08 13:02:44 -08:00
Eric House
a0fffb3af6 get rid of SMS enabling on Marshmallow and later
My old asking for permission to turn on/off SMS is confusing and adds no
value when the OS separates out permissions and is confusing. So get rid
of it on Marshmallow and later, always returning true from the old API
and hiding the preference in that case.
2017-01-08 12:58:57 -08:00
Eric House
b0105888d0 sort current turn games with oldest at top 2017-01-07 16:20:15 -08:00
Eric House
449860a880 make Dbg variant's icons upside down
The write-red-on-it thing doesn't work for the notify.png file used in
notifications (I think because I can't find a color Android doesn't
strip out.) So use a rotation transform instead. Users will never see
this anyway.
2017-01-07 14:48:31 -08:00
Eric House
4f30a5be71 Merge remote-tracking branch 'weblate/android_translate' into android_branch 2017-01-07 13:15:16 -08:00
Eric House
e842e1a744 use tryGetPerms to replace a bunch of Perms23 crud -- again 2 2017-01-07 12:55:45 -08:00
Eric House
734549668c use tryGetPerms to replace a bunch of Perms23 crud -- again 2017-01-07 12:45:26 -08:00
Eric House
a453676456 use tryGetPerms to replace a bunch of Perms23 crud
This one required allowing passing in a string rather than a res id.
2017-01-07 12:16:59 -08:00
Eric House
6203012db6 use the utility for contacts permission 2017-01-07 10:55:21 -08:00
Eric House
ee81e3e6cc tweak permissions again
Move connection options READ_PHONE_STATE check from ConnViaViewLayout to
GameConfigDelegate and give it a rationale. Preferences stuff can't do
permissions because it can't override onRequestPermissionsResult (base
activity is of wrong class). Should fix that at some point, either by
moving to preference fragments or with a dummy activity to go over the
top.
2017-01-07 10:21:41 -08:00
Eric House
558a20f2db more tweaks around SMS permission
Explicit "ask again" and "skip" buttons in alert showing rationale;
check/ask for permission before sending invitation via SMS; warn each
time SMS-enabled game is opened without permission but allow it to stay
open and if necessary send an invitation.
2017-01-07 08:38:48 -08:00
Eric House
b898637666 close game that has no way to connect
add "close game" button to warning about lack of comms, and do that on
dismiss too. Nothing good can come from having the thing stay open.

Eventually the "close" should turn into "edit" and launch GameConfig on
the game with the comms selector up, but that's hard, as currently the
launch only happens from GamesList and is via
startActivityForResult. Might be easiest to close and send an intent to
GamesList to cause it to launch GameConfig that way. Not for this release.
2017-01-07 07:44:53 -08:00
Eric House
8bf65622b5 fix crash duplicating no-address network game
An edge case, but: doing "new from" on a game without any connection
types crashed because of an assertion in comms that assumed
addr_setType() was being called on zero-initialized flags, which
shouldn't have been a requirement. Pulled that as well as java code that
added RELAY-type connectivity to any game that had none. If a game has
none, leave it that way.
2017-01-07 07:41:38 -08:00
Eric House
86e7142687 split DlgDelegate interface in three
replace dlgButtonClicked() with separate methods for positive and
negative buttons and alert dismissal. I was making too many mistakes
because the old method was getting called twice (e.g. for negative and
then dismissal) and I hadn't needed to differentiate until adding that
new Action. There should be no behavior change with this, but it's
pervasive and replaces some spaghetti.
2017-01-06 07:07:17 -08:00
Andreas Kleinert
6bce7ea64d Translated using Weblate (German)
Currently translated at 8.5% (64 of 746 strings)
2017-01-05 21:44:57 +01:00
Eric House
dc7ed9bfb2 use new utility method 2017-01-05 07:42:21 -08:00
Eric House
46f69607c5 log class in XWFragment lifecycle methods 2017-01-05 07:39:06 -08:00
Eric House
d661f1d050 add another perms request/rationale 2017-01-04 07:10:45 -08:00
Eric House
7c033ccdf1 warn when unpermitted choice made
Let OS ask for STORAGE when user chooses Downloads dict storage option,
but do nothing if it's not granted. Existing code asks again when the
actual move is to done.
2017-01-04 06:46:44 -08:00
Eric House
2eaa3b82e7 inval dicts availability cache when permission changes
Along with cacheing what dicts are where cache the state of STORAGE
permission when the cache was made. If it's changed, invalidate the
cache.
2017-01-03 21:24:42 -08:00
Eric House
b505de5833 don't crash when STORAGE taken away mid-game
If an game's open that uses a wordlist kept in Downloads and permission
is revoked, close cleanly. On re-opening the user will be prompted by
existing code to download again. (Note: not prompted to turn STORAGE
permission back on. It would't be easy to detect that case, and I'm not
spending time helping people who are perverse.)
2017-01-03 21:15:08 -08:00
Eric House
9349e06747 perms: new utility to manage request flow
Add new static method that takes a request, rationale and Action, offers
the rationale if required and then, if user hasn't cancelled, asks for
permission. Eventually the Action is issued with either POSITIVE or
NEGATIVE. Use this to ask for STORAGE when downloading upgrades and
moving wordlists to the downloads area.
2017-01-03 07:25:12 -08:00
Eric House
4f2c67c331 up copyright for new year!!! 2017-01-03 07:11:06 -08:00
Eric House
59c80f8277 add special title to permissions rationale alerts 2016-12-31 16:27:17 -08:00
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