summaryrefslogtreecommitdiffhomepage
path: root/app/src
AgeCommit message (Collapse)Author
2017-08-14ConfigActivity: Show back arrow in single layout action barSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-14ListFragment: Don't assume the ListView is the rootSamuel Holland
It may share the layout with a FAB, and that requires a parent ViewGroup. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-14ConfigActivity: Fragments are hard; this un-breaks animationsSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-14ConfigActivity: Enable animations on fragment transitionsSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-14EditFragment: Input filters for config name and private keySamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-14ConfigActivity: Avoid crash when started while lockedSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-13Major renaming and refactoring in activity and serviceSamuel Holland
Apparently "configuration" is the proper term, not "profile". Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-13Profile: Add function to copy config from another profileSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-13ProfileActivity: Remove unnecessary parameterizationSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-13ProfileService: Rework handling of updates, againSamuel Holland
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>
2017-08-10ServiceClientFragment: Connect early if possibleSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-10ProfileList: Fix state trackingSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-10ProfileEdit: Finish writing code-behindSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-10ProfileActivity: Do menus correctlySamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-10ProfileFragment: Make good use of the cached profileSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-09Settings: Add empty activitySamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-09Hook up editing to the layout and menusSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-09ProfileEdit: Add empty activity/fragmentSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-09ProfileActivity: Do not use onClick for menusSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-09ProfileActivity: Also remember editing stateSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-09ProfileFragment: Helper class to remember a fragment's profileSamuel Holland
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>
2017-08-09ProfileList: Add the list fragment in code so it knows the layoutSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-09ProfileActivity: Replace fragments instead of hidingSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-09ProfileActivity: Extract base class for fixing fragmentsSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-09Interface: Correctly handle setting a null or empty keySamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-09KeyEncoding: Clean up and reorganize to match styleSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-09Keypair: Convert to java-style array declarationsSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-08Constant time base64Jason A. Donenfeld
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-08res: Add icons for quick settings tileSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-08Profile: Add helper to check name validitySamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-08Profile: Make name modifiableSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-08ProfileActivity: Refactor into clean layers of functionalitySamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-07ProfileServiceInterface: Update for map-based collectionSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-07ProfileService: Use a map to store profile dataSamuel Holland
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>
2017-08-07ObservableArrayMapAdapter: Copy ObservableListAdapterSamuel Holland
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>
2017-08-07ProfileActivity: Add two-pane master-detail layoutSamuel Holland
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>
2017-08-07PlaceholderFragment: Simple fragment that shows a messageSamuel Holland
This is used for the detail pane when no profile is selected. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-07ProfileActivity: Make local variables finalSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-07ProfileActivityFragment: Fix service connection trackingSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-07ProfileList: Load fragment programmaticallySamuel Holland
This is necessary to replace it with the profile detail fragment later. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-04ProfileList: Extract service management into a base classSamuel Holland
It will be shared with other fragments. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-04ProfileList: Convert to a fragmentSamuel Holland
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>
2017-08-04ProfileList: remove generated config from UISamuel Holland
It was only there for developing the parser. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-04RootShell: Make shell command configurableSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-04icon: Remove transparency inside non-round dragonSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-01ProfileList: Remove "Add" menu action, to be replaced by a FABSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-01ProfileService: Rework profile updatingSamuel Holland
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>
2017-08-01Interface: Convert to using Keypair classSamuel Holland
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>
2017-08-01Keypair: Create class for generating/storing keysSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-01Curve25519: Import class from noise-javaSamuel Holland
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>