aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/java/com (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* ConfigActivity: Show the current config in the titleSamuel Holland2017-08-151-0/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* BaseConfigActivity: Move menu handling to ConfigActivitySamuel Holland2017-08-152-7/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ConfigActivity: Show back arrow in single layout action barSamuel Holland2017-08-141-0/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ListFragment: Don't assume the ListView is the rootSamuel Holland2017-08-141-1/+1
| | | | | | | It may share the layout with a FAB, and that requires a parent ViewGroup. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ConfigActivity: Fragments are hard; this un-breaks animationsSamuel Holland2017-08-142-79/+88
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ConfigActivity: Enable animations on fragment transitionsSamuel Holland2017-08-141-0/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* EditFragment: Input filters for config name and private keySamuel Holland2017-08-141-0/+50
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ConfigActivity: Avoid crash when started while lockedSamuel Holland2017-08-141-3/+12
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Major renaming and refactoring in activity and serviceSamuel Holland2017-08-1336-1126/+979
| | | | | | Apparently "configuration" is the proper term, not "profile". Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Profile: Add function to copy config from another profileSamuel Holland2017-08-131-3/+10
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileActivity: Remove unnecessary parameterizationSamuel Holland2017-08-131-5/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileService: Rework handling of updates, againSamuel Holland2017-08-131-50/+68
| | | | | | | | | Prefer updating an object instead of replacing it. This preserves the selection in the UI list. Also make renaming atomic as it should be. Now the only possibility for data loss is if the old file can be opened but not written to. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ServiceClientFragment: Connect early if possibleSamuel Holland2017-08-101-0/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileList: Fix state trackingSamuel Holland2017-08-101-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileEdit: Finish writing code-behindSamuel Holland2017-08-102-0/+61
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileActivity: Do menus correctlySamuel Holland2017-08-104-39/+56
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileFragment: Make good use of the cached profileSamuel Holland2017-08-102-21/+23
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Settings: Add empty activitySamuel Holland2017-08-092-1/+12
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Hook up editing to the layout and menusSamuel Holland2017-08-092-5/+33
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileEdit: Add empty activity/fragmentSamuel Holland2017-08-093-0/+28
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileActivity: Do not use onClick for menusSamuel Holland2017-08-093-6/+27
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileActivity: Also remember editing stateSamuel Holland2017-08-091-3/+19
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileFragment: Helper class to remember a fragment's profileSamuel Holland2017-08-092-16/+62
| | | | | | | | | | Caching the actual profile object is important when the fragment is on an activity's back stack: when it is shown again, onCreateView will be called with profile already set and the service already connected. In this case, there is no later notification from which to bind the profile, so the existing object needs to be bound there. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileList: Add the list fragment in code so it knows the layoutSamuel Holland2017-08-092-6/+20
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileActivity: Replace fragments instead of hidingSamuel Holland2017-08-094-39/+75
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileActivity: Extract base class for fixing fragmentsSamuel Holland2017-08-093-55/+77
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Interface: Correctly handle setting a null or empty keySamuel Holland2017-08-091-4/+8
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* KeyEncoding: Clean up and reorganize to match styleSamuel Holland2017-08-093-71/+85
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Keypair: Convert to java-style array declarationsSamuel Holland2017-08-091-6/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Constant time base64Jason A. Donenfeld2017-08-083-20/+82
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Profile: Add helper to check name validitySamuel Holland2017-08-081-0/+5
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Profile: Make name modifiableSamuel Holland2017-08-081-1/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileActivity: Refactor into clean layers of functionalitySamuel Holland2017-08-0811-138/+281
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileServiceInterface: Update for map-based collectionSamuel Holland2017-08-073-32/+31
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileService: Use a map to store profile dataSamuel Holland2017-08-072-17/+16
| | | | | | | | | This has no visible changes at the moment, but will allow most functions to pass around strings instead of Profile objects, obviating the need to implement serialization for them. It also trades some naive linear searches for the binary search in SimpleArrayMap. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ObservableArrayMapAdapter: Copy ObservableListAdapterSamuel Holland2017-08-072-0/+111
| | | | | | | | Since the conversion to a sequential list (to implement ListAdapter) depends on the implementation detail that ObservableArrayMap is backed by an array, we can't use the ObservableMap interface here. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileActivity: Add two-pane master-detail layoutSamuel Holland2017-08-071-0/+4
| | | | | | | This is designed for tablets, but for testing purposes, it is currently enabled for all devices in landscape orientation. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* PlaceholderFragment: Simple fragment that shows a messageSamuel Holland2017-08-071-0/+18
| | | | | | This is used for the detail pane when no profile is selected. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileActivity: Make local variables finalSamuel Holland2017-08-071-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileActivityFragment: Fix service connection trackingSamuel Holland2017-08-071-2/+16
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileList: Load fragment programmaticallySamuel Holland2017-08-071-0/+6
| | | | | | This is necessary to replace it with the profile detail fragment later. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileList: Extract service management into a base classSamuel Holland2017-08-042-25/+39
| | | | | | It will be shared with other fragments. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileList: Convert to a fragmentSamuel Holland2017-08-043-24/+120
| | | | | | | | This is required for a future two-fragment tablet layout, and simplifies the code a bit since the profile detail (view/edit) will be implemented as fragments anyway. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* RootShell: Make shell command configurableSamuel Holland2017-08-041-1/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileList: Remove "Add" menu action, to be replaced by a FABSamuel Holland2017-08-011-4/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ProfileService: Rework profile updatingSamuel Holland2017-08-012-56/+29
| | | | | | | | | | | | | | | | | | | | | | | This should help discourage editing a Profile without making a copy first, since the caller has to keep track of the old Profile as well. ProfileAdder has been updated to prevent adding duplicate profiles. It checks once in the constructor, so the caller can catch the exception and pass the error back to the UI. It checks again in the worker thread to prevent any race from happening if a profile is added twice quickly. Either the file exists, or it doesn't. Additionally, this change solves the race condition when the old profile is removed before it is updated; previously this would lead to the profile being re-added. Now, ProfileRemover will fail and the profile will stay removed. Finally, updating a profile's name should now work correctly. There were previously multiple bugs with that (the old profile wasn't removed, the new one could duplicate a name, the new one could overwrite some random other one, etc.). Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Interface: Convert to using Keypair classSamuel Holland2017-08-012-7/+23
| | | | | | | This allows retrieving the public key and generating keypairs, both of which will be exposed in the UI. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Keypair: Create class for generating/storing keysSamuel Holland2017-08-011-0/+65
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Curve25519: Import class from noise-javaSamuel Holland2017-08-011-0/+534
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* RootShell: rename SETUP to SETUP_TEMPLATESamuel Holland2017-08-041-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>