Commit graph

10000 commits

Author SHA1 Message Date
Eric House
a724ef734f add forgotten file 2017-02-10 05:40:18 -08:00
Eric House
e69824ece0 remove Runnable from DlgState
Can't be serializing Runnables, so replace with an Action that's sent
via onPosButton.
2017-02-09 09:08:03 -08:00
Eric House
470ee6eaa4 rebase invite choices alert on fragments
And create a common superclass for alerts coming out of DlgDelegate
2017-02-09 08:14:44 -08:00
Eric House
7c39bf6064 call via activity in common case too 2017-02-09 06:41:38 -08:00
Eric House
939688e3cd change DlgClickNotify methods to return boolean
So dispatching over possible targets can stop when one has handled it.
2017-02-09 06:23:41 -08:00
Eric House
796192380f switch not-again alerts to being fragments
Since associated DlgDelegate instance doesn't survive a rotation, needed
to pipe results through a DlgClickNotify implementation on XWActivity
that then dispatches in the DualpaneDelegate case to all visible
fragments. I hope this turns out to work for all DlgClickNotify
implementations as I switch them over. We'll see.
2017-02-09 06:19:37 -08:00
Eric House
683eb8e14b don't remove alerts in onStop()
Required to fix alerts going away now that orientations are handled by
the OS (which in turn is the preferred way to do things now since not
ALL config changes CAN be handled by the OS.) With this change some
alerts will probably cause crashes during a rotation. Those all need to
be fixed.
2017-02-07 07:04:27 -08:00
Eric House
0e23c191b5 convert About alert to DialogFragment
As a first experiment. Untested on non-dualpane and on older OS
versions.
2017-02-07 07:02:16 -08:00
Eric House
121c35b728 don't expect View to survive a rotation 2017-02-06 19:18:15 -08:00
Eric House
69eee734e2 cleanup: switch on ids rather than test views 2017-02-04 10:28:23 -08:00
Eric House
99664a8360 persist game config state across rotations
Make CurGameInfo serializable, make sure it's updated in onPause, and
then just add it to the bundle. Easy.
2017-02-04 10:12:34 -08:00
Eric House
b050ac5d62 update studylist display when words added
Add listener interface to DBUtils and hook StudyListDelegate into it so
that if a word is added while the list is being displayed the new word
shows up immediately.
2017-02-04 09:40:01 -08:00
Eric House
6eb4a9b09b preserve studylist selection across rotation
As elsewhere, convert to a serializable representation and save it in
instance state.
2017-02-04 09:00:40 -08:00
Eric House
6b565e2fa7 cleanup: remove some logging 2017-02-04 08:53:07 -08:00
Eric House
6270a81bfa config changes to build on different system 2017-02-04 08:12:40 -08:00
Eric House
b0cef99507 preserve wordlist selection and remote info
wordlist browser selection and downloaded info about downloadable
wordlists didn't survive rotation. They do now, the latter as a huge
serialized array. To make selection work I save the keySet() of a
mapping of selected names to the views that represent them. Now the
presence of a key, even if the value is (temporarily) null, signals that
something's selected.
2017-02-02 21:08:22 -08:00
Eric House
3ae2b41ae2 save selected games/groups across rotations 2017-02-01 06:08:33 -08:00
Eric House
ca4b3fd454 fix crash when starting in non-dualpane mode 2017-01-31 21:04:17 -08:00
Eric House
b874d25563 fix iterating over fragments
Old code that didn't rotate properly was meant to associate view IDs
with fragments so I could iterate over them, e.g. to dispatch
intents. To replace that the common superclass of all fragments now
keeps a set of active ones and provides a method that uses that to find
the fragment that owns a view. So I can iterate over fragments based on
the dualcontainer-contained views as before.
2017-01-31 19:46:51 -08:00
Eric House
0fedcf56ab fix remaining fragment view layouts
The layout_width="1" thing is critical!
2017-01-31 08:03:13 -08:00
Eric House
352508b852 start fixing problems with dual-pane
Remove the generated FrameLayout that was breaking restoration after a
config change. Set layout_weight=1 for all fragment root views so they
get half the screen in landscape mode. Remove some code. Problems
remain, first among them that notification intents aren't dispatched correctly.
2017-01-31 07:01:11 -08:00
Eric House
f9cc524028 remove configChanges for MainActivity
Makes it so simply rotating duplicates the grey-screen GamesList problem.
2017-01-28 11:03:33 -08:00
Eric House
afb0c1d3ee disable move when all games already there
When all selected games are starting in the same group and that group is
selected as the move destination, disable the move button.
2017-01-24 07:55:09 -08:00
Eric House
b8e8c176ed don't open group just because added game
A group that's closed stays closed even if a game's added to it. The
change flushed out a bug where the groups cache wasn't being invalided
on a game move, so fix that too.
2017-01-24 06:53:54 -08:00
Eric House
9cab7d916c fix strings update server file requires
Name file and set internal constant sent to server to use same git rev
string so that the script will correctly identify whether the version I
have is the latest it has available. Fixes server offering to replace
with what I already have.
2017-01-22 16:22:35 -08:00
Eric House
929c4c811b tweak gradle-built apk name 2017-01-22 15:55:31 -08:00
Eric House
83fed4da91 include debug keystore directly
replace symlink silliness ant required with gradle commands to sign
debug builds with the checked-in (local file) debug keystore. Make
it possible for an environment variable to override in case somebody
wants to use his own.
2017-01-22 15:35:02 -08:00
Eric House
15d0f88187 add preference to disable wifi direct
Looks like there are battery drainage issues with the current half-done
implementation, so add option to turn it off. Only takes effect on
restart, and only matters on dbg variant now since it's compile-time
disabled on the main variant.

Also add discovery machine state to ConnState printout, stop running the
machine over and over (likely the battery problem), but add ability to
restart it triggered by the ConnState's "reconnect" button.

Also start persisting the most recently seen set of peers. If service
discovery and not connecting is the problem having these available to
try to connect to on startup might help.
2017-01-22 14:51:21 -08:00
Eric House
b96d44393a add and use boolToStr
Just to make log messages a bit more helpful. Should be no behavior
change, and no change in code generated in release builds.
2017-01-22 14:15:29 -08:00
Eric House
4a93281a2d enable wifidirect in xw4dbg variant
As it was before.... Also log rather than assert a common widir packet
forwarding error.
2017-01-20 07:56:03 -08:00
Eric House
9a8b323f4d Merge branch 'android_branch' into android_translate 2017-01-19 19:07:21 -08:00
Eric House
2053b234fa print less during builds 2017-01-19 19:05:10 -08:00
Eric House
eb13ea4291 add the upside-down icons for -dbg flavor 2017-01-19 08:36:27 -08:00
Eric House
9c142dd6e7 add cleanNDK task and separate jnilib dirs
Build different jni code (into different obj and libs directories) for
the different release/debug and xw4/xw4dbg combinations. This works when
only one build is done, but when doing two some later task tries to put
both multiple same-named libraries into the .apk and so fails. I still
think it's worth adding this to keep from using the wrong binary, but
that needs to be fixed.

cleanNDK just nukes all the directories. Easier than invoking build-ndk
clean...
2017-01-19 08:10:16 -08:00
Eric House
43e8c3ea64 fix release script errors and that running it finds 2017-01-19 06:22:24 -08:00
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