-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactors activities using google sheets and google drive (#1569)
* Adds GoogleAccountManager class to handle google account selection and permission Adds DriveHelper to interact with Google Drive Adds SheetsHelper to interact with Google Sheets * Overrides theme of account picker dialog * Removes duplicate code in ServerPreferencesFragment * Removes parameter from chooseAccount method and converts into a field * Removes listener from constructor * Breaks down methods into smaller ones in DriveHelper Code refactor * Moves all of the Drive calls into DriveService * Adds dependencies for power mock It is added to mock final methods which is not handled by Mockito * Adds tests for GoogleAccountsManager * Reverts the version of mockito-core to 2.8.47 to fix tests * Adds tests for DriveHelper * Adds sheets service * Adds tests for sheets helper * Fixes downloading media files from the media directory Issue : Folder mime type was getting appended even when the folder name was null. So fixed it by adding a condition while determining mime type * updates the test condition for getFilesFromDrive() if we don't provide any parent folder id or the folder name, the drive service shouldn't fetch any files from the google drive
- Loading branch information
1 parent
98624a8
commit bdecf25
Showing
15 changed files
with
1,521 additions
and
814 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
407 changes: 104 additions & 303 deletions
407
collect_app/src/main/java/org/odk/collect/android/activities/GoogleDriveActivity.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.