Compare commits

...
Author SHA1 Message Date
Tobias Kaminsky fd6a9b4fa2 update to 20170111 2017-01-11 00:35:37 +01:00
AndyScherzinger 8881869ec9 CHANGELOG 2017-01-10 23:55:56 +01:00
AndyScherzinger 5acf274da8 Merge branch 'fixAutoUploadViewNPE' of https://github.com/nextcloud/android into beta 2017-01-10 23:54:37 +01:00
AndyScherzinger 973798cc2a performance: only do further processing if not a Nc app folder 2017-01-10 22:47:07 +01:00
AndyScherzinger 07ac28f08d NPE Fix
resolves #529
2017-01-10 22:31:14 +01:00
Tobias Kaminsky 9f6e4e7e7c update to 20170109 2017-01-09 00:34:52 +01:00
tobiasKaminsky 1698e0ba15 Merge remote-tracking branch 'origin/removePhoneStatePermission' into beta 2017-01-08 09:00:57 +01:00
tobiasKaminsky c85d241912 remove read_phone_state permission 2017-01-08 08:55:48 +01:00
Tobias Kaminsky 6ad38ba34c update to 20170106 2017-01-06 00:34:57 +01:00
AndyScherzinger 93dc06da10 Merge branch 'master' of https://github.com/nextcloud/android into beta
# Conflicts:
#	AndroidManifest.xml
2017-01-06 00:13:07 +01:00
Tobias Kaminsky 39f2107541 update to 20170105 2017-01-05 00:36:09 +01:00
AndyScherzinger eac62b16bc Merge branch 'pinchZoom' of https://github.com/nextcloud/android into beta
# Conflicts:
#	src/com/owncloud/android/db/PreferenceManager.java
#	src/com/owncloud/android/ui/adapter/FileListListAdapter.java
#	src/com/owncloud/android/ui/fragment/ExtendedListFragment.java
2017-01-04 23:00:21 +01:00
AndyScherzinger dda8c2d10d save/restore zoom level 2017-01-04 22:47:35 +01:00
AndyScherzinger 19a1d7e994 formatting 2017-01-04 21:54:01 +01:00
AndyScherzinger b2d9d65386 use same check as elseware 2017-01-04 21:54:00 +01:00
AndyScherzinger 1d31783113 replace == with equals call 2017-01-04 21:54:00 +01:00
Andy Scherzinger 2ac7dbd892 cleanup 2017-01-04 21:54:00 +01:00
Andy Scherzinger 3e2c772e3d CR 2017-01-04 21:54:00 +01:00
tobiasKaminsky 72987427e3 show filenames only if column size < 4 2017-01-04 21:54:00 +01:00
tobiasKaminsky 512b569368 use local context 2017-01-04 21:53:59 +01:00
tobiasKaminsky 937f9e0d0c changes due to CR 2017-01-04 21:53:59 +01:00
tobiasKaminsky 9425ad266b changes according to CR 2017-01-04 21:53:59 +01:00
tobiasKaminsky 2a3998fa49 save gridColumns on start/stop 2017-01-04 21:53:59 +01:00
tobiasKaminsky 88e1cc462f after pinching grid is updated correctly 2017-01-04 21:53:59 +01:00
tobiasKaminsky 6173c6c8f9 wip 2017-01-04 21:53:56 +01:00
AndyScherzinger 9681f4505d Merge branch 'master' of https://github.com/nextcloud/android into beta
# Conflicts:
#	AndroidManifest.xml
#	CHANGELOG.md
2017-01-04 21:07:27 +01:00
AndyScherzinger 41b0dabea7 Merge branch 'master' of https://github.com/nextcloud/android into beta 2017-01-04 15:09:46 +01:00
AndyScherzinger 69cba92f71 Merge branch 'codacy' of https://github.com/nextcloud/android into beta
# Conflicts:
#	src/com/owncloud/android/services/observer/SyncedFolderObserver.java
2017-01-04 15:09:21 +01:00
AndyScherzinger 5854e24907 formatting 2017-01-03 21:45:30 +01:00
AndyScherzinger 6d1646753d code review 2017-01-03 21:23:10 +01:00
AndyScherzinger 9d77c48f7d fix visibility 2017-01-03 21:20:49 +01:00
AndyScherzinger 8a59e72829 fix codacy warnings 2017-01-03 21:20:46 +01:00
Tobias Kaminsky cd341d51d3 update to 20170101 2017-01-01 00:37:43 +01:00
tobiasKaminsky 6a2c055f83 Merge remote-tracking branch 'origin/beta' into beta
# Conflicts:
#	CHANGELOG.md
#	src/com/owncloud/android/ui/fragment/ExtendedListFragment.java
2016-12-31 17:36:17 +01:00
tobiasKaminsky 36a29dbe45 Merge remote-tracking branch 'remotes/origin/renameWifiOnly' into beta
# Conflicts:
#	CHANGELOG.md
#	src/com/owncloud/android/ui/fragment/ExtendedListFragment.java
2016-12-31 17:29:52 +01:00
Tobias Kaminsky 8b3e16cd96 update to 20161231 2016-12-31 00:35:49 +01:00
AndyScherzinger bda72a0be6 Merge branch 'emailShareCrashFix' of https://github.com/nextcloud/android into beta
# Conflicts:
#	CHANGELOG.md
#	src/com/owncloud/android/ui/fragment/ExtendedListFragment.java
2016-12-30 18:51:28 +01:00
AndyScherzinger 6d8366ab6f changelog 2016-12-30 17:37:44 +01:00
AndyScherzinger fb955be26b Merge branch 'emailShareCrashFix' of https://github.com/nextcloud/android into beta 2016-12-30 17:32:19 +01:00
AndyScherzinger 4b27b03f48 resolves: #483 - adding proper email sharee handling 2016-12-30 17:25:54 +01:00
Tobias Kaminsky 2faf793f32 update to 20161230 2016-12-30 00:35:14 +01:00
tobiasKaminsky 45bf886d90 Merge remote-tracking branch 'origin/beta' into beta 2016-12-29 16:26:23 +01:00
tobiasKaminsky 210c446cd9 Merge remote-tracking branch 'remotes/origin/disableInstantUploadLoggingOnNougat' into beta 2016-12-29 16:26:05 +01:00
tobiasKaminsky c43a034f43 Merge remote-tracking branch 'remotes/origin/pendingJobsinUploadView' into beta 2016-12-29 16:25:55 +01:00
tobiasKaminsky 86b9ed532d disable handling broadcast on Nougat and better 2016-12-29 16:10:59 +01:00
tobiasKaminsky c5c3d2f9a1 show pending jobs in upload view
cancel pending jobs
2016-12-29 16:07:25 +01:00
tobiasKaminsky 5b19a80c2c Merge remote-tracking branch 'remotes/origin/master' into showPendingJobs 2016-12-29 15:14:54 +01:00
tobiasKaminsky 3553854e15 Merge remote-tracking branch 'remotes/origin/autoUploadNoTmpFiles' into beta
# Conflicts:
#	src/com/owncloud/android/services/observer/SyncedFolderObserver.java
2016-12-29 14:49:37 +01:00
tobiasKaminsky 37b6abac9f ignore files ending with ".tmp" 2016-12-29 14:47:17 +01:00
Tobias Kaminsky 12da0a83c6 update to 20161229 2016-12-29 00:35:20 +01:00
tobiasKaminsky 194844e9ed Merge remote-tracking branch 'remotes/origin/fixRemovingFileBug' into beta 2016-12-28 10:07:31 +01:00
tobiasKaminsky 56688fa8ae fixed removing files #473 2016-12-28 10:05:19 +01:00
Tobias Kaminsky 9fbee9c741 update to 20161224 2016-12-24 00:35:39 +01:00
tobiasKaminsky c6470c26aa Merge remote-tracking branch 'remotes/origin/AutoUploadDelayAndCheck' into beta 2016-12-23 12:13:48 +01:00
tobiasKaminsky 331b7a679d Merge remote-tracking branch 'remotes/origin/autoUploadOnlyFiles' into beta 2016-12-23 12:13:37 +01:00
tobiasKaminsky 140418cc4c - delay job execution by minimal 10s
- on job execution: check if file exists prior to real upload. If file does not exist anymore, just ignore it
2016-12-23 11:19:22 +01:00
tobiasKaminsky 7d5a90d7a2 auto upload: only files, no folders 2016-12-23 10:25:19 +01:00
Tobias Kaminsky 3bada9ff28 update to 20161222 2016-12-22 00:36:47 +01:00
AndyScherzinger 04c0645079 Merge branch 'uploadUrlFile' of https://github.com/zmatsuo/android into beta 2016-12-21 13:18:47 +01:00
AndyScherzinger 9ee4bc38d6 log 2016-12-21 13:05:24 +01:00
AndyScherzinger 04bd1d492b Merge branch 'uploadUrlFile' of https://github.com/zmatsuo/android into beta 2016-12-21 13:05:17 +01:00
AndyScherzinger 5af7a1613c Merge branch 'uploadUrlFile' of https://github.com/zmatsuo/android into beta
# Conflicts:
#	src/com/owncloud/android/ui/activity/ReceiveExternalFilesActivity.java
2016-12-21 12:58:56 +01:00
AndyScherzinger 20486c72bf Merge branch 'uploadUrlFile' of https://github.com/zmatsuo/android into beta 2016-12-21 12:16:51 +01:00
Tobias Kaminsky 640415bfd9 update to 20161215 2016-12-15 00:36:13 +01:00
AndyScherzinger f82893683c CHANGELOG 2016-12-14 14:42:07 +01:00
AndyScherzinger bc1d5698bb Merge branch 'fix_file_modification_date_on_upload' of https://github.com/nextcloud/android into beta
# Conflicts:
#	build.gradle
2016-12-14 14:40:38 +01:00
AndyScherzinger c4c58c0985 CHANGELOG.md 2016-12-14 14:36:47 +01:00
AndyScherzinger 473871c0ad Merge branch 'designTweaks' of https://github.com/nextcloud/android into beta
# Conflicts:
#	src/com/owncloud/android/ui/fragment/ExtendedListFragment.java
2016-12-14 14:12:05 +01:00
AndyScherzinger 2b45305c74 Merge branch 'fix_bug_stop_player_when_delete_file' of https://github.com/nextcloud/android into beta
# Conflicts:
#	src/com/owncloud/android/ui/preview/PreviewMediaFragment.java
2016-12-14 14:10:07 +01:00
AndyScherzinger 9f202e2df3 fix codacy warnings 2016-12-14 13:43:02 +01:00
davigonz f97ba62f38 update to snapshot of lib version 2016-12-14 12:43:21 +01:00
davigonz 986d51d784 Read modification time from the file in local filesystem and set it to the file
# Conflicts:
#	src/com/owncloud/android/operations/UploadFileOperation.java
2016-12-14 12:36:47 +01:00
AndyScherzinger 1d420261fc restore backAsUp arrow in action bar when being in a subfolder (and drawer has been opened/closed) #445 2016-12-13 17:49:09 +01:00
AndyScherzinger 246acd94bb empty list tweaks for #445 2016-12-13 17:26:46 +01:00
AndyScherzinger 7012be9baa #445 - space between avatar and filename corrected 2016-12-13 14:19:45 +01:00
AndyScherzinger a428f9817e fix API call after rebase 2016-12-12 18:48:47 +01:00
Andy Scherzinger 470a293069 fixes after rebase 2016-12-12 18:48:47 +01:00
masensio 177985f1af Media player stops when its current file is deleted 2016-12-12 18:48:47 +01:00
AndyScherzinger 480073a8ae Merge branch 'master' of https://github.com/nextcloud/android into beta
# Conflicts:
#	AndroidManifest.xml
#	CHANGELOG.md
#	build.gradle
2016-12-07 19:16:44 +01:00
tobiasKaminsky 2330dc51d3 extracted string value
first try to get uploadStorageManager show job
2016-12-01 17:28:06 +01:00
Tobias Kaminsky 443faabb17 update to 20161129 2016-11-29 00:36:09 +01:00
AndyScherzinger 325e69a700 reactivate Auto upload for Android5+ 2016-11-28 17:37:15 +01:00
AndyScherzinger b13b21cae2 Merge branch 'master' of https://github.com/nextcloud/android into beta 2016-11-28 17:28:58 +01:00
Tobias Kaminsky 178f7c1842 update to 20161125 2016-11-25 00:36:40 +01:00
AndyScherzinger 8e2dc01a01 Merge branch 'whatsNewSkipOptimization' of https://github.com/nextcloud/android into beta 2016-11-24 12:57:38 +01:00
AndyScherzinger b21b1abe94 Merge branch 'master' of https://github.com/nextcloud/android into beta
# Conflicts:
#	AndroidManifest.xml
#	res/drawable-hdpi/what_new_instant_upload.png
#	res/drawable-hdpi/whats_new_accounts.png
#	res/drawable-hdpi/whats_new_files.png
#	res/layout/whats_new_element.xml
#	res/values/strings.xml
#	res/values/styles.xml
#	src/com/owncloud/android/MainApp.java
#	src/com/owncloud/android/features/FeatureList.java
#	src/com/owncloud/android/ui/activity/WhatsNewActivity.java
2016-11-24 11:51:39 +01:00
Tobias Kaminsky 1913b199b9 update to 20161123 2016-11-23 00:37:40 +01:00
AndyScherzinger dd7e816091 Merge branch 'federated_sharing_edit_options' of https://github.com/nextcloud/android into beta 2016-11-22 23:06:59 +01:00
AndyScherzinger 6a5759674a fix codacy warning 2016-11-22 23:06:15 +01:00
AndyScherzinger 311fbdaa9a updated CHANGELOG.md 2016-11-22 22:48:56 +01:00
AndyScherzinger 580a606f23 Merge branch 'federated_sharing_edit_options' of https://github.com/nextcloud/android into beta
# Conflicts:
#	build.gradle
#	src/com/owncloud/android/ui/fragment/EditShareFragment.java
2016-11-22 22:45:37 +01:00
AndyScherzinger a66ec7098d reintroduce account for federated sharing permission 2016-11-22 22:33:06 +01:00
AndyScherzinger 4fccc2e738 fix import 2016-11-22 22:21:35 +01:00
AndyScherzinger fdbc03cb2f adaptes federated shares permission computation 2016-11-22 22:18:32 +01:00
AndyScherzinger 4a1114bd16 fix compile error after lib merges
# Conflicts:
#	src/com/owncloud/android/ui/activity/ShareActivity.java
2016-11-22 22:18:32 +01:00
AndyScherzinger 5afa92c0cd Merge branch 'master' of https://github.com/nextcloud/android into beta 2016-11-22 22:10:05 +01:00
AndyScherzinger 47563c80f5 adaptes federated shares permission computation 2016-11-22 22:07:53 +01:00
AndyScherzinger 940a5aca7f fix compile error after lib merges 2016-11-22 21:57:26 +01:00
AndyScherzinger de008271ff Merge branch 'beta' of https://github.com/nextcloud/android into beta 2016-11-22 21:45:35 +01:00
tobiasKaminsky 7c552ffda1 Merge remote-tracking branch 'remotes/origin/master' into beta 2016-11-22 21:40:24 +01:00
AndyScherzinger 21cb4aa704 temp gradle dependency to library PR 2016-11-22 16:18:22 +01:00
AndyScherzinger f97a77ab88 add missing code fragments 2016-11-22 16:18:00 +01:00
David A. Velasco 13ecefe8e1 Remove always-true component in condition, from CR 2016-11-22 14:03:37 +01:00
jabarros a564295459 Fix var name in comment 2016-11-22 14:03:37 +01:00
jabarros a116070779 Handle create, change and delete options in federated sharing in servers 9.1 or up
# Conflicts:
#	src/com/owncloud/android/ui/fragment/EditShareFragment.java
2016-11-22 14:03:37 +01:00
AndyScherzinger d131c3715f Merge branch 'beta' of https://github.com/nextcloud/android into beta 2016-11-16 14:13:54 +01:00
Tobias Kaminsky fc07936182 update to 20161111 2016-11-11 00:34:58 +01:00
tobiasKaminsky a28bf742a7 fix "showing double whatsnew screen on first start" once again ;) 2016-11-10 22:49:48 +01:00
tobiasKaminsky 0e170a314f fix only one picture is uploaded 2016-11-10 21:58:46 +01:00
AndyScherzinger 5a69f4b213 fixing codacy warnings 2016-11-10 21:58:46 +01:00
AndyScherzinger 95186c361c brackets 2016-11-10 21:58:46 +01:00
AndyScherzinger 966ba0b89c Merge branch 'beta' of https://github.com/nextcloud/android into beta 2016-11-09 16:08:10 +01:00
Tobias Kaminsky f23a7c6d53 update to 20161109 2016-11-09 00:35:03 +01:00
tobiasKaminsky 13b095c28e changelog 2016-11-08 21:25:01 +01:00
tobiasKaminsky a50cc4eb55 Merge remote-tracking branch 'remotes/origin/streaming' into beta 2016-11-08 21:18:23 +01:00
Andy Scherzinger bb599ae95f minor code changes after rebase 2016-11-08 21:03:30 +01:00
AndyScherzinger 4ff7abb0ca ortganize imports 2016-11-08 07:49:15 +01:00
AndyScherzinger 5b3cb3f620 fix API calls after rebase 2016-11-08 07:49:15 +01:00
Andy Scherzinger b2255e9e19 removed printStackTrace 2016-11-08 07:49:15 +01:00
Andy Scherzinger 83d16e5284 minor code changes after rebase 2016-11-08 07:49:15 +01:00
tobiasKaminsky 981c1f854f update warning message 2016-11-08 07:49:15 +01:00
tobiasKaminsky 324296646b try to fix #1348 2016-11-08 07:49:14 +01:00
tobiasKaminsky ab419aa80a show error message again.
Stream with external app is now only possible via menu item
2016-11-08 07:49:14 +01:00
tobiasKaminsky 983d076c88 show external streaming only for not downloaded files 2016-11-08 07:49:14 +01:00
tobiasKaminsky f3fbaa456b add missing check for context menu 2016-11-08 07:49:14 +01:00
tobiasKaminsky 6129a932b7 tidy up once more 2016-11-08 07:49:14 +01:00
tobiasKaminsky 5b37ea0a6f tidy up 2016-11-08 07:49:13 +01:00
tobiasKaminsky 66073b7b13 wip 2016-11-08 07:49:13 +01:00
tobiasKaminsky 0a12f86657 wip 2016-11-08 07:49:13 +01:00
Tobias Kaminsky 6444d7debc update to 20161108 2016-11-08 00:35:26 +01:00
AndyScherzinger f4de72bd9d Merge branch 'syncedFolders' of https://github.com/nextcloud/android into beta 2016-11-07 17:54:22 +01:00
AndyScherzinger ffeab978fb Merge branch 'syncedFolders' of https://github.com/nextcloud/android into beta
# Conflicts:
#	src/com/owncloud/android/services/observer/FolderObserver.java
2016-11-07 15:38:42 +01:00
AndyScherzinger 2f8e6ebf15 Merge branch 'whatsNew' of https://github.com/nextcloud/android into beta 2016-11-07 15:37:41 +01:00
AndyScherzinger c05e72f0bb removal of code warnings 2016-11-07 15:37:20 +01:00
AndyScherzinger e060616629 remove unneeded valueOff call 2016-11-07 12:31:19 +01:00
AndyScherzinger 35d76f11ae Merge branch 'whatsNew' of https://github.com/nextcloud/android into beta
# Conflicts:
#	AndroidManifest.xml
#	res/drawable-anydpi-v21/arrow_right.xml
#	res/drawable-hdpi/what_new_instant_upload.png
#	res/drawable-hdpi/whats_new_accounts.png
#	res/drawable-hdpi/whats_new_files.png
#	res/drawable-hdpi/whats_new_share.png
#	res/drawable/indicator_dot_not_selected.xml
#	res/drawable/indicator_dot_selected.xml
#	res/drawable/round_button.xml
#	res/drawable/whats_new_progress_transition.xml
#	res/layout/whats_new_activity.xml
#	res/layout/whats_new_element.xml
#	res/values/strings.xml
#	src/com/owncloud/android/MainApp.java
#	src/com/owncloud/android/features/FeatureList.java
#	src/com/owncloud/android/ui/activity/WhatsNewActivity.java
#	src/com/owncloud/android/ui/whatsnew/ProgressIndicator.java
2016-11-07 10:41:48 +01:00
AndyScherzinger 036b281151 fixed headers and code duplication 2016-11-07 10:23:10 +01:00
AndyScherzinger 968be026d8 organize imports after rebase 2016-11-07 10:03:13 +01:00
Andy Scherzinger 4d44b3848a hide "skip" button on last feature element 2016-11-07 10:03:13 +01:00
Andy Scherzinger 8c62ada9ea incorporating the new feature graphics and coloring 2016-11-07 10:03:13 +01:00
Felix Epp 97b18c05eb Add new graphics for colorful whats new background 2016-11-07 10:03:12 +01:00
Andy Scherzinger 30f677610a resized font sizes 2016-11-07 10:03:12 +01:00
Andy Scherzinger 3d46f08caa fixed arrow icon color 2016-11-07 10:03:12 +01:00
Andy Scherzinger a728198e13 fixed arrow color, images and logos 2016-11-07 10:03:12 +01:00
Bartosz Przybylski f15afd89a1 Code review fixes 2016-11-07 10:03:12 +01:00
Bartosz Przybylski fa5d3b0caa tabs to spaces 2016-11-07 10:03:11 +01:00
Bartosz Przybylski c82511ce19 tabs to spaces 2016-11-07 10:03:11 +01:00
Bartosz Przybylski 6f28bcbf71 Show whats new only once on first run 2016-11-07 10:03:11 +01:00
Bartosz Przybylski 1f65aa0426 Change the way of displaying progress indicator 2016-11-07 10:03:11 +01:00
Bartosz Przybylski e41d991a73 Use ViewPager instead of custom dragging mechanism 2016-11-07 10:03:11 +01:00
Bartosz Przybylski 0f2333a431 Add parameter to allow showing whats new in beta 2016-11-07 10:03:10 +01:00
Andy Scherzinger 8df44eb9a7 use the standard dp margin & padding references 2016-11-07 10:03:10 +01:00
Andy Scherzinger ac484f0696 rework icons to not break ANT builds 2016-11-07 10:03:10 +01:00
Bartosz Przybylski 80d9d8985a Till java7 won't be used on ant project use old diamond notation 2016-11-07 10:03:10 +01:00
Andy Scherzinger 17a68e087f small design changes, adding arrow as vector (thus bumping gradle plugin to 1.5.0!), changing check icon and adding circle background for finish action 2016-11-07 10:03:10 +01:00
Andy Scherzinger 338b6c526a changes indicator to more material like style 2016-11-07 10:03:09 +01:00
Andy Scherzinger c13f865b5e added iOS images for the whats new screens 2016-11-07 10:03:09 +01:00
Bartosz Przybylski 9816b0c309 Use global method to get version code 2016-11-07 10:03:09 +01:00
Bartosz Przybylski 9a2561d130 Show done button when only single news is available 2016-11-07 10:03:09 +01:00
Bartosz Przybylski 369e63ed25 Insert type in diamond operator, but this is just a hack to support old comiler 2016-11-07 10:03:09 +01:00
Bartosz Przybylski 9a1b6105aa Implement left/right swipe in whats new view 2016-11-07 10:03:09 +01:00
Bartosz Przybylski 4c9ac6a3e3 Another small cleanup 2016-11-07 10:03:08 +01:00
Bartosz Przybylski 6a4a5eb49b Remove testing stuff 2016-11-07 10:03:08 +01:00
Bartosz Przybylski 84cfe8c1f0 Put FeatureList to separate file for cleaner code 2016-11-07 10:03:08 +01:00
Bartosz Przybylski 38700482a9 Small code cleanup in WhatsNewActivity 2016-11-07 10:03:08 +01:00
Bartosz Przybylski 8c08511237 Add Whats new activity and embed it into project 2016-11-07 10:02:58 +01:00
Tobias Kaminsky 46158d364a Merge branch 'beta' of github.com:/nextcloud/android into beta 2016-11-07 07:37:37 +01:00
AndyScherzinger 1aabcc9e25 remove unnecessary valueOf 2016-11-07 00:51:42 +01:00
AndyScherzinger 364145c349 replace printStackTrace with log call 2016-11-07 00:46:11 +01:00
AndyScherzinger 05056ccab7 replace printStackTrace with log call 2016-11-07 00:38:56 +01:00
Tobias Kaminsky b98b786c10 update to 20161107 2016-11-07 00:35:21 +01:00
AndyScherzinger 1c8b734a17 Merge branch 'fixPythonWarnings' of https://github.com/nextcloud/android into beta 2016-11-07 00:33:55 +01:00
AndyScherzinger a3bd4b91c1 Merge branch 'syncedFolders' of https://github.com/nextcloud/android into beta 2016-11-07 00:33:30 +01:00
Tobias Kaminsky 8ef23b1425 Merge branch 'beta' of github.com:/nextcloud/android into beta 2016-11-07 00:30:12 +01:00
AndyScherzinger f0eff92011 Merge branch 'syncedFolders' of https://github.com/nextcloud/android into beta
# Conflicts:
#	src/com/owncloud/android/services/observer/FolderObserver.java
2016-11-07 00:24:52 +01:00
AndyScherzinger 86064d8fc1 removed unused code warnings 2016-11-06 23:52:34 +01:00
AndyScherzinger 75b2fe9c36 imports fixed after merge 2016-11-06 23:33:18 +01:00
AndyScherzinger 4c04c8d5e0 Merge branch 'fixSendLogCrash' of https://github.com/nextcloud/android into beta 2016-11-06 23:25:21 +01:00
AndyScherzinger 6f7ebd22e3 Merge branch 'sortFix' of https://github.com/nextcloud/android into beta
# Conflicts:
#	src/com/owncloud/android/ui/activity/UploadFilesActivity.java
2016-11-06 23:24:36 +01:00
AndyScherzinger 4753f2bae7 remove unused array list 2016-11-06 23:20:34 +01:00
AndyScherzinger bf14e37db3 re-add sort by size for local folder views while sorting folders in the list alphabetically 2016-11-06 23:18:46 +01:00
AndyScherzinger 90b1202876 fix crash when exposing URI on Android 7+ 2016-11-06 22:05:19 +01:00
tobiasKaminsky 314146622d Merge remote-tracking branch 'remotes/origin/syncedFolders' into beta 2016-11-06 09:38:40 +01:00
Tobias Kaminsky 5f883c7d5c Merge branch 'beta' of github.com:/nextcloud/android into beta 2016-11-06 08:46:44 +01:00
Tobias Kaminsky 08bda3b50d update to 20161106 2016-11-06 08:40:47 +01:00
tobiasKaminsky 7be7c6d9f6 dummy change to get an update to beta 2016-11-05 10:30:53 +01:00
Tobias Kaminsky 6b6abdadf6 update 2016-11-05 10:06:34 +01:00
AndyScherzinger 25a9ec1ef5 Merge branch 'master' of https://github.com/iskradelta/android into beta
# Conflicts:
#	src/com/owncloud/android/ui/activity/Preferences.java
2016-11-03 17:02:03 +01:00
AndyScherzinger 491b7998ae remove unused code 2016-11-03 16:48:21 +01:00
AndyScherzinger bff45cc5d8 further formatting issues 2016-11-03 16:46:05 +01:00
AndyScherzinger 613e426468 formatting 2016-11-03 16:34:44 +01:00
AndyScherzinger faa6714cd6 centralize repeated texts 2016-11-03 16:27:01 +01:00
AndyScherzinger bd577c2863 bugfix compile 2016-11-03 16:00:07 +01:00
AndyScherzinger a04e68d8fe centralize repeated texts 2016-11-03 15:50:58 +01:00
AndyScherzinger 7f68bff3fc firther coverage issue not merge from PMD branch 2016-11-03 15:48:37 +01:00
AndyScherzinger 90f483331b fix for log path calculation 2016-11-03 14:53:09 +01:00
AndyScherzinger 8cbf227b03 fixed logging paths after merges 2016-11-03 14:27:57 +01:00
AndyScherzinger 84d4c8fa8a formatting 2016-11-03 13:17:56 +01:00
AndyScherzinger 852fdd59a3 Merge branch 'master' of https://github.com/iskradelta/android into beta
# Conflicts:
#	AndroidManifest.xml
#	build.gradle
#	res/values/setup.xml
#	src/com/owncloud/android/MainApp.java
#	src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
#	src/com/owncloud/android/db/ProviderMeta.java
#	src/com/owncloud/android/providers/FileContentProvider.java
#	src/com/owncloud/android/ui/activity/Preferences.java
#	src/com/owncloud/android/ui/preview/PreviewImageActivity.java
#	src/com/owncloud/android/utils/DisplayUtils.java
#	src/com/owncloud/android/utils/FileStorageUtils.java
2016-11-03 12:27:16 +01:00
AndyScherzinger 181cc6f120 fix after pull 2016-11-03 10:50:33 +01:00
AndyScherzinger a8004ba13f Merge branch 'master' of https://github.com/iskradelta/android
# Conflicts:
#	build.gradle
#	src/com/owncloud/android/datamodel/FileDataStorageManager.java
2016-11-03 10:48:59 +01:00
AndyScherzinger 0913b58594 further findbugs/pmd fixes for new feature (sd card) 2016-11-03 10:47:15 +01:00
AndyScherzinger 65ad78725a fixed minor warnings 2016-11-03 09:53:51 +01:00
AndyScherzinger b0590e2928 add Null Checks to fix isGrid/list checks 2016-11-03 09:53:51 +01:00
AndyScherzinger f3b02603e2 fix new PMD error after rebase, fix display remote file list issue 2016-11-03 09:53:51 +01:00
Iskra Delta 9dfb068357 PMD appeased
Some warnings have been supressed.
2016-11-03 09:53:50 +01:00
Iskra Delta ae05054fc7 FindBugs appeased 2016-11-03 09:53:14 +01:00
AndyScherzinger 0d88c5e4f1 Use correct array of options
Resolves: #336
2016-11-03 00:14:26 +01:00
AndyScherzinger 2fcdd2daf7 Revert "added lost imports"
This reverts commit d25e1c2343.
2016-11-02 22:42:33 +01:00
AndyScherzinger d25e1c2343 added lost imports 2016-11-02 22:29:24 +01:00
AndyScherzinger 3c89d5133d Merge branch 'master' of https://github.com/nextcloud/android into beta
# Conflicts:
#	res/values/strings.xml
#	src/com/owncloud/android/MainApp.java
#	src/com/owncloud/android/ui/activity/Preferences.java
#	src/com/owncloud/android/utils/FileStorageUtils.java
2016-11-02 22:25:48 +01:00
tobiasKaminsky e7f7954a3e update 2016-11-02 22:03:02 +01:00
AndyScherzinger 481ce675dc fixed minor warnings 2016-11-02 19:03:19 +01:00
AndyScherzinger b5f995b1fe add Null Checks to fix isGrid/list checks 2016-11-02 18:39:57 +01:00
AndyScherzinger 4a7bf985cb fix new PMD error after rebase, fix display remote file list issue 2016-11-02 16:56:44 +01:00
Iskra Delta 821dd1b868 PMD appeased
Some warnings have been supressed.
2016-11-02 16:22:31 +01:00
Iskra Delta 116a5ad597 FindBugs appeased 2016-11-02 16:20:18 +01:00
AndyScherzinger 49cd2c1df2 Merge branch 'master' of https://github.com/nextcloud/android into beta 2016-11-02 11:17:16 +01:00
AndyScherzinger aa3ed90295 Merge branch 'syncedFolders' of https://github.com/nextcloud/android into beta 2016-11-02 00:37:13 +01:00
AndyScherzinger 5890f1b8da Merge branch 'syncedFolders' of https://github.com/nextcloud/android into beta
# Conflicts:
#	src/com/owncloud/android/datamodel/OCFile.java
#	src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
#	src/com/owncloud/android/utils/BitmapUtils.java
#	src/com/owncloud/android/utils/MimeTypeUtil.java
2016-11-02 00:33:49 +01:00
AndyScherzinger d3dbdcedc6 Merge branch 'syncedFolders' of https://github.com/nextcloud/android into beta 2016-11-01 18:51:58 +01:00
AndyScherzinger 96666937c9 Merge branch 'syncedFolders' of https://github.com/nextcloud/android into beta
# Conflicts:
#	res/values/strings.xml
2016-10-31 18:58:42 +01:00
AndyScherzinger 87d1e56b63 Merge branch 'syncedFolders' of https://github.com/nextcloud/android into beta 2016-10-27 23:43:53 +02:00
tobiasKaminsky a357814531 update 2016-10-27 21:41:30 +02:00
tobiasKaminsky fa85658281 dirty fix for the null occurence 2016-10-27 20:11:57 +02:00
AndyScherzinger 5fd25ec06e Merge branch 'accountSwitcherOptimizations' of https://github.com/nextcloud/android into beta
# Conflicts:
#	build.gradle
#	res/layout/account_action.xml
#	res/layout/account_item.xml
#	res/layout/accounts_layout.xml
#	res/layout/drawer.xml
#	res/layout/drawer_header.xml
#	res/layout/toolbar_standard.xml
#	src/com/owncloud/android/ui/activity/ManageAccountsActivity.java
2016-10-27 16:15:59 +02:00
AndyScherzinger 0f6291f551 Merge branch 'syncedFolders' of https://github.com/nextcloud/android into beta 2016-10-27 15:36:40 +02:00
AndyScherzinger e0cfb10739 use proper alert 2016-10-27 09:46:05 +02:00
AndyScherzinger 55e29a13f8 removed deprecated eu language file (es is available) 2016-10-27 09:46:05 +02:00
AndyScherzinger e0952ab27e removed deprecated eu language file (es is available) 2016-10-27 09:46:05 +02:00
AndyScherzinger c9e1136898 removed deprecated ru-ru language file (ru is available) 2016-10-27 09:46:05 +02:00
AndyScherzinger 45813bb156 removed deprecated ch language file 2016-10-27 09:46:05 +02:00
AndyScherzinger f5d905f944 removed deprecated fi language file 2016-10-27 09:46:04 +02:00
AndyScherzinger 6066b2b0d5 upgrade legacy calls 2016-10-27 09:46:04 +02:00
AndyScherzinger 4cb667ed21 code review changes 2016-10-27 09:46:04 +02:00
AndyScherzinger 19b89fea6f fixes after cherry pick 2016-10-27 09:46:04 +02:00
AndyScherzinger f39b5e8205 use latest 2.2.1 gradle/Android plugin 2016-10-27 09:46:04 +02:00
David A. Velasco 1750c78a50 Finish action mode when drawer starts to open, recover it when drawer is closed
# Conflicts:
#	build.gradle
#	src/com/owncloud/android/ui/activity/DrawerActivity.java
#	src/com/owncloud/android/ui/fragment/OCFileListFragment.java
2016-10-27 09:46:03 +02:00
AndyScherzinger d8252e491d spacing fix (dp perfect) 2016-10-27 09:46:03 +02:00
AndyScherzinger 9fd78a5e49 fixed file headers 2016-10-27 09:46:03 +02:00
AndyScherzinger 9d1bc4495f housekeeping (file_actions and AccountActionsDialog aren't in use anymore due to multi select / account manager capabilities) 2016-10-27 09:46:03 +02:00
AndyScherzinger 8bc71e8610 layout fixes II 2016-10-27 09:46:03 +02:00
AndyScherzinger 1d205aad29 layoutfix 2016-10-27 09:46:02 +02:00
AndyScherzinger 518b53fac5 optimized layout adding username + account-url 2016-10-27 09:46:02 +02:00
AndyScherzinger 4ab0599e83 name and avatr clickable (switching accounts) 2016-10-27 09:46:02 +02:00
AndyScherzinger e1524fefab highlight currently active user 2016-10-27 09:46:02 +02:00
David A. Velasco f8b23eeb30 Show a check mark on the current account in the account manager
# Conflicts:
#	res/layout/account_item.xml
#	src/com/owncloud/android/ui/activity/ManageAccountsActivity.java
#	src/com/owncloud/android/ui/adapter/AccountListAdapter.java
2016-10-27 09:46:02 +02:00
AndyScherzinger e7090f8871 account switching via list item click 2016-10-27 09:46:01 +02:00
David A. Velasco e9f1cb210c Fix exit of the app after not creating account from 'Add account' in navigation drawer 2016-10-27 09:45:52 +02:00
AndyScherzinger 090cf59a5a 2016-10-26 Changelog 2016-10-26 22:19:37 +02:00
tobiasKaminsky ff7f29ef44 update to 20161026 2016-10-26 21:42:20 +02:00
AndyScherzinger 189e4cbdce fix preferences after merge 2016-10-26 21:22:05 +02:00
tobiasKaminsky 1a8efb672f resolve merge problems 2016-10-26 20:56:44 +02:00
tobiasKaminsky 4c624ca058 Merge remote-tracking branch 'remotes/origin/syncedFolders' into beta 2016-10-26 20:49:17 +02:00
AndyScherzinger d9a7e6e5ba build tools 24.0.2 2016-10-24 23:25:55 +02:00
AndyScherzinger 5344e438db downgrade to v24 due to old drone build images 2016-10-24 23:05:36 +02:00
AndyScherzinger fb2b10b709 remove merge duplicates 2016-10-24 22:41:24 +02:00
AndyScherzinger 1dc476596d fix comment 2016-10-24 19:52:38 +02:00
AndyScherzinger d3fce16e5c fixed merge errors, bumped to v25 (jack disabled due to http-client 3.3 enforcement) 2016-10-24 19:52:05 +02:00
AndyScherzinger 6c7907a25f Merge branch 'build24' of https://github.com/nextcloud/android into beta 2016-10-24 19:15:42 +02:00
AndyScherzinger a1f8cfc2ec manifest bump v25 2016-10-24 19:15:11 +02:00
AndyScherzinger ae63f520b1 Merge branch 'build24' of https://github.com/nextcloud/android into beta
# Conflicts:
#	AndroidManifest.xml
#	build.gradle
#	res/values/setup.xml
#	src/com/owncloud/android/datamodel/OCFile.java
2016-10-24 19:14:34 +02:00
AndyScherzinger 4ca2313b30 bump to 2.2.2 and v25 2016-10-24 19:12:16 +02:00
AndyScherzinger da93fff35d launcher icon aligned with stable release icon 2016-10-24 09:52:47 +02:00
tobiasKaminsky ba0be7e9cc Merge remote-tracking branch 'origin/build24' into beta 2016-10-19 21:05:13 +02:00
tobiasKaminsky a182f376fb Merge remote-tracking branch 'origin/accountSwitcherOptimizations' into beta 2016-10-19 21:03:20 +02:00
tobiasKaminsky 76993fba26 Merge remote-tracking branch 'origin/MimeUtilsHousekeeping' into beta 2016-10-19 21:01:02 +02:00
tobiasKaminsky 91cd67dbce revert removing buildTypes 2016-10-19 19:08:45 +02:00
AndyScherzinger 649e3972c3 new version 2016-10-19 18:12:14 +02:00
AndyScherzinger 6954e8af3f Merge branch 'master' of https://github.com/nextcloud/android into beta
# Conflicts:
#	res/xml/preferences.xml
#	src/com/owncloud/android/ui/activity/Preferences.java
2016-10-19 17:22:57 +02:00
AndyScherzinger 90637b7ba2 Merge branch 'accountSwitcherOptimizations' of https://github.com/nextcloud/android into beta
# Conflicts:
#	build.gradle
2016-10-18 16:25:51 +02:00
AndyScherzinger 1b1162e625 fixes after cherry pick 2016-10-17 14:40:24 +02:00
AndyScherzinger a5f2620858 use latest 2.2.1 gradle/Android plugin 2016-10-17 14:33:29 +02:00
David A. Velasco 4b3c122232 Finish action mode when drawer starts to open, recover it when drawer is closed
# Conflicts:
#	build.gradle
#	src/com/owncloud/android/ui/activity/DrawerActivity.java
#	src/com/owncloud/android/ui/fragment/OCFileListFragment.java
2016-10-17 14:31:18 +02:00
AndyScherzinger ad28148acb spacing fix (dp perfect) 2016-10-17 13:44:20 +02:00
AndyScherzinger 987b584604 fixed file headers 2016-10-17 13:44:20 +02:00
AndyScherzinger 9f78f3b65b housekeeping (file_actions and AccountActionsDialog aren't in use anymore due to multi select / account manager capabilities) 2016-10-17 13:44:20 +02:00
AndyScherzinger f03e1c3a2f layout fixes II 2016-10-17 13:44:20 +02:00
AndyScherzinger 1ac7218337 layoutfix 2016-10-17 13:44:19 +02:00
AndyScherzinger 573a729905 optimized layout adding username + account-url 2016-10-17 13:44:19 +02:00
AndyScherzinger 99e675dd18 name and avatr clickable (switching accounts) 2016-10-17 13:44:19 +02:00
AndyScherzinger 8f3de4ff74 highlight currently active user 2016-10-17 13:44:19 +02:00
David A. Velasco 3b118bb7d9 Show a check mark on the current account in the account manager
# Conflicts:
#	res/layout/account_item.xml
#	src/com/owncloud/android/ui/activity/ManageAccountsActivity.java
#	src/com/owncloud/android/ui/adapter/AccountListAdapter.java
2016-10-17 13:44:19 +02:00
AndyScherzinger 29e0dbd14a account switching via list item click 2016-10-17 13:44:18 +02:00
David A. Velasco f6a5466264 Fix exit of the app after not creating account from 'Add account' in navigation drawer 2016-10-17 13:44:18 +02:00
AndyScherzinger eaa1f08b35 Update Android Gradle Plugin to 2.2.1 2016-10-17 13:42:03 +02:00
AndyScherzinger 59e90c508d fix after rebase 2016-10-17 13:42:03 +02:00
AndyScherzinger 8d56482d69 update support library 2016-10-17 13:42:03 +02:00
Andy Scherzinger d4d18acebf fix android-lib reference 2016-10-17 13:42:03 +02:00
Andy Scherzinger 7b9edd6327 fixes 2016-10-17 13:42:02 +02:00
David A. Velasco ce08c2450b Fix crash opening or sending files in Android 7
# Conflicts:
#	res/values/setup.xml
#	src/com/owncloud/android/ui/activity/Preferences.java
2016-10-17 13:42:02 +02:00
Andy Scherzinger c14e217261 Revert "reactive instrumented demo test"
This reverts commit f7195a0192.
2016-10-17 13:42:02 +02:00
Andy Scherzinger 7f632389eb reactive instrumented demo test 2016-10-17 13:42:02 +02:00
Andy Scherzinger aa5c208e01 change emulator ready detection again, disable running sample instrumented unit test (failing at the moment)
updated wait_for_emulator.sh for actual travis cookbook revision https://github.com/travis-ci/travis-cookbooks/blob/62039b204699adcdf4b3365fac42d81246cb57fe/ci_environment/android-sdk/files/default/android-wait-for-emulator

try emulator 24

bump support lib to 24.2.0
2016-10-17 13:42:02 +02:00
Andy Scherzinger f8677b7d0c bump Android SDK Build-Tools to 24.0.2 2016-10-17 13:42:01 +02:00
Andy Scherzinger 100cb24cf5 no pre-dexing on travis (performance) 2016-10-17 13:42:01 +02:00
Andy Scherzinger 7ccffe2483 Update build tools to 24.0.1, java7 compat 2016-10-17 13:42:01 +02:00
Andy Scherzinger 42d1ea394f rebase/merge 2016-10-17 13:42:01 +02:00
Andy Scherzinger 3b4befc31c lib1.0.4 2016-10-17 13:42:01 +02:00
Andy Scherzinger d07958672d Revert "added jcenter repo"
This reverts commit b54e954c96014babd176d8f50ba6b7a9e44dea38.
2016-10-17 13:42:00 +02:00
Andy Scherzinger 091bb7f519 link to v24 version of the Nc lib 2016-10-17 13:42:00 +02:00
Andy Scherzinger 7b1465f8a8 added jcenter repo 2016-10-17 13:42:00 +02:00
Andy Scherzinger 82a7274ed4 bump to v24 incl. toolchain, jdk8 etc. 2016-10-17 13:41:57 +02:00
tobiasKaminsky b1e3818c98 update 2016-10-17 09:46:00 +02:00
Tobias Kaminsky 571f3b2a97 Merge pull request #335 from iskradelta/beta
Begin debug logs when build type is debug
2016-10-17 09:40:06 +02:00
Iskra Delta 0eab22268f Begin debug logs always
Previous check was not true hence no logs
being made ever. Also place the logs in
different folder in case user wishes
to debug both apps (or more) at the same
time.
2016-10-16 19:27:12 +00:00
tobiasKaminsky 1cd8c098d8 update 2016-10-12 18:54:31 +02:00
tobiasKaminsky a3aa7b33eb fix wrong merging 2016-10-12 18:50:26 +02:00
tobiasKaminsky b3ba7d104f Merge remote-tracking branch 'remotes/origin/build24' into beta
# Conflicts:
#	AndroidManifest.xml
#	build.gradle
#	res/values/setup.xml
#	src/com/owncloud/android/utils/FileStorageUtils.java
2016-10-12 18:38:59 +02:00
David A. Velasco 5f4275f3b9 Fix crash opening or sending files in Android 7
# Conflicts:
#	res/values/setup.xml
#	src/com/owncloud/android/ui/activity/Preferences.java
2016-10-12 18:38:20 +02:00
Andy Scherzinger aa76b425e2 Revert "reactive instrumented demo test"
This reverts commit f7195a0192.
2016-10-12 18:35:40 +02:00
Andy Scherzinger 1d10f18da0 reactive instrumented demo test 2016-10-12 18:35:40 +02:00
Andy Scherzinger cb0912a9d4 no pre-dexing on travis (performance) 2016-10-12 18:35:20 +02:00
Andy Scherzinger c513d574d5 Update build tools to 24.0.1, java7 compat 2016-10-12 18:34:43 +02:00
Andy Scherzinger 0ffc2372bb rebase/merge 2016-10-12 18:34:14 +02:00
Andy Scherzinger 65c7a53cbf Revert "added jcenter repo"
This reverts commit b54e954c96014babd176d8f50ba6b7a9e44dea38.
2016-10-12 18:33:56 +02:00
Andy Scherzinger 98beb64abe added jcenter repo 2016-10-12 18:33:39 +02:00
Andy Scherzinger 4af64f5249 bump to v24 incl. toolchain, jdk8 etc. 2016-10-12 18:33:39 +02:00
Andy Scherzinger d53ae1bbad cleanup 2016-10-12 18:32:43 +02:00
Andy Scherzinger a8c3311e69 CR 2016-10-12 18:32:43 +02:00
tobiasKaminsky c4eede9f25 save gridColumns on start/stop 2016-10-12 18:30:37 +02:00
tobiasKaminsky 8920afe054 wip 2016-10-12 18:27:58 +02:00
Jubril Edu 78da832560 Incorporated Checkstyle, findbugs, pmd and lint 2016-10-12 18:27:03 +02:00
AndyScherzinger 1bec2da4be Update Android Gradle Plugin to 2.2.1 2016-10-12 18:08:35 +02:00
AndyScherzinger 41e2ce1d38 fix after rebase 2016-10-12 17:22:38 +02:00
AndyScherzinger cfa5493023 update support library 2016-10-12 17:22:38 +02:00
Andy Scherzinger 4e65fa386f fix android-lib reference 2016-10-12 17:22:37 +02:00
Andy Scherzinger c4c741fb9e fixes 2016-10-12 17:22:37 +02:00
David A. Velasco f5f667c38b Fix crash opening or sending files in Android 7
# Conflicts:
#	res/values/setup.xml
#	src/com/owncloud/android/ui/activity/Preferences.java
2016-10-12 17:22:37 +02:00
Andy Scherzinger 1f26ac9ed7 Revert "reactive instrumented demo test"
This reverts commit f7195a0192.
2016-10-12 17:22:37 +02:00
Andy Scherzinger 5bf6722c64 reactive instrumented demo test 2016-10-12 17:22:36 +02:00
Andy Scherzinger 6f9311cbcb change emulator ready detection again, disable running sample instrumented unit test (failing at the moment)
updated wait_for_emulator.sh for actual travis cookbook revision https://github.com/travis-ci/travis-cookbooks/blob/62039b204699adcdf4b3365fac42d81246cb57fe/ci_environment/android-sdk/files/default/android-wait-for-emulator

try emulator 24

bump support lib to 24.2.0
2016-10-12 17:22:36 +02:00
Andy Scherzinger 0cf7154729 bump Android SDK Build-Tools to 24.0.2 2016-10-12 17:22:36 +02:00
Andy Scherzinger 2a56305a21 no pre-dexing on travis (performance) 2016-10-12 17:22:36 +02:00
Andy Scherzinger ab3f4a7af7 Update build tools to 24.0.1, java7 compat 2016-10-12 17:22:35 +02:00
Andy Scherzinger 852527171a rebase/merge 2016-10-12 17:22:35 +02:00
Andy Scherzinger 917626163d lib1.0.4 2016-10-12 17:22:35 +02:00
Andy Scherzinger f7403d8b37 Revert "added jcenter repo"
This reverts commit b54e954c96014babd176d8f50ba6b7a9e44dea38.
2016-10-12 17:22:34 +02:00
Andy Scherzinger ca0324dcc2 link to v24 version of the Nc lib 2016-10-12 17:22:34 +02:00
Andy Scherzinger d314232ae6 added jcenter repo 2016-10-12 17:22:34 +02:00
Andy Scherzinger 5a0e552974 bump to v24 incl. toolchain, jdk8 etc. 2016-10-12 17:22:34 +02:00
AndyScherzinger 5ada3b1c22 rename 2/2 2016-10-12 17:18:38 +02:00
AndyScherzinger b57d5aec66 rename 1/2 2016-10-12 17:18:38 +02:00
AndyScherzinger 00618ea9d3 Move all file type (as in mime type) checks to MimeTypeUtil 2016-10-12 17:18:37 +02:00
AndyScherzinger 2002a3f413 spacing fix (dp perfect) 2016-10-12 17:15:19 +02:00
AndyScherzinger 092d172f82 fixed file headers 2016-10-12 17:15:19 +02:00
AndyScherzinger 211934036e housekeeping (file_actions and AccountActionsDialog aren't in use anymore due to multi select / account manager capabilities) 2016-10-12 17:15:19 +02:00
AndyScherzinger 7838bf0d99 layout fixes II 2016-10-12 17:15:19 +02:00
AndyScherzinger 8d9db55e46 layoutfix 2016-10-12 17:15:19 +02:00
AndyScherzinger 2904ec1701 optimized layout adding username + account-url 2016-10-12 17:15:18 +02:00
AndyScherzinger 6b70332b09 name and avatr clickable (switching accounts) 2016-10-12 17:15:18 +02:00
AndyScherzinger 3ffc52b177 highlight currently active user 2016-10-12 17:15:18 +02:00
David A. Velasco 9996f226ff Show a check mark on the current account in the account manager
# Conflicts:
#	res/layout/account_item.xml
#	src/com/owncloud/android/ui/activity/ManageAccountsActivity.java
#	src/com/owncloud/android/ui/adapter/AccountListAdapter.java
2016-10-12 17:15:18 +02:00
AndyScherzinger 4e90676545 account switching via list item click 2016-10-12 17:15:18 +02:00
David A. Velasco c630955890 Fix exit of the app after not creating account from 'Add account' in navigation drawer 2016-10-12 17:15:14 +02:00
AndyScherzinger a1d6aa730e Merge branch 'accountSwitcherOptimizations' of https://github.com/nextcloud/android into beta 2016-10-12 16:59:27 +02:00
AndyScherzinger b96e4719ab spacing fix (dp perfect) 2016-10-12 16:58:31 +02:00
AndyScherzinger 7d4f1d4ac0 fixed file headers 2016-10-12 16:51:40 +02:00
AndyScherzinger b499e31051 housekeeping (file_actions and AccountActionsDialog aren't in use anymore due to multi select / account manager capabilities) 2016-10-12 16:51:24 +02:00
AndyScherzinger 598bd5f9ce Merge branch 'accountSwitcherOptimizations' of https://github.com/nextcloud/android into beta
# Conflicts:
#	res/layout/account_item.xml
2016-10-12 15:01:55 +02:00
AndyScherzinger 85f7e0e44f layout fixes II 2016-10-12 15:00:43 +02:00
AndyScherzinger b4552df41b layoutfix 2016-10-12 13:20:58 +02:00
AndyScherzinger 09b57dfb1a optimized layout adding username + account-url 2016-10-12 12:18:27 +02:00
AndyScherzinger 09b82393f0 name and avatr clickable (switching accounts) 2016-10-12 12:18:27 +02:00
AndyScherzinger 7637604ba2 highlight currently active user 2016-10-12 12:18:27 +02:00
David A. Velasco 9c543986ef Show a check mark on the current account in the account manager
# Conflicts:
#	res/layout/account_item.xml
#	src/com/owncloud/android/ui/activity/ManageAccountsActivity.java
#	src/com/owncloud/android/ui/adapter/AccountListAdapter.java
2016-10-12 12:18:26 +02:00
AndyScherzinger b75e04207e account switching via list item click 2016-10-12 12:18:26 +02:00
David A. Velasco 33e1b0c0b1 Fix exit of the app after not creating account from 'Add account' in navigation drawer 2016-10-12 12:18:23 +02:00
AndyScherzinger 490fa936eb Fixes after pulls, bumping version code, latest gradle plugin 2016-10-12 11:24:14 +02:00
AndyScherzinger 52c39b3da2 Merge branch 'MimeUtilsHousekeeping' of https://github.com/nextcloud/android into beta
# Conflicts:
#	src/com/owncloud/android/datamodel/OCFile.java
#	src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
#	src/com/owncloud/android/ui/adapter/FileListListAdapter.java
2016-10-12 10:55:10 +02:00
AndyScherzinger 61e773968c Merge branch 'accountSwitcherOptimizations' of https://github.com/nextcloud/android into beta 2016-10-12 10:53:47 +02:00
AndyScherzinger 3bc6f48c14 Merge branch 'master' of https://github.com/nextcloud/android into beta 2016-10-12 10:52:56 +02:00
AndyScherzinger 720b5bbf26 optimized layout adding username + account-url 2016-10-11 16:07:20 +02:00
AndyScherzinger 3443a892ef name and avatr clickable (switching accounts) 2016-10-11 15:20:16 +02:00
AndyScherzinger bcb2b8e358 highlight currently active user 2016-10-11 15:08:41 +02:00
David A. Velasco b80d3ab772 Show a check mark on the current account in the account manager
# Conflicts:
#	res/layout/account_item.xml
#	src/com/owncloud/android/ui/activity/ManageAccountsActivity.java
#	src/com/owncloud/android/ui/adapter/AccountListAdapter.java
2016-10-11 14:08:27 +02:00
AndyScherzinger 5daff9a7e3 account switching via list item click 2016-10-11 13:24:05 +02:00
David A. Velasco 867ceb1574 Fix exit of the app after not creating account from 'Add account' in navigation drawer 2016-10-11 13:11:58 +02:00
AndyScherzinger 997bc22d94 rename 2/2 2016-10-10 18:32:00 +02:00
AndyScherzinger bcb7819592 rename 1/2 2016-10-10 18:31:32 +02:00
AndyScherzinger d7995cbf30 Move all file type (as in mime type) checks to MimeTypeUtil 2016-10-10 15:29:20 +02:00
AndyScherzinger 87549920d7 Merge branch 'beta' of https://github.com/nextcloud/android into beta 2016-10-06 22:45:00 +02:00
AndyScherzinger bbc2d14b37 Merge branch 'master' of https://github.com/nextcloud/android into beta 2016-10-06 22:44:14 +02:00
tobiasKaminsky 47e92e8360 new version 2016-10-06 19:34:12 +02:00
tobiasKaminsky b963ca650c Merge remote-tracking branch 'origin/descendIntoFolder' into beta 2016-10-06 19:31:43 +02:00
tobiasKaminsky 78bc2f3391 Merge remote-tracking branch 'origin/master' into beta 2016-10-06 19:31:01 +02:00
AndyScherzinger fe21d590e9 version bump + CHANGELOG.md 2016-10-06 10:11:38 +02:00
AndyScherzinger cd46d2b964 Merge branch 'build24' of https://github.com/nextcloud/android into beta
# Conflicts:
#	AndroidManifest.xml
#	build.gradle
#	res/values/setup.xml
#	src/com/owncloud/android/ui/helpers/FileOperationsHelper.java
#	src/com/owncloud/android/utils/FileStorageUtils.java
2016-10-06 09:57:19 +02:00
AndyScherzinger a142711031 Merge branch 'master' of https://github.com/nextcloud/android into beta
# Conflicts:
#	src/com/owncloud/android/ui/helpers/FileOperationsHelper.java
#	src/com/owncloud/android/utils/FileStorageUtils.java
2016-10-06 09:54:40 +02:00
AndyScherzinger b33445d17e fix after rebase 2016-10-06 09:39:54 +02:00
AndyScherzinger 4d2a43aabd update support library 2016-10-06 09:14:59 +02:00
Andy Scherzinger e7be185502 fix android-lib reference 2016-10-06 09:14:59 +02:00
Andy Scherzinger cd755699e3 fixes 2016-10-06 09:14:58 +02:00
David A. Velasco fc27def747 Fix crash opening or sending files in Android 7
# Conflicts:
#	res/values/setup.xml
#	src/com/owncloud/android/ui/activity/Preferences.java
2016-10-06 09:14:58 +02:00
Andy Scherzinger 3c52abe2d8 Revert "reactive instrumented demo test"
This reverts commit f7195a0192.
2016-10-06 09:10:56 +02:00
Andy Scherzinger 0c1c791f7f reactive instrumented demo test 2016-10-06 09:10:56 +02:00
Andy Scherzinger 25ef4d941d change emulator ready detection again, disable running sample instrumented unit test (failing at the moment)
updated wait_for_emulator.sh for actual travis cookbook revision https://github.com/travis-ci/travis-cookbooks/blob/62039b204699adcdf4b3365fac42d81246cb57fe/ci_environment/android-sdk/files/default/android-wait-for-emulator

try emulator 24

bump support lib to 24.2.0
2016-10-06 09:10:56 +02:00
Andy Scherzinger a942fc7fc0 bump Android SDK Build-Tools to 24.0.2 2016-10-06 09:10:56 +02:00
Andy Scherzinger 1ba8dccc22 no pre-dexing on travis (performance) 2016-10-06 09:10:56 +02:00
Andy Scherzinger 90df2299f6 Update build tools to 24.0.1, java7 compat 2016-10-06 09:10:55 +02:00
Andy Scherzinger e4ab7a812c rebase/merge 2016-10-06 09:10:55 +02:00
Andy Scherzinger 89094c1f10 lib1.0.4 2016-10-06 09:10:55 +02:00
Andy Scherzinger 919478723c Revert "added jcenter repo"
This reverts commit b54e954c96014babd176d8f50ba6b7a9e44dea38.
2016-10-06 09:10:55 +02:00
Andy Scherzinger 8254baf187 link to v24 version of the Nc lib 2016-10-06 09:10:55 +02:00
Andy Scherzinger 12d9bdd6f8 added jcenter repo 2016-10-06 09:10:55 +02:00
Andy Scherzinger 40c3e17ea9 bump to v24 incl. toolchain, jdk8 etc. 2016-10-06 09:10:54 +02:00
tobiasKaminsky c2225dda46 add change to subfolder 2016-10-05 20:24:13 +02:00
AndyScherzinger 46c81972ec merge fix 2016-10-05 01:31:51 +02:00
AndyScherzinger 0edcf3a45a Merge branch 'build24' of https://github.com/nextcloud/android into beta
# Conflicts:
#	AndroidManifest.xml
#	build.gradle
#	res/values/setup.xml
#	src/com/owncloud/android/utils/FileStorageUtils.java
2016-10-05 01:07:02 +02:00
AndyScherzinger 3f70de3579 update support library 2016-10-05 00:58:04 +02:00
AndyScherzinger 09d0637c8b Merge branch 'fixDroneLink' of https://github.com/nextcloud/android into beta 2016-10-05 00:33:11 +02:00
AndyScherzinger 7470d6f3eb further pulls/changes 2016-10-05 00:32:36 +02:00
AndyScherzinger ba99684909 Merge branch 'wordingDavdroid' of https://github.com/nextcloud/android into beta 2016-10-05 00:31:20 +02:00
AndyScherzinger abcb8e8161 Merge branch 'cursorFix' of https://github.com/nextcloud/android into beta 2016-10-05 00:29:47 +02:00
AndyScherzinger 59355d38d5 log result code for error without exceptions 2016-10-05 00:15:34 +02:00
AndyScherzinger 852c11e11c distinguish exception for error and canceled 2016-10-05 00:09:04 +02:00
AndyScherzinger 70085c09ea Merge branch 'master' of https://github.com/nextcloud/android into beta 2016-10-04 23:49:28 +02:00
tobiasKaminsky 4ef6a9863a descend into folder after creating it in uploader 2016-10-04 13:52:41 +02:00
Andy Scherzinger 27e396501c fix android-lib reference 2016-10-04 13:44:55 +02:00
Andy Scherzinger 1074f20f9c fixes 2016-10-04 13:44:55 +02:00
David A. Velasco 9d5482a0c7 Fix crash opening or sending files in Android 7
# Conflicts:
#	res/values/setup.xml
#	src/com/owncloud/android/ui/activity/Preferences.java
2016-10-04 13:44:54 +02:00
Andy Scherzinger c7574a3d73 Revert "reactive instrumented demo test"
This reverts commit f7195a0192.
2016-10-04 13:44:54 +02:00
Andy Scherzinger 03e3684865 reactive instrumented demo test 2016-10-04 13:44:54 +02:00
Andy Scherzinger 9ee7909eb0 change emulator ready detection again, disable running sample instrumented unit test (failing at the moment)
updated wait_for_emulator.sh for actual travis cookbook revision https://github.com/travis-ci/travis-cookbooks/blob/62039b204699adcdf4b3365fac42d81246cb57fe/ci_environment/android-sdk/files/default/android-wait-for-emulator

try emulator 24

bump support lib to 24.2.0
2016-10-04 13:44:54 +02:00
Andy Scherzinger e7d577fe17 bump Android SDK Build-Tools to 24.0.2 2016-10-04 13:44:54 +02:00
Andy Scherzinger 0805bf6456 no pre-dexing on travis (performance) 2016-10-04 13:44:53 +02:00
Andy Scherzinger 7fcb2c4cb0 Update build tools to 24.0.1, java7 compat 2016-10-04 13:44:53 +02:00
Andy Scherzinger a7aa45a891 rebase/merge 2016-10-04 13:44:53 +02:00
Andy Scherzinger 239140d5e6 lib1.0.4 2016-10-04 13:44:53 +02:00
Andy Scherzinger 25e896a096 Revert "added jcenter repo"
This reverts commit b54e954c96014babd176d8f50ba6b7a9e44dea38.
2016-10-04 13:44:53 +02:00
Andy Scherzinger 829c5b9a35 link to v24 version of the Nc lib 2016-10-04 13:44:52 +02:00
Andy Scherzinger 8ae9670250 added jcenter repo 2016-10-04 13:44:52 +02:00
Andy Scherzinger 56453266a6 bump to v24 incl. toolchain, jdk8 etc. 2016-10-04 13:44:49 +02:00
Andy Scherzinger 5c42d96259 Merge branch '201_fixExpandableUploadListAdapter' of https://github.com/nextcloud/android into beta 2016-09-26 17:53:11 +02:00
Andy Scherzinger 7efae88a5d bugfix for NPE #201 2016-09-26 17:49:45 +02:00
Andy Scherzinger 515c6fe943 Merge branch 'beta' of https://github.com/nextcloud/android into beta
# Conflicts:
#	build.gradle
2016-09-26 17:32:34 +02:00
Andy Scherzinger 763df858de fix setup.xml after branch pulls 2016-09-26 17:29:42 +02:00
Andy Scherzinger 76cb95cd07 Merge branch 'dismissDialogFragment' of https://github.com/nextcloud/android into beta 2016-09-26 17:25:10 +02:00
Andy Scherzinger 31a120ea9a Merge branch 'build24' of https://github.com/nextcloud/android into beta
# Conflicts:
#	AndroidManifest.xml
#	build.gradle
#	res/values/setup.xml
#	src/com/owncloud/android/utils/FileStorageUtils.java
2016-09-26 17:23:27 +02:00
Andy Scherzinger a349d6934d Merge branch 'master' of https://github.com/nextcloud/android into beta
# Conflicts:
#	wait_for_emulator.sh
2016-09-26 17:19:37 +02:00
Andy Scherzinger 7e964795b5 fix android-lib reference 2016-09-26 16:40:38 +02:00
Andy Scherzinger 723334a1c1 fixes 2016-09-26 16:40:38 +02:00
David A. Velasco 5a37719111 Fix crash opening or sending files in Android 7
# Conflicts:
#	res/values/setup.xml
#	src/com/owncloud/android/ui/activity/Preferences.java
2016-09-26 16:40:38 +02:00
Andy Scherzinger d8d803ab8c Revert "reactive instrumented demo test"
This reverts commit f7195a0192.
2016-09-26 16:40:38 +02:00
Andy Scherzinger 313fde0bc6 reactive instrumented demo test 2016-09-26 16:40:38 +02:00
Andy Scherzinger d0b691cafb change emulator ready detection again, disable running sample instrumented unit test (failing at the moment)
updated wait_for_emulator.sh for actual travis cookbook revision https://github.com/travis-ci/travis-cookbooks/blob/62039b204699adcdf4b3365fac42d81246cb57fe/ci_environment/android-sdk/files/default/android-wait-for-emulator

try emulator 24

bump support lib to 24.2.0
2016-09-26 16:40:38 +02:00
Andy Scherzinger ed04da30dc bump Android SDK Build-Tools to 24.0.2 2016-09-26 16:40:00 +02:00
Andy Scherzinger 0e45eed32a no pre-dexing on travis (performance) 2016-09-26 16:40:00 +02:00
Andy Scherzinger 979b14bfae Update build tools to 24.0.1, java7 compat 2016-09-26 16:40:00 +02:00
Andy Scherzinger 0fa105e781 rebase/merge 2016-09-26 16:40:00 +02:00
Andy Scherzinger b3c8abd0d8 lib1.0.4 2016-09-26 16:40:00 +02:00
Andy Scherzinger 5c095bb00b Revert "added jcenter repo"
This reverts commit b54e954c96014babd176d8f50ba6b7a9e44dea38.
2016-09-26 16:40:00 +02:00
Andy Scherzinger bad15df75d link to v24 version of the Nc lib 2016-09-26 16:40:00 +02:00
Andy Scherzinger dfeae52619 added jcenter repo 2016-09-26 16:40:00 +02:00
Andy Scherzinger 795d695300 bump to v24 incl. toolchain, jdk8 etc. 2016-09-26 16:40:00 +02:00
Andy Scherzinger 200fe5ab64 fix crash in dismissLoadingDialog #279 2016-09-26 16:30:53 +02:00
Andy Scherzinger dd5894d690 fix crash in dismissLoadingDialog #279 2016-09-26 16:28:24 +02:00
tobiasKaminsky 1c1c464165 update 2016-09-22 20:15:43 +02:00
tobiasKaminsky 655324e179 Merge remote-tracking branch 'origin/beta' into beta
# Conflicts:
#	AndroidManifest.xml
#	CHANGELOG.md
#	res/values/strings.xml
2016-09-21 19:43:18 +02:00
tobiasKaminsky 5b0aa52d93 Merge remote-tracking branch 'remotes/origin/whatsNew' into beta 2016-09-21 19:40:51 +02:00
tobiasKaminsky a4a2cb9721 removed 5. screen
avoid duplicate whats new
2016-09-21 19:40:27 +02:00
tobiasKaminsky 881063e9fb Merge remote-tracking branch 'remotes/origin/whatsNew' into beta 2016-09-21 19:35:40 +02:00
tobiasKaminsky 63fe98d8ac Merge remote-tracking branch 'origin/whatsNew' into whatsNew 2016-09-21 17:29:09 +02:00
Andy Scherzinger 08b4e9c709 Merge branch 'logSendCrash' of https://github.com/nextcloud/android into beta 2016-09-21 12:01:59 +02:00
Andy Scherzinger 41861a8d1f IndexOutOfBounds check #283 2016-09-21 11:56:38 +02:00
Andy Scherzinger 5feacb3b69 2016-09-21 2016-09-21 01:58:18 +02:00
Andy Scherzinger 6325d56864 Merge branch 'LukeOwncloud-patch-remove-failed' of https://github.com/nextcloud/android into beta 2016-09-21 01:56:01 +02:00
Andy Scherzinger a811f49f58 Merge branch 'magicUrl' of https://github.com/nextcloud/android into beta 2016-09-21 01:54:59 +02:00
Andy Scherzinger bd883c53d2 Merge branch 'dismissDialogFragment' of https://github.com/nextcloud/android into beta 2016-09-21 01:54:11 +02:00
Andy Scherzinger fb71c3e1ce Merge branch 'whatsNew' of https://github.com/nextcloud/android into beta
# Conflicts:
#	AndroidManifest.xml
#	res/layout/whats_new_activity.xml
#	res/layout/whats_new_element.xml
#	res/values/strings.xml
#	src/com/owncloud/android/MainApp.java
#	src/com/owncloud/android/ui/activity/WhatsNewActivity.java
2016-09-21 01:33:08 +02:00
Andy Scherzinger b415a9a598 Merge branch 'master' of https://github.com/nextcloud/android into beta
# Conflicts:
#	.travis.yml
#	AndroidManifest.xml
#	CHANGELOG.md
2016-09-21 01:30:09 +02:00
Andy Scherzinger b5ee31bad3 removed unnecessary else part 2016-09-21 00:20:41 +02:00
LukeOwncloud af5f521454 return false if remove failed
if OCFile is null --> cannot delete ==> return false.
2016-09-21 00:20:41 +02:00
Andy Scherzinger 0761bff179 fix crash in dismissLoadingDialog #279 2016-09-21 00:19:35 +02:00
Andy Scherzinger 2a5d777219 code review changes 2016-09-21 00:18:17 +02:00
Andy Scherzinger 6244502d87 downgrade to only support cloud://login 2016-09-21 00:18:17 +02:00
Andy Scherzinger 4cb527795c move connection (re) init from start to onResume and restore server checked flag 2016-09-21 00:18:17 +02:00
Andy Scherzinger a4361a447c wip server check 2016-09-21 00:18:17 +02:00
Andy Scherzinger 4b77f648dd focus check 2016-09-21 00:18:17 +02:00
Andy Scherzinger 0a224c442b fix url mapping 2016-09-21 00:18:17 +02:00
Andy Scherzinger 17d5683d98 MagicUrls for Login + Unit tests for the parser 2016-09-21 00:18:17 +02:00
Andy Scherzinger 8bdb9d72a9 resized font sizes 2016-09-21 00:11:24 +02:00
Andy Scherzinger 31ffb0a2a1 fixed arrow icon color 2016-09-21 00:11:24 +02:00
Andy Scherzinger 8d49161b39 fixed arrow color, images and logos 2016-09-21 00:11:24 +02:00
Bartosz Przybylski 9281a3acae Code review fixes 2016-09-21 00:11:24 +02:00
Bartosz Przybylski e0aa06cbc9 tabs to spaces 2016-09-21 00:11:24 +02:00
Bartosz Przybylski be9f000aad tabs to spaces 2016-09-21 00:11:24 +02:00
Bartosz Przybylski 6094f5fcb7 Show whats new only once on first run 2016-09-21 00:11:24 +02:00
Bartosz Przybylski 0f30fa0bc5 Change the way of displaying progress indicator 2016-09-21 00:11:24 +02:00
Bartosz Przybylski 3b665c28e3 Use ViewPager instead of custom dragging mechanism 2016-09-21 00:11:24 +02:00
Bartosz Przybylski 55f41a12d7 Add parameter to allow showing whats new in beta 2016-09-21 00:11:24 +02:00
Andy Scherzinger b980363b7c use the standard dp margin & padding references 2016-09-21 00:11:24 +02:00
Andy Scherzinger 1f7df2fd9b rework icons to not break ANT builds 2016-09-21 00:11:24 +02:00
Bartosz Przybylski c02370145e Till java7 won't be used on ant project use old diamond notation 2016-09-21 00:11:24 +02:00
Andy Scherzinger ee4ae35eb9 small design changes, adding arrow as vector (thus bumping gradle plugin to 1.5.0!), changing check icon and adding circle background for finish action 2016-09-21 00:11:24 +02:00
Andy Scherzinger 33bcc4ba1c changes indicator to more material like style 2016-09-21 00:11:24 +02:00
Andy Scherzinger 67c5b57cfd added iOS images for the whats new screens 2016-09-21 00:11:24 +02:00
Bartosz Przybylski a5e2d7d239 Use global method to get version code 2016-09-21 00:11:24 +02:00
Bartosz Przybylski c4406f4141 Show done button when only single news is available 2016-09-21 00:11:24 +02:00
Bartosz Przybylski e8309e2431 Insert type in diamond operator, but this is just a hack to support old comiler 2016-09-21 00:11:24 +02:00
Bartosz Przybylski c1ca971823 Implement left/right swipe in whats new view 2016-09-21 00:11:24 +02:00
Bartosz Przybylski 5bb9620aa1 Another small cleanup 2016-09-21 00:11:24 +02:00
Bartosz Przybylski 8c2cfe9ab4 Remove testing stuff 2016-09-21 00:11:24 +02:00
Bartosz Przybylski a962e2aca5 Put FeatureList to separate file for cleaner code 2016-09-21 00:11:24 +02:00
Bartosz Przybylski c5b8bbe0f4 Small code cleanup in WhatsNewActivity 2016-09-21 00:11:24 +02:00
Bartosz Przybylski e2ad7cbe2b Add Whats new activity and embed it into project 2016-09-21 00:11:24 +02:00
tobiasKaminsky 60aeedd80e Merge remote-tracking branch 'remotes/origin/whatsNew' into beta 2016-09-18 17:55:06 +02:00
Andy Scherzinger e8d7fd0953 resized font sizes 2016-09-18 17:50:40 +02:00
Andy Scherzinger 18222b2467 fixed arrow icon color 2016-09-18 17:50:40 +02:00
Andy Scherzinger 84d8695677 fixed arrow color, images and logos 2016-09-18 17:50:40 +02:00
Bartosz Przybylski 24c2dd49ff Code review fixes 2016-09-18 17:50:40 +02:00
Bartosz Przybylski 5980af1caa tabs to spaces 2016-09-18 17:50:40 +02:00
Bartosz Przybylski 91b9ccdb19 tabs to spaces 2016-09-18 17:50:40 +02:00
Bartosz Przybylski 457a5d934a Show whats new only once on first run 2016-09-18 17:50:40 +02:00
Bartosz Przybylski 3d86e32eb5 Change the way of displaying progress indicator 2016-09-18 17:50:40 +02:00
Bartosz Przybylski 48db65b178 Use ViewPager instead of custom dragging mechanism 2016-09-18 17:50:40 +02:00
Bartosz Przybylski 6854dc5b02 Add parameter to allow showing whats new in beta 2016-09-18 17:50:40 +02:00
Andy Scherzinger c6f970b52a use the standard dp margin & padding references 2016-09-18 17:50:40 +02:00
Andy Scherzinger b2171f2e8f rework icons to not break ANT builds 2016-09-18 17:50:40 +02:00
Bartosz Przybylski cc757729bd Till java7 won't be used on ant project use old diamond notation 2016-09-18 17:50:40 +02:00
Andy Scherzinger f6c5c63c0d small design changes, adding arrow as vector (thus bumping gradle plugin to 1.5.0!), changing check icon and adding circle background for finish action 2016-09-18 17:50:40 +02:00
Andy Scherzinger 871607b89c changes indicator to more material like style 2016-09-18 17:50:40 +02:00
Andy Scherzinger 6b462c9895 added iOS images for the whats new screens 2016-09-18 17:50:40 +02:00
Bartosz Przybylski 1c258946c2 Use global method to get version code 2016-09-18 17:50:40 +02:00
Bartosz Przybylski 97acb9d4e4 Show done button when only single news is available 2016-09-18 17:50:40 +02:00
Bartosz Przybylski e410a6f7ac Insert type in diamond operator, but this is just a hack to support old comiler 2016-09-18 17:50:40 +02:00
Bartosz Przybylski f33e985b84 Implement left/right swipe in whats new view 2016-09-18 17:50:40 +02:00
Bartosz Przybylski 2bf7b49774 Another small cleanup 2016-09-18 17:50:40 +02:00
Bartosz Przybylski c65d78ff20 Remove testing stuff 2016-09-18 17:50:40 +02:00
Bartosz Przybylski c91b7f7442 Put FeatureList to separate file for cleaner code 2016-09-18 17:50:40 +02:00
Bartosz Przybylski a6c74539f8 Small code cleanup in WhatsNewActivity 2016-09-18 17:50:40 +02:00
Bartosz Przybylski 9e85786f00 Add Whats new activity and embed it into project 2016-09-18 17:50:40 +02:00
tobiasKaminsky 2d0c73fef1 Merge remote-tracking branch 'remotes/origin/whatsNew' into beta 2016-09-18 17:49:24 +02:00
tobiasKaminsky c549385e96 prevent showing what's new screen twice 2016-09-18 14:48:48 +02:00
tobiasKaminsky ffbe691085 Merge remote-tracking branch 'origin/beta' into beta 2016-09-18 09:12:41 +02:00
tobiasKaminsky 6c1c723d50 Merge remote-tracking branch 'remotes/origin/master' into beta 2016-09-18 09:11:38 +02:00
Andy Scherzinger d92ddc061c Merge branch 'master' of https://github.com/nextcloud/android into beta
# Conflicts:
#	AndroidManifest.xml
#	CHANGELOG.md
2016-09-18 01:28:36 +02:00
Andy Scherzinger ea86870d7f Merge branch 'whatsNew' of https://github.com/nextcloud/android into beta 2016-09-15 15:19:52 +02:00
Andy Scherzinger 1084f97927 fixed arrow icon color 2016-09-15 15:19:20 +02:00
Andy Scherzinger 3504a08163 Merge branch 'whatsNew' of https://github.com/nextcloud/android into beta
# Conflicts:
#	res/drawable-hdpi/whats_new_accounts.png
2016-09-15 15:12:16 +02:00
Andy Scherzinger ddf2e9f717 fixed arrow color, images and logos 2016-09-15 15:08:43 +02:00
Andy Scherzinger e6bc6591d8 Merge branch 'whatsNew' of https://github.com/nextcloud/android into beta
# Conflicts:
#	res/values/strings.xml
#	src/com/owncloud/android/MainApp.java
2016-09-15 14:37:56 +02:00
Andy Scherzinger 4cda211590 fixed logos 2016-09-15 13:30:28 +02:00
Bartosz Przybylski 8a8c82301d Code review fixes 2016-09-15 11:35:43 +02:00
Bartosz Przybylski b78ce68baf tabs to spaces 2016-09-15 11:35:43 +02:00
Bartosz Przybylski 814d147ad4 tabs to spaces 2016-09-15 11:35:43 +02:00
Bartosz Przybylski 287089922b Show whats new only once on first run 2016-09-15 11:35:43 +02:00
Bartosz Przybylski e4552b6da6 Change the way of displaying progress indicator 2016-09-15 11:35:43 +02:00
Bartosz Przybylski 29079e5fd2 Use ViewPager instead of custom dragging mechanism 2016-09-15 11:35:43 +02:00
Bartosz Przybylski 1a57ddef9a Add parameter to allow showing whats new in beta 2016-09-15 11:35:43 +02:00
Andy Scherzinger 0eae7c59a9 use the standard dp margin & padding references 2016-09-15 11:35:43 +02:00
Andy Scherzinger 9180481515 rework icons to not break ANT builds 2016-09-15 11:35:43 +02:00
Bartosz Przybylski b1f8f084b8 Till java7 won't be used on ant project use old diamond notation 2016-09-15 11:35:43 +02:00
Andy Scherzinger b2f816eb31 small design changes, adding arrow as vector (thus bumping gradle plugin to 1.5.0!), changing check icon and adding circle background for finish action 2016-09-15 11:35:43 +02:00
Andy Scherzinger a34488e47e changes indicator to more material like style 2016-09-15 11:35:43 +02:00
Andy Scherzinger afdfc62ee7 added iOS images for the whats new screens 2016-09-15 11:35:43 +02:00
Bartosz Przybylski b8d796c19e Use global method to get version code 2016-09-15 11:35:43 +02:00
Bartosz Przybylski 255bcb1a99 Show done button when only single news is available 2016-09-15 11:35:43 +02:00
Bartosz Przybylski 57302403b6 Insert type in diamond operator, but this is just a hack to support old comiler 2016-09-15 11:35:43 +02:00
Bartosz Przybylski ba44bfbe02 Implement left/right swipe in whats new view 2016-09-15 11:35:43 +02:00
Bartosz Przybylski 6bf4a37019 Another small cleanup 2016-09-15 11:35:43 +02:00
Bartosz Przybylski afce75826e Remove testing stuff 2016-09-15 11:35:43 +02:00
Bartosz Przybylski 30ceace544 Put FeatureList to separate file for cleaner code 2016-09-15 11:35:43 +02:00
Bartosz Przybylski f3417a1f3b Small code cleanup in WhatsNewActivity 2016-09-15 11:35:43 +02:00
Bartosz Przybylski c6f306af49 Add Whats new activity and embed it into project 2016-09-15 11:35:43 +02:00
Andy Scherzinger aab9c087bf Merge branch 'master' of https://github.com/nextcloud/android into beta
# Conflicts:
#	CHANGELOG.md
#	res/xml/preferences.xml
#	src/com/owncloud/android/ui/activity/Preferences.java
2016-09-12 22:39:16 +02:00
Andy Scherzinger d584f806f0 Merge branch '130rcBugfix' of https://github.com/nextcloud/android into beta 2016-09-08 13:38:45 +02:00
Andy Scherzinger 0b1b893740 Merge branch '130rcBugfix' of https://github.com/nextcloud/android into beta 2016-09-08 13:35:30 +02:00
Andy Scherzinger 7c9e3dab4f Merge branch '130rcBugfix' of https://github.com/nextcloud/android into beta
# Conflicts:
#	AndroidManifest.xml
#	res/layout/participate_layout.xml
#	res/values/strings.xml
2016-09-08 10:36:32 +02:00
tobiasKaminsky a6b46eef90 update changelod 2016-09-07 21:49:44 +02:00
tobiasKaminsky d51825c98d update to rc2 2016-09-07 21:44:18 +02:00
Andy Scherzinger 598458f759 bugfix incorrect merge 2016-09-07 19:18:40 +02:00
Andy Scherzinger 3de7eb134d updated CHANGELOG.md 2016-09-07 18:50:15 +02:00
Andy Scherzinger e89f2d5808 Merge branch '130rcBugfix' of https://github.com/nextcloud/android into beta
# Conflicts:
#	AndroidManifest.xml
2016-09-07 18:47:31 +02:00
Andy Scherzinger 5136870879 compile fixes after merge 2016-09-07 18:43:30 +02:00
Andy Scherzinger 06f5ffe296 Merge branch 'davAppIntegration' of https://github.com/nextcloud/android into beta
# Conflicts:
#	AndroidManifest.xml
#	CHANGELOG.md
#	build.gradle
#	oc_jb_workaround/build.gradle
#	res/layout/participate_layout.xml
#	res/layout/share_file_layout.xml
#	res/layout/upload_files_layout.xml
#	res/menu/drawer_menu.xml
#	res/values/attrs.xml
#	res/values/setup.xml
#	res/values/strings.xml
#	res/xml/preferences.xml
#	src/com/owncloud/android/ui/activity/ParticipateActivity.java
#	src/com/owncloud/android/ui/activity/Preferences.java
#	src/com/owncloud/android/ui/activity/UploadFilesActivity.java
#	src/com/owncloud/android/ui/fragment/ShareFileFragment.java
#	src/com/owncloud/android/ui/helpers/FileOperationsHelper.java
2016-09-07 18:38:42 +02:00
Andy Scherzinger f3a41dc260 consistent wording for upload options --> folder 2016-09-07 18:29:14 +02:00
Andy Scherzinger 65fa8c4c20 show toast if davdroid sync has been setup successfully 2016-09-07 17:52:12 +02:00
Andy Scherzinger 91919d9246 move setup call to settings screen 2016-09-07 17:37:33 +02:00
Andy Scherzinger eb267862b7 wip davdroid login launch 2016-09-07 15:46:47 +02:00
Andy Scherzinger dcb0bd26f3 improve layouting and texts for upload behavior #26 2016-09-07 15:21:24 +02:00
Andy Scherzinger e6b99c96e7 bugfix layouting and issue reporting button click 2016-09-07 15:08:02 +02:00
Andy Scherzinger efe9692ee4 1.3.0 RC2 versioning 2016-09-07 14:46:59 +02:00
Andy Scherzinger dba4dd513a Bugfix report GH issue button click 2016-09-07 14:46:44 +02:00
Andy Scherzinger 92b58b654e Merge branch 'mixSortByDate' of https://github.com/nextcloud/android into beta 2016-09-04 21:41:48 +02:00
Andy Scherzinger 4198991338 Merge branch 'participate' of https://github.com/nextcloud/android into beta
# Conflicts:
#	build.gradle
#	res/layout/participate_layout.xml
#	res/menu/drawer_menu.xml
#	res/values/setup.xml
#	src/com/owncloud/android/ui/activity/ParticipateActivity.java
#	src/com/owncloud/android/utils/ConnectivityUtils.java
2016-09-04 21:31:37 +02:00
Andy Scherzinger a80b2216ce don't show the currently active account in the account chooser (since it is already active and displayer in the drawer header)
- don't show information twice
2016-09-04 21:20:35 +02:00
Andy Scherzinger 6102f78552 fix for triggering the main drawer menu items from "participate", changed participate icon and checkable behavior, don't show settings etc when showing accounts 2016-09-04 21:12:03 +02:00
Andy Scherzinger 330883cc81 participate icon 2016-09-04 20:35:52 +02:00
Andy Scherzinger 0b2162d70c slight whitespace optimizations in accordance with material design guidelines 2016-09-04 20:26:11 +02:00
tobiasKaminsky 013ddc4bf1 fix wrong new line 2016-09-04 20:06:07 +02:00
tobiasKaminsky c09979389d links are now extracted to setup.xml 2016-09-04 20:06:07 +02:00
tobiasKaminsky 13e37493c9 wip 2016-09-04 20:06:07 +02:00
tobiasKaminsky fc1ba3c384 Merge remote-tracking branch 'remotes/origin/participate' into beta 2016-09-04 15:37:27 +02:00
tobiasKaminsky 19b65e6afd fix wrong new line 2016-09-04 15:36:33 +02:00
tobiasKaminsky 716d1554b5 Merge remote-tracking branch 'remotes/origin/instant_upload_multi_account' into beta 2016-09-04 12:00:46 +02:00
tobiasKaminsky 83b8c5cc0a if no account is set the current account is used for instant upload 2016-09-04 11:40:24 +02:00
tobiasKaminsky fd428095d7 Merge remote-tracking branch 'origin/instant_upload_multi_account' into instant_upload_multi_account 2016-09-04 11:21:49 +02:00
tobiasKaminsky f83ecc83c8 Merge remote-tracking branch 'origin/beta' into beta 2016-09-04 11:08:36 +02:00
tobiasKaminsky b64569db57 Merge remote-tracking branch 'remotes/origin/mixSortByDate' into beta 2016-09-04 11:08:16 +02:00
tobiasKaminsky c56cd56645 Merge remote-tracking branch 'remotes/origin/pinchZoom' into beta 2016-09-04 11:08:04 +02:00
tobiasKaminsky 604eccb185 Merge remote-tracking branch 'remotes/origin/resizeCache' into beta 2016-09-04 11:04:49 +02:00
tobiasKaminsky 5fde328016 Merge remote-tracking branch 'remotes/origin/fixPublicLink' into beta 2016-09-04 11:01:10 +02:00
tobiasKaminsky 8bc3935130 Merge remote-tracking branch 'remotes/origin/descendIntoFolder' into beta 2016-09-04 11:00:58 +02:00
tobiasKaminsky 80e610ea41 Merge remote-tracking branch 'remotes/origin/participate' into beta 2016-09-04 11:00:36 +02:00
tobiasKaminsky caba790774 Merge remote-tracking branch 'remotes/origin/filesDrop' into beta 2016-09-04 11:00:04 +02:00
tobiasKaminsky 1161c3f19e links are now extracted to setup.xml 2016-09-04 10:52:32 +02:00
tobiasKaminsky 4be92d4650 wip 2016-09-03 23:13:34 +02:00
Andy Scherzinger 411022175c sizeScale 1 for MB, code removed for unsupported legacy Android versions
# Conflicts:
#	src/com/owncloud/android/utils/DisplayUtils.java
2016-09-03 17:56:49 +02:00
tobiasKaminsky f5218d53e0 update 2016-09-03 12:59:06 +02:00
tobiasKaminsky 2ba7087953 fix bug: resized image was always used indepentent of download state 2016-09-03 12:14:00 +02:00
tobiasKaminsky 911e4072f4 fix wrong merge resolve: thumbnails are now generated during upload again 2016-09-03 09:12:49 +02:00
tobiasKaminsky 9809e88ec0 Merge remote-tracking branch 'origin/beta' into beta 2016-09-03 07:55:16 +02:00
tobiasKaminsky 0c7c92c40b Merge remote-tracking branch 'remotes/origin/quotaDisplay' into beta 2016-09-03 07:49:56 +02:00
Andy Scherzinger bc2c96b284 organize imports 2016-09-01 16:26:39 +02:00
Andy Scherzinger 2da70e914c cleanup 2016-09-01 16:26:39 +02:00
Andy Scherzinger 3baa5ab208 CR 2016-09-01 16:26:39 +02:00
tobiasKaminsky 6044010ffe show filenames only if column size < 4 2016-09-01 16:26:39 +02:00
tobiasKaminsky 56e3129f52 use local context 2016-09-01 16:26:39 +02:00
tobiasKaminsky 580ab151f1 changes due to CR 2016-09-01 16:26:39 +02:00
tobiasKaminsky 2ccd0167f3 changes according to CR 2016-09-01 16:26:39 +02:00
tobiasKaminsky 01961b4db6 save gridColumns on start/stop 2016-09-01 16:26:39 +02:00
tobiasKaminsky db37d4f680 after pinching grid is updated correctly 2016-09-01 16:26:39 +02:00
tobiasKaminsky b44178b0ad wip 2016-09-01 16:26:39 +02:00
Andy Scherzinger b1e364efb6 fixed copyright 2016-09-01 16:20:02 +02:00
Andy Scherzinger 48e90501c0 code cleanup 2016-09-01 16:20:02 +02:00
Andy Scherzinger 0b87d80f08 beatified info rendereing for active account/path for uploads 2016-09-01 16:20:02 +02:00
Andy Scherzinger 54d1c42ea7 fix AccountUtils calls 2016-09-01 16:20:02 +02:00
Andy Scherzinger 7e84c2a934 CR changes 2016-09-01 16:20:02 +02:00
Andy Scherzinger 8ae25feaee cleanup code for preference loading 2016-09-01 16:20:02 +02:00
Luke Owncloud c99ef87a5f configure account for instant upload 2016-09-01 16:20:02 +02:00
Andy Scherzinger 72c96f7054 minor cleanups after rebase 2016-09-01 16:15:45 +02:00
tobiasKaminsky b4e068af38 fix wrong cast of cache size 2016-09-01 16:15:45 +02:00
tobiasKaminsky 85ae0ef010 show cache size in mb 2016-09-01 16:15:45 +02:00
tobiasKaminsky 6e4913ade8 fixed according to andys comments 2016-09-01 16:15:45 +02:00
tobiasKaminsky 1787cd4ea2 cache size is read from cache on preference start 2016-09-01 16:15:45 +02:00
tobiasKaminsky a731e87267 cache resize 2016-09-01 16:15:45 +02:00
tobiasKaminsky 007f9a3696 add preference for cache size 2016-09-01 16:15:45 +02:00
tobiasKaminsky 08bddb3dcf descend into folder after creating it in uploader 2016-09-01 16:12:59 +02:00
Andy Scherzinger a638f3c31b CHANGELOG.md 2016-09-01 14:56:53 +02:00
Andy Scherzinger d2c6f0c0a7 Merge branch 'fixRemoteFolderSize' of https://github.com/nextcloud/android into beta 2016-09-01 14:55:52 +02:00
tobiasKaminsky 6e7645b4f4 mix folders and files on sort by date 2016-09-01 11:32:01 +02:00
Andy Scherzinger 2d05f45a6d minor formattings 2016-09-01 11:26:09 +02:00
Andy Scherzinger b64e41f1cb hide file listing switch visibility fix when share link gets deactivated 2016-09-01 11:26:09 +02:00
tobiasKaminsky 738c491800 wip 2016-09-01 11:26:09 +02:00
tobiasKaminsky fe13a0ef23 wip 2016-09-01 11:26:09 +02:00
tobiasKaminsky 3ab681415b wip 2016-09-01 11:26:09 +02:00
tobiasKaminsky bf213bc11f wip 2016-09-01 11:26:09 +02:00
tobiasKaminsky 946d2a1d5e wip 2016-09-01 11:26:09 +02:00
Andy Scherzinger a44441bdda Merge branch 'quotaDisplay' of https://github.com/nextcloud/android into beta 2016-09-01 10:12:41 +02:00
Andy Scherzinger c6d71c4c14 CHANGELOG.md 2016-08-31 19:35:43 +02:00
Andy Scherzinger fc06e1b91e Merge branch 'build24' of https://github.com/nextcloud/android into beta
# Conflicts:
#	AndroidManifest.xml
#	res/values/setup.xml
#	src/com/owncloud/android/utils/FileStorageUtils.java
2016-08-31 19:34:30 +02:00
Andy Scherzinger e73f9970ee fixes 2016-08-31 19:27:38 +02:00
David A. Velasco 4c4d6948cc Fix crash opening or sending files in Android 7
# Conflicts:
#	res/values/setup.xml
#	src/com/owncloud/android/ui/activity/Preferences.java
2016-08-31 19:23:42 +02:00
Andy Scherzinger 054717cc65 Merge branch 'quotaDisplay' of https://github.com/nextcloud/android into beta
# Conflicts:
#	build.gradle
2016-08-31 19:18:40 +02:00
Andy Scherzinger 58652a5522 Revert "reactive instrumented demo test"
This reverts commit f7195a0192.
2016-08-30 23:29:49 +02:00
Andy Scherzinger f7195a0192 reactive instrumented demo test 2016-08-30 19:12:29 +02:00
Andy Scherzinger 6a6fb1dab7 Merge branch 'build24' of https://github.com/nextcloud/android into beta 2016-08-30 18:46:58 +02:00
Andy Scherzinger 70c1cef829 atm we only need the emulator version since it is also the targeted version 2016-08-30 18:25:34 +02:00
Andy Scherzinger 753399fdc7 Updated CHANGELOG.md 2016-08-30 18:20:46 +02:00
Andy Scherzinger 0a463042e5 Merge branch 'build24' of https://github.com/nextcloud/android into beta
# Conflicts:
#	build.gradle
2016-08-30 18:15:57 +02:00
Andy Scherzinger 30e5ad14ae Merge branch 'fixEmptyLocalUploadFolder' of https://github.com/nextcloud/android into beta
# Conflicts:
#	build.gradle
#	src/com/owncloud/android/MainApp.java
#	src/com/owncloud/android/ui/activity/FileDisplayActivity.java
2016-08-30 18:06:05 +02:00
Andy Scherzinger 1b7ffa00bf bugfix showing empty local folders as empty and not showing the parent folder in an empty folder 2016-08-30 17:56:28 +02:00
Andy Scherzinger f606d14b6d change emulator ready detection again, disable running sample instrumented unit test (failing at the moment)
updated wait_for_emulator.sh for actual travis cookbook revision https://github.com/travis-ci/travis-cookbooks/blob/62039b204699adcdf4b3365fac42d81246cb57fe/ci_environment/android-sdk/files/default/android-wait-for-emulator

try emulator 24

bump support lib to 24.2.0
2016-08-30 15:16:47 +02:00
Andy Scherzinger 644a9ee978 bump Android SDK Build-Tools to 24.0.2 2016-08-29 17:58:55 +02:00
Andy Scherzinger 0b88b6e144 changed matrix variables to better support different target and emulator API-level 2016-08-18 15:53:46 +02:00
Andy Scherzinger 99434be7c4 no pre-dexing on travis (performance) 2016-08-18 15:53:46 +02:00
Andy Scherzinger 68c8ce6010 try v23 emulator 2016-08-18 15:53:46 +02:00
Andy Scherzinger 9fe0c6f364 Update build tools to 24.0.1, java7 compat 2016-08-18 15:53:46 +02:00
Andy Scherzinger 3a4d516c24 rebase/merge 2016-08-18 15:53:46 +02:00
Andy Scherzinger a724993861 lib1.0.4 2016-08-18 15:53:46 +02:00
Andy Scherzinger 38f0266ecf Revert "added jcenter repo"
This reverts commit b54e954c96014babd176d8f50ba6b7a9e44dea38.
2016-08-18 15:53:46 +02:00
Andy Scherzinger 7a539ef071 link to v24 version of the Nc lib 2016-08-18 15:53:46 +02:00
Andy Scherzinger c4c9fac34a added jcenter repo 2016-08-18 15:53:46 +02:00
Andy Scherzinger 49a125ebd6 bump to v24 incl. toolchain, jdk8 etc. 2016-08-18 15:53:46 +02:00
Andy Scherzinger 649c5cfe0c fixed the background color 2016-08-14 20:26:08 +02:00
Andy Scherzinger beb3abb7f3 CR changes 2016-08-14 20:18:32 +02:00
Andy Scherzinger 32aa5113b5 colorize quota progress bar depending on thresholds met, reformattings 2016-08-14 20:18:32 +02:00
Andy Scherzinger ff7bb22903 minor code refactoring extracting setup code into dedicated methods 2016-08-14 20:18:32 +02:00
Andy Scherzinger c117f1eb60 get and show quota information 2016-08-14 20:18:32 +02:00
Andy Scherzinger 1b1e20bee7 update to Nc Android library 1.0.4 2016-08-14 20:14:52 +02:00
Andy Scherzinger d5f143c4cc view elements fix 2016-08-14 20:14:26 +02:00
Andy Scherzinger 9e3499707c initial quota display implementation 2016-08-14 20:14:26 +02:00
Andy Scherzinger 1b279acca8 initial layout changes for in drawer quota display 2016-08-14 20:14:26 +02:00
tobiasKaminsky 831813fd81 update 2016-08-09 22:04:03 +02:00
tobiasKaminsky 44e91d4d9d fix wrong beta lookup url 2016-08-09 21:11:34 +02:00
tobiasKaminsky 7df332b2dc update 2016-08-08 20:28:02 +02:00
tobiasKaminsky 50a565f11d Merge remote-tracking branch 'remotes/origin/externalSD2' into beta 2016-08-08 20:21:03 +02:00
tobiasKaminsky 430872629d Merge remote-tracking branch 'remotes/origin/updateCopyMove' into beta 2016-08-08 19:53:39 +02:00
tobiasKaminsky 79650fbcb9 Merge remote-tracking branch 'remotes/origin/filesDrop' into beta 2016-08-08 19:52:38 +02:00
tobiasKaminsky 7fb56cd467 Merge remote-tracking branch 'remotes/origin/fixNPEinUploadFile' into beta 2016-08-08 19:45:44 +02:00
tobiasKaminsky a524d9083f Merge remote-tracking branch 'remotes/origin/fixUploadComparator' into beta 2016-08-08 19:45:00 +02:00
tobiasKaminsky e7d190adf4 "move upload" is first default when on first startup 2016-08-08 10:51:41 +02:00
tobiasKaminsky f5e32fb333 move / copy updated 2016-08-08 10:51:41 +02:00
Andy Scherzinger 3d1ba53339 fix chunked upload constructor call 2016-08-08 10:32:49 +02:00
Andy Scherzinger d0857dd009 extract/pre-compile the pattern 2016-08-08 10:32:49 +02:00
Andy Scherzinger 4567ce5496 further CR fixes, fixed comment in layout/migration_layout.xml 2016-08-08 10:32:49 +02:00
Andy Scherzinger 37f99a7fa2 CR, GPLv3 2016-08-08 10:32:49 +02:00
Andy Scherzinger 4feff15973 lib version 1.0.2, organizes imports in FileStorageUtils 2016-08-08 10:32:49 +02:00
Andy Scherzinger 25d7f4149e fixed strings (oC->Nc and ... --> &#8230;) 2016-08-08 10:32:49 +02:00
Andy Scherzinger aa081f0080 temporary gradle link to branch/snapshot of the library until it is merged, so the build works again 2016-08-08 10:32:49 +02:00
Bartosz Przybylski 278da5520a rebase fixes 2016-08-08 10:32:49 +02:00
tobiasKaminsky eba09158c3 use lollipop external storage system 2016-08-08 10:32:49 +02:00
Bartosz Przybylski eaf0265866 Because of multiple underlying implementation of storage mount points introduce a mechanism which is querying multiple solutions and lists them to the user 2016-08-08 10:32:49 +02:00
Bartosz Przybylski 42ca74cbb0 Handle case of migration of empty src directory 2016-08-08 10:32:49 +02:00
Bartosz Przybylski 64eeacb829 Change the way of fetching mounted resources, use system tools and parse results 2016-08-08 10:32:49 +02:00
Bartosz Przybylski 3eea52f5f3 Use progress dialog instead of alert dialog, for better UX 2016-08-08 10:32:49 +02:00
Bartosz Przybylski 3c0087da97 Tabs to spaces 2016-08-08 10:32:49 +02:00
Bartosz Przybylski bb86f57628 Small code cleanups 2016-08-08 10:32:49 +02:00
Bartosz Przybylski 57c93d37c2 Simplify storage selection process 2016-08-08 10:32:49 +02:00
Bartosz Przybylski 5326351378 Add DataStorageUtils to detect connected SD cards 2016-08-08 10:32:49 +02:00
Bartosz Przybylski 52e69cf25b For more reliability delete old files recursively in migration cleanup 2016-08-08 10:32:49 +02:00
Bartosz Przybylski 3a214db461 Fix after rebase 2016-08-08 10:32:49 +02:00
Bartosz Przybylski 54d82af9ff Soften requirement on cleanup step failures 2016-08-08 10:32:49 +02:00
Bartosz Przybylski 23b02079d3 Stop and start logging on migration 2016-08-08 10:32:49 +02:00
Bartosz Przybylski 2f6192a6e5 Code cleanups 2016-08-08 10:32:49 +02:00
Bartosz Przybylski 3f0df0a5c9 Add cleanup and rollback step when migrating. Correctly set progress during migration. 2016-08-08 10:32:49 +02:00
Bartosz Przybylski 7f3543e802 Add more migration stuff. cleanup step is still missing 2016-08-08 10:32:49 +02:00
Bartosz Przybylski 017e68b79c Add unfinished local directories browser for storage target. Add migration activity stub. Adjust some parts of app to prepare it for storage migration 2016-08-08 10:32:49 +02:00
tobiasKaminsky 1e968d6ab1 Prepare preferences and project to use user defined storage path 2016-08-08 10:32:49 +02:00
Andy Scherzinger 20e9b8e94f minor formattings 2016-08-08 10:28:16 +02:00
Andy Scherzinger e71ae2e532 hide file listing switch visibility fix when share link gets deactivated 2016-08-08 10:28:16 +02:00
tobiasKaminsky 45ade381de wip 2016-08-08 10:28:16 +02:00
tobiasKaminsky 30c18fd1ea wip 2016-08-08 10:28:16 +02:00
tobiasKaminsky 65d16da98b wip 2016-08-08 10:28:16 +02:00
tobiasKaminsky 1e6a090810 wip 2016-08-08 10:28:16 +02:00
tobiasKaminsky f402dd9692 wip 2016-08-08 10:28:16 +02:00
tobiasKaminsky f83bf524a8 Merge remote-tracking branch 'remotes/origin/updateCopyMove' into beta 2016-08-08 10:17:31 +02:00
tobiasKaminsky ad2c8fc08e update 2016-08-08 10:11:08 +02:00
tobiasKaminsky 492cf00064 Merge remote-tracking branch 'remotes/origin/fixPublicLink' into beta 2016-08-08 10:09:16 +02:00
tobiasKaminsky e29cfabfe9 allow apk to git 2016-08-04 18:28:54 +02:00
tobiasKaminsky 0b59dd9e2a "move upload" is first default when on first startup 2016-08-04 10:51:55 +02:00
tobiasKaminsky ee17b00288 move / copy updated 2016-08-04 10:51:55 +02:00
tobiasKaminsky 728db354f9 Merge remote-tracking branch 'remotes/origin/resizedImages' into beta 2016-08-03 17:50:50 +02:00
tobiasKaminsky 1df99748ef Merge remote-tracking branch 'remotes/origin/protect_password_field_agains_autocompletion_suggestions' into beta 2016-08-03 17:50:39 +02:00
tobiasKaminsky 452b23cc39 Merge remote-tracking branch 'remotes/origin/meteredWiFi' into beta 2016-08-03 17:50:27 +02:00
tobiasKaminsky 773a8d6a63 Merge remote-tracking branch 'remotes/origin/instant_upload_multi_account' into beta 2016-08-03 17:49:36 +02:00
tobiasKaminsky a2f836bb66 Merge remote-tracking branch 'remotes/origin/filter' into beta 2016-08-03 17:46:17 +02:00
tobiasKaminsky 1aacc2b45f Merge remote-tracking branch 'remotes/origin/filesDrop' into beta 2016-08-03 17:45:00 +02:00
tobiasKaminsky 9562e70450 Merge remote-tracking branch 'remotes/origin/externalSD2' into beta 2016-08-03 17:43:07 +02:00
tobiasKaminsky 7fece371ad Merge remote-tracking branch 'remotes/origin/resumeChunkedUploads' into beta 2016-08-03 17:17:00 +02:00
tobiasKaminsky 94a6c44012 Merge remote-tracking branch 'remotes/origin/uploadWhenCharging' into beta 2016-08-03 17:16:07 +02:00
tobiasKaminsky b4775d52ed update 2016-08-02 22:15:49 +02:00
tobiasKaminsky 37427304fd Merge remote-tracking branch 'remotes/origin/updateCopyMove' into beta 2016-08-02 21:39:33 +02:00
tobiasKaminsky 47edebde38 Merge remote-tracking branch 'origin/beta' into beta 2016-08-02 21:39:12 +02:00
tobiasKaminsky 1ce514972b "move upload" is first default when on first startup 2016-08-02 21:36:11 +02:00
Andy Scherzinger 6b36468d19 fixed copyright 2016-08-02 19:42:08 +02:00
Andy Scherzinger 35e9301a6d code cleanup 2016-08-02 19:42:08 +02:00
Andy Scherzinger d933e88f64 beatified info rendereing for active account/path for uploads 2016-08-02 19:42:08 +02:00
Andy Scherzinger 7549a547de fix AccountUtils calls 2016-08-02 19:41:31 +02:00
Andy Scherzinger 51e02f9591 CR changes 2016-08-02 19:41:31 +02:00
Andy Scherzinger 2d6184ccfc cleanup code for preference loading 2016-08-02 19:41:31 +02:00
Luke Owncloud 4752d2741e configure account for instant upload 2016-08-02 19:41:31 +02:00
Andy Scherzinger ae947a5ca4 minor formattings 2016-08-02 17:55:30 +02:00
Andy Scherzinger 6ab0506c9a hide file listing switch visibility fix when share link gets deactivated 2016-08-02 17:18:46 +02:00
Andy Scherzinger 0faa786b2e hide file listing switch visibility fix when share link gets deactivated 2016-08-02 17:17:20 +02:00
tobiasKaminsky 824be9278c wip 2016-08-02 15:44:18 +02:00
tobiasKaminsky aa00ad74b2 wip 2016-08-02 15:44:18 +02:00
tobiasKaminsky c1e2b2dee5 wip 2016-08-02 15:44:18 +02:00
tobiasKaminsky 229ff7c38b wip 2016-08-02 15:44:18 +02:00
tobiasKaminsky e78b0fb447 wip 2016-08-02 15:44:18 +02:00
Andy Scherzinger 956cfa5d7b proper show hide during drawer open/close, also for filter-menu-item 2016-08-02 15:28:44 +02:00
Andy Scherzinger 70abde93de GPLv3 2016-08-02 15:28:44 +02:00
Andy Scherzinger 69b368e111 hide non-primary action menu items in overflow menu 2016-08-02 15:28:44 +02:00
Andy Scherzinger 3019c540a1 added description and went for ifRoom 2016-08-02 15:28:44 +02:00
Andy Scherzinger eef9e38065 fix UI behavior for filtering in upload view 2016-08-02 15:28:44 +02:00
Andy Scherzinger 422d432712 fixed license version 2016-08-02 15:28:44 +02:00
Andy Scherzinger 74e117191e correct search view UI-behavior 2016-08-02 15:28:44 +02:00
tobiasKaminsky 7e6162815f filter for oc file list and local file list 2016-08-02 15:28:44 +02:00
Andy Scherzinger 984d0fe93c fixed parameter order 2016-08-02 11:50:02 +02:00
Andy Scherzinger 4bb1071e1a fix chunked upload constructor call 2016-08-02 11:35:51 +02:00
Andy Scherzinger 2769d9389a extract/pre-compile the pattern 2016-08-02 11:18:49 +02:00
Andy Scherzinger 6417c93517 further CR fixes, fixed comment in layout/migration_layout.xml 2016-08-02 11:12:25 +02:00
Andy Scherzinger 4f0b0b9116 CR, GPLv3 2016-08-02 10:59:31 +02:00
Andy Scherzinger 39745e49e7 lib version 1.0.2, organizes imports in FileStorageUtils 2016-08-02 10:37:35 +02:00
Andy Scherzinger cfb25da11f fixed strings (oC->Nc and ... --> &#8230;) 2016-08-02 10:34:26 +02:00
Andy Scherzinger b57414a759 temporary gradle link to branch/snapshot of the library until it is merged, so the build works again 2016-08-02 10:34:26 +02:00
Bartosz Przybylski e884640785 rebase fixes 2016-08-02 10:34:26 +02:00
tobiasKaminsky 351905fc48 use lollipop external storage system 2016-08-02 10:34:26 +02:00
Bartosz Przybylski 648d3f5292 Because of multiple underlying implementation of storage mount points introduce a mechanism which is querying multiple solutions and lists them to the user 2016-08-02 10:34:26 +02:00
Bartosz Przybylski 845a6b2f68 Handle case of migration of empty src directory 2016-08-02 10:34:26 +02:00
Bartosz Przybylski ebe6c2bca7 Change the way of fetching mounted resources, use system tools and parse results 2016-08-02 10:34:26 +02:00
Bartosz Przybylski 769430b8f0 Use progress dialog instead of alert dialog, for better UX 2016-08-02 10:34:26 +02:00
Bartosz Przybylski 393c9b4072 Tabs to spaces 2016-08-02 10:34:26 +02:00
Bartosz Przybylski ab3d19d29e Small code cleanups 2016-08-02 10:34:26 +02:00
Bartosz Przybylski e94220a906 Simplify storage selection process 2016-08-02 10:34:03 +02:00
Bartosz Przybylski c568af347c Add DataStorageUtils to detect connected SD cards 2016-08-02 10:34:03 +02:00
Bartosz Przybylski 5c1b4ba796 For more reliability delete old files recursively in migration cleanup 2016-08-02 10:34:03 +02:00
Bartosz Przybylski e13ad5ff26 Fix after rebase 2016-08-02 10:34:03 +02:00
Bartosz Przybylski 5166231481 Soften requirement on cleanup step failures 2016-08-02 10:34:03 +02:00
Bartosz Przybylski 25300cc0e9 Stop and start logging on migration 2016-08-02 10:34:03 +02:00
Bartosz Przybylski b637679083 Code cleanups 2016-08-02 10:34:03 +02:00
Bartosz Przybylski c928224b55 Add cleanup and rollback step when migrating. Correctly set progress during migration. 2016-08-02 10:32:41 +02:00
Bartosz Przybylski 83378f60c3 Add more migration stuff. cleanup step is still missing 2016-08-02 10:32:41 +02:00
Bartosz Przybylski 237b26ae79 Add unfinished local directories browser for storage target. Add migration activity stub. Adjust some parts of app to prepare it for storage migration 2016-08-02 10:32:41 +02:00
tobiasKaminsky e393a6db27 Prepare preferences and project to use user defined storage path 2016-08-02 10:32:41 +02:00
tobiasKaminsky df45b5543b Merge remote-tracking branch 'remotes/origin/filter' into beta 2016-08-01 21:57:58 +02:00
tobiasKaminsky 9f86064b81 Merge remote-tracking branch 'origin/resizedImages' into resizedImages 2016-08-01 21:56:21 +02:00
tobiasKaminsky 73da2a1d14 added second parameter to thumbnail generation task 2016-08-01 21:43:18 +02:00
tobiasKaminsky 26683f5c61 added second parameter to thumbnail generation task 2016-08-01 21:42:11 +02:00
tobiasKaminsky 56572a09ef allow apk to be uploaded 2016-08-01 21:18:58 +02:00
Andy Scherzinger 7b58b8c328 update to Nc Android lib 1.0.2 2016-08-01 16:51:42 +02:00
Andy Scherzinger 30b66dcd27 bump Nc Android lib version 2016-08-01 16:25:23 +02:00
tobiasKaminsky 26e0dab381 resume chunked uploads 2016-08-01 16:22:32 +02:00
Andy Scherzinger 93bb169c6c GPLv3 2016-08-01 11:31:37 +02:00
Andy Scherzinger 4e03fb3894 GPLv3 2016-08-01 11:29:08 +02:00
tobiasKaminsky 4d9d895b57 add apks ;) 2016-07-31 13:18:15 +02:00
tobiasKaminsky 9fae39b45f update beta 2016-07-31 12:56:38 +02:00
tobiasKaminsky e2cce3957e fix merging error 2016-07-31 12:55:03 +02:00
tobiasKaminsky 6bdde0e59a Merge remote-tracking branch 'remotes/origin/updateCopyMove' into beta 2016-07-31 12:46:36 +02:00
tobiasKaminsky 1e5a2583df Merge remote-tracking branch 'remotes/origin/NPEonEmptyLocalFolder' into beta 2016-07-31 12:40:02 +02:00
tobiasKaminsky b5c3d07ab3 update changelog 2016-07-31 12:22:25 +02:00
tobiasKaminsky 705d942124 move / copy updated 2016-07-31 12:14:33 +02:00
tobiasKaminsky 40a68482fe Merge remote-tracking branch 'remotes/origin/externalSD2' into beta 2016-07-31 10:27:53 +02:00
tobiasKaminsky 4d27d9c0a9 add only upload when charging 2016-07-30 19:31:03 +02:00
tobiasKaminsky 955cf86f05 update changelog 2016-07-30 19:29:23 +02:00
tobiasKaminsky b1dd34e18c Merge remote-tracking branch 'remotes/origin/uploadWhenCharging' into beta 2016-07-30 18:58:26 +02:00
tobiasKaminsky 2ea5eaca4c finally a beta update :) 2016-07-28 21:42:08 +02:00
tobiasKaminsky a92e749c9f fix sharing for beta 2016-07-28 21:22:47 +02:00
tobiasKaminsky 8a988a9e84 wip 2016-07-28 20:57:26 +02:00
tobiasKaminsky 8d1864d0cf update beta 2016-07-28 20:38:00 +02:00
tobiasKaminsky 4015763df6 Merge remote-tracking branch 'remotes/origin/resumeChunkedUploads' into beta 2016-07-28 20:02:07 +02:00
tobiasKaminsky f720c186c3 Merge remote-tracking branch 'remotes/origin/protect_password_field_agains_autocompletion_suggestions' into beta 2016-07-28 19:57:48 +02:00
tobiasKaminsky 75949fb5ca Merge remote-tracking branch 'remotes/origin/refresh_folders_startup' into beta 2016-07-28 19:55:36 +02:00
tobiasKaminsky 033bc352f4 Merge remote-tracking branch 'remotes/origin/renameInstantUploadPath' into beta 2016-07-28 19:54:55 +02:00
tobiasKaminsky 9e8c3f2192 Merge remote-tracking branch 'remotes/origin/meteredWiFi' into beta 2016-07-28 19:53:48 +02:00
tobiasKaminsky 39cb69737c Merge remote-tracking branch 'remotes/origin/djvu' into beta 2016-07-28 19:53:31 +02:00
tobiasKaminsky 106d02f4ee Merge remote-tracking branch 'remotes/origin/filter' into beta 2016-07-28 19:53:08 +02:00
tobiasKaminsky 6fbfd0c6ce Merge remote-tracking branch 'remotes/origin/resizeCache' into beta 2016-07-28 19:50:58 +02:00
tobiasKaminsky 962f9413bf Merge remote-tracking branch 'remotes/origin/pinchZoom' into beta 2016-07-28 19:49:43 +02:00
tobiasKaminsky 092704a1e1 Merge remote-tracking branch 'remotes/origin/textFile' into beta 2016-07-28 19:49:28 +02:00
tobiasKaminsky 69f0edec74 Merge remote-tracking branch 'remotes/origin/filesDrop' into beta 2016-07-28 19:49:12 +02:00
tobiasKaminsky ae7247b008 Merge remote-tracking branch 'remotes/origin/mixSortByDate' into beta 2016-07-28 19:48:49 +02:00
tobiasKaminsky 08706b4813 Merge remote-tracking branch 'remotes/origin/instant_upload_multi_account' into beta 2016-07-28 19:48:23 +02:00
tobiasKaminsky a9b587b1cd Merge remote-tracking branch 'remotes/origin/resizedImages' into beta 2016-07-28 19:47:39 +02:00
Andy Scherzinger 5b806394b6 reformetted two lines 2016-07-28 19:04:52 +02:00
tobiasKaminsky 5170f029b2 changes due to CR 2016-07-28 19:04:52 +02:00
Andy Scherzinger 999ec8202e textfile --> text file 2016-07-28 19:04:52 +02:00
tobiasKaminsky 658371336e finish 2016-07-28 19:04:52 +02:00
tobiasKaminsky 447c2f9d52 wip 2016-07-28 19:04:52 +02:00
tobiasKaminsky c7dafff817 djvu is not an image 2016-07-28 19:00:30 +02:00
tobiasKaminsky d238c8a7fb resume chunked uploads 2016-07-28 18:29:49 +02:00
Andy Scherzinger 88b49880e1 Changed the delay to execute the runnable in startSyncFolderOperation, adding 350 ms. 2016-07-28 18:03:44 +02:00
David A. Velasco 6cf396f0d4 Add flag to disable suggestions in password field, no matter if visible or not 2016-07-28 18:00:03 +02:00
Andy Scherzinger ac9aedecec hide non-primary action menu items in overflow menu 2016-07-28 17:46:51 +02:00
Andy Scherzinger b535fe2926 added description and went for ifRoom 2016-07-28 17:46:51 +02:00
Andy Scherzinger c8fba79f9f fix UI behavior for filtering in upload view 2016-07-28 17:46:51 +02:00
Andy Scherzinger 8f941939e2 fixed license version 2016-07-28 17:46:51 +02:00
Andy Scherzinger 75d3236fa7 correct search view UI-behavior 2016-07-28 17:46:51 +02:00
tobiasKaminsky 6a3903afbe filter for oc file list and local file list 2016-07-28 17:46:51 +02:00
Andy Scherzinger aeb9ea9871 fixed copyright 2016-07-27 17:31:01 +02:00
Andy Scherzinger 7712e694b1 code cleanup 2016-07-27 17:31:01 +02:00
Andy Scherzinger 04ff966d63 beatified info rendereing for active account/path for uploads 2016-07-27 17:31:01 +02:00
Andy Scherzinger a99032ccf4 fix AccountUtils calls 2016-07-27 17:31:01 +02:00
Andy Scherzinger 953b5c637e CR changes 2016-07-27 17:31:01 +02:00
Andy Scherzinger 2f4aef8fb2 cleanup code for preference loading 2016-07-27 17:31:01 +02:00
Luke Owncloud 53cfb1196d configure account for instant upload 2016-07-27 17:31:01 +02:00
tobiasKaminsky c7555938a5 delay instant upload when metered wifi is used 2016-07-26 19:52:49 +02:00
tobiasKaminsky cf1e7013f4 minor code enhancements 2016-07-23 10:23:54 +02:00
tobiasKaminsky 8258843ae1 Merge remote-tracking branch 'remotes/origin/resizedImages' into resizedImages2 2016-07-23 10:15:50 +02:00
tobiasKaminsky 67baae4441 Merge remote-tracking branch 'remotes/origin/master' into resizedImages2 2016-07-23 10:12:39 +02:00
tobiasKaminsky a5509797bc resized images are now fetched via gallery app 2016-07-23 09:46:59 +02:00
tobiasKaminsky 3ff2d58a25 Merge remote-tracking branch 'remotes/origin/master' into storeResizedImagesOnDeletion 2016-07-21 20:25:31 +02:00
tobiasKaminsky e7e02837e6 update 2016-07-21 20:02:23 +02:00
tobiasKaminsky eaed9886cf Merge remote-tracking branch 'remotes/origin/master' into resizeCache 2016-07-21 19:58:36 +02:00
tobiasKaminsky cb9c6fc8f6 show filenames only if column size < 4 2016-07-21 19:44:22 +02:00
tobiasKaminsky b4136568e5 Merge remote-tracking branch 'remotes/origin/master' into pinchZoom 2016-07-21 19:24:15 +02:00
tobiasKaminsky 8bb465f1e7 wip 2016-07-21 18:26:52 +02:00
tobiasKaminsky 5511c063d6 Merge remote-tracking branch 'remotes/origin/master' into filesDrop 2016-07-21 18:18:05 +02:00
tobiasKaminsky 0e1f66e0e3 wip 2016-07-21 18:17:46 +02:00
tobiasKaminsky 2c71d2b57e wip 2016-07-20 20:18:18 +02:00
tobiasKaminsky a61c4b932c wip 2016-07-18 18:39:59 +02:00
tobiasKaminsky 8b9d6b2f22 Merge remote-tracking branch 'remotes/origin/master' into filesDrop 2016-07-18 18:37:20 +02:00
tobiasKaminsky 87f03c7c17 wip 2016-07-18 17:27:38 +02:00
tobiasKaminsky 6ca77290ec mix folders and files on sort by date 2016-07-17 17:22:42 +02:00
Andy Scherzinger d2a323a970 fix AccountUtils calls 2016-07-09 20:48:17 +02:00
Andy Scherzinger a6ef30cbbd CR changes 2016-07-09 20:23:47 +02:00
Andy Scherzinger 184eaef74f cleanup code for preference loading 2016-07-09 20:23:47 +02:00
Luke Owncloud 27d49da7ea configure account for instant upload 2016-07-09 20:23:46 +02:00
Andy Scherzinger 2ffcb50397 fixed strings (oC->Nc and ... --> &#8230;) 2016-07-03 14:36:17 +02:00
Andy Scherzinger 55d038e801 temporary gradle link to branch/snapshot of the library until it is merged, so the build works again 2016-07-03 14:32:04 +02:00
Bartosz Przybylski 47066401d0 rebase fixes 2016-07-03 00:19:59 +02:00
tobiasKaminsky 3eb7aa3809 use lollipop external storage system 2016-07-03 00:04:43 +02:00
Bartosz Przybylski 1cb345c99f Because of multiple underlying implementation of storage mount points introduce a mechanism which is querying multiple solutions and lists them to the user 2016-07-03 00:03:49 +02:00
Bartosz Przybylski 870b04a390 Handle case of migration of empty src directory 2016-07-03 00:02:31 +02:00
Bartosz Przybylski ec14112d82 Change the way of fetching mounted resources, use system tools and parse results 2016-07-03 00:02:31 +02:00
Bartosz Przybylski b20373d59b Use progress dialog instead of alert dialog, for better UX 2016-07-03 00:02:31 +02:00
Bartosz Przybylski 9745b34290 Tabs to spaces 2016-07-03 00:02:31 +02:00
Bartosz Przybylski b589077669 Small code cleanups 2016-07-03 00:01:07 +02:00
Bartosz Przybylski 56d0517a47 Simplify storage selection process 2016-07-02 23:58:49 +02:00
Bartosz Przybylski ebaf8c6ccf Add DataStorageUtils to detect connected SD cards 2016-07-02 23:48:40 +02:00
Bartosz Przybylski 029c54dc2b For more reliability delete old files recursively in migration cleanup 2016-07-02 23:48:40 +02:00
Bartosz Przybylski 4ab8d0cb35 Fix after rebase 2016-07-02 23:48:40 +02:00
Bartosz Przybylski ab0abea781 Soften requirement on cleanup step failures 2016-07-02 23:48:40 +02:00
Bartosz Przybylski fadbd7629d Stop and start logging on migration 2016-07-02 23:48:40 +02:00
Bartosz Przybylski cf2267e196 Code cleanups 2016-07-02 23:48:40 +02:00
Bartosz Przybylski 77c4819e98 Add cleanup and rollback step when migrating. Correctly set progress during migration. 2016-07-02 23:44:54 +02:00
Bartosz Przybylski 76d58fbbc8 Add more migration stuff. cleanup step is still missing 2016-07-02 23:44:54 +02:00
Bartosz Przybylski 7ec2ffc6af Add unfinished local directories browser for storage target. Add migration activity stub. Adjust some parts of app to prepare it for storage migration 2016-07-02 23:44:12 +02:00
tobiasKaminsky c848d4fd3b Prepare preferences and project to use user defined storage path 2016-07-02 23:32:03 +02:00
tobiasKaminsky e3d43e754d wip 2016-06-25 13:38:55 +02:00
tobiasKaminsky bcb55a0e4c Merge remote-tracking branch 'remotes/origin/master' into resizedImages 2016-06-25 13:30:23 +02:00
tobiasKaminsky a9fbec2934 revert wip 2016-05-13 18:17:49 +02:00
tobiasKaminsky 140e923982 update build gradle 2016-05-13 18:16:10 +02:00
tobiasKaminsky 680cf56746 correct indentation 2016-05-13 18:15:12 +02:00
tobiasKaminsky 7162aa65f4 revert exporting FileContentProvider 2016-05-13 18:14:32 +02:00
tobiasKaminsky a6e16a4e71 wip 2016-04-10 18:54:28 +02:00
tobiasKaminsky 93b143a647 use local context 2016-03-30 18:09:04 +02:00
tobiasKaminsky 78aa439660 changes due to CR 2016-03-21 08:25:12 +01:00
tobiasKaminsky a3fd1a0ac6 Merge remote-tracking branch 'remotes/upstream/master' into pinchZoom 2016-03-12 10:33:02 +01:00
tobiasKaminsky 302b253e9a update lib 2016-03-12 09:02:30 +01:00
tobiasKaminsky 7469b5dd96 Merge remote-tracking branch 'remotes/upstream/master' into pinchZoom 2016-03-12 08:56:26 +01:00
tobiasKaminsky e4ce10f180 changes according to CR 2016-03-12 08:54:59 +01:00
tobiasKaminsky 2ecff7c12f save gridColumns on start/stop 2016-02-08 08:58:59 +01:00
tobiasKaminsky 5849a4a93f after pinching grid is updated correctly 2016-01-24 09:46:51 +01:00
tobiasKaminsky 999a2ee86e wip 2016-01-20 20:39:33 +01:00
tobiasKaminsky eac4e49ceb fixed showing thumbnails in local file list (uploader) 2016-01-03 13:36:29 +01:00
tobiasKaminsky 5c9c34f1d2 fix wrong cast of cache size 2015-11-22 10:13:40 +01:00
tobiasKaminsky 0302a62af5 Merge branch 'master' of github.com:owncloud/android into resizeCache 2015-11-14 16:33:22 +01:00
tobiasKaminsky 11774de541 show cache size in mb 2015-11-13 18:33:21 +01:00
tobiasKaminsky 90382c5889 show thumbnail while waiting for resized image 2015-11-13 16:41:05 +01:00
tobiasKaminsky ce841a3c4f Merge remote-tracking branch 'remotes/upstream/master' into resizedImagesMaster 2015-11-05 22:04:57 +01:00
tobiasKaminsky d5ee0ef158 fixed #1244 2015-11-05 21:58:02 +01:00
tobiasKaminsky d06a4b155d updated for future use with later PRs 2015-11-02 22:09:29 +01:00
tobiasKaminsky 3ddb48b647 exported must be set to true 2015-11-02 10:24:01 +01:00
tobiasKaminsky 957484588e fix #1230 2015-10-31 11:03:15 +01:00
tobiasKaminsky cf22541dd5 fixed storing thumbnails by correct imageKey 2015-10-31 08:30:13 +01:00
tobiasKaminsky 61338bbb0c fixed rotating resized image 2015-10-31 08:09:49 +01:00
tobiasKaminsky 890b8df374 fixed according to andys comments 2015-10-17 17:36:31 +02:00
tobiasKaminsky 981ecb91c9 cache size is read from cache on preference start 2015-10-12 20:21:19 +02:00
tobiasKaminsky 39921730b3 cache resize 2015-10-12 08:30:30 +02:00
tobiasKaminsky 641ebef687 add preference for cache size 2015-10-12 07:40:21 +02:00
tobiasKaminsky 788ebbcdab reverted library 2015-07-01 20:13:02 +02:00
tobiasKaminsky ce35d6448e Merge remote-tracking branch 'upstream/develop' into resizedImages 2015-07-01 19:16:42 +02:00
tobiasKaminsky a1bc147849 resized image is loaded instead of full sized image. 2015-05-18 21:01:17 +02:00
89 changed files with 1841 additions and 1107 deletions

No files matched your search

-2
View File
@@ -1,6 +1,4 @@
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
+22 -14
View File
@@ -20,8 +20,8 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.owncloud.android"
android:versionCode="10040102"
android:versionName="1.4.1 RC2">
android:versionCode="20170111"
android:versionName="20170111" >
<uses-sdk
android:minSdkVersion="14"
@@ -44,6 +44,7 @@
<!-- WRITE_EXTERNAL_STORAGE may be enabled or disabled by the user after installation in
API >= 23; the app needs to handle this -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS" />
<!-- Next permissions are always approved in installation time,
the apps needs to do nothing special in runtime -->
@@ -56,18 +57,17 @@
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:name=".MainApp"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:label="Nextcloud beta"
android:theme="@style/Theme.ownCloud.Toolbar"
android:manageSpaceActivity="com.owncloud.android.ui.activity.ManageSpaceActivity">
<activity
android:name=".ui.activity.FileDisplayActivity"
android:label="@string/app_name"
android:label="Nextcloud beta"
android:theme="@style/Theme.ownCloud.Toolbar.Drawer">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -83,6 +83,7 @@
android:taskAffinity=""
android:excludeFromRecents="true"
android:label="Nextcloud beta"
android:theme="@style/Theme.ownCloud.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.SEND" />
@@ -104,7 +105,7 @@
android:theme="@style/Theme.ownCloud.Overlay" />
<activity
android:name=".ui.preview.PreviewVideoActivity"
android:label="@string/app_name"
android:label="Nextcloud beta"
android:theme="@style/Theme.ownCloud.Fullscreen" />
<service
@@ -144,8 +145,8 @@
android:syncable="true" />
<provider
android:name=".providers.UsersAndGroupsSearchProvider"
android:authorities="com.nextcloud.android.providers.UsersAndGroupsSearchProvider"
android:name="org.nextcloud.providers.UsersAndGroupsSearchProvider"
android:authorities="org.nextcloud.beta.android.providers.UsersAndGroupsSearchProvider"
android:enabled="true"
android:exported="false"
android:label="@string/search_users_and_groups_hint" />
@@ -173,6 +174,12 @@
android:resource="@xml/exposed_filepaths" />
</provider>
<provider
android:name=".ui.adapter.DiskLruImageCacheFileProvider"
android:authorities="@string/authorityCache"
android:exported="true">
</provider>
<activity
android:name=".authentication.AuthenticatorActivity"
android:exported="true"
@@ -208,8 +215,9 @@
<activity android:name=".ui.activity.ConflictsResolveActivity"/>
<activity android:name=".ui.activity.GenericExplanationActivity"/>
<activity android:name=".ui.activity.ErrorsWhileCopyingHandlerActivity"/>
<activity android:name=".ui.activity.LogHistoryActivity"/>
<activity android:name=".ui.activity.ErrorReportActivity"/>
<activity android:name=".ui.errorhandling.ErrorShowActivity" />
<activity android:name=".ui.activity.UploadListActivity" />
@@ -252,16 +260,16 @@
<activity
android:name=".ui.activity.CopyToClipboardActivity"
android:icon="@drawable/copy_link"
android:label="@string/copy_link" />
android:label="Copy link" />
<activity
android:name=".ui.activity.FolderPickerActivity"
android:label="@string/app_name" />
android:label="Nextcloud beta" />
<activity
android:name=".ui.activity.UploadPathActivity"
android:label="@string/app_name" />
android:label="Nextcloud beta" />
<activity
android:name=".ui.activity.ShareActivity"
android:label="@string/share_dialog_title"
android:label="Sharing"
android:theme="@style/Theme.ownCloud.Dialog.NoTitle"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustResize" >
@@ -272,7 +280,7 @@
android:resource="@xml/users_and_groups_searchable"/>
</activity>
<activity android:name=".ui.activity.ManageSpaceActivity"
android:label="@string/manage_space_title"
android:label="Manage space"
android:theme="@style/Theme.ownCloud" />
</application>
+100 -59
View File
@@ -1,73 +1,114 @@
## 1.4.1 (January, 2017)
- Share URLs to Nextcloud
- Bugfixes and design improvements
## 2017-01-10
- Fix NPE an improve performance of Auto Upload view #530
## 1.4.0 (December 8, 2016)
## 2016-12-31
- Proper email sharee handling #492
- Disable handling broadcast on Nougat and better #488
- Pending jobs in upload view #487
- Ignore files ending with ".tmp" #485
- Fixed removing files #473 #479
- Auto upload: delay job, check file #472
- Auto upload: only files, no folders #469
- External SD card support
- Auto Upload (Android 7+)
- What's new start screen
- Show/hide hidden folders & files
- Upload view: switch between grid/list view
- Descend into folder after creating it in uploader
- Provisioning links to launch and prefill app with login data
- Add open URL file feature
- Sort favorite files first in list
- Account switcher optimizations
- Bugfixes and design improvements
- Update library to 1.0.9
## 2016-12-22
- Add upload URL file feature #327
## 1.3.1 (September 20, 2016)
## 2016-12-15
- Minor Usability improvements #449
- Fix file modification date on upload #451
- Move action hard to discover - difference between single/multi selection
- Show move/copy context in toolbar title
- Share file with dictadroid to Nextcloud
- Don't show upload failure notification for already deleted files
## 2016-11-22
- Updated federated sharing edit options #395
## 1.3.0 (September 17, 2016)
## 2016-11-08
- Streaming #183
- Files drop permission in share viewe
- Display quota if configured/available in navigation drawer
- Resume chunked uploads instead of complete restarts
- Filter remote and local file lists
- Simple integration with DAVdroid for calender and contacts sync
- Mix folders and files on sort by date
- Upload when charging option
- Revamp upload options Move/Copy/Just-Upload
- Text can be selected and shared to Nextcloud
- Respect metered wifi and block instant uploads
- Proper handling of .djvu files
- Bugfixes and design improvements
## 2016-10-26
- New Instant Upload (Android 5+) #358
## 1.2.0 (July 29, 2016)
## 2016-10-19
- Fix user info route (https://github.com/nextcloud/android-library/pull/21)
- Begin debug logs when build type is debug #335
- Account switcher optimizations #326
- Fix TimSort #339
- add preference to show hidden files #328
- tune grid view of images #316
- add grid view option when choosing a file from within the app #301
- Multi select capabilities
- Confirmation dialog on account removal
- Offline available filter in main menu
- Sorting capability when choosing files to be uploaded
- Video thumbnails if activated on server
- Thumbnails during upload
- Fixed user agent for file firewalling
- Showing server side folder sizes
- Text in test preview can now be selected
- Search suggestions fixed for user/group search during sharing
- Minor bugfixes
## 2016-10-06
- put cursor close in finally block to make sure no resource leak occurrs #306
- change wordings for davdroid integration #293
- added logging to gain information about upload issues
- Sorts favourite files first in list #302
- Add open URL file feature #298
- fix remove failed #241
- Crash when sending non-existing log #284
- Fix NPE in ExpandableUploadListAdapter...setText #290
- change wordings for davdroid integration #293
- Fix NullPointerException in PreviewMediaFragment. #295
## 1.1.0 (July 6, 2016)
## 2016-09-26
- update fix crash in dismissLoadingDialog #279
- fix crash when sending non-existing log #284
- New main menu to switch accounts easily
- Ability to open Nextcloud hosted files (read-only) from other apps that support the standard file chooser (requires Android 4.4 / KitKat or higher)
- "Select all files" for upload within a folder
- Optional feature to auto-create monthly folders for your instant uploads
- Revamped login screen
- Minor bugfixes
## 2016-09-22
- update to latest 1.3.1 functionality
- updated What's new #84
- fix crash in dismissLoadingDialog #279
- Provisioning Links to launch and prefill app with login data #248
- fix remove failed #241
## 1.0.1 (June 20, 2016)
## 2016-09-18
- update to latest 1.3.0 functionality
- change caption for move and copy action #265
- Fix thumbnail preview support for new files
- Add support for animated GIFs
- Optimized uploader layout
## 2016-09-15
- update to latest 1.3.0 RC2 functionality
- What's new #84
## 1.0.0 (June 12, 2016)
## 2016-09-07
- update Motivate more users #239
- DAVdroid login screen prefilled launch #236
- Initial release of the Nextcloud Android app
## 2016-09-04
- descend into folder after creating it in uploader #206
- Motivate more users #239
## 2016-09-03
- Display quota if configured/available in navigation drawer #204
- bugfix for empty folder display #229
- Update Toolchain/Android-Target to v24 #214
- Restore display of remote folder size #235
## 2016-08-08
- update all PR
- search for the right ocShare with public link #197
- Fix comparator determining order of list of uploads #199
- generate thumbnails only if mCurrentUpload is not null #205
## 2016-07-31
- External SD support #92
- move / copy updated #178
- prevents NPE when selecting empty local folder #180
## 2016-07-30
- Upload when charging #171
## 2016-07-28
Fresh start on current master with these PRs:
- Resized images #69
- Instant upload in the context of multi account support #98
- mix folders and files on sort by date #135
- Files drop #141
- Receive text file #142
- Pinch zoom #143
- Resize cache #144
- filter for oc file list and local file list #152
- djvu is not an image #153
- delay instant upload when metered wifi is used #161
- rename instant upload path #162
- Refresh when app starts #166
- Disable suggestions in password field #167
- resume chunked uploads #168
From now on every new PR with "3. to review" will be merged to beta and published
+1
View File
@@ -0,0 +1 @@
20170111
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+31 -2
View File
@@ -41,7 +41,7 @@ dependencies {
/// dependencies for app building
compile name: 'touch-image-view'
compile 'com.github.nextcloud:android-library:1.0.9'
compile 'com.github.nextcloud:android-library:beta-SNAPSHOT'
compile "com.android.support:support-v4:${supportLibraryVersion}"
compile "com.android.support:design:${supportLibraryVersion}"
compile 'com.jakewharton:disklrucache:2.0.2'
@@ -100,7 +100,14 @@ android {
testInstrumentationRunnerArgument "TEST_PASSWORD", "\"$System.env.OCTEST_APP_PASSWORD\""
testInstrumentationRunnerArgument "TEST_SERVER_URL", "\"$System.env.OCTEST_SERVER_BASE_URL\""
applicationId "com.nextcloud.client"
applicationId "com.nextcloud.android.beta"
versionCode 20170111
versionName "20170111"
// disable the experimental Jack build tools.
jackOptions {
enabled false
}
}
// adapt structure from Eclipse to Gradle/Android Studio expectations;
@@ -139,9 +146,15 @@ android {
preDexLibraries = preDexEnabled && !travisBuild
}
dexOptions {
// Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
preDexLibraries = preDexEnabled && !travisBuild
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
incremental false
}
lintOptions {
@@ -151,6 +164,10 @@ android {
packagingOptions {
exclude 'META-INF/LICENSE.txt'
}
signingConfigs {
release
}
task checkstyle(type: Checkstyle) {
configFile = file("${rootProject.projectDir}/checkstyle.xml")
configProperties.checkstyleSuppressionsPath = file("${project.rootDir}/config/quality/checkstyle/suppressions.xml").absolutePath
@@ -202,4 +219,16 @@ android {
}
check.dependsOn 'checkstyle', 'findbugs', 'pmd', 'lint'
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
if (project.hasProperty('RELEASE_STORE_FILE')) {
android.signingConfigs.release.storeFile = file(RELEASE_STORE_FILE)
android.signingConfigs.release.storePassword = RELEASE_STORE_PASSWORD
android.signingConfigs.release.keyAlias = RELEASE_KEY_ALIAS
android.signingConfigs.release.keyPassword = RELEASE_KEY_PASSWORD
}
+1 -1
View File
@@ -1,4 +1,4 @@
#Tue Aug 16 10:44:46 CEST 2016
#Sat Sep 03 07:48:32 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

-1
View File
@@ -26,7 +26,6 @@
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_gravity="center_vertical"
android:singleLine="false"
android:layout_margin="@dimen/standard_margin"
style="?android:attr/editTextPreferenceStyle"
android:text="@string/manage_space_description"
+3 -2
View File
@@ -2,8 +2,9 @@
<!--
Nextcloud Android client application
Copyright (C) 2016 Andy Scherzinger
Copyright (C) 2016 Nextcloud.
Copyright (C) 2015 Andy Scherzinger
Copyright (C) 2016 Nextcloud
Copyright (C) 2015 ownCloud
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+3 -2
View File
@@ -2,8 +2,9 @@
<!--
Nextcloud Android client application
Copyright (C) 2016 Andy Scherzinger
Copyright (C) 2016 Nextcloud.
Copyright (C) 2015 Andy Scherzinger
Copyright (C) 2016 Nextcloud
Copyright (C) 2015 ownCloud
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+77
View File
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
ownCloud Android client application
Copyright (C) 2015 ownCloud Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2,
as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginBottom="@dimen/standard_margin"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="@dimen/standard_padding"
android:paddingRight="@dimen/standard_padding">
<TextView
android:id="@+id/logTV"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/empty"
android:typeface="monospace"/>
</LinearLayout>
</ScrollView>
<LinearLayout
android:id="@+id/historyButtonBar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginBottom="@dimen/standard_margin"
android:layout_marginLeft="@dimen/standard_margin"
android:layout_marginRight="@dimen/standard_margin">
<Button
android:id="@+id/cancelErrorLogButton"
android:theme="@style/Button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_weight="1"
android:text="@string/error_log_exit" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/sendErrorLogButton"
android:theme="@style/Button.Primary"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_weight="1"
android:text="@string/error_log_send" />
</LinearLayout>
</LinearLayout>
+7
View File
@@ -29,6 +29,13 @@
app:showAsAction="never"
android:showAsAction="never"
android:orderInCategory="1" />
<item
android:id="@+id/action_stream_file"
android:title="@string/action_stream_file"
android:icon="@drawable/ic_view"
app:showAsAction="never"
android:showAsAction="never"
android:orderInCategory="1" />
<item
android:id="@+id/action_open_file_with"
android:title="@string/actionbar_open_with"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 38 KiB

+14 -9
View File
@@ -4,23 +4,26 @@
<bool name="is_beta">false</bool>
<!-- App name and other strings-->
<string name="app_name">Nextcloud</string>
<string name="account_type">nextcloud</string> <!-- better if was a domain name; but changing it now would require migrate accounts when the app is updated -->
<string name="authority">org.nextcloud</string> <!-- better if was the app package with ".provider" appended ; it identifies the provider -->
<string name="document_provider_authority">org.nextcloud.documents</string>
<string name="file_provider_authority">org.nextcloud.files</string>
<string name="app_name">Nextcloud beta</string>
<string name="account_type">nextcloud.beta</string> <!-- better if was a domain name; but changing it now would require
migrate accounts when the app is updated -->
<string name="authority">org.nextcloud.beta.provider</string> <!-- better if was the app package with ".provider" appended ; it identifies the provider -->
<string name="authorityCache">org.nextcloud.beta.imageCache.provider</string>
<string name="authoritySearch">org.nextcloud.beta.android.providers.UsersAndGroupsSearchProvider</string>
<string name="document_provider_authority">org.nextcloud.beta.documents</string>
<string name="file_provider_authority">org.nextcloud.beta.files</string>
<string name ="db_file">nextcloud.db</string>
<string name ="db_name">nextcloud</string>
<string name ="data_folder">nextcloud</string>
<string name ="log_name">nextcloud</string>
<string name ="log_name">beta</string>
<string name ="default_display_name_for_root_folder">Nextcloud</string>
<string name ="user_agent">Mozilla/5.0 (Android) ownCloud-android/%1$s</string>
<string name ="user_agent">Mozilla/5.0 (Android) nextcloud-android/%1$s</string>
<!-- URLs and flags related -->
<string name="server_url"></string>
<bool name="show_server_url_input">true</bool>
<bool name="show_welcome_link">true</bool>
<string name="welcome_link_url">"https://nextcloud.com"</string>
<string name="welcome_link_url">"https://nextcloud.com/mobile/new"</string>
<string name="share_api_link"></string>
<!-- Flags to setup the authentication methods available in the app -->
@@ -64,8 +67,10 @@
<bool name="imprint_enabled">false</bool>
<bool name="recommend_enabled">true</bool>
<bool name="feedback_enabled">true</bool>
<bool name="logger_enabled">false</bool>
<bool name="logger_enabled">true</bool>
<string name="url_help">https://help.nextcloud.com/c/feature</string>
<string name="beta_link">https://github.com/nextcloud/android/raw/beta/apks/nextcloud-beta-</string>
<string name="beta_latest">https://github.com/nextcloud/android/raw/beta/apks/latest</string>
<string name="url_imprint"></string>
<string name="mail_recommend">"mailto:"</string>
<string name="mail_feedback">"mailto:[email protected]"</string>
+13
View File
@@ -317,10 +317,16 @@
<string name="preview_image_description">Image preview</string>
<string name="preview_image_error_unknown_format">This image cannot be shown</string>
<string name="error_log_exit">Exit</string>
<string name="error_log_send">Send Log</string>
<string name="error_log_title">Error Log</string>
<string name="error__upload__local_file_not_copied">%1$s could not be copied to %2$s local folder</string>
<string name="prefs_instant_upload_path_title">Instant upload folder</string>
<string name="prefs_folder_sync_local_path_title">Local folder</string>
<string name="prefs_folder_sync_remote_path_title">Remote folder</string>
<string name="prefs_instant_upload_account">Account</string>
<string name="prefs_instant_upload_path">Path</string>
<string name="prefs_instant_upload_path_use_subfolders_title">Use subfolders</string>
<string name="prefs_instant_upload_path_use_subfolders_summary">Store in subfolders based on year and month</string>
@@ -446,12 +452,17 @@
<string name="upload_move_files">Move file</string>
<string name="select_all">Select all</string>
<string name="action_stream_file">Stream file with external player</string>
<string name="stream_expose_password">Do you want to stream this file with an external app?\n\nCAUTION: This may expose your password locally on the display!</string>
<string name="pref_behaviour_entries_keep_file">kept in original folder</string>
<string name="pref_behaviour_entries_move">moved to app folder</string>
<string name="pref_behaviour_entries_delete_file">deleted</string>
<string name="prefs_storage_path">Storage path</string>
<string name="prefs_common">Common</string>
<string name="pref_cache_size">Cache size</string>
<string name="share_dialog_title">Sharing</string>
<string name="share_file">Share %1$s</string>
<string name="share_with_user_section_title">Share with users and groups</string>
@@ -484,6 +495,7 @@
<string name="share_privilege_can_edit_delete">delete</string>
<string name="edit_share_unshare">Stop sharing</string>
<string name="edit_share_done">done</string>
<string name="changelog">https://github.com/nextcloud/android/raw/beta/CHANGELOG.md</string>
<string name="action_retry_uploads">Retry failed</string>
<string name="action_clear_failed_uploads">Clear failed</string>
@@ -553,6 +565,7 @@
<string name="storage_description_default">Default</string>
<string name="storage_description_sd_no">SD card %1$d</string>
<string name="storage_description_unknown">Unknown</string>
<string name="prefs_category_beta">Beta</string>
<!-- What's new feature and texts to show -->
<string name="whats_new_title">What\'s new in Nextcloud</string>
+16 -3
View File
@@ -28,7 +28,7 @@
<com.owncloud.android.ui.CheckBoxPreferenceWithLongTitle android:key="instant_uploading"
android:title="@string/prefs_instant_upload"
android:summary="@string/prefs_instant_upload_summary"/>
<com.owncloud.android.ui.PreferenceWithLongSummary
<com.owncloud.android.ui.PreferenceWithTwoLineLongSummary
android:title="@string/prefs_instant_upload_path_title"
android:key="instant_upload_path" />
<com.owncloud.android.ui.CheckBoxPreferenceWithLongTitle
@@ -36,8 +36,6 @@
android:summary="@string/prefs_instant_upload_path_use_subfolders_summary"
android:key="instant_upload_path_use_subfolders" />
<com.owncloud.android.ui.CheckBoxPreferenceWithLongTitle
android:dependency="instant_uploading"
android:disableDependentsState="true"
android:title="@string/instant_upload_on_wifi"
android:key="instant_upload_on_wifi"/>
<com.owncloud.android.ui.CheckBoxPreferenceWithLongTitle
@@ -81,6 +79,10 @@
<PreferenceCategory android:title="@string/prefs_category_details">
<android.preference.CheckBoxPreference android:title="@string/prefs_passcode" android:key="set_pincode" />
<android.preference.CheckBoxPreference android:title="@string/prefs_show_hidden_files" android:key="show_hidden_files" />
<EditTextPreference android:title="@string/pref_cache_size"
android:key="pref_cache_size"
android:digits="0123456789"/>
</PreferenceCategory>
<PreferenceCategory android:title="@string/prefs_category_more" android:key="more">
@@ -95,4 +97,15 @@
<Preference android:title="@string/about_title" android:id="@+id/about_app" android:key="about_app" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/prefs_category_beta" android:key="beta_category">
<Preference android:id="@+id/beta_link"
android:title="Download latest beta version"
android:key="beta_link" />
<Preference android:id="@+id/changelog_link"
android:title="Changelog beta version"
android:key="changelog_link" />
</PreferenceCategory>
</PreferenceScreen>
+2 -2
View File
@@ -22,7 +22,7 @@
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/app_name"
android:hint="@string/search_users_and_groups_hint"
android:searchSuggestAuthority="com.nextcloud.android.providers.UsersAndGroupsSearchProvider"
android:searchSuggestIntentAction="com.nextcloud.android.providers.UsersAndGroupsSearchProvider.action.SHARE_WITH"
android:searchSuggestAuthority="org.nextcloud.beta.android.providers.UsersAndGroupsSearchProvider"
android:searchSuggestIntentAction="org.nextcloud.beta.android.providers.UsersAndGroupsSearchProvider.action.SHARE_WITH"
android:searchSuggestThreshold="1" >
</searchable>
+16 -10
View File
@@ -42,6 +42,9 @@ import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.services.observer.SyncedFolderObserverService;
import com.owncloud.android.ui.activity.Preferences;
import com.owncloud.android.ui.activity.WhatsNewActivity;
import com.owncloud.android.utils.ExceptionHandler;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -76,10 +79,15 @@ public class MainApp extends Application {
@SuppressWarnings("unused")
private boolean mBound;
@SuppressFBWarnings("ST") public void onCreate(){
@SuppressFBWarnings("ST")
public void onCreate(){
super.onCreate();
MainApp.mContext = getApplicationContext();
// Setup handler for uncaught exceptions.
Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(this));
SharedPreferences appPrefs =
PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
MainApp.storagePath = appPrefs.getString(Preferences.PreferenceKeys.STORAGE_PATH, Environment.
@@ -96,17 +104,15 @@ public class MainApp extends Application {
// initialise thumbnails cache on background thread
new ThumbnailsCacheManager.InitDiskCacheTask().execute();
if (BuildConfig.DEBUG) {
String dataFolder = getDataFolder();
// Set folder for store logs
Log_OC.setLogDataFolder(dataFolder);
String dataFolder = getDataFolder() + getAppContext().getResources().getString(R.string.log_name);
Log_OC.startLogging(MainApp.storagePath);
Log_OC.d("Debug", "start logging");
}
// Set folder for store logs
Log_OC.setLogDataFolder(dataFolder);
Log_OC.startLogging(MainApp.storagePath);
Log_OC.d("Debug", "start logging");
Log_OC.d("SyncedFolderObserverService", "Start service SyncedFolderObserverService");
Intent i = new Intent(this, SyncedFolderObserverService.class);
@@ -169,7 +175,7 @@ public class MainApp extends Application {
MainApp.storagePath = path;
}
// Methods to obtain Strings referring app_name
// Methods to obtain Strings referring app_name
// From AccountAuthenticator
// public static final String ACCOUNT_TYPE = "owncloud";
public static String getAccountType() {
@@ -38,7 +38,8 @@ import com.owncloud.android.lib.common.utils.Log_OC;
/**
* Authenticator for ownCloud accounts.
*
* Controller class accessed from the system AccountManager, providing integration of ownCloud accounts with the Android system.
* Controller class accessed from the system AccountManager,
* providing integration of ownCloud accounts with the Android system.
*
* TODO - better separation in operations for OAuth-capable and regular ownCloud accounts.
* TODO - review completeness
@@ -46,8 +47,8 @@ import com.owncloud.android.lib.common.utils.Log_OC;
public class AccountAuthenticator extends AbstractAccountAuthenticator {
/**
* Is used by android system to assign accounts to authenticators. Should be
* used by application and all extensions.
* Is used by android system to assign accounts to authenticators.
* Should be used by application and all extensions.
*/
public static final String KEY_AUTH_TOKEN_TYPE = "authTokenType";
public static final String KEY_REQUIRED_FEATURES = "requiredFeatures";
@@ -74,8 +75,7 @@ public class AccountAuthenticator extends AbstractAccountAuthenticator {
String accountType, String authTokenType,
String[] requiredFeatures, Bundle options)
throws NetworkErrorException {
Log_OC.i(TAG, "Adding account with type " + accountType
+ " and auth token " + authTokenType);
Log_OC.i(TAG, "Adding account with type " + accountType + " and auth token " + authTokenType);
final Bundle bundle = new Bundle();
@@ -131,8 +131,7 @@ public class AccountAuthenticator extends AbstractAccountAuthenticator {
try {
validateAccountType(account.type);
} catch (AuthenticatorException e) {
Log_OC.e(TAG, "Failed to validate account type " + account.type + ": "
+ e.getMessage(), e);
Log_OC.e(TAG, "Failed to validate account type " + account.type + ": " + e.getMessage(), e);
return e.getFailureBundle();
}
Intent intent = new Intent(mContext, AuthenticatorActivity.class);
@@ -149,8 +148,7 @@ public class AccountAuthenticator extends AbstractAccountAuthenticator {
}
@Override
public Bundle editProperties(AccountAuthenticatorResponse response,
String accountType) {
public Bundle editProperties(AccountAuthenticatorResponse response, String accountType) {
return null;
}
@@ -166,8 +164,7 @@ public class AccountAuthenticator extends AbstractAccountAuthenticator {
validateAccountType(account.type);
validateAuthTokenType(authTokenType);
} catch (AuthenticatorException e) {
Log_OC.e(TAG, "Failed to validate account type " + account.type + ": "
+ e.getMessage(), e);
Log_OC.e(TAG, "Failed to validate account type " + account.type + ": " + e.getMessage(), e);
return e.getFailureBundle();
}
@@ -219,8 +216,7 @@ public class AccountAuthenticator extends AbstractAccountAuthenticator {
Account account, String authTokenType, Bundle options)
throws NetworkErrorException {
final Intent intent = new Intent(mContext, AuthenticatorActivity.class);
intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE,
response);
intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
intent.putExtra(KEY_ACCOUNT, account);
intent.putExtra(KEY_AUTH_TOKEN_TYPE, authTokenType);
intent.putExtra(KEY_LOGIN_OPTIONS, options);
@@ -232,8 +228,7 @@ public class AccountAuthenticator extends AbstractAccountAuthenticator {
}
@Override
public Bundle getAccountRemovalAllowed(
AccountAuthenticatorResponse response, Account account)
public Bundle getAccountRemovalAllowed(AccountAuthenticatorResponse response, Account account)
throws NetworkErrorException {
return super.getAccountRemovalAllowed(response, account);
}
@@ -244,15 +239,13 @@ public class AccountAuthenticator extends AbstractAccountAuthenticator {
intent.addFlags(Intent.FLAG_FROM_BACKGROUND);
}
private void validateAccountType(String type)
throws UnsupportedAccountTypeException {
private void validateAccountType(String type) throws UnsupportedAccountTypeException {
if (!type.equals(MainApp.getAccountType())) {
throw new UnsupportedAccountTypeException();
}
}
private void validateAuthTokenType(String authTokenType)
throws UnsupportedAuthTokenTypeException {
private void validateAuthTokenType(String authTokenType) throws UnsupportedAuthTokenTypeException {
if (!authTokenType.equals(MainApp.getAuthTokenType()) &&
!authTokenType.equals(AccountTypeUtils.getAuthTokenTypePass(MainApp.getAccountType())) &&
!authTokenType.equals(AccountTypeUtils.getAuthTokenTypeAccessToken(MainApp.getAccountType())) &&
@@ -269,8 +262,7 @@ public class AccountAuthenticator extends AbstractAccountAuthenticator {
public AuthenticatorException(int code, String errorMsg) {
mFailureBundle = new Bundle();
mFailureBundle.putInt(AccountManager.KEY_ERROR_CODE, code);
mFailureBundle
.putString(AccountManager.KEY_ERROR_MESSAGE, errorMsg);
mFailureBundle.putString(AccountManager.KEY_ERROR_MESSAGE, errorMsg);
}
public Bundle getFailureBundle() {
@@ -278,8 +270,7 @@ public class AccountAuthenticator extends AbstractAccountAuthenticator {
}
}
public static class UnsupportedAccountTypeException extends
AuthenticatorException {
public static class UnsupportedAccountTypeException extends AuthenticatorException {
private static final long serialVersionUID = 1L;
public UnsupportedAccountTypeException() {
@@ -288,8 +279,7 @@ public class AccountAuthenticator extends AbstractAccountAuthenticator {
}
}
public static class UnsupportedAuthTokenTypeException extends
AuthenticatorException {
public static class UnsupportedAuthTokenTypeException extends AuthenticatorException {
private static final long serialVersionUID = 1L;
public UnsupportedAuthTokenTypeException() {
@@ -297,23 +287,4 @@ public class AccountAuthenticator extends AbstractAccountAuthenticator {
"Unsupported auth token type");
}
}
public static class UnsupportedFeaturesException extends
AuthenticatorException {
public static final long serialVersionUID = 1L;
public UnsupportedFeaturesException() {
super(AccountManager.ERROR_CODE_UNSUPPORTED_OPERATION,
"Unsupported features");
}
}
public static class AccessDeniedException extends AuthenticatorException {
public AccessDeniedException(int code, String errorMsg) {
super(AccountManager.ERROR_CODE_INVALID_RESPONSE, "Access Denied");
}
private static final long serialVersionUID = 1L;
}
}
@@ -331,4 +331,28 @@ public class AccountUtils {
}
return (serverVersion != null ? serverVersion.isSearchUsersSupported() : false);
}
/**
* Returns account for instant upload or null, if not defined.
* @return instant upload account or null
*/
public static Account getInstantUploadAccount(Context context) {
return getAccount(com.owncloud.android.db.PreferenceManager.instantPictureUploadPathAccount(context));
}
/**
* Returns account for instant video upload or null, if not defined.
* @return instant video upload account or null
*/
public static Account getInstantVideoUploadAccount(Context context) {
return getAccount(com.owncloud.android.db.PreferenceManager.instantVideoUploadPathAccount(context));
}
/**
* Returns account for given account name or null, if not defined.
* @return account named accountNam or null
*/
private static Account getAccount(String accountName) {
return getOwnCloudAccountByName(MainApp.getAppContext(), accountName);
}
}
@@ -91,10 +91,12 @@ import com.owncloud.android.ui.dialog.SamlWebViewDialog;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.OnSslUntrustedCertListener;
import com.owncloud.android.utils.DisplayUtils;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.security.cert.X509Certificate;
import java.util.Map;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
/**
* This Activity is used to add an ownCloud account to the App
*/
@@ -401,7 +403,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
* @param savedInstanceState Saved activity state, as in {{@link #onCreate(Bundle)}
*/
private void initServerPreFragment(Bundle savedInstanceState) {
boolean checkHostUrl = true;
/// step 1 - load and process relevant inputs (resources, intent, savedInstanceState)
boolean isUrlInputAllowed = getResources().getBoolean(R.bool.show_server_url_input);
@@ -444,9 +445,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
mHostUrlInput.setFocusable(false);
}
if (isUrlInputAllowed) {
if (mServerInfo.mBaseUrl.isEmpty()) {
checkHostUrl = false;
}
mRefreshButton = findViewById(R.id.embeddedRefreshButton);
} else {
findViewById(R.id.hostUrlFrame).setVisibility(View.GONE);
@@ -91,22 +91,25 @@ public class MediaProvider {
}
cursorImages.close();
// count images
Cursor count = contentResolver.query(
MEDIA_URI,
FILE_PROJECTION,
FILE_SELECTION + folderId,
null,
null);
// only do further work if folder is not within the Nextcloud app itself
if (!mediaFolder.absolutePath.startsWith(dataPath)) {
if (count != null) {
mediaFolder.numberOfFiles = count.getCount();
count.close();
// count images
Cursor count = contentResolver.query(
MEDIA_URI,
FILE_PROJECTION,
FILE_SELECTION + folderId,
null,
null);
if (count != null) {
mediaFolder.numberOfFiles = count.getCount();
count.close();
}
mediaFolders.add(mediaFolder);
}
}
if (!mediaFolder.absolutePath.startsWith(dataPath)) {
mediaFolders.add(mediaFolder);
}
}
cursorFolders.close();
}
@@ -22,19 +22,27 @@
package com.owncloud.android.datamodel;
import android.accounts.Account;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.media.ThumbnailUtils;
import android.net.Uri;
import android.os.AsyncTask;
import android.view.Display;
import android.view.MenuItem;
import android.view.View;
import android.view.WindowManager;
import android.preference.PreferenceManager;
import android.widget.ImageView;
import android.widget.ProgressBar;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
@@ -67,12 +75,12 @@ public class ThumbnailsCacheManager {
private static final String TAG = ThumbnailsCacheManager.class.getSimpleName();
private static final String CACHE_FOLDER = "thumbnailCache";
private static final Integer CACHE_SIZE_MB = 10;
private static final Object mThumbnailsDiskCacheLock = new Object();
private static DiskLruImageCache mThumbnailCache = null;
private static boolean mThumbnailCacheStarting = true;
private static final int DISK_CACHE_SIZE = 1024 * 1024 * 10; // 10MB
private static final CompressFormat mCompressFormat = CompressFormat.JPEG;
private static final int mCompressQuality = 70;
private static OwnCloudClient mClient = null;
@@ -89,7 +97,7 @@ public class ThumbnailsCacheManager {
R.drawable.file_movie
);
public static class InitDiskCacheTask extends AsyncTask<File, Void, Void> {
@Override
@@ -99,7 +107,19 @@ public class ThumbnailsCacheManager {
if (mThumbnailCache == null) {
try {
// Check if media is mounted or storage is built-in, if so,
SharedPreferences appPrefs =
PreferenceManager.getDefaultSharedPreferences(MainApp.getAppContext());
// due to backward compatibility
Integer cacheSize = CACHE_SIZE_MB * 1024 * 1024;
try {
cacheSize = appPrefs.getInt("pref_cache_size", cacheSize);
} catch (ClassCastException e) {
String temp = appPrefs.getString("pref_cache_size",
cacheSize.toString());
cacheSize = Integer.decode(temp) * 1024 * 1024;
}
// Check if media is mounted or storage is built-in, if so,
// try and use external cache dir; otherwise use internal cache dir
final String cachePath =
MainApp.getAppContext().getExternalCacheDir().getPath() +
@@ -108,7 +128,7 @@ public class ThumbnailsCacheManager {
final File diskCacheDir = new File(cachePath);
mThumbnailCache = new DiskLruImageCache(
diskCacheDir,
DISK_CACHE_SIZE,
cacheSize,
mCompressFormat,
mCompressQuality
);
@@ -163,6 +183,7 @@ public class ThumbnailsCacheManager {
}
}
public static Bitmap getBitmapFromDiskCache(String key) {
synchronized (mThumbnailsDiskCacheLock) {
// Wait while disk cache is started from background thread
@@ -180,14 +201,40 @@ public class ThumbnailsCacheManager {
return null;
}
/**
* Sets max size of cache
* @param maxSize in MB
* @return
*/
public static boolean setMaxSize(long maxSize){
if (mThumbnailCache != null){
mThumbnailCache.setMaxSize(maxSize * 1024 * 1024);
return true;
} else {
return false;
}
}
/**
* Shows max cache size
* @return max cache size in MB.
*/
public static long getMaxSize(){
if (mThumbnailCache == null) {
new ThumbnailsCacheManager.InitDiskCacheTask().execute();
}
return mThumbnailCache.getMaxSize() / 1024 / 1024;
}
public static class ThumbnailGenerationTask extends AsyncTask<Object, Void, Bitmap> {
private final WeakReference<ImageView> mImageViewReference;
private WeakReference<ProgressBar> mProgressWheelRef;
private static Account mAccount;
private Object mFile;
private Boolean mIsThumbnail;
private String mImageKey = null;
private FileDataStorageManager mStorageManager;
public ThumbnailGenerationTask(ImageView imageView, FileDataStorageManager storageManager,
Account account) {
// Use a WeakReference to ensure the ImageView can be garbage collected
@@ -208,6 +255,12 @@ public class ThumbnailsCacheManager {
mImageViewReference = null;
}
public ThumbnailGenerationTask(ImageView imageView, FileDataStorageManager storageManager,
Account account, ProgressBar progressWheel) {
this(imageView, storageManager, account);
mProgressWheelRef = new WeakReference<ProgressBar>(progressWheel);
}
public ThumbnailGenerationTask(ImageView imageView) {
// Use a WeakReference to ensure the ImageView can be garbage collected
mImageViewReference = new WeakReference<ImageView>(imageView);
@@ -229,18 +282,20 @@ public class ThumbnailsCacheManager {
}
mFile = params[0];
if (params.length == 2) {
mImageKey = (String) params[1];
mIsThumbnail = (Boolean) params[1];
if (params.length == 3){
mImageKey = (String) params[2];
}
if (mFile instanceof OCFile) {
thumbnail = doOCFileInBackground();
thumbnail = doOCFileInBackground(mIsThumbnail);
if (MimeTypeUtil.isVideo((OCFile) mFile) && thumbnail != null) {
thumbnail = addVideoOverlay(thumbnail);
}
} else if (mFile instanceof File) {
thumbnail = doFileInBackground();
thumbnail = doFileInBackground(mIsThumbnail);
String url = ((File) mFile).getAbsolutePath();
String mMimeType = FileStorageUtils.getMimeTypeFromName(url);
@@ -273,12 +328,41 @@ public class ThumbnailsCacheManager {
tagId = String.valueOf(mFile.hashCode());
}
if (String.valueOf(imageView.getTag()).equals(tagId)) {
if (mProgressWheelRef != null) {
final ProgressBar progressWheel = mProgressWheelRef.get();
if (progressWheel != null) {
progressWheel.setVisibility(View.GONE);
}
}
imageView.setImageBitmap(bitmap);
}
}
}
}
/**
* Add thumbnail to cache
* @param imageKey: thumb key
* @param bitmap: image for extracting thumbnail
* @param path: image path
* @param pxW: thumbnail width in pixel
* @param pxH: thumbnail height in pixel
* @return Bitmap
*/
private Bitmap addThumbnailToCache(String imageKey, Bitmap bitmap, String path,
int pxW, int pxH){
Bitmap thumbnail = ThumbnailUtils.extractThumbnail(bitmap, pxW, pxH);
// Rotate image, obeying exif tag
thumbnail = BitmapUtils.rotateImage(thumbnail,path);
// Add thumbnail to cache
addBitmapToCache(imageKey, thumbnail);
return thumbnail;
}
/**
* Converts size of file icon from dp to pixel
* @return int
@@ -289,31 +373,56 @@ public class ThumbnailsCacheManager {
return Math.round(r.getDimension(R.dimen.file_icon_size_grid));
}
private Bitmap doOCFileInBackground() {
private Point getScreenDimension(){
WindowManager wm = (WindowManager) MainApp.getAppContext().
getSystemService(Context.WINDOW_SERVICE);
Display display = wm.getDefaultDisplay();
Point test = new Point();
display.getSize(test);
return test;
}
private Bitmap doOCFileInBackground(Boolean isThumbnail) {
Bitmap thumbnail = null;
OCFile file = (OCFile)mFile;
final String imageKey = String.valueOf(file.getRemoteId());
// distinguish between thumbnail and resized image
String temp = String.valueOf(file.getRemoteId());
if (isThumbnail){
temp = "t" + temp;
} else {
temp = "r" + temp;
}
final String imageKey = temp;
// Check disk cache in background thread
Bitmap thumbnail = getBitmapFromDiskCache(imageKey);
thumbnail = getBitmapFromDiskCache(imageKey);
// Not found in disk cache
if (thumbnail == null || file.needsUpdateThumbnail()) {
int px = getThumbnailDimension();
int pxW = 0;
int pxH = 0;
if (mIsThumbnail) {
pxW = pxH = getThumbnailDimension();
} else {
Point p = getScreenDimension();
pxW = p.x;
pxH = p.y;
}
if (file.isDown()) {
Bitmap temp = BitmapUtils.decodeSampledBitmapFromFile(
file.getStoragePath(), px, px);
Bitmap bitmap = ThumbnailUtils.extractThumbnail(temp, px, px);
Bitmap bitmap = BitmapUtils.decodeSampledBitmapFromFile(
file.getStoragePath(), pxW, pxH);
if (bitmap != null) {
// Handle PNG
if (file.getMimetype().equalsIgnoreCase("image/png")) {
bitmap = handlePNG(bitmap, px);
bitmap = handlePNG(bitmap, pxW);
}
thumbnail = addThumbnailToCache(imageKey, bitmap, file.getStoragePath(), px);
thumbnail = addThumbnailToCache(imageKey, bitmap, file.getStoragePath(),
pxW, pxH);
file.setNeedsUpdateThumbnail(false);
mStorageManager.saveFile(file);
@@ -326,30 +435,47 @@ public class ThumbnailsCacheManager {
if (serverOCVersion.supportsRemoteThumbnails()) {
GetMethod get = null;
try {
String uri = mClient.getBaseUri() + "" +
"/index.php/apps/files/api/v1/thumbnail/" +
px + "/" + px + Uri.encode(file.getRemotePath(), "/");
Log_OC.d("Thumbnail", "URI: " + uri);
get = new GetMethod(uri);
get.setRequestHeader("Cookie",
"nc_sameSiteCookielax=true;nc_sameSiteCookiestrict=true");
int status = mClient.executeMethod(get);
if (status == HttpStatus.SC_OK) {
InputStream inputStream = get.getResponseBodyAsStream();
Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
thumbnail = ThumbnailUtils.extractThumbnail(bitmap, px, px);
// Handle PNG
if (file.getMimetype().equalsIgnoreCase("image/png")) {
thumbnail = handlePNG(thumbnail, px);
}
// Add thumbnail to cache
if (thumbnail != null) {
addBitmapToCache(imageKey, thumbnail);
if (mIsThumbnail) {
String uri = mClient.getBaseUri() + "" +
"/index.php/apps/files/api/v1/thumbnail/" +
pxW + "/" + pxH + Uri.encode(file.getRemotePath(), "/");
Log_OC.d("Thumbnail", "URI: " + uri);
get = new GetMethod(uri);
get.setRequestHeader("Cookie",
"nc_sameSiteCookielax=true;nc_sameSiteCookiestrict=true");
int status = mClient.executeMethod(get);
if (status == HttpStatus.SC_OK) {
InputStream inputStream = get.getResponseBodyAsStream();
Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
thumbnail = ThumbnailUtils.extractThumbnail(bitmap, pxW, pxH);
}
} else {
mClient.exhaustResponse(get.getResponseBodyAsStream());
String uri = mClient.getBaseUri() + "" +
"/index.php/apps/gallery/api/preview/" +
Integer.parseInt(file.getRemoteId().substring(0,8)) +
"/" + pxW + "/" + pxH;
Log_OC.d("Thumbnail", "FileName: " + file.getFileName() +
" Download URI: " + uri);
get = new GetMethod(uri);
get.setRequestHeader("Cookie",
"nc_sameSiteCookielax=true;nc_sameSiteCookiestrict=true");
int status = mClient.executeMethod(get);
if (status == HttpStatus.SC_OK) {
InputStream inputStream = get.getResponseBodyAsStream();
Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
// Download via gallery app
thumbnail = bitmap;
}
}
// Handle PNG
if (file.getMimetype().equalsIgnoreCase("image/png")) {
thumbnail = handlePNG(thumbnail, pxW);
}
// Add thumbnail to cache
if (thumbnail != null) {
addBitmapToCache(imageKey, thumbnail);
}
} catch (Exception e) {
Log_OC.d(TAG, e.getMessage(), e);
@@ -369,7 +495,7 @@ public class ThumbnailsCacheManager {
}
private Bitmap doFileInBackground() {
private Bitmap doFileInBackground(Boolean mIsThumbnail) {
File file = (File)mFile;
final String imageKey;
@@ -379,19 +505,33 @@ public class ThumbnailsCacheManager {
imageKey = String.valueOf(file.hashCode());
}
// distinguish between thumbnail and resized image
if (mIsThumbnail){
mImageKey = "t" + mImageKey;
} else {
mImageKey = "r" + mImageKey;
}
// Check disk cache in background thread
Bitmap thumbnail = getBitmapFromDiskCache(imageKey);
// Not found in disk cache
if (thumbnail == null) {
int px = getThumbnailDimension();
int pxW = 0;
int pxH = 0;
if (mIsThumbnail) {
pxW = pxH = getThumbnailDimension();
} else {
Point p = getScreenDimension();
pxW = p.x;
pxH = p.y;
}
Bitmap bitmap = BitmapUtils.decodeSampledBitmapFromFile(
file.getAbsolutePath(), px, px);
file.getAbsolutePath(), pxW, pxH);
if (bitmap != null) {
thumbnail = addThumbnailToCache(imageKey, bitmap, file.getPath(), px);
thumbnail = addThumbnailToCache(imageKey, bitmap, file.getPath(), pxW, pxH);
}
}
return thumbnail;
@@ -22,6 +22,8 @@ package com.owncloud.android.db;
import android.content.Context;
import android.content.SharedPreferences;
import com.owncloud.android.MainApp;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.utils.FileStorageUtils;
/**
@@ -38,17 +40,25 @@ public abstract class PreferenceManager {
private static final String AUTO_PREF__UPLOAD_FILE_EXTENSION_MAP_URL = "prefs_upload_file_extension_map_url";
private static final String AUTO_PREF__UPLOAD_FILE_EXTENSION_URL = "prefs_upload_file_extension_url";
private static final String AUTO_PREF__UPLOADER_BEHAVIOR = "prefs_uploader_behaviour";
private static final String AUTO_PREF__GRID_COLUMNS = "grid_columns";
private static final String PREF__INSTANT_UPLOADING = "instant_uploading";
private static final String PREF__INSTANT_UPLOAD_PATH_ACCOUNT = "instant_upload_path_account";
private static final String PREF__INSTANT_VIDEO_UPLOADING = "instant_video_uploading";
private static final String PREF__INSTANT_UPLOAD_PATH_USE_SUBFOLDERS = "instant_upload_path_use_subfolders";
private static final String PREF__INSTANT_UPLOAD_ON_WIFI = "instant_upload_on_wifi";
private static final String PREF__INSTANT_VIDEO_UPLOAD_ON_WIFI = "instant_video_upload_on_wifi";
private static final String PREF__INSTANT_VIDEO_UPLOAD_PATH_USE_SUBFOLDERS = "instant_video_upload_path_use_subfolders";
private static final String PREF__INSTANT_VIDEO_UPLOAD_PATH_ACCOUNT = "instant_video_upload_path_account";
public static boolean instantPictureUploadEnabled(Context context) {
return getDefaultSharedPreferences(context).getBoolean(PREF__INSTANT_UPLOADING, false);
}
public static String instantPictureUploadPathAccount(Context context) {
return getDefaultSharedPreferences(context).getString(PREF__INSTANT_UPLOAD_PATH_ACCOUNT,
AccountUtils.getCurrentOwnCloudAccount(MainApp.getAppContext()).name);
}
public static boolean instantVideoUploadEnabled(Context context) {
return getDefaultSharedPreferences(context).getBoolean(PREF__INSTANT_VIDEO_UPLOADING, false);
}
@@ -61,6 +71,11 @@ public abstract class PreferenceManager {
return getDefaultSharedPreferences(context).getBoolean(PREF__INSTANT_UPLOAD_ON_WIFI, false);
}
public static String instantVideoUploadPathAccount(Context context) {
return getDefaultSharedPreferences(context).getString(PREF__INSTANT_VIDEO_UPLOAD_PATH_ACCOUNT,
AccountUtils.getCurrentOwnCloudAccount(MainApp.getAppContext()).name);
}
public static boolean instantVideoUploadPathUseSubfolders(Context context) {
return getDefaultSharedPreferences(context).getBoolean(PREF__INSTANT_VIDEO_UPLOAD_PATH_USE_SUBFOLDERS, false);
}
@@ -205,22 +220,44 @@ public abstract class PreferenceManager {
saveIntPreference(context, AUTO_PREF__UPLOADER_BEHAVIOR, uploaderBehaviour);
}
public static void saveBooleanPreference(Context context, String key, boolean value) {
/**
* Gets the grid columns which the user has set last.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @return grid columns grid columns
*/
public static float getGridColumns(Context context) {
return getDefaultSharedPreferences(context).getFloat(AUTO_PREF__GRID_COLUMNS, -1.0f);
}
/**
* Saves the grid columns which the user has set last.
*
* @param context Caller {@link Context}, used to access to shared preferences manager.
* @param gridColumns the uploader behavior
*/
public static void setGridColumns(Context context, float gridColumns) {
saveFloatPreference(context, AUTO_PREF__GRID_COLUMNS, gridColumns);
}
private static void saveBooleanPreference(Context context, String key, boolean value) {
SharedPreferences.Editor appPreferences = getDefaultSharedPreferences(context.getApplicationContext()).edit();
appPreferences.putBoolean(key, value);
appPreferences.apply();
appPreferences.putBoolean(key, value).apply();
}
private static void saveStringPreference(Context context, String key, String value) {
SharedPreferences.Editor appPreferences = getDefaultSharedPreferences(context.getApplicationContext()).edit();
appPreferences.putString(key, value);
appPreferences.apply();
appPreferences.putString(key, value).apply();
}
private static void saveIntPreference(Context context, String key, int value) {
SharedPreferences.Editor appPreferences = getDefaultSharedPreferences(context.getApplicationContext()).edit();
appPreferences.putInt(key, value);
appPreferences.apply();
appPreferences.putInt(key, value).apply();
}
private static void saveFloatPreference(Context context, String key, float value) {
SharedPreferences.Editor appPreferences = getDefaultSharedPreferences(context.getApplicationContext()).edit();
appPreferences.putFloat(key, value).apply();
}
public static SharedPreferences getDefaultSharedPreferences(Context context) {
@@ -32,6 +32,7 @@ import com.owncloud.android.files.services.FileUploader.FileUploaderBinder;
import com.owncloud.android.lib.resources.status.OCCapability;
import com.owncloud.android.services.OperationsService.OperationsServiceBinder;
import com.owncloud.android.ui.activity.ComponentsGetter;
import com.owncloud.android.utils.MimeTypeUtil;
import java.util.ArrayList;
import java.util.Arrays;
@@ -243,6 +244,12 @@ public class FileMenuFilter {
toShow.add(R.id.action_unfavorite_file);
}
// STREAM
if (isSingleFile() && !anyFileDown() && (anyFileAudio() || anyFileVideo())){
toShow.add(R.id.action_stream_file);
} else {
toHide.add(R.id.action_stream_file);
}
}
private boolean anyFileSynchronizing() {
@@ -320,6 +327,24 @@ public class FileMenuFilter {
return false;
}
private boolean anyFileAudio() {
for(OCFile file: mFiles) {
if(MimeTypeUtil.isAudio(file)) {
return true;
}
}
return false;
}
private boolean anyFileVideo() {
for(OCFile file: mFiles) {
if(MimeTypeUtil.isVideo(file)) {
return true;
}
}
return false;
}
private boolean allFavorites() {
for(OCFile file: mFiles) {
if(!file.isFavorite()) {
+4 -4
View File
@@ -96,9 +96,9 @@ public class InstantUploadBroadcastReceiver extends BroadcastReceiver {
return;
}
Account account = AccountUtils.getCurrentOwnCloudAccount(context);
Account account = AccountUtils.getInstantUploadAccount(context);
if (account == null) {
Log_OC.w(TAG, "No account found for instant upload, aborting");
Log_OC.w(TAG, "No account found for instant photo upload, aborting");
return;
}
@@ -184,9 +184,9 @@ public class InstantUploadBroadcastReceiver extends BroadcastReceiver {
return;
}
Account account = AccountUtils.getCurrentOwnCloudAccount(context);
Account account = AccountUtils.getInstantVideoUploadAccount(context);
if (account == null) {
Log_OC.w(TAG, "No account found for instant upload, aborting");
Log_OC.w(TAG, "No account found for instant video upload, aborting");
return;
}
@@ -21,10 +21,8 @@
package com.owncloud.android.files.services;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.NetworkInfo;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
@@ -51,7 +49,7 @@ public class ConnectivityActionReceiver extends BroadcastReceiver {
/**
* Magic keyword, by Google.
*
* {@See http://developer.android.com/intl/es/reference/android/net/wifi/WifiInfo.html#getSSID()}
* {@see http://developer.android.com/intl/es/reference/android/net/wifi/WifiInfo.html#getSSID()}
*/
private static final String UNKNOWN_SSID = "<unknown ssid>";
@@ -192,7 +190,9 @@ public class ConnectivityActionReceiver extends BroadcastReceiver {
}
}
private void wifiDisconnected(Context context) {
/**
*
private void wifiDisconnected() {
// TODO something smart
// NOTE: explicit cancellation of only-wifi instant uploads is not needed anymore, since currently:
@@ -204,6 +204,7 @@ public class ConnectivityActionReceiver extends BroadcastReceiver {
}
static public void enableActionReceiver(Context context) {
PackageManager pm = context.getPackageManager();
ComponentName compName = new ComponentName(context.getApplicationContext(), ConnectivityActionReceiver.class);
@@ -218,5 +219,5 @@ public class ConnectivityActionReceiver extends BroadcastReceiver {
PackageManager.DONT_KILL_APP);
}
*/
}
@@ -673,7 +673,6 @@ public class FileUploader extends Service
upload = mCurrentUpload;
}
if (upload != null) {
boolean pending = !upload.isUploadInProgress();
upload.cancel();
// need to update now table in mUploadsStorageManager,
// since the operation will not get to be run by FileUploader#uploadFile
@@ -685,7 +684,7 @@ public class FileUploader extends Service
}
/**
* Cancels all the uploads for an account
* Cancels all the uploads for an account.
*
* @param account ownCloud account.
*/
@@ -964,9 +963,10 @@ public class FileUploader extends Service
final ThumbnailsCacheManager.ThumbnailGenerationTask task =
new ThumbnailsCacheManager.ThumbnailGenerationTask(mStorageManager, mCurrentAccount);
Object[] params = new Object[2];
params[0] = new File(mCurrentUpload.getOriginalStoragePath());
params[1] = mCurrentUpload.getFile().getRemoteId();
Object[] params = new Object[3];
params[0] = mCurrentUpload.getFile();
params[1] = true;
params[2] = mCurrentUpload.getFile().getRemoteId();
task.execute(params);
}
@@ -21,25 +21,30 @@
package com.owncloud.android.media;
import android.accounts.Account;
import android.app.Activity;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import android.media.MediaPlayer.OnErrorListener;
import android.media.MediaPlayer.OnPreparedListener;
import android.net.Uri;
import android.net.wifi.WifiManager;
import android.net.wifi.WifiManager.WifiLock;
import android.os.IBinder;
import android.os.PowerManager;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.NotificationCompat;
import android.widget.Toast;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.common.accounts.AccountUtils;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.ui.activity.FileDisplayActivity;
@@ -214,6 +219,25 @@ public class MediaService extends Service implements OnCompletionListener, OnPre
return context.getString(messageId);
}
public static AlertDialog.Builder streamWithExternalApp(final Uri uri, final Activity activity){
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setMessage(activity.getString(R.string.stream_expose_password))
.setPositiveButton(activity.getString(R.string.common_yes),
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(uri);
activity.startActivity(i);
}
})
.setNegativeButton(activity.getString(R.string.common_no), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// User cancelled the dialog
}
});
return builder;
}
/**
@@ -435,12 +459,7 @@ public class MediaService extends Service implements OnCompletionListener, OnPre
releaseResources(false); // release everything except MediaPlayer
try {
if (mFile == null) {
Toast.makeText(this, R.string.media_err_nothing_to_play, Toast.LENGTH_LONG).show();
processStopRequest(true);
return;
} else if (mAccount == null) {
if (mAccount == null) {
Toast.makeText(this, R.string.media_err_not_in_owncloud, Toast.LENGTH_LONG).show();
processStopRequest(true);
return;
@@ -449,12 +468,12 @@ public class MediaService extends Service implements OnCompletionListener, OnPre
createMediaPlayerIfNeeded();
mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
String url = mFile.getStoragePath();
/* Streaming is not possible right now
if (url == null || url.length() <= 0) {
url = AccountUtils.constructFullURLForAccount(this, mAccount) + mFile.getRemotePath();
}
mIsStreaming = url.startsWith("http:") || url.startsWith("https:");
*/
mIsStreaming = false;
mPlayer.setDataSource(url);
@@ -495,6 +514,8 @@ public class MediaService extends Service implements OnCompletionListener, OnPre
Toast.makeText(this, String.format(getString(R.string.media_err_unexpected), mFile.getFileName()),
Toast.LENGTH_LONG).show();
processStopRequest(true);
} catch (AccountUtils.AccountNotFoundException e) {
Log_OC.e(TAG, "playMedia - Account missing",e);
}
}
@@ -42,7 +42,7 @@ public class CreateFolderOperation extends SyncOperation implements OnRemoteOper
private static final String TAG = CreateFolderOperation.class.getSimpleName();
protected String mRemotePath;
protected boolean mCreateFullPath;
private boolean mCreateFullPath;
/**
* Constructor
@@ -53,20 +53,18 @@ public class CreateFolderOperation extends SyncOperation implements OnRemoteOper
public CreateFolderOperation(String remotePath, boolean createFullPath) {
mRemotePath = remotePath;
mCreateFullPath = createFullPath;
}
@Override
protected RemoteOperationResult run(OwnCloudClient client) {
CreateRemoteFolderOperation operation = new CreateRemoteFolderOperation(mRemotePath,
mCreateFullPath);
CreateRemoteFolderOperation operation = new CreateRemoteFolderOperation(mRemotePath, mCreateFullPath);
RemoteOperationResult result = operation.execute(client);
if (result.isSuccess()) {
saveFolderInDB();
} else {
Log_OC.e(TAG, mRemotePath + "hasn't been created");
Log_OC.e(TAG, mRemotePath + " hasn't been created");
}
return result;
@@ -75,22 +73,20 @@ public class CreateFolderOperation extends SyncOperation implements OnRemoteOper
@Override
public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
if (operation instanceof CreateRemoteFolderOperation) {
onCreateRemoteFolderOperationFinish((CreateRemoteFolderOperation)operation, result);
onCreateRemoteFolderOperationFinish(result);
}
}
private void onCreateRemoteFolderOperationFinish(CreateRemoteFolderOperation operation,
RemoteOperationResult result) {
private void onCreateRemoteFolderOperationFinish(RemoteOperationResult result) {
if (result.isSuccess()) {
saveFolderInDB();
} else {
Log_OC.e(TAG, mRemotePath + "hasn't been created");
Log_OC.e(TAG, mRemotePath + " hasn't been created");
}
}
/**
* Save new directory in local database
* Save new directory in local database.
*/
public void saveFolderInDB() {
if (mCreateFullPath && getStorageManager().
@@ -101,8 +97,7 @@ public class CreateFolderOperation extends SyncOperation implements OnRemoteOper
String composedRemotePath = "/";
// For each antecesor folders create them recursively
for (int i=0; i<subFolders.length; i++) {
String subFolder = subFolders[i];
for (String subFolder : subFolders) {
if (!subFolder.isEmpty()) {
composedRemotePath = composedRemotePath + subFolder + "/";
mRemotePath = composedRemotePath;
@@ -112,8 +107,7 @@ public class CreateFolderOperation extends SyncOperation implements OnRemoteOper
} else { // Create directory on DB
OCFile newDir = new OCFile(mRemotePath);
newDir.setMimetype(MimeType.DIRECTORY);
long parentId = getStorageManager().
getFileByPath(FileStorageUtils.getParentPath(mRemotePath)).getFileId();
long parentId = getStorageManager().getFileByPath(FileStorageUtils.getParentPath(mRemotePath)).getFileId();
newDir.setParentId(parentId);
newDir.setModificationTimestamp(System.currentTimeMillis());
getStorageManager().saveFile(newDir);
@@ -32,7 +32,7 @@ import com.owncloud.android.lib.resources.shares.ShareType;
import com.owncloud.android.operations.common.SyncOperation;
/**
* Creates a new private share for a given file
* Creates a new private share for a given file.
*/
public class CreateShareWithShareeOperation extends SyncOperation {
@@ -314,7 +314,7 @@ public class RefreshFolderOperation extends RemoteOperation {
Log_OC.d(TAG, "Synchronizing " + mAccount.name + remotePath);
if (result.isSuccess()) {
synchronizeData(result.getData(), client);
synchronizeData(result.getData());
if (mConflictsFound > 0 || mFailsInFavouritesFound > 0) {
result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT);
// should be a different result code, but will do the job
@@ -344,18 +344,14 @@ public class RefreshFolderOperation extends RemoteOperation {
/**
* Synchronizes the data retrieved from the server about the contents of the target folder
* with the current data in the local database.
*
* Grants that mChildren is updated with fresh data after execution.
*
* @param folderAndFiles Remote folder and children files in Folder
*
* @param client Client instance to the remote server where the data were
* retrieved.
* @return 'True' when any change was made in the local data, 'false' otherwise
* Synchronizes the data retrieved from the server about the contents of the target folder
* with the current data in the local database.
*
* Grants that mChildren is updated with fresh data after execution.
*
* @param folderAndFiles Remote folder and children files in Folder
*/
private void synchronizeData(ArrayList<Object> folderAndFiles, OwnCloudClient client) {
private void synchronizeData(ArrayList<Object> folderAndFiles) {
// get 'fresh data' from the database
mLocalFolder = mStorageManager.getFileByPath(mLocalFolder.getRemotePath());
@@ -24,6 +24,7 @@ package com.owncloud.android.operations;
import android.accounts.Account;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.files.services.FileDownloader;
@@ -154,9 +154,8 @@ public class SynchronizeFolderOperation extends SyncOperation {
}
if (result.isSuccess()) {
syncContents(client);
syncContents();
}
}
if (mCancellationRequested.get()) {
@@ -168,15 +167,13 @@ public class SynchronizeFolderOperation extends SyncOperation {
}
return result;
}
private RemoteOperationResult checkForChanges(OwnCloudClient client)
throws OperationCancelledException {
private RemoteOperationResult checkForChanges(OwnCloudClient client) throws OperationCancelledException {
Log_OC.d(TAG, "Checking changes in " + mAccount.name + mRemotePath);
mRemoteFolderChanged = true;
RemoteOperationResult result = null;
RemoteOperationResult result;
if (mCancellationRequested.get()) {
throw new OperationCancelledException();
@@ -185,12 +182,11 @@ public class SynchronizeFolderOperation extends SyncOperation {
// remote request
ReadRemoteFileOperation operation = new ReadRemoteFileOperation(mRemotePath);
result = operation.execute(client);
if (result.isSuccess()){
if (result.isSuccess()) {
OCFile remoteFolder = FileStorageUtils.fillOCFile((RemoteFile) result.getData().get(0));
// check if remote and local folder are different
mRemoteFolderChanged =
!(remoteFolder.getEtag().equalsIgnoreCase(mLocalFolder.getEtag()));
mRemoteFolderChanged = !(remoteFolder.getEtag().equalsIgnoreCase(mLocalFolder.getEtag()));
result = new RemoteOperationResult(ResultCode.OK);
@@ -216,8 +212,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
}
private RemoteOperationResult fetchAndSyncRemoteFolder(OwnCloudClient client)
throws OperationCancelledException {
private RemoteOperationResult fetchAndSyncRemoteFolder(OwnCloudClient client) throws OperationCancelledException {
if (mCancellationRequested.get()) {
throw new OperationCancelledException();
}
@@ -227,7 +222,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
Log_OC.d(TAG, "Synchronizing " + mAccount.name + mRemotePath);
if (result.isSuccess()) {
synchronizeData(result.getData(), client);
synchronizeData(result.getData());
if (mConflictsFound > 0 || mFailsInFileSyncsFound > 0) {
result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT);
// should be a different result code, but will do the job
@@ -237,7 +232,6 @@ public class SynchronizeFolderOperation extends SyncOperation {
removeLocalFolder();
}
}
return result;
}
@@ -260,19 +254,14 @@ public class SynchronizeFolderOperation extends SyncOperation {
/**
* Synchronizes the data retrieved from the server about the contents of the target folder
* with the current data in the local database.
* Synchronizes the data retrieved from the server about the contents of the target folder
* with the current data in the local database.
*
* Grants that mChildren is updated with fresh data after execution.
* Grants that mChildren is updated with fresh data after execution.
*
* @param folderAndFiles Remote folder and children files in Folder
*
* @param client Client instance to the remote server where the data were
* retrieved.
* @return 'True' when any change was made in the local data, 'false' otherwise
* @param folderAndFiles Remote folder and children files in Folder
*/
private void synchronizeData(ArrayList<Object> folderAndFiles, OwnCloudClient client)
throws OperationCancelledException {
private void synchronizeData(ArrayList<Object> folderAndFiles) throws OperationCancelledException {
FileDataStorageManager storageManager = getStorageManager();
// parse data from remote folder
@@ -283,7 +272,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
Log_OC.d(TAG, "Remote folder " + mLocalFolder.getRemotePath()
+ " changed - starting update of local data ");
List<OCFile> updatedFiles = new Vector<OCFile>(folderAndFiles.size() - 1);
List<OCFile> updatedFiles = new Vector<>(folderAndFiles.size() - 1);
mFilesForDirectDownload.clear();
mFilesToSyncContents.clear();
@@ -293,7 +282,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
// get current data about local contents of the folder to synchronize
List<OCFile> localFiles = storageManager.getFolderContent(mLocalFolder, false);
Map<String, OCFile> localFilesMap = new HashMap<String, OCFile>(localFiles.size());
Map<String, OCFile> localFilesMap = new HashMap<>(localFiles.size());
for (OCFile file : localFiles) {
localFilesMap.put(file.getRemotePath(), file);
}
@@ -306,79 +295,86 @@ public class SynchronizeFolderOperation extends SyncOperation {
r = (RemoteFile) folderAndFiles.get(i);
remoteFile = FileStorageUtils.fillOCFile(r);
/// new OCFile instance to merge fresh data from server with local state
updatedFile = FileStorageUtils.fillOCFile(r);
updatedFile.setParentId(mLocalFolder.getFileId());
/// retrieve local data for the read file
// localFile = mStorageManager.getFileByPath(remoteFile.getRemotePath());
localFile = localFilesMap.remove(remoteFile.getRemotePath());
/// new OCFile instance to merge fresh data from server with local state
updatedFile = FileStorageUtils.fillOCFile(r);
updatedFile.setParentId(mLocalFolder.getFileId());
/// add to updatedFile data about LOCAL STATE (not existing in server)
updatedFile.setLastSyncDateForProperties(mCurrentSyncTime);
if (localFile != null) {
updatedFile.setFileId(localFile.getFileId());
updatedFile.setFavorite(localFile.isFavorite());
updatedFile.setLastSyncDateForData(localFile.getLastSyncDateForData());
updatedFile.setModificationTimestampAtLastSyncForData(
localFile.getModificationTimestampAtLastSyncForData()
);
updatedFile.setStoragePath(localFile.getStoragePath());
// eTag will not be updated unless file CONTENTS are synchronized
updatedFile.setEtag(localFile.getEtag());
if (updatedFile.isFolder()) {
updatedFile.setFileLength(localFile.getFileLength());
// TODO move operations about size of folders to FileContentProvider
} else if (mRemoteFolderChanged && MimeTypeUtil.isImage(remoteFile) &&
remoteFile.getModificationTimestamp() !=
localFile.getModificationTimestamp()) {
updatedFile.setNeedsUpdateThumbnail(true);
Log.d(TAG, "Image " + remoteFile.getFileName() + " updated on the server");
}
updatedFile.setPublicLink(localFile.getPublicLink());
updatedFile.setShareViaLink(localFile.isSharedViaLink());
updatedFile.setShareWithSharee(localFile.isSharedWithSharee());
updatedFile.setEtagInConflict(localFile.getEtagInConflict());
} else {
// remote eTag will not be updated unless file CONTENTS are synchronized
updatedFile.setEtag("");
}
updateLocalStateData(remoteFile, localFile, updatedFile);
/// check and fix, if needed, local storage path
searchForLocalFileInDefaultPath(updatedFile);
/// classify file to sync/download contents later
if (remoteFile.isFolder()) {
/// to download children files recursively
synchronized (mCancellationRequested) {
if (mCancellationRequested.get()) {
throw new OperationCancelledException();
}
startSyncFolderOperation(remoteFile.getRemotePath());
}
} else {
/// prepare content synchronization for files (any file, not just favorites)
SynchronizeFileOperation operation = new SynchronizeFileOperation(
localFile,
remoteFile,
mAccount,
true,
mContext
);
mFilesToSyncContents.add(operation);
}
classifyFileForLaterSyncOrDownload(remoteFile, localFile);
updatedFiles.add(updatedFile);
}
// save updated contents in local database
storageManager.saveFolder(remoteFolder, updatedFiles, localFilesMap.values());
}
private void updateLocalStateData(OCFile remoteFile, OCFile localFile, OCFile updatedFile) {
updatedFile.setLastSyncDateForProperties(mCurrentSyncTime);
if (localFile != null) {
updatedFile.setFileId(localFile.getFileId());
updatedFile.setFavorite(localFile.isFavorite());
updatedFile.setLastSyncDateForData(localFile.getLastSyncDateForData());
updatedFile.setModificationTimestampAtLastSyncForData(
localFile.getModificationTimestampAtLastSyncForData()
);
updatedFile.setStoragePath(localFile.getStoragePath());
// eTag will not be updated unless file CONTENTS are synchronized
updatedFile.setEtag(localFile.getEtag());
if (updatedFile.isFolder()) {
updatedFile.setFileLength(localFile.getFileLength());
// TODO move operations about size of folders to FileContentProvider
} else if (mRemoteFolderChanged && MimeTypeUtil.isImage(remoteFile) &&
remoteFile.getModificationTimestamp() !=
localFile.getModificationTimestamp()) {
updatedFile.setNeedsUpdateThumbnail(true);
Log.d(TAG, "Image " + remoteFile.getFileName() + " updated on the server");
}
updatedFile.setPublicLink(localFile.getPublicLink());
updatedFile.setShareViaLink(localFile.isSharedViaLink());
updatedFile.setShareWithSharee(localFile.isSharedWithSharee());
updatedFile.setEtagInConflict(localFile.getEtagInConflict());
} else {
// remote eTag will not be updated unless file CONTENTS are synchronized
updatedFile.setEtag("");
}
}
private void classifyFileForLaterSyncOrDownload(OCFile remoteFile, OCFile localFile)
throws OperationCancelledException {
if (remoteFile.isFolder()) {
/// to download children files recursively
synchronized (mCancellationRequested) {
if (mCancellationRequested.get()) {
throw new OperationCancelledException();
}
startSyncFolderOperation(remoteFile.getRemotePath());
}
} else {
/// prepare content synchronization for files (any file, not just favorites)
SynchronizeFileOperation operation = new SynchronizeFileOperation(
localFile,
remoteFile,
mAccount,
true,
mContext
);
mFilesToSyncContents.add(operation);
}
}
private void prepareOpsFromLocalKnowledge() throws OperationCancelledException {
List<OCFile> children = getStorageManager().getFolderContent(mLocalFolder, false);
for (OCFile child : children) {
@@ -415,9 +411,9 @@ public class SynchronizeFolderOperation extends SyncOperation {
}
private void syncContents(OwnCloudClient client) throws OperationCancelledException {
private void syncContents() throws OperationCancelledException {
startDirectDownloads();
startContentSynchronizations(mFilesToSyncContents, client);
startContentSynchronizations(mFilesToSyncContents);
}
@@ -439,18 +435,15 @@ public class SynchronizeFolderOperation extends SyncOperation {
* Performs a list of synchronization operations, determining if a download or upload is needed
* or if exists conflict due to changes both in local and remote contents of the each file.
*
* If download or upload is needed, request the operation to the corresponding service and goes
* on.
* If download or upload is needed, request the operation to the corresponding service and goes on.
*
* @param filesToSyncContents Synchronization operations to execute.
* @param client Interface to the remote ownCloud server.
*/
private void startContentSynchronizations(List<SyncOperation> filesToSyncContents,
OwnCloudClient client)
private void startContentSynchronizations(List<SyncOperation> filesToSyncContents)
throws OperationCancelledException {
Log_OC.v(TAG, "Starting content synchronization... ");
RemoteOperationResult contentsResult = null;
RemoteOperationResult contentsResult;
for (SyncOperation op: filesToSyncContents) {
if (mCancellationRequested.get()) {
throw new OperationCancelledException();
@@ -2,7 +2,7 @@
* ownCloud Android client application
*
* @author David A. Velasco
* Copyright (C) 2016 ownCloud Inc.
* Copyright (C) 2016 ownCloud GmbH.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
@@ -367,15 +367,19 @@ public class UploadFileOperation extends SyncOperation {
throw new OperationCancelledException();
}
// Get the last modification date of the file from the file system
Long timeStampLong = originalFile.lastModified()/1000;
String timeStamp = timeStampLong.toString();
/// perform the upload
if ( mChunked &&
(new File(mFile.getStoragePath())).length() >
ChunkedUploadRemoteFileOperation.CHUNK_SIZE ) {
mUploadOperation = new ChunkedUploadRemoteFileOperation(mContext, mFile.getStoragePath(),
mFile.getRemotePath(), mFile.getMimetype(), mFile.getEtagInConflict());
mFile.getRemotePath(), mFile.getMimetype(), mFile.getEtagInConflict(), timeStamp);
} else {
mUploadOperation = new UploadRemoteFileOperation(mFile.getStoragePath(),
mFile.getRemotePath(), mFile.getMimetype(), mFile.getEtagInConflict());
mFile.getRemotePath(), mFile.getMimetype(), mFile.getEtagInConflict(), timeStamp);
}
Iterator <OnDatatransferProgressListener> listener = mDataTransferListeners.iterator();
while (listener.hasNext()) {
@@ -436,15 +440,14 @@ public class UploadFileOperation extends SyncOperation {
if (result.getException() != null) {
if(result.isCancelled()){
Log_OC.w(TAG, "Upload of " + mOriginalStoragePath + " to " + mRemotePath +
": " + result.getLogMessage());
" has been canceled: " + result.getLogMessage());
} else {
Log_OC.e(TAG, "Upload of " + mOriginalStoragePath + " to " + mRemotePath +
": " + result.getLogMessage(), result.getException());
}
} else {
Log_OC.e(TAG, "Upload of " + mOriginalStoragePath + " to " + mRemotePath +
": " + result.getLogMessage());
Log_OC.e(TAG, "Upload of " + mOriginalStoragePath + " to " + mRemotePath + "ResultCode(" +
result.getCode().name() + "): " + result.getLogMessage());
}
}
}
@@ -709,55 +709,6 @@ public class OperationsService extends Service {
}
/**
* Sends a broadcast when a new operation is added to the queue.
*
* Local broadcasts are only delivered to activities in the same process, but can't be
* done sticky :\
*
* @param target Account or URL pointing to an OC server.
* @param operation Added operation.
*/
private void sendBroadcastNewOperation(Target target, RemoteOperation operation) {
Intent intent = new Intent(ACTION_OPERATION_ADDED);
if (target.mAccount != null) {
intent.putExtra(EXTRA_ACCOUNT, target.mAccount);
} else {
intent.putExtra(EXTRA_SERVER_URL, target.mServerUrl);
}
//LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(this);
//lbm.sendBroadcast(intent);
sendStickyBroadcast(intent);
}
// TODO - maybe add a notification for real start of operations
/**
* Sends a LOCAL broadcast when an operations finishes in order to the interested activities c
* an update their view
*
* Local broadcasts are only delivered to activities in the same process.
*
* @param target Account or URL pointing to an OC server.
* @param operation Finished operation.
* @param result Result of the operation.
*/
private void sendBroadcastOperationFinished(Target target, RemoteOperation operation,
RemoteOperationResult result) {
Intent intent = new Intent(ACTION_OPERATION_FINISHED);
intent.putExtra(EXTRA_RESULT, result);
if (target.mAccount != null) {
intent.putExtra(EXTRA_ACCOUNT, target.mAccount);
} else {
intent.putExtra(EXTRA_SERVER_URL, target.mServerUrl);
}
//LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(this);
//lbm.sendBroadcast(intent);
sendStickyBroadcast(intent);
}
/**
* Notifies the currently subscribed listeners about the end of an operation.
*
@@ -784,9 +735,8 @@ public class OperationsService extends Service {
}
}
if (count == 0) {
Pair<RemoteOperation, RemoteOperationResult> undispatched =
new Pair<RemoteOperation, RemoteOperationResult>(operation, result);
mUndispatchedFinishedOperations.put(((Runnable) operation).hashCode(), undispatched);
Pair<RemoteOperation, RemoteOperationResult> undispatched = new Pair<>(operation, result);
mUndispatchedFinishedOperations.put(operation.hashCode(), undispatched);
}
Log_OC.d(TAG, "Called " + count + " listeners");
}
@@ -147,7 +147,7 @@ public class FolderObserver extends FileObserver {
public void startWatching(String fileName) {
synchronized (mObservedChildren) {
if (!mObservedChildren.containsKey(fileName)) {
mObservedChildren.put(fileName, Boolean.FALSE);
mObservedChildren.put(fileName, false);
}
}
@@ -45,7 +45,9 @@ class SyncedFolderObserver extends RecursiveFileObserver {
File temp = new File(path);
// do not upload "null"-files, test if file exists and is a real file
if (!temp.getName().equalsIgnoreCase("null") && temp.isFile() && !temp.getName().endsWith(".tmp")) {
if (!temp.getName().equalsIgnoreCase("null")
&& temp.isFile()
&& !temp.getName().endsWith(".tmp")) {
PersistableBundle bundle = new PersistableBundle();
// TODO extract
bundle.putString(SyncedFolderJobService.LOCAL_PATH, path);
@@ -1,61 +0,0 @@
/**
* ownCloud Android client application
*
* @author Bartek Przybylski
* Copyright (C) 2011 Bartek Przybylski
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.ui;
import android.graphics.drawable.Drawable;
import android.view.View.OnClickListener;
/**
* Represents an Item on the ActionBar.
*/
public class ActionItem {
private Drawable mIcon;
private String mTitle;
private OnClickListener mClickListener;
public ActionItem() {
}
public void setTitle(String title) {
mTitle = title;
}
public String getTitle() {
return mTitle;
}
public void setIcon(Drawable icon) {
mIcon = icon;
}
public Drawable getIcon() {
return mIcon;
}
public void setOnClickListener(OnClickListener listener) {
mClickListener = listener;
}
public OnClickListener getOnClickListerner() {
return mClickListener;
}
}
@@ -0,0 +1,49 @@
/**
* Nextcloud Android client application
*
* Copyright (C) 2016 Nextcloud
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.owncloud.android.ui;
import android.content.Context;
import android.preference.Preference;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;
public class PreferenceWithTwoLineLongSummary extends Preference{
public PreferenceWithTwoLineLongSummary(Context context) {
super(context);
}
public PreferenceWithTwoLineLongSummary(Context context, AttributeSet attrs) {
super(context, attrs);
}
public PreferenceWithTwoLineLongSummary(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
protected void onBindView(View view) {
super.onBindView(view);
TextView titleView = (TextView) view.findViewById(android.R.id.summary);
titleView.setSingleLine(false);
titleView.setMaxLines(2);
titleView.setEllipsize(TextUtils.TruncateAt.MIDDLE);
}
}
@@ -1,307 +0,0 @@
/**
* ownCloud Android client application
*
* @author Lorensius. W. T
* Copyright (C) 2011 Bartek Przybylski
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.ui;
import android.content.Context;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewGroup;
import java.util.ArrayList;
import com.owncloud.android.R;
/**
* Popup window, shows action list as icon and text like the one in Gallery3D
* app.
*/
public class QuickAction extends CustomPopup {
private final View root;
private final ImageView mArrowUp;
private final ImageView mArrowDown;
private final LayoutInflater inflater;
private final Context context;
protected static final int ANIM_GROW_FROM_LEFT = 1;
protected static final int ANIM_GROW_FROM_RIGHT = 2;
protected static final int ANIM_GROW_FROM_CENTER = 3;
protected static final int ANIM_REFLECT = 4;
protected static final int ANIM_AUTO = 5;
private int animStyle;
private ViewGroup mTrack;
private ScrollView scroller;
private ArrayList<ActionItem> actionList;
/**
* Constructor
*
* @param anchor {@link View} on where the popup window should be displayed
*/
public QuickAction(View anchor) {
super(anchor);
actionList = new ArrayList<ActionItem>();
context = anchor.getContext();
inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
root = (ViewGroup) inflater.inflate(R.layout.popup, null);
mArrowDown = (ImageView) root.findViewById(R.id.arrow_down);
mArrowUp = (ImageView) root.findViewById(R.id.arrow_up);
setContentView(root);
mTrack = (ViewGroup) root.findViewById(R.id.tracks);
scroller = (ScrollView) root.findViewById(R.id.scroller);
animStyle = ANIM_AUTO;
}
/**
* Set animation style
*
* @param animStyle animation style, default is set to ANIM_AUTO
*/
public void setAnimStyle(int animStyle) {
this.animStyle = animStyle;
}
/**
* Add action item
*
* @param action {@link ActionItem} object
*/
public void addActionItem(ActionItem action) {
actionList.add(action);
}
/**
* Show popup window. Popup is automatically positioned, on top or bottom of
* anchor view.
*
*/
public void show() {
preShow();
int xPos, yPos;
int[] location = new int[2];
mAnchor.getLocationOnScreen(location);
Rect anchorRect = new Rect(location[0], location[1], location[0]
+ mAnchor.getWidth(), location[1] + mAnchor.getHeight());
createActionList();
root.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
root.measure(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
int rootHeight = root.getMeasuredHeight();
int rootWidth = root.getMeasuredWidth();
int screenWidth = mWManager.getDefaultDisplay().getWidth();
int screenHeight = mWManager.getDefaultDisplay().getHeight();
// automatically get X coord of popup (top left)
if ((anchorRect.left + rootWidth) > screenWidth) {
xPos = anchorRect.left - (rootWidth - mAnchor.getWidth());
} else {
if (mAnchor.getWidth() > rootWidth) {
xPos = anchorRect.centerX() - (rootWidth / 2);
} else {
xPos = anchorRect.left;
}
}
int dyTop = anchorRect.top;
int dyBottom = screenHeight - anchorRect.bottom;
boolean onTop = (dyTop > dyBottom) ? true : false;
if (onTop) {
if (rootHeight > dyTop) {
yPos = 15;
LayoutParams l = scroller.getLayoutParams();
l.height = dyTop - mAnchor.getHeight();
} else {
yPos = anchorRect.top - rootHeight;
}
} else {
yPos = anchorRect.bottom;
if (rootHeight > dyBottom) {
LayoutParams l = scroller.getLayoutParams();
l.height = dyBottom;
}
}
showArrow(((onTop) ? R.id.arrow_down : R.id.arrow_up),
anchorRect.centerX() - xPos);
setAnimationStyle(screenWidth, anchorRect.centerX(), onTop);
mWindow.showAtLocation(mAnchor, Gravity.NO_GRAVITY, xPos, yPos);
}
/**
* Set animation style
*
* @param screenWidth screen width
* @param requestedX distance from left edge
* @param onTop flag to indicate where the popup should be displayed. Set
* TRUE if displayed on top of anchor view and vice versa
*/
private void setAnimationStyle(int screenWidth, int requestedX,
boolean onTop) {
int arrowPos = requestedX - mArrowUp.getMeasuredWidth() / 2;
switch (animStyle) {
case ANIM_GROW_FROM_LEFT:
mWindow.setAnimationStyle((onTop) ? R.style.Animations_PopUpMenu_Left
: R.style.Animations_PopDownMenu_Left);
break;
case ANIM_GROW_FROM_RIGHT:
mWindow.setAnimationStyle((onTop) ? R.style.Animations_PopUpMenu_Right
: R.style.Animations_PopDownMenu_Right);
break;
case ANIM_GROW_FROM_CENTER:
mWindow.setAnimationStyle((onTop) ? R.style.Animations_PopUpMenu_Center
: R.style.Animations_PopDownMenu_Center);
break;
case ANIM_REFLECT:
mWindow.setAnimationStyle((onTop) ? R.style.Animations_PopUpMenu_Reflect
: R.style.Animations_PopDownMenu_Reflect);
break;
case ANIM_AUTO:
if (arrowPos <= screenWidth / 4) {
mWindow.setAnimationStyle((onTop) ? R.style.Animations_PopUpMenu_Left
: R.style.Animations_PopDownMenu_Left);
} else if (arrowPos > screenWidth / 4
&& arrowPos < 3 * (screenWidth / 4)) {
mWindow.setAnimationStyle((onTop) ? R.style.Animations_PopUpMenu_Center
: R.style.Animations_PopDownMenu_Center);
} else {
mWindow.setAnimationStyle((onTop) ? R.style.Animations_PopUpMenu_Right
: R.style.Animations_PopDownMenu_Right);
}
break;
}
}
/**
* Create action list
*/
private void createActionList() {
View view;
String title;
Drawable icon;
OnClickListener listener;
for (int i = 0; i < actionList.size(); i++) {
title = actionList.get(i).getTitle();
icon = actionList.get(i).getIcon();
listener = actionList.get(i).getOnClickListerner();
view = getActionItem(title, icon, listener);
view.setFocusable(true);
view.setClickable(true);
mTrack.addView(view);
}
}
/**
* Get action item {@link View}
*
* @param title action item title
* @param icon {@link Drawable} action item icon
* @param listener {@link View.OnClickListener} action item listener
* @return action item {@link View}
*/
private View getActionItem(String title, Drawable icon,
OnClickListener listener) {
LinearLayout container = (LinearLayout) inflater.inflate(
R.layout.action_item, null);
ImageView img = (ImageView) container.findViewById(R.id.icon);
TextView text = (TextView) container.findViewById(R.id.title);
if (icon != null) {
img.setImageDrawable(icon);
}
if (title != null) {
text.setText(title);
}
if (listener != null) {
container.setOnClickListener(listener);
}
return container;
}
/**
* Show arrow
*
* @param whichArrow arrow type resource id
* @param requestedX distance from left screen
*/
private void showArrow(int whichArrow, int requestedX) {
final View showArrow = (whichArrow == R.id.arrow_up) ? mArrowUp
: mArrowDown;
final View hideArrow = (whichArrow == R.id.arrow_up) ? mArrowDown
: mArrowUp;
final int arrowWidth = mArrowUp.getMeasuredWidth();
showArrow.setVisibility(View.VISIBLE);
ViewGroup.MarginLayoutParams param = (ViewGroup.MarginLayoutParams) showArrow
.getLayoutParams();
param.leftMargin = requestedX - arrowWidth / 2;
hideArrow.setVisibility(View.INVISIBLE);
}
}
@@ -3,8 +3,7 @@
*
* @author Andy Scherzinger
* Copyright (C) 2016 Andy Scherzinger
* Copyright (C) 2016 Nextcloud
* Copyright (C) 2016 ownCloud Inc.
* Copyright (C) 2016 Nextcloud.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
@@ -174,7 +173,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
setupQuotaElement();
// show folder sync menu item only for Android 7+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
mNavigationView.getMenu().removeItem(R.id.nav_folder_sync);
}
}
@@ -0,0 +1,104 @@
/**
* ownCloud Android client application
*
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.ui.activity;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.ui.dialog.LoadingDialog;
import com.owncloud.android.utils.FileStorageUtils;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.lang.ref.WeakReference;
public class ErrorReportActivity extends AppCompatActivity {
private static final String TAG = ErrorReportActivity.class.getSimpleName();
private String mLogText;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.error_send);
setTitle(getString(R.string.error_log_title));
Button cancelErrorLogButton = (Button) findViewById(R.id.cancelErrorLogButton);
Button sendErrorLogButton = (Button) findViewById(R.id.sendErrorLogButton);
TextView logTV = (TextView) findViewById(R.id.logTV);
Intent intent = getIntent();
String action = intent.getAction();
String type = intent.getType();
if (Intent.ACTION_SEND.equals(action) && type != null) {
mLogText = intent.getStringExtra(Intent.EXTRA_TEXT);
} else {
// Handle other intents, such as being started from the home screen
mLogText = "Error, nothing received!";
}
logTV.setText(mLogText);
cancelErrorLogButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
finishAffinity();
}
});
sendErrorLogButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
sendMail();
}
});
}
/**
* Start activity for sending email with logs attached
*/
private void sendMail() {
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, mLogText);
sendIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
sendIntent.setType("text/plain");
startActivity(sendIntent);
}
}
@@ -66,6 +66,8 @@ import com.owncloud.android.lib.common.operations.RemoteOperation;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.media.MediaService;
import com.owncloud.android.media.MediaServiceBinder;
import com.owncloud.android.operations.CopyFileOperation;
import com.owncloud.android.operations.CreateFolderOperation;
import com.owncloud.android.operations.MoveFileOperation;
@@ -88,6 +90,7 @@ import com.owncloud.android.ui.preview.PreviewTextFragment;
import com.owncloud.android.ui.preview.PreviewVideoActivity;
import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.ErrorMessageAdapter;
import com.owncloud.android.utils.MimeTypeUtil;
import com.owncloud.android.utils.PermissionUtil;
import java.io.File;
@@ -139,7 +142,10 @@ public class FileDisplayActivity extends HookActivity
private Collection<MenuItem> mDrawerMenuItemstoShowHideList;
private MediaServiceBinder mMediaServiceBinder = null;
private MediaServiceConnection mMediaServiceConnection = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
Log_OC.v(TAG, "onCreate() start");
@@ -248,7 +254,7 @@ public class FileDisplayActivity extends HookActivity
*/
private void upgradeNotificationForInstantUpload() {
// check for Android 7+ if legacy instant upload is activated --> disable + show info
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N &&
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP &&
(PreferenceManager.instantPictureUploadEnabled(this) ||
PreferenceManager.instantPictureUploadEnabled(this))) {
@@ -1391,8 +1397,38 @@ public class FileDisplayActivity extends HookActivity
mUploaderBinder = null;
}
}
};
private MediaServiceConnection newMediaConnection(){
return new MediaServiceConnection();
}
/** Defines callbacks for service binding, passed to bindService() */
private class MediaServiceConnection implements ServiceConnection {
@Override
public void onServiceConnected(ComponentName component, IBinder service) {
if (component.equals(new ComponentName(FileDisplayActivity.this, MediaService.class))) {
Log_OC.d(TAG, "Media service connected");
mMediaServiceBinder = (MediaServiceBinder) service;
}else {
return;
}
}
@Override
public void onServiceDisconnected(ComponentName component) {
if (component.equals(new ComponentName(FileDisplayActivity.this,
MediaService.class))) {
Log_OC.e(TAG, "Media service disconnected");
mMediaServiceBinder = null;
}
}
};
/**
* Updates the view associated to the activity after the finish of some operation over files
* in the current account.
@@ -1461,6 +1497,7 @@ public class FileDisplayActivity extends HookActivity
if (result.isSuccess()) {
OCFile removedFile = operation.getFile();
tryStopPlaying(removedFile);
FileFragment second = getSecondFragment();
if (second != null && removedFile.equals(second.getFile())) {
if (second instanceof PreviewMediaFragment) {
@@ -1481,6 +1518,21 @@ public class FileDisplayActivity extends HookActivity
}
}
public void setMediaServiceConnection() {
mMediaServiceConnection = newMediaConnection();// mediaServiceConnection;
if (mMediaServiceConnection != null) {
bindService(new Intent(this, MediaService.class), mMediaServiceConnection,
Context.BIND_AUTO_CREATE);
}
}
private void tryStopPlaying(OCFile file){
if (mMediaServiceConnection != null && MimeTypeUtil.isAudio(file)){
if (mMediaServiceBinder.isPlaying(file)){
mMediaServiceBinder.pause();
}
}
}
/**
* Updates the view associated to the activity after the finish of an operation trying to move a
@@ -1710,7 +1762,7 @@ public class FileDisplayActivity extends HookActivity
// another window floating over
}
},
DELAY_TO_REQUEST_REFRESH_OPERATION_LATER
DELAY_TO_REQUEST_OPERATIONS_LATER + 350
);
}
@@ -63,7 +63,6 @@ import static com.owncloud.android.datamodel.SyncedFolderDisplayItem.UNPERSISTED
*/
public class FolderSyncActivity extends FileActivity implements FolderSyncAdapter.ClickListener,
SyncedFolderPreferencesDialogFragment.OnSyncedFolderPreferenceListener {
private static final String TAG = FolderSyncActivity.class.getSimpleName();
private static final String SYNCED_FOLDER_PREFERENCES_DIALOG_TAG = "SYNCED_FOLDER_PREFERENCES_DIALOG";
public static final String PRIORITIZED_FOLDER = "Camera";
@@ -21,6 +21,4 @@ package com.owncloud.android.ui.activity;
public abstract class HookActivity extends FileActivity {
private static final String TAG = HookActivity.class.getName();
}
@@ -148,7 +148,7 @@ public class LogHistoryActivity extends ToolbarActivity {
emailAddress = "";
}
ArrayList<Uri> uris = new ArrayList<Uri>();
ArrayList<Uri> uris = new ArrayList<>();
// Convert from paths to Android friendly Parcelable Uri's
for (String file : Log_OC.getLogFileNames()) {
@@ -193,7 +193,7 @@ public class LogHistoryActivity extends ToolbarActivity {
public LoadingLogTask(TextView logTV){
// Use of a WeakReference to ensure the TextView can be garbage collected
textViewReference = new WeakReference<TextView>(logTV);
textViewReference = new WeakReference<>(logTV);
}
protected String doInBackground(String... args) {
@@ -60,7 +60,6 @@ import com.owncloud.android.ui.helpers.FileOperationsHelper;
import com.owncloud.android.utils.DisplayUtils;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
/**
@@ -28,7 +28,6 @@ import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.owncloud.android.R;
@@ -37,7 +36,6 @@ import com.owncloud.android.R;
* Activity providing information about ways to participate in the app's development.
*/
public class ParticipateActivity extends FileActivity {
private Button mReportBtn;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -91,8 +89,7 @@ public class ParticipateActivity extends FileActivity {
contributeGithubView.setMovementMethod(LinkMovementMethod.getInstance());
contributeGithubView.setText(Html.fromHtml(getString(R.string.participate_contribute_github_text)));
mReportBtn = (Button) findViewById(R.id.participate_testing_report);
mReportBtn.setOnClickListener(new View.OnClickListener() {
findViewById(R.id.participate_testing_report).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.report_issue_link))));
@@ -31,6 +31,7 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
@@ -59,6 +60,7 @@ import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.datamodel.ThumbnailsCacheManager;
import com.owncloud.android.datastorage.DataStorageProvider;
import com.owncloud.android.datastorage.StoragePoint;
import com.owncloud.android.lib.common.OwnCloudAccount;
@@ -66,7 +68,12 @@ import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.utils.DisplayUtils;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.ExecutionException;
/**
* An Activity that allows the user to change the application's settings.
@@ -90,12 +97,35 @@ public class Preferences extends PreferenceActivity
*/
private Uri mUri;
public static final String INSTANT_UPLOAD_PATH_ACCOUNT = "instant_upload_path_account";
public static final String INSTANT_UPLOAD_PATH = "instant_upload_path";
public static final String INSTANT_VIDEO_UPLOAD_PATH = "instant_video_upload_path";
public static final String INSTANT_VIDEO_UPLOAD_PATH_ACCOUNT = "instant_video_upload_path_account";
public static final String INSTANT_VIDEO_UPLOAD_PATH_USE_SUBFOLDERS = "instant_video_upload_path_use_subfolders";
public static final String INSTANT_VIDEO_UPLOAD_ON_WIFI = "instant_video_upload_on_wifi";
public static final String INSTANT_VIDEO_UPLOADING = "instant_video_uploading";
public static final String PREFS_INSTANT_BEHAVIOUR = "prefs_instant_behaviour";
public static final String ABOUT_APP = "about_app";
public static final String INSTANT_UPLOADING_CATEGORY = "instant_uploading_category";
public static final String INSTANT_UPLOAD_PATH_USE_SUBFOLDERS = "instant_upload_path_use_subfolders";
public static final String INSTANT_UPLOAD_ON_WIFI = "instant_upload_on_wifi";
public static final String INSTANT_UPLOADING = "instant_uploading";
public static final String LOGGER = "logger";
public static final String FEEDBACK = "feedback";
public static final String RECOMMEND = "recommend";
public static final String MORE = "more";
public static final String HELP = "help";
private static String INSTANT_UPLOAD_ACCOUNT_LABEL;
private static String INSTANT_UPLOAD_PATH_LABEL;
private CheckBoxPreference pCode;
private CheckBoxPreference mShowHiddenFiles;
private Preference pAboutApp;
private AppCompatDelegate mDelegate;
private String mUploadPath;
private String mUploadPathAccount;
private PreferenceCategory mPrefInstantUploadCategory;
private Preference mPrefInstantUpload;
private Preference mPrefInstantUploadBehaviour;
@@ -109,6 +139,7 @@ public class Preferences extends PreferenceActivity
private Preference mPrefInstantVideoUploadPathWiFi;
private Preference mPrefInstantVideoUploadOnlyOnCharging;
private String mUploadVideoPath;
private String mUploadVideoPathAccount;
private ListPreference mPrefStoragePath;
private String mStoragePath;
@@ -189,7 +220,7 @@ public class Preferences extends PreferenceActivity
}
});
PreferenceCategory preferenceCategory = (PreferenceCategory) findPreference("more");
PreferenceCategory preferenceCategory = (PreferenceCategory) findPreference(MORE);
boolean calendarContactsEnabled = getResources().getBoolean(R.bool.calendar_contacts_enabled);
Preference pCalendarContacts = findPreference("calendar_contacts");
@@ -216,9 +247,30 @@ public class Preferences extends PreferenceActivity
}
}
final Preference pCacheSize = findPreference("pref_cache_size");
if (pCacheSize != null){
final SharedPreferences appPrefs =
PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
Long cacheSize = ThumbnailsCacheManager.getMaxSize();
pCacheSize.setSummary(cacheSize + " Mb");
pCacheSize.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
int size = Integer.decode((String) newValue);
if (ThumbnailsCacheManager.setMaxSize(size)){
appPrefs.edit().putInt("pref_cache_size", size);
pCacheSize.setSummary(size + " MB");
return true;
} else {
return false;
}
}
});
}
boolean helpEnabled = getResources().getBoolean(R.bool.help_enabled);
Preference pHelp = findPreference("help");
if (pHelp != null) {
Preference pHelp = findPreference(HELP);
if (pHelp != null ) {
if (helpEnabled) {
pHelp.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
@@ -237,8 +289,8 @@ public class Preferences extends PreferenceActivity
}
}
boolean recommendEnabled = getResources().getBoolean(R.bool.recommend_enabled);
Preference pRecommend = findPreference("recommend");
boolean recommendEnabled = getResources().getBoolean(R.bool.recommend_enabled);
Preference pRecommend = findPreference(RECOMMEND);
if (pRecommend != null) {
if (recommendEnabled) {
pRecommend.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@@ -270,7 +322,7 @@ public class Preferences extends PreferenceActivity
}
boolean feedbackEnabled = getResources().getBoolean(R.bool.feedback_enabled);
Preference pFeedback = findPreference("feedback");
Preference pFeedback = findPreference(FEEDBACK);
if (pFeedback != null) {
if (feedbackEnabled) {
pFeedback.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@@ -295,7 +347,7 @@ public class Preferences extends PreferenceActivity
}
boolean loggerEnabled = getResources().getBoolean(R.bool.logger_enabled) || BuildConfig.DEBUG;
Preference pLogger = findPreference("logger");
Preference pLogger = findPreference(LOGGER);
if (pLogger != null) {
if (loggerEnabled) {
pLogger.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@@ -366,11 +418,11 @@ public class Preferences extends PreferenceActivity
}
mPrefInstantUploadCategory = (PreferenceCategory) findPreference("instant_uploading_category");
mPrefInstantUploadCategory = (PreferenceCategory) findPreference(INSTANT_UPLOADING_CATEGORY);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
// Instant upload via preferences on pre Android Nougat
mPrefInstantUploadPath = findPreference("instant_upload_path");
mPrefInstantUploadPath = findPreference(PreferenceKeys.INSTANT_UPLOAD_PATH);
if (mPrefInstantUploadPath != null) {
mPrefInstantUploadPath.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@@ -385,28 +437,27 @@ public class Preferences extends PreferenceActivity
return true;
}
});
}
}
mPrefInstantUploadCategory = (PreferenceCategory) findPreference("instant_uploading_category");
mPrefInstantUploadUseSubfolders = findPreference(INSTANT_UPLOAD_PATH_USE_SUBFOLDERS);
mPrefInstantUploadPathWiFi = findPreference(INSTANT_UPLOAD_ON_WIFI);
mPrefInstantUpload = findPreference(INSTANT_UPLOADING);
mPrefInstantPictureUploadOnlyOnCharging = findPreference("instant_upload_on_charging");
mPrefInstantUploadUseSubfolders = findPreference("instant_upload_path_use_subfolders");
mPrefInstantUploadPathWiFi = findPreference("instant_upload_on_wifi");
mPrefInstantPictureUploadOnlyOnCharging = findPreference("instant_upload_on_charging");
mPrefInstantUpload = findPreference("instant_uploading");
toggleInstantPictureOptions(((CheckBoxPreference) mPrefInstantUpload).isChecked());
toggleInstantPictureOptions(((CheckBoxPreference) mPrefInstantUpload).isChecked());
mPrefInstantUpload.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
mPrefInstantUpload.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
toggleInstantPictureOptions((Boolean) newValue);
toggleInstantUploadBehaviour(
((CheckBoxPreference) mPrefInstantVideoUpload).isChecked(),
(Boolean) newValue);
return true;
}
});
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
toggleInstantPictureOptions((Boolean) newValue);
toggleInstantUploadBehaviour(
((CheckBoxPreference)mPrefInstantVideoUpload).isChecked(),
(Boolean) newValue);
return true;
}
});
mPrefInstantVideoUploadPath = findPreference(PreferenceKeys.INSTANT_VIDEO_UPLOAD_PATH);
if (mPrefInstantVideoUploadPath != null){
@@ -426,12 +477,14 @@ public class Preferences extends PreferenceActivity
});
}
mPrefInstantVideoUploadUseSubfolders = findPreference("instant_video_upload_path_use_subfolders");
mPrefInstantVideoUploadPathWiFi = findPreference("instant_video_upload_on_wifi");
mPrefInstantVideoUpload = findPreference("instant_video_uploading");
mPrefInstantVideoUploadOnlyOnCharging = findPreference("instant_video_upload_on_charging");
toggleInstantVideoOptions(((CheckBoxPreference) mPrefInstantVideoUpload).isChecked());
mPrefInstantVideoUpload.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
mPrefInstantVideoUploadUseSubfolders = findPreference(INSTANT_VIDEO_UPLOAD_PATH_USE_SUBFOLDERS);
mPrefInstantVideoUploadPathWiFi = findPreference(INSTANT_VIDEO_UPLOAD_ON_WIFI);
mPrefInstantVideoUpload = findPreference(INSTANT_VIDEO_UPLOADING);
mPrefInstantVideoUploadOnlyOnCharging = findPreference("instant_video_upload_on_charging");
toggleInstantVideoOptions(((CheckBoxPreference) mPrefInstantVideoUpload).isChecked());
mPrefInstantVideoUpload.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
toggleInstantVideoOptions((Boolean) newValue);
@@ -442,10 +495,10 @@ public class Preferences extends PreferenceActivity
}
});
mPrefInstantUploadBehaviour = findPreference("prefs_instant_behaviour");
toggleInstantUploadBehaviour(
((CheckBoxPreference) mPrefInstantVideoUpload).isChecked(),
((CheckBoxPreference) mPrefInstantUpload).isChecked());
mPrefInstantUploadBehaviour = findPreference(PREFS_INSTANT_BEHAVIOUR);
toggleInstantUploadBehaviour(
((CheckBoxPreference)mPrefInstantVideoUpload).isChecked(),
((CheckBoxPreference)mPrefInstantUpload).isChecked());
loadInstantUploadPath();
loadInstantUploadVideoPath();
@@ -455,13 +508,87 @@ public class Preferences extends PreferenceActivity
}
/* About App */
pAboutApp = findPreference("about_app");
if (pAboutApp != null) {
pAboutApp.setTitle(String.format(getString(R.string.about_android), getString(R.string.app_name)));
pAboutApp.setSummary(String.format(getString(R.string.about_version), appVersion));
pAboutApp = (Preference) findPreference(ABOUT_APP);
if (pAboutApp != null) {
pAboutApp.setTitle(String.format(getString(R.string.about_android),
getString(R.string.app_name)));
try {
Integer currentVersion = getPackageManager().getPackageInfo
(getPackageName(), 0).versionCode;
pAboutApp.setSummary(String.format(getString(R.string.about_version),
currentVersion));
} catch (NameNotFoundException e) {
Log_OC.e(TAG, "Error setting about app summary", e);
}
}
INSTANT_UPLOAD_ACCOUNT_LABEL = getResources().getString(R.string.prefs_instant_upload_account);
INSTANT_UPLOAD_PATH_LABEL = getResources().getString(R.string.prefs_instant_upload_path);
INSTANT_UPLOAD_ACCOUNT_LABEL = getResources().getString(R.string.prefs_instant_upload_account);
INSTANT_UPLOAD_PATH_LABEL = getResources().getString(R.string.prefs_instant_upload_path);
INSTANT_UPLOAD_ACCOUNT_LABEL = getResources().getString(R.string.prefs_instant_upload_account);
INSTANT_UPLOAD_PATH_LABEL = getResources().getString(R.string.prefs_instant_upload_path);
loadStoragePath();
/* Link to Beta apks */
Preference pBetaLink = findPreference("beta_link");
if (pBetaLink != null ){
pBetaLink.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
Integer latestVersion = -1;
Integer currentVersion = -1;
try {
currentVersion = getPackageManager().getPackageInfo
(getPackageName(), 0).versionCode;
LoadingVersionNumberTask loadTask = new LoadingVersionNumberTask();
loadTask.execute();
latestVersion = loadTask.get();
} catch (InterruptedException | ExecutionException | NameNotFoundException e) {
Log_OC.e(TAG, "Error detecting app version", e);
}
if (latestVersion == -1 || currentVersion == -1) {
Toast.makeText(getApplicationContext(), "No information available!",
Toast.LENGTH_SHORT).show();
}
if (latestVersion > currentVersion) {
String betaLinkWeb = (String) getText(R.string.beta_link) +
latestVersion + ".apk";
if (betaLinkWeb != null && betaLinkWeb.length() > 0) {
Uri uriUrl = Uri.parse(betaLinkWeb);
Intent intent = new Intent(Intent.ACTION_VIEW, uriUrl);
startActivity(intent);
return true;
}
} else {
Toast.makeText(getApplicationContext(), "No new version available!",
Toast.LENGTH_SHORT).show();
return true;
}
return true;
}
});
}
loadStoragePath();
/* Link to beta changelog */
Preference pChangelogLink = findPreference("changelog_link");
if (pChangelogLink != null) {
pChangelogLink.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
String betaLinkWeb = getString(R.string.changelog);
if (betaLinkWeb != null && betaLinkWeb.length() > 0) {
Uri uriUrl = Uri.parse(betaLinkWeb);
Intent intent = new Intent(Intent.ACTION_VIEW, uriUrl);
startActivity(intent);
return true;
}
return true;
}
});
}
}
private void launchDavDroidLogin()
@@ -601,8 +728,10 @@ public class Preferences extends PreferenceActivity
mUploadPath = DisplayUtils.getPathWithoutLastSlash(mUploadPath);
mUploadPathAccount = AccountUtils.getCurrentOwnCloudAccount(MainApp.getAppContext()).name;
// Show the path on summary preference
mPrefInstantUploadPath.setSummary(mUploadPath);
mPrefInstantUploadPath.setSummary(getUploadAccountPath(mUploadPathAccount, mUploadPath));
saveInstantUploadPathOnPreferences();
@@ -614,8 +743,10 @@ public class Preferences extends PreferenceActivity
mUploadVideoPath = DisplayUtils.getPathWithoutLastSlash(mUploadVideoPath);
mUploadVideoPathAccount = AccountUtils.getCurrentOwnCloudAccount(MainApp.getAppContext()).name;
// Show the video path on summary preference
mPrefInstantVideoUploadPath.setSummary(mUploadVideoPath);
mPrefInstantVideoUploadPath.setSummary(getUploadAccountPath(mUploadVideoPathAccount, mUploadVideoPath));
saveInstantUploadVideoPathOnPreferences();
} else if (requestCode == ACTION_REQUEST_PASSCODE && resultCode == RESULT_OK) {
@@ -724,14 +855,24 @@ public class Preferences extends PreferenceActivity
return mDelegate;
}
/**
* Returns a combined string of accountName and uploadPath to be displayed to user.
*/
private String getUploadAccountPath(String accountName, String uploadPath) {
return INSTANT_UPLOAD_ACCOUNT_LABEL + ": " + accountName + "\n"
+ INSTANT_UPLOAD_PATH_LABEL + ": " + uploadPath;
}
/**
* Load upload path set on preferences
*/
private void loadInstantUploadPath() {
SharedPreferences appPrefs =
PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
mUploadPath = appPrefs.getString(PreferenceKeys.INSTANT_UPLOAD_PATH, getString(R.string.instant_upload_path));
mPrefInstantUploadPath.setSummary(mUploadPath);
mUploadPath = appPrefs.getString(INSTANT_UPLOAD_PATH, getString(R.string.instant_upload_path));
mUploadPathAccount = appPrefs.getString(INSTANT_UPLOAD_PATH_ACCOUNT,
AccountUtils.getCurrentOwnCloudAccount(MainApp.getAppContext()).name);
mPrefInstantUploadPath.setSummary(getUploadAccountPath(mUploadPathAccount, mUploadPath));
}
/**
@@ -750,6 +891,7 @@ public class Preferences extends PreferenceActivity
mPrefStoragePath.setValue(newStoragePath);
}
/**
* Load storage path set on preferences
*/
@@ -763,13 +905,14 @@ public class Preferences extends PreferenceActivity
}
/**
* Save the "Instant Upload Path" on preferences
* Save the "Instant Upload Path" and corresponding account on preferences
*/
private void saveInstantUploadPathOnPreferences() {
SharedPreferences appPrefs =
PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
SharedPreferences.Editor editor = appPrefs.edit();
editor.putString(PreferenceKeys.INSTANT_UPLOAD_PATH, mUploadPath);
editor.putString(PreferenceKeys.INSTANT_UPLOAD_PATH, mUploadPath)
.putString(INSTANT_UPLOAD_PATH_ACCOUNT, mUploadPathAccount);
editor.commit();
}
@@ -779,18 +922,21 @@ public class Preferences extends PreferenceActivity
private void loadInstantUploadVideoPath() {
SharedPreferences appPrefs =
PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
mUploadVideoPath = appPrefs.getString("instant_video_upload_path", getString(R.string.instant_upload_path));
mPrefInstantVideoUploadPath.setSummary(mUploadVideoPath);
mUploadVideoPath = appPrefs.getString(INSTANT_VIDEO_UPLOAD_PATH, getString(R.string.instant_upload_path));
mUploadVideoPathAccount = appPrefs.getString(INSTANT_VIDEO_UPLOAD_PATH_ACCOUNT,
AccountUtils.getCurrentOwnCloudAccount(MainApp.getAppContext()).name);
mPrefInstantVideoUploadPath.setSummary(getUploadAccountPath(mUploadVideoPathAccount, mUploadVideoPath));
}
/**
* Save the "Instant Video Upload Path" on preferences
* Save the "Instant Video Upload Path" and corresponding account on preferences
*/
private void saveInstantUploadVideoPathOnPreferences() {
SharedPreferences appPrefs =
PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
SharedPreferences.Editor editor = appPrefs.edit();
editor.putString(PreferenceKeys.INSTANT_VIDEO_UPLOAD_PATH, mUploadVideoPath);
editor.putString(INSTANT_VIDEO_UPLOAD_PATH, mUploadVideoPath)
.putString(INSTANT_VIDEO_UPLOAD_PATH_ACCOUNT, mUploadVideoPathAccount);
editor.commit();
}
@@ -806,4 +952,27 @@ public class Preferences extends PreferenceActivity
// Migration was canceled so we don't do anything
}
/**
*
* Class for loading the version number
*
*/
private class LoadingVersionNumberTask extends AsyncTask<Void, Void, Integer> {
protected Integer doInBackground(Void... args) {
try {
URL url = new URL(getString(R.string.beta_latest));
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
Integer latestVersion = Integer.parseInt(in.readLine());
in.close();
return latestVersion;
} catch (IOException e) {
Log_OC.e(TAG, "Error loading version number", e);
}
return -1;
}
}
}
@@ -38,11 +38,11 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.shares.OCShare;
import com.owncloud.android.lib.resources.shares.ShareType;
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
import com.owncloud.android.operations.CreateShareViaLinkOperation;
import com.owncloud.android.operations.GetSharesForFileOperation;
import com.owncloud.android.operations.UnshareOperation;
import com.owncloud.android.operations.UpdateSharePermissionsOperation;
import com.owncloud.android.providers.UsersAndGroupsSearchProvider;
import com.owncloud.android.ui.dialog.ShareLinkToDialog;
import com.owncloud.android.ui.fragment.EditShareFragment;
import com.owncloud.android.ui.fragment.SearchShareesFragment;
@@ -51,6 +51,8 @@ import com.owncloud.android.ui.fragment.ShareFragmentListener;
import com.owncloud.android.utils.ErrorMessageAdapter;
import com.owncloud.android.utils.GetShareWithUsersAsyncTask;
import org.nextcloud.providers.UsersAndGroupsSearchProvider;
/**
* Activity for sharing files
@@ -142,11 +144,28 @@ public class ShareActivity extends FileActivity
if (getFile().isSharedWithMe()) {
return OCShare.READ_PERMISSION_FLAG; // minimum permissions
} else if (getFile().isFolder()) {
return (isFederated) ? OCShare.FEDERATED_PERMISSIONS_FOR_FOLDER : OCShare.MAXIMUM_PERMISSIONS_FOR_FOLDER;
} else { // isFile
return (isFederated) ? OCShare.FEDERATED_PERMISSIONS_FOR_FILE : OCShare.MAXIMUM_PERMISSIONS_FOR_FILE;
} else if (isFederated) {
OwnCloudVersion serverVersion =
com.owncloud.android.authentication.AccountUtils.getServerVersion(getAccount());
if (serverVersion != null && serverVersion.isNotReshareableFederatedSupported()) {
return (
getFile().isFolder() ?
OCShare.FEDERATED_PERMISSIONS_FOR_FOLDER_AFTER_OC9 :
OCShare.FEDERATED_PERMISSIONS_FOR_FILE_AFTER_OC9
);
} else {
return (
getFile().isFolder() ?
OCShare.FEDERATED_PERMISSIONS_FOR_FOLDER_UP_TO_OC9 :
OCShare.FEDERATED_PERMISSIONS_FOR_FILE_UP_TO_OC9
);
}
} else {
return (
getFile().isFolder() ?
OCShare.MAXIMUM_PERMISSIONS_FOR_FOLDER :
OCShare.MAXIMUM_PERMISSIONS_FOR_FILE
);
}
}
@@ -28,7 +28,6 @@ import android.support.annotation.ColorInt;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.ProgressBar;
import com.owncloud.android.R;
@@ -92,11 +91,6 @@ public abstract class ToolbarActivity extends BaseActivity {
ActionBar actionBar = getSupportActionBar();
actionBar.setTitle(titleToSet);
// also as content description
View actionBarTitleView = getWindow().getDecorView().findViewById(
getResources().getIdentifier("action_bar_title", "id", "android")
);
// set home button properties
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setDisplayShowTitleEnabled(true);
@@ -121,10 +121,10 @@ public class DiskLruImageCache {
}
final InputStream in = snapshot.getInputStream( 0 );
if ( in != null ) {
final BufferedInputStream buffIn =
final BufferedInputStream buffIn =
new BufferedInputStream( in, IO_BUFFER_SIZE );
bitmap = BitmapFactory.decodeStream( buffIn );
}
bitmap = BitmapFactory.decodeStream( buffIn );
}
} catch ( IOException e ) {
Log_OC.d(TAG, e.getMessage(), e);
} finally {
@@ -194,4 +194,12 @@ public class DiskLruImageCache {
Log_OC.d(TAG, e.getMessage(), e);
}
}
public void setMaxSize(long maxSize){
mDiskCache.setMaxSize(maxSize);
}
public long getMaxSize(){
return mDiskCache.getMaxSize();
}
}
@@ -0,0 +1,136 @@
/**
* ownCloud Android client application
*
* Copyright (C) 2016 Tobias Kaminsky
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.owncloud.android.ui.adapter;
import android.accounts.Account;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import android.provider.OpenableColumns;
import com.owncloud.android.MainApp;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.datamodel.ThumbnailsCacheManager;
import com.owncloud.android.lib.common.utils.Log_OC;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
public class DiskLruImageCacheFileProvider extends ContentProvider {
private static String TAG = FileDataStorageManager.class.getSimpleName();
private FileDataStorageManager mFileDataStorageManager;
public static final String AUTHORITY = "org.nextcloud.beta.imageCache.provider";
@Override
public boolean onCreate() {
return true;
}
private OCFile getFile(Uri uri){
Account account = AccountUtils.getCurrentOwnCloudAccount(MainApp.getAppContext());
mFileDataStorageManager = new FileDataStorageManager(account,
MainApp.getAppContext().getContentResolver());
OCFile ocFile = mFileDataStorageManager.getFileByPath(uri.getPath());
return ocFile;
}
@Override
public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
OCFile ocFile = getFile(uri);
Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(
String.valueOf("r" + ocFile.getRemoteId()));
// create a file to write bitmap data
File f = new File(MainApp.getAppContext().getCacheDir(), ocFile.getFileName());
try {
f.createNewFile();
//Convert bitmap to byte array
ByteArrayOutputStream bos = new ByteArrayOutputStream();
thumbnail.compress(Bitmap.CompressFormat.JPEG, 90, bos);
byte[] bitmapdata = bos.toByteArray();
//write the bytes in file
FileOutputStream fos = null;
try {
fos = new FileOutputStream(f);
} catch (FileNotFoundException e) {
Log_OC.e(TAG, "Error opening file output stream", e);
}
fos.write(bitmapdata);
fos.flush();
fos.close();
} catch (IOException e) {
Log_OC.e(TAG, "Error opening file", e);
}
return ParcelFileDescriptor.open(f, ParcelFileDescriptor.MODE_READ_ONLY);
}
@Override
public String getType(Uri uri) {
OCFile ocFile = getFile(uri);
return ocFile.getMimetype();
}
@Override
public Cursor query(Uri uri, String[] arg1, String arg2, String[] arg3, String arg4) {
MatrixCursor cursor = null;
OCFile ocFile = getFile(uri);
File file = new File(MainApp.getAppContext().getCacheDir(), ocFile.getFileName());
if (file.exists()) {
cursor = new MatrixCursor(new String[] {
OpenableColumns.DISPLAY_NAME, OpenableColumns.SIZE });
cursor.addRow(new Object[] { uri.getLastPathSegment(),
file.length() });
}
return cursor;
}
@Override
public Uri insert(Uri uri, ContentValues values) {
return null;
}
@Override
public int delete(Uri uri, String selection, String[] selectionArgs) {
return 0;
}
@Override
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
return 0;
}
}
@@ -444,7 +444,7 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
task
);
fileIcon.setImageDrawable(asyncDrawable);
task.execute(fakeFileToCheatThumbnailsCacheManagerInterface);
task.execute(fakeFileToCheatThumbnailsCacheManagerInterface, true);
}
}
@@ -480,7 +480,7 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
task
);
fileIcon.setImageDrawable(asyncDrawable);
task.execute(file);
task.execute(file, true);
Log_OC.v(TAG, "Executing task to generate a new thumbnail");
}
}
@@ -48,6 +48,7 @@ import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder;
import com.owncloud.android.files.services.FileUploader.FileUploaderBinder;
import com.owncloud.android.services.OperationsService.OperationsServiceBinder;
import com.owncloud.android.ui.activity.ComponentsGetter;
import com.owncloud.android.ui.fragment.OCFileListFragment;
import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.FileStorageUtils;
import com.owncloud.android.utils.MimeTypeUtil;
@@ -62,6 +63,7 @@ import java.util.Vector;
*/
public class FileListListAdapter extends BaseAdapter implements FilterableListAdapter {
public static final int showFilenameColumnThreshold = 4;
private Context mContext;
private Vector<OCFile> mFilesAll = new Vector<OCFile>();
private Vector<OCFile> mFiles = null;
@@ -71,16 +73,19 @@ public class FileListListAdapter extends BaseAdapter implements FilterableListAd
private FileDataStorageManager mStorageManager;
private Account mAccount;
private ComponentsGetter mTransferServiceGetter;
private OCFileListFragment mListFragment;
public FileListListAdapter(
boolean justFolders,
Context context,
ComponentsGetter transferServiceGetter
ComponentsGetter transferServiceGetter,
OCFileListFragment listFragment
) {
mJustFolders = justFolders;
mContext = context;
mAccount = AccountUtils.getCurrentOwnCloudAccount(mContext);
mListFragment = listFragment;
mTransferServiceGetter = transferServiceGetter;
@@ -202,9 +207,14 @@ public class FileListListAdapter extends BaseAdapter implements FilterableListAd
case GRID_ITEM:
// filename
fileName = (TextView) view.findViewById(R.id.Filename);
name = file.getFileName();
fileName.setText(name);
if (mListFragment.getColumnSize() > showFilenameColumnThreshold && viewType == ViewType.GRID_ITEM) {
fileName.setVisibility(View.GONE);
}
case GRID_IMAGE:
// sharedIcon
ImageView sharedIconV = (ImageView) view.findViewById(R.id.sharedIcon);
@@ -223,12 +233,9 @@ public class FileListListAdapter extends BaseAdapter implements FilterableListAd
// local state
ImageView localStateView = (ImageView) view.findViewById(R.id.localFileIndicator);
localStateView.bringToFront();
FileDownloaderBinder downloaderBinder =
mTransferServiceGetter.getFileDownloaderBinder();
FileUploaderBinder uploaderBinder =
mTransferServiceGetter.getFileUploaderBinder();
OperationsServiceBinder opsBinder =
mTransferServiceGetter.getOperationsServiceBinder();
FileDownloaderBinder downloaderBinder = mTransferServiceGetter.getFileDownloaderBinder();
FileUploaderBinder uploaderBinder = mTransferServiceGetter.getFileUploaderBinder();
OperationsServiceBinder opsBinder = mTransferServiceGetter.getOperationsServiceBinder();
localStateView.setVisibility(View.INVISIBLE); // default first
@@ -300,7 +307,9 @@ public class FileListListAdapter extends BaseAdapter implements FilterableListAd
if (!file.isFolder()) {
if ((MimeTypeUtil.isImage(file) || MimeTypeUtil.isVideo(file)) && file.getRemoteId() != null) {
// Thumbnail in Cache?
Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(file.getRemoteId());
Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(
"t" + file.getRemoteId()
);
if (thumbnail != null && !file.needsUpdateThumbnail()) {
if (MimeTypeUtil.isVideo(file)) {
@@ -330,7 +339,7 @@ public class FileListListAdapter extends BaseAdapter implements FilterableListAd
task
);
fileIcon.setImageDrawable(asyncDrawable);
task.execute(file);
task.execute(file, true);
}
}
@@ -45,8 +45,6 @@ import java.util.List;
*/
public class FolderSyncAdapter extends SectionedRecyclerViewAdapter<FolderSyncAdapter.MainViewHolder> {
private static final String TAG = FolderSyncAdapter.class.getSimpleName();
private final Context mContext;
private final int mGridWidth;
private final int mGridTotal;
@@ -200,7 +200,7 @@ public class LocalFileListAdapter extends BaseAdapter implements FilterableListA
if (MimeTypeUtil.isImage(file)){
// Thumbnail in Cache?
Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(
String.valueOf(file.hashCode())
"t" + file.hashCode()
);
if (thumbnail != null){
fileIcon.setImageBitmap(thumbnail);
@@ -222,7 +222,7 @@ public class LocalFileListAdapter extends BaseAdapter implements FilterableListA
task
);
fileIcon.setImageDrawable(asyncDrawable);
task.execute(file);
task.execute(file, true);
Log_OC.v(TAG, "Executing task to generate a new thumbnail");
} // else, already being generated, don't restart it
@@ -1,76 +0,0 @@
/**
* ownCloud Android client application
*
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.ui.adapter;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Environment;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import com.owncloud.android.R;
import java.io.File;
public class LogListAdapter extends ArrayAdapter<String> {
private Context context = null;
private String[] values;
private Uri fileUri = null;
public LogListAdapter(Context context, String[] values) {
super(context, R.layout.log_item, values);
this.context = context;
this.values = values;
}
@Override
public View getView(final int position, View convertView,@NonNull ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View rowView = inflater.inflate(R.layout.log_item, parent, false);
TextView listText = (TextView) rowView.findViewById(R.id.log_item_single);
listText.setText(values[position]);
listText.setTextSize(15);
fileUri = Uri.fromFile(new File(Environment.getExternalStorageDirectory() + File.separator + "owncloud" + File
.separator+"log"+File.separator+values[position]));
listText.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent emailIntent = new Intent(Intent.ACTION_SEND);
emailIntent.setType("text/rtf");
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "Nextcloud Logfile");
emailIntent.putExtra(Intent.EXTRA_TEXT, "This is a automatic E-mail send by nextcloud/android");
emailIntent.putExtra(Intent.EXTRA_STREAM, fileUri);
emailIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(Intent.createChooser(emailIntent, "Send mail..."));
}
});
return rowView;
}
}
@@ -118,7 +118,7 @@ public class UploaderAdapter extends SimpleAdapter {
task
);
fileIcon.setImageDrawable(asyncDrawable);
task.execute(file);
task.execute(file, true);
}
}
} else {
@@ -81,12 +81,6 @@ public class SamlWebViewDialog extends DialogFragment {
return fragment;
}
public SamlWebViewDialog() {
super();
}
@Override
public void onAttach(Activity activity) {
Log_OC.v(TAG, "onAttach");
@@ -33,6 +33,7 @@ import android.widget.CompoundButton;
import android.widget.TextView;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
@@ -40,6 +41,7 @@ import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.shares.OCShare;
import com.owncloud.android.lib.resources.shares.SharePermissionsBuilder;
import com.owncloud.android.lib.resources.shares.ShareType;
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
import com.owncloud.android.ui.activity.FileActivity;
public class EditShareFragment extends Fragment {
@@ -64,6 +66,9 @@ public class EditShareFragment extends Fragment {
/** File bound to mShare, received as a parameter in construction time */
private OCFile mFile;
/** Account of the shared file, received as a parameter in construction time */
private Account mAccount;
/** Listener for changes on privilege checkboxes */
private CompoundButton.OnCheckedChangeListener mOnPrivilegeChangeListener;
@@ -86,13 +91,6 @@ public class EditShareFragment extends Fragment {
return fragment;
}
/**
* Required empty public constructor
*/
public EditShareFragment() {
}
/**
* {@inheritDoc}
*/
@@ -104,7 +102,7 @@ public class EditShareFragment extends Fragment {
mShare = getArguments().getParcelable(ARG_SHARE);
mFile = getArguments().getParcelable(ARG_FILE);
/* OC account holding the shared file, received as a parameter in construction time */
//Account mAccount = getArguments().getParcelable(ARG_ACCOUNT);
mAccount = getArguments().getParcelable(ARG_ACCOUNT);
}
}
@@ -150,6 +148,11 @@ public class EditShareFragment extends Fragment {
int sharePermissions = mShare.getPermissions();
boolean isFederated = ShareType.FEDERATED.equals(mShare.getShareType());
OwnCloudVersion serverVersion = AccountUtils.getServerVersion(mAccount);
boolean isNotReshareableFederatedSupported = (
serverVersion != null &&
serverVersion.isNotReshareableFederatedSupported()
);
CompoundButton compound;
compound = (CompoundButton) editShareView.findViewById(R.id.canShareSwitch);
@@ -166,18 +169,22 @@ public class EditShareFragment extends Fragment {
boolean canEdit = (sharePermissions & anyUpdatePermission) > 0;
compound.setChecked(canEdit);
if (mFile.isFolder() && !isFederated) {
boolean areEditOptionsAvailable = !isFederated || isNotReshareableFederatedSupported;
if (mFile.isFolder() && areEditOptionsAvailable) {
/// TODO change areEditOptionsAvailable in order to delete !isFederated
// from checking when iOS is ready
compound = (CompoundButton) editShareView.findViewById(R.id.canEditCreateCheckBox);
compound.setChecked((sharePermissions & OCShare.CREATE_PERMISSION_FLAG) > 0);
compound.setVisibility(canEdit ? View.VISIBLE : View.GONE);
compound.setVisibility((canEdit) ? View.VISIBLE : View.GONE);
compound = (CompoundButton) editShareView.findViewById(R.id.canEditChangeCheckBox);
compound.setChecked((sharePermissions & OCShare.UPDATE_PERMISSION_FLAG) > 0);
compound.setVisibility(canEdit ? View.VISIBLE : View.GONE);
compound.setVisibility((canEdit) ? View.VISIBLE : View.GONE);
compound = (CompoundButton) editShareView.findViewById(R.id.canEditDeleteCheckBox);
compound.setChecked((sharePermissions & OCShare.DELETE_PERMISSION_FLAG) > 0);
compound.setVisibility(canEdit ? View.VISIBLE : View.GONE);
compound.setVisibility((canEdit) ? View.VISIBLE : View.GONE);
}
setPermissionsListening(editShareView, true);
@@ -26,8 +26,11 @@ import android.support.annotation.StringRes;
import android.support.v4.app.Fragment;
import android.support.v4.view.MenuItemCompat;
import android.support.v4.widget.SwipeRefreshLayout;
import android.view.GestureDetector;
import android.support.v7.widget.SearchView;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
@@ -42,9 +45,12 @@ import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.owncloud.android.MainApp;
import com.getbase.floatingactionbutton.FloatingActionButton;
import com.getbase.floatingactionbutton.FloatingActionsMenu;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.db.PreferenceManager;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.ui.ExtendedListView;
import com.owncloud.android.ui.activity.OnEnforceableRefreshListener;
@@ -59,7 +65,7 @@ public class ExtendedListFragment extends Fragment
protected static final String TAG = ExtendedListFragment.class.getSimpleName();
protected static final String KEY_SAVED_LIST_POSITION = "SAVED_LIST_POSITION";
protected static final String KEY_SAVED_LIST_POSITION = "SAVED_LIST_POSITION";
private static final String KEY_INDEXES = "INDEXES";
private static final String KEY_FIRST_POSITIONS= "FIRST_POSITIONS";
@@ -67,9 +73,12 @@ public class ExtendedListFragment extends Fragment
private static final String KEY_HEIGHT_CELL = "HEIGHT_CELL";
private static final String KEY_EMPTY_LIST_MESSAGE = "EMPTY_LIST_MESSAGE";
private static final String KEY_IS_GRID_VISIBLE = "IS_GRID_VISIBLE";
public static final float minColumnSize = 2.0f;
public static final float maxColumnSize = 10.0f;
private ScaleGestureDetector mScaleGestureDetector = null;
protected SwipeRefreshLayout mRefreshListLayout;
private SwipeRefreshLayout mRefreshGridLayout;
protected SwipeRefreshLayout mRefreshGridLayout;
protected SwipeRefreshLayout mRefreshEmptyLayout;
protected LinearLayout mEmptyListContainer;
protected TextView mEmptyListMessage;
@@ -98,6 +107,8 @@ public class ExtendedListFragment extends Fragment
private FilterableListAdapter mAdapter;
private float mScale = -1f;
protected void setListAdapter(FilterableListAdapter listAdapter) {
mAdapter = listAdapter;
mCurrentListView.setAdapter(listAdapter);
@@ -179,11 +190,36 @@ public class ExtendedListFragment extends Fragment
mListFooterView = inflater.inflate(R.layout.list_footer, null, false);
mGridView = (GridViewWithHeaderAndFooter) (v.findViewById(R.id.grid_root));
mGridView.setNumColumns(GridView.AUTO_FIT);
mScale = PreferenceManager.getGridColumns(getContext());
setGridViewColumns(1f);
//mGridView.setNumColumns(GridView.AUTO_FIT);
mGridView.setOnItemClickListener(this);
mGridFooterView = inflater.inflate(R.layout.list_footer, null, false);
mScaleGestureDetector = new ScaleGestureDetector(MainApp.getAppContext(),new ScaleListener());
// gestureDetector = new GestureDetector(MainApp.getAppContext(), new SingleTapConfirm());
mGridView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
mScaleGestureDetector.onTouchEvent(motionEvent);
return false;
}
});
if (savedInstanceState != null) {
int referencePosition = savedInstanceState.getInt(KEY_SAVED_LIST_POSITION);
if (mCurrentListView!= null && mCurrentListView.equals(mListView)) {
Log_OC.v(TAG, "Setting and centering around list position " + referencePosition);
mListView.setAndCenterSelection(referencePosition);
} else {
Log_OC.v(TAG, "Setting grid position " + referencePosition);
mGridView.setSelection(referencePosition);
}
}
// Pull-down to refresh layout
mRefreshListLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_containing_list);
mRefreshGridLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_containing_grid);
@@ -219,6 +255,36 @@ public class ExtendedListFragment extends Fragment
return v;
}
private class SingleTapConfirm extends GestureDetector.SimpleOnGestureListener {
@Override
public boolean onSingleTapUp(MotionEvent e) {
return true;
}
}
private class ScaleListener extends ScaleGestureDetector.SimpleOnScaleGestureListener {
@Override
public boolean onScale(ScaleGestureDetector detector) {
setGridViewColumns(detector.getScaleFactor());
PreferenceManager.setGridColumns(getContext(), mScale);
return true;
}
}
private void setGridViewColumns(float scaleFactor) {
if (mScale == -1f) {
mGridView.setNumColumns(GridView.AUTO_FIT);
mScale = mGridView.getNumColumns();
}
mScale *= 1.f - (scaleFactor - 1.f);
mScale = Math.max(minColumnSize, Math.min(mScale, maxColumnSize));
Integer scaleInt = Math.round(mScale);
mGridView.setNumColumns(scaleInt);
mGridView.invalidateViews();
}
protected void setupEmptyList(View view) {
mEmptyListContainer = (LinearLayout) view.findViewById(R.id.empty_list_view);
mEmptyListMessage = (TextView) view.findViewById(R.id.empty_list_view_text);
@@ -247,7 +313,9 @@ public class ExtendedListFragment extends Fragment
mTops = new ArrayList<>();
mHeightCell = 0;
}
}
mScale = PreferenceManager.getGridColumns(getContext());
}
@Override
@@ -261,6 +329,8 @@ public class ExtendedListFragment extends Fragment
savedInstanceState.putIntegerArrayList(KEY_TOPS, mTops);
savedInstanceState.putInt(KEY_HEIGHT_CELL, mHeightCell);
savedInstanceState.putString(KEY_EMPTY_LIST_MESSAGE, getEmptyViewText());
PreferenceManager.setGridColumns(getContext(), mScale);
}
/**
@@ -283,6 +353,10 @@ public class ExtendedListFragment extends Fragment
}
}
public int getColumnSize() {
return Math.round(mScale);
}
/*
* Restore index and position
@@ -449,7 +449,7 @@ public class FileDetailFragment extends FileFragment implements OnClickListener
task
);
iv.setImageDrawable(asyncDrawable);
task.execute(file);
task.execute(file, true);
}
}
} else {
@@ -22,9 +22,11 @@
*/
package com.owncloud.android.ui.fragment;
import android.accounts.Account;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
@@ -52,6 +54,7 @@ import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.files.FileMenuFilter;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
import com.owncloud.android.media.MediaService;
import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.activity.FolderPickerActivity;
@@ -192,7 +195,8 @@ public class OCFileListFragment extends ExtendedListFragment {
mAdapter = new FileListListAdapter(
mJustFolders,
getActivity(),
mContainerActivity
mContainerActivity,
this
);
setListAdapter(mAdapter);
@@ -616,15 +620,13 @@ public class OCFileListFragment extends ExtendedListFragment {
((FileDisplayActivity)mContainerActivity).startImagePreview(file);
} else if (PreviewTextFragment.canBePreviewed(file)){
((FileDisplayActivity)mContainerActivity).startTextPreview(file);
} else if (file.isDown()) {
if (PreviewMediaFragment.canBePreviewed(file)) {
} else if (PreviewMediaFragment.canBePreviewed(file)) {
// media preview
((FileDisplayActivity) mContainerActivity).startMediaPreview(file, 0, true);
} else {
} else if (file.isDown()) {
mContainerActivity.getFileOperationsHelper().openFile(file);
}
} else {
else {
// automatic download, preview on finish
((FileDisplayActivity) mContainerActivity).startDownloadForPreview(file);
}
@@ -684,6 +686,14 @@ public class OCFileListFragment extends ExtendedListFragment {
}
return true;
}
case R.id.action_stream_file: {
Account account = ((FileActivity)mContainerActivity).getAccount();
Context context = MainApp.getAppContext();
Uri uri = PreviewMediaFragment.generateUrlWithCredentials(account, context, singleFile);
MediaService.streamWithExternalApp(uri, getActivity()).show();
return true;
}
}
}
@@ -89,10 +89,6 @@ public class SearchShareesFragment extends Fragment implements ShareUserListAdap
return fragment;
}
public SearchShareesFragment() {
// Required empty public constructor
}
/**
* {@inheritDoc}
*/
@@ -76,8 +76,7 @@ import java.util.Date;
* Use the {@link ShareFileFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class ShareFileFragment extends Fragment
implements ShareUserListAdapter.ShareUserAdapterListener {
public class ShareFileFragment extends Fragment implements ShareUserListAdapter.ShareUserAdapterListener {
private static final String TAG = ShareFileFragment.class.getSimpleName();
@@ -150,6 +149,7 @@ public class ShareFileFragment extends Fragment
*/
private OnHideFileListingPermissionInteractionListener mOnHideFileListingPermissionInteractionListener = null;
/**
* Public factory method to create new ShareFileFragment instances.
*
@@ -166,12 +166,6 @@ public class ShareFileFragment extends Fragment
return fragment;
}
/**
* Required empty public constructor.
*/
public ShareFileFragment() {
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -558,7 +552,6 @@ public class ShareFileFragment extends Fragment
}
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
+34 -3
View File
@@ -48,12 +48,15 @@ import com.owncloud.android.services.OperationsService;
import com.owncloud.android.services.observer.FileObserverService;
import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.ui.activity.ShareActivity;
import com.owncloud.android.ui.adapter.DiskLruImageCacheFileProvider;
import com.owncloud.android.ui.dialog.ShareLinkToDialog;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.Collection;
import java.util.List;
import java.util.regex.Matcher;
@@ -65,7 +68,7 @@ import java.util.regex.Pattern;
public class FileOperationsHelper {
private static final String TAG = FileOperationsHelper.class.getSimpleName();
private static final String FTAG_CHOOSER_DIALOG = "CHOOSER_DIALOG";
protected FileActivity mFileActivity = null;
@@ -474,8 +477,17 @@ public class FileOperationsHelper {
if (hideFileListing) {
updateShareIntent.putExtra(OperationsService.EXTRA_SHARE_PERMISSIONS, OCShare.CREATE_PERMISSION_FLAG);
} else {
updateShareIntent.
putExtra(OperationsService.EXTRA_SHARE_PERMISSIONS, OCShare.FEDERATED_PERMISSIONS_FOR_FOLDER);
OwnCloudVersion serverVersion = AccountUtils.getServerVersion(mFileActivity.getAccount());
if (serverVersion != null && serverVersion.isNotReshareableFederatedSupported()) {
updateShareIntent.
putExtra(OperationsService.EXTRA_SHARE_PERMISSIONS,
OCShare.FEDERATED_PERMISSIONS_FOR_FOLDER_AFTER_OC9);
} else {
updateShareIntent.
putExtra(OperationsService.EXTRA_SHARE_PERMISSIONS,
OCShare.FEDERATED_PERMISSIONS_FOR_FOLDER_UP_TO_OC9);
}
}
queueShareIntent(updateShareIntent);
@@ -519,6 +531,25 @@ public class FileOperationsHelper {
}
}
public void sendCachedImage(OCFile file) {
if (file != null) {
Intent sendIntent = new Intent(android.content.Intent.ACTION_SEND);
// set MimeType
sendIntent.setType(file.getMimetype());
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("content://" + DiskLruImageCacheFileProvider.AUTHORITY + file.getRemotePath()));
sendIntent.putExtra(Intent.ACTION_SEND, true); // Send Action
// Show dialog, without the own app
String[] packagesToExclude = new String[] { mFileActivity.getPackageName() };
DialogFragment chooserDialog = ShareLinkToDialog.newInstance(sendIntent, packagesToExclude);
chooserDialog.show(mFileActivity.getSupportFragmentManager(), FTAG_CHOOSER_DIALOG);
} else {
Log_OC.wtf(TAG, "Trying to send a NULL OCFile");
}
}
/**
* Request the synchronization of a file or folder with the OC server, including its contents.
*
@@ -383,10 +383,6 @@ public class PreviewImageActivity extends FileActivity implements
OCFile currentFile = mPreviewImagePagerAdapter.getFileAt(position);
getSupportActionBar().setTitle(currentFile.getFileName());
setDrawerIndicatorEnabled(false);
if (!currentFile.isDown()
&& !mPreviewImagePagerAdapter.pendingErrorAt(position)) {
requestForDownload(currentFile);
}
// Call to reset image zoom to initial state
((PreviewImagePagerAdapter) mViewPager.getAdapter()).resetZoom();
@@ -497,7 +493,7 @@ public class PreviewImageActivity extends FileActivity implements
if (file.getFileId() > FileDataStorageManager.ROOT_PARENT_ID) {
file = getStorageManager().getFileById(file.getFileId());
}
if (file != null) {
/// Refresh the activity according to the Account and OCFile set
setFile(file); // reset after getting it fresh from storageManager
@@ -39,8 +39,10 @@ import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.datamodel.ThumbnailsCacheManager;
import com.owncloud.android.files.FileMenuFilter;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.ui.dialog.ConfirmationDialogFragment;
@@ -71,11 +73,14 @@ public class PreviewImageFragment extends FileFragment {
private static final String ARG_FILE = "FILE";
private static final String ARG_IGNORE_FIRST = "IGNORE_FIRST";
private static final String ARG_SHOW_RESIZED_IMAGE = "SHOW_RESIZED_IMAGE";
private TouchImageViewCustom mImageView;
private TextView mMessageView;
private ProgressBar mProgressWheel;
private Boolean mShowResizedImage = false;
public Bitmap mBitmap = null;
private static final String TAG = PreviewImageFragment.class.getSimpleName();
@@ -99,11 +104,14 @@ public class PreviewImageFragment extends FileFragment {
* {@link FragmentStatePagerAdapter}
* ; TODO better solution
*/
public static PreviewImageFragment newInstance(OCFile imageFile, boolean ignoreFirstSavedState){
public static PreviewImageFragment newInstance(OCFile imageFile, boolean ignoreFirstSavedState,
boolean showResizedImage){
PreviewImageFragment frag = new PreviewImageFragment();
frag.mShowResizedImage = showResizedImage;
Bundle args = new Bundle();
args.putParcelable(ARG_FILE, imageFile);
args.putBoolean(ARG_IGNORE_FIRST, ignoreFirstSavedState);
args.putBoolean(ARG_SHOW_RESIZED_IMAGE, showResizedImage);
frag.setArguments(args);
return frag;
}
@@ -136,6 +144,7 @@ public class PreviewImageFragment extends FileFragment {
// not right now
mIgnoreFirstSavedState = args.getBoolean(ARG_IGNORE_FIRST);
mShowResizedImage = args.getBoolean(ARG_SHOW_RESIZED_IMAGE);
setHasOptionsMenu(true);
}
@@ -181,9 +190,6 @@ public class PreviewImageFragment extends FileFragment {
if (getFile() == null) {
throw new IllegalStateException("Instanced with a NULL OCFile");
}
if (!getFile().isDown()) {
throw new IllegalStateException("There is no local file to preview");
}
}
@@ -201,10 +207,56 @@ public class PreviewImageFragment extends FileFragment {
public void onStart() {
super.onStart();
if (getFile() != null) {
mLoadBitmapTask = new LoadBitmapTask(mImageView, mMessageView, mProgressWheel);
//mLoadBitmapTask.execute(new String[]{getFile().getStoragePath()});
// mLoadBitmapTask.execute(getFile().getStoragePath());
mLoadBitmapTask.execute(getFile());
mImageView.setTag(getFile().getFileId());
if (mShowResizedImage){
Bitmap resizedImage = ThumbnailsCacheManager.getBitmapFromDiskCache(
String.valueOf("r" + getFile().getRemoteId()));
if (resizedImage != null && !getFile().needsUpdateThumbnail()){
mProgressWheel.setVisibility(View.GONE);
mImageView.setImageBitmap(resizedImage);
mImageView.setVisibility(View.VISIBLE);
mBitmap = resizedImage;
} else {
// show thumbnail while loading resized image
Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(
String.valueOf("t" + getFile().getRemoteId()));
if (thumbnail != null){
mImageView.setImageBitmap(thumbnail);
mProgressWheel.setVisibility(View.VISIBLE);
mImageView.setVisibility(View.VISIBLE);
mBitmap = thumbnail;
} else {
thumbnail = ThumbnailsCacheManager.mDefaultImg;
}
// generate new resized image
if (ThumbnailsCacheManager.cancelPotentialThumbnailWork(getFile(), mImageView) &&
mContainerActivity.getStorageManager() != null) {
final ThumbnailsCacheManager.ThumbnailGenerationTask task =
new ThumbnailsCacheManager.ThumbnailGenerationTask(
mImageView, mContainerActivity.getStorageManager(),
mContainerActivity.getStorageManager().getAccount(),
mProgressWheel);
if (resizedImage == null) {
resizedImage = thumbnail;
}
final ThumbnailsCacheManager.AsyncThumbnailDrawable asyncDrawable =
new ThumbnailsCacheManager.AsyncThumbnailDrawable(
MainApp.getAppContext().getResources(),
resizedImage,
task
);
mImageView.setImageDrawable(asyncDrawable);
task.execute(getFile(), false);
}
}
} else {
mLoadBitmapTask = new LoadBitmapTask(mImageView, mMessageView, mProgressWheel);
mLoadBitmapTask.execute(getFile());
}
}
}
@@ -305,9 +357,15 @@ public class PreviewImageFragment extends FileFragment {
return true;
}
case R.id.action_send_file: {
mContainerActivity.getFileOperationsHelper().sendDownloadedFile(getFile());
return true;
if (MimeTypeUtil.isImage(getFile()) && !getFile().isDown()){
mContainerActivity.getFileOperationsHelper().sendCachedImage(getFile());
return true;
} else {
mContainerActivity.getFileOperationsHelper().sendDownloadedFile(getFile());
return true;
}
}
case R.id.action_download_file:
case R.id.action_sync_file: {
mContainerActivity.getFileOperationsHelper().syncFile(getFile());
return true;
@@ -103,17 +103,17 @@ public class PreviewImagePagerAdapter extends FragmentStatePagerAdapter {
Fragment fragment = null;
if (file.isDown()) {
fragment = PreviewImageFragment.newInstance(file,
mObsoletePositions.contains(Integer.valueOf(i)));
} else if (mDownloadErrors.contains(Integer.valueOf(i))) {
fragment = FileDownloadFragment.newInstance(file, mAccount, true);
((FileDownloadFragment)fragment).setError(true);
mDownloadErrors.remove(Integer.valueOf(i));
mObsoletePositions.contains(Integer.valueOf(i)), false);
} else {
fragment = FileDownloadFragment.newInstance(
file, mAccount, mObsoletePositions.contains(Integer.valueOf(i))
);
if (mDownloadErrors.contains(Integer.valueOf(i))) {
fragment = FileDownloadFragment.newInstance(file, mAccount, true);
((FileDownloadFragment)fragment).setError(true);
mDownloadErrors.remove(Integer.valueOf(i));
} else {
fragment = PreviewImageFragment.newInstance(file,
mObsoletePositions.contains(Integer.valueOf(i)), true);
}
}
mObsoletePositions.remove(Integer.valueOf(i));
return fragment;
@@ -20,6 +20,8 @@
package com.owncloud.android.ui.preview;
import android.accounts.Account;
import android.accounts.AuthenticatorException;
import android.accounts.OperationCanceledException;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
@@ -35,6 +37,8 @@ import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import android.media.MediaPlayer.OnErrorListener;
import android.media.MediaPlayer.OnPreparedListener;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.IBinder;
import android.support.v7.app.AlertDialog;
@@ -50,19 +54,28 @@ import android.widget.ImageView;
import android.widget.Toast;
import android.widget.VideoView;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.files.FileMenuFilter;
import com.owncloud.android.lib.common.OwnCloudAccount;
import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
import com.owncloud.android.lib.common.OwnCloudCredentials;
import com.owncloud.android.lib.common.accounts.AccountUtils;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.media.MediaControlView;
import com.owncloud.android.media.MediaService;
import com.owncloud.android.media.MediaServiceBinder;
import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.dialog.ConfirmationDialogFragment;
import com.owncloud.android.ui.dialog.RemoveFilesDialogFragment;
import com.owncloud.android.ui.fragment.FileFragment;
import com.owncloud.android.utils.MimeTypeUtil;
import java.io.IOException;
/**
* This fragment shows a preview of a downloaded media file (audio or video).
@@ -73,8 +86,7 @@ import com.owncloud.android.utils.MimeTypeUtil;
* By now, if the {@link OCFile} passed is not downloaded, an {@link IllegalStateException} is
* generated on instantiation too.
*/
public class PreviewMediaFragment extends FileFragment implements
OnTouchListener {
public class PreviewMediaFragment extends FileFragment implements OnTouchListener {
public static final String EXTRA_FILE = "FILE";
public static final String EXTRA_ACCOUNT = "ACCOUNT";
@@ -96,7 +108,6 @@ public class PreviewMediaFragment extends FileFragment implements
private static final String TAG = PreviewMediaFragment.class.getSimpleName();
/**
* Creates a fragment to preview a file.
* <p/>
@@ -133,7 +144,6 @@ public class PreviewMediaFragment extends FileFragment implements
mAutoplay = true;
}
/**
* {@inheritDoc}
*/
@@ -143,7 +153,6 @@ public class PreviewMediaFragment extends FileFragment implements
setHasOptionsMenu(true);
}
/**
* {@inheritDoc}
*/
@@ -165,7 +174,6 @@ public class PreviewMediaFragment extends FileFragment implements
return mView;
}
/**
* {@inheritDoc}
*/
@@ -182,10 +190,6 @@ public class PreviewMediaFragment extends FileFragment implements
if (mAccount == null) {
throw new IllegalStateException("Instanced with a NULL ownCloud Account");
}
if (!file.isDown()) {
throw new IllegalStateException("There is no local file to preview");
}
}
else {
file = (OCFile) savedInstanceState.getParcelable(PreviewMediaFragment.EXTRA_FILE);
@@ -196,7 +200,7 @@ public class PreviewMediaFragment extends FileFragment implements
mAutoplay = savedInstanceState.getBoolean(PreviewMediaFragment.EXTRA_PLAYING);
}
if (file != null && file.isDown()) {
if (file != null) {
if (MimeTypeUtil.isVideo(file)) {
mVideoPreview.setVisibility(View.VISIBLE);
mImagePreview.setVisibility(View.GONE);
@@ -235,7 +239,6 @@ public class PreviewMediaFragment extends FileFragment implements
}
}
/**
* {@inheritDoc}
*/
@@ -266,14 +269,13 @@ public class PreviewMediaFragment extends FileFragment implements
}
}
@Override
public void onStart() {
super.onStart();
Log_OC.v(TAG, "onStart");
OCFile file = getFile();
if (file != null && file.isDown()) {
if (file != null) {
if (MimeTypeUtil.isAudio(file)) {
bindMediaService();
@@ -287,14 +289,12 @@ public class PreviewMediaFragment extends FileFragment implements
}
}
private void stopAudio() {
Intent i = new Intent(getActivity(), MediaService.class);
i.setAction(MediaService.ACTION_STOP_ALL);
getActivity().startService(i);
}
/**
* {@inheritDoc}
*/
@@ -304,7 +304,6 @@ public class PreviewMediaFragment extends FileFragment implements
inflater.inflate(R.menu.file_actions_menu, menu);
}
/**
* {@inheritDoc}
*/
@@ -345,7 +344,6 @@ public class PreviewMediaFragment extends FileFragment implements
}
}
/**
* {@inheritDoc}
*/
@@ -390,7 +388,6 @@ public class PreviewMediaFragment extends FileFragment implements
}
}
/**
* Update the file of the fragment with file value
*
@@ -429,11 +426,67 @@ public class PreviewMediaFragment extends FileFragment implements
// create and prepare control panel for the user
mMediaController.setMediaPlayer(mVideoPreview);
// load the video file in the video player ;
Uri videoUri;
// load the video file in the video player ;
// when done, VideoHelper#onPrepared() will be called
mVideoPreview.setVideoURI(getFile().getStorageUri());
if (getFile().isDown()) {
videoUri = getFile().getStorageUri();
} else {
Context context = MainApp.getAppContext();
videoUri = generateUrlWithCredentials(mAccount, context, getFile());
}
mVideoPreview.setVideoURI(videoUri);
}
public static Uri generateUrlWithCredentials(Account account, Context context, OCFile file){
OwnCloudAccount ocAccount = null;
try {
ocAccount = new OwnCloudAccount(account, context);
final ClientGenerationTask task = new ClientGenerationTask();
task.execute(ocAccount);
OwnCloudClient mClient = task.get();
String url = AccountUtils.constructFullURLForAccount(context, account)
+ Uri.encode(file.getRemotePath(), "/");
OwnCloudCredentials credentials = mClient.getCredentials();
return Uri.parse(url.replace("//", "//" + credentials.getUsername() + ":" + credentials.getAuthToken() +
"@"));
} catch (AccountUtils.AccountNotFoundException e) {
Log_OC.e(TAG,"Couldn't create streaming URI - Account missing", e);
} catch (Exception e) {
Log_OC.e(TAG,"Couldn't create streaming URI", e);
}
return null;
}
public static class ClientGenerationTask extends AsyncTask<Object, Void, OwnCloudClient> {
@Override
protected OwnCloudClient doInBackground(Object... params) {
Object account = params[0];
if (account instanceof OwnCloudAccount){
try {
OwnCloudAccount ocAccount = (OwnCloudAccount) account;
return OwnCloudClientManagerFactory.getDefaultSingleton().
getClientFor(ocAccount, MainApp.getAppContext());
} catch (AccountUtils.AccountNotFoundException e) {
Log_OC.e(TAG,"Couldn't create Nc client - Account missing", e);
} catch (OperationCanceledException e) {
Log_OC.e(TAG,"Couldn't create Nc client - Operation canceled", e);
} catch (AuthenticatorException e) {
Log_OC.e(TAG,"Couldn't create Nc client - Authentication error", e);
} catch (IOException e) {
Log_OC.e(TAG,"Couldn't create Nc client - I/O error", e);
}
}
return null;
}
}
private class VideoHelper implements OnCompletionListener, OnPreparedListener, OnErrorListener {
@@ -456,7 +509,6 @@ public class PreviewMediaFragment extends FileFragment implements
mPrepared = true;
}
/**
* Called when the file is finished playing.
* <p/>
@@ -473,7 +525,6 @@ public class PreviewMediaFragment extends FileFragment implements
mMediaController.updatePausePlay();
}
/**
* Called when an error in playback occurs.
*
@@ -483,7 +534,6 @@ public class PreviewMediaFragment extends FileFragment implements
*/
@Override
public boolean onError(MediaPlayer mp, int what, int extra) {
Log_OC.e(TAG, "Error in video playback, what = " + what + ", extra = " + extra);
if (mVideoPreview.getWindowToken() != null) {
String message = MediaService.getMessageForMediaError(
getActivity(), what, extra);
@@ -501,10 +551,8 @@ public class PreviewMediaFragment extends FileFragment implements
}
return true;
}
}
@Override
public void onPause() {
Log_OC.v(TAG, "onPause");
@@ -553,7 +601,6 @@ public class PreviewMediaFragment extends FileFragment implements
return false;
}
private void startFullScreenVideo() {
Intent i = new Intent(getActivity(), PreviewVideoActivity.class);
i.putExtra(FileActivity.EXTRA_ACCOUNT, mAccount);
@@ -586,7 +633,6 @@ public class PreviewMediaFragment extends FileFragment implements
if (!mMediaServiceBinder.isPlaying(file)) {
Log_OC.d(TAG, "starting playback of " + file.getStoragePath());
mMediaServiceBinder.start(mAccount, file, mAutoplay, mSavedPlaybackPosition);
}
else {
if (!mMediaServiceBinder.isPlaying() && mAutoplay) {
@@ -602,11 +648,14 @@ public class PreviewMediaFragment extends FileFragment implements
if (mMediaServiceConnection == null) {
mMediaServiceConnection = new MediaServiceConnection();
}
getActivity().bindService( new Intent(getActivity(),
MediaService.class),
mMediaServiceConnection,
Context.BIND_AUTO_CREATE);
// follow the flow in MediaServiceConnection#onServiceConnected(...)
getActivity().bindService(
new Intent(getActivity(), MediaService.class),
mMediaServiceConnection,
Context.BIND_AUTO_CREATE
);
// follow the flow in MediaServiceConnection#onServiceConnected(...)
((FileDisplayActivity) getActivity()).setMediaServiceConnection();
}
/** Defines callbacks for service binding, passed to bindService() */
@@ -658,7 +707,6 @@ public class PreviewMediaFragment extends FileFragment implements
}
}
/**
* Opens the previewed file with an external application.
*/
@@ -679,7 +727,6 @@ public class PreviewMediaFragment extends FileFragment implements
return (file != null && (MimeTypeUtil.isAudio(file) || MimeTypeUtil.isVideo(file)));
}
public void stopPreview(boolean stopAudio) {
OCFile file = getFile();
if (MimeTypeUtil.isAudio(file) && stopAudio) {
@@ -693,7 +740,6 @@ public class PreviewMediaFragment extends FileFragment implements
}
}
/**
* Finishes the preview
*/
@@ -701,7 +747,6 @@ public class PreviewMediaFragment extends FileFragment implements
getActivity().onBackPressed();
}
public int getPosition() {
if (mPrepared) {
mSavedPlaybackPosition = mVideoPreview.getCurrentPosition();
@@ -716,5 +761,4 @@ public class PreviewMediaFragment extends FileFragment implements
}
return mAutoplay;
}
}
@@ -38,9 +38,9 @@ import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.common.accounts.AccountUtils;
import com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.utils.MimeTypeUtil;
import com.owncloud.android.media.MediaService;
import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.utils.MimeTypeUtil;
/**
* Activity implementing a basic video player.
@@ -206,14 +206,9 @@ public class PreviewVideoActivity extends FileActivity implements OnCompletionLi
mVideoPlayer.setVideoURI(file.getStorageUri());
} else {
// not working yet
String url;
try {
url = AccountUtils.constructFullURLForAccount(this, getAccount()) + file.getRemotePath();
mVideoPlayer.setVideoURI(Uri.parse(url));
} catch (AccountNotFoundException e) {
onError(null, MediaService.OC_MEDIA_ERROR, R.string.media_err_no_account);
}
Uri uri = PreviewMediaFragment.generateUrlWithCredentials(getAccount(), getApplicationContext(),
getFile());
mVideoPlayer.setVideoURI(uri);
}
// create and prepare control panel for the user
@@ -101,24 +101,20 @@ public class DisplayUtils {
* <li>rounds the size based on the suffix to 0,1 or 2 decimals</li>
* </ul>
*
* @param bytes Input file size
* @param bytes Input file size
* @return something readable like "12 MB", {@link com.owncloud.android.R.string#common_pending} for negative
* byte values
*/
public static String bytesToHumanReadable(long bytes) {
if (bytes < 0) {
return MainApp.getAppContext().getString(R.string.common_pending);
} else {
double result = bytes;
int suffixIndex = 0;
while (result > 1024 && suffixIndex < sizeSuffixes.length) {
result /= 1024.;
suffixIndex++;
}
return new BigDecimal(String.valueOf(result)).setScale(
sizeScales[suffixIndex], BigDecimal.ROUND_HALF_UP) + " " + sizeSuffixes[suffixIndex];
double result = bytes;
int suffixIndex = 0;
while (result > 1024 && suffixIndex < sizeSuffixes.length) {
result /= 1024.;
suffixIndex++;
}
return new BigDecimal(String.valueOf(result)).setScale(
sizeScales[suffixIndex], BigDecimal.ROUND_HALF_UP) + " " + sizeSuffixes[suffixIndex];
}
/**
@@ -49,15 +49,10 @@ import java.net.SocketTimeoutException;
/**
* Class to choose proper error messages to show to the user depending on the results of operations,
* always following the same policy
* always following the same policy.
*/
public class ErrorMessageAdapter {
public ErrorMessageAdapter() {
}
public static String getErrorCauseMessage(RemoteOperationResult result,
RemoteOperation operation, Resources res) {
@@ -0,0 +1,95 @@
package com.owncloud.android.utils;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import com.owncloud.android.ui.activity.ErrorReportActivity;
import java.io.PrintWriter;
import java.io.StringWriter;
// from https://stackoverflow.com/questions/23486627/catching-error-and-user-information#answer-23486834
public class ExceptionHandler implements Thread.UncaughtExceptionHandler {
private final Context mContext;
private static final String TAG = com.owncloud.android.ui.errorhandling.ExceptionHandler.class.getSimpleName();
public ExceptionHandler(Context context) {
mContext = context;
}
@Override
public void uncaughtException(Thread arg0, Throwable exception) {
Log.e(TAG, "ExceptionHandler caught UncaughtException", exception);
StringWriter stackTrace = new StringWriter();
exception.printStackTrace(new PrintWriter(stackTrace));
final StringBuilder errorReport = new StringBuilder(192);
final String LINE_SEPARATOR = "\n";
errorReport.append("************ CAUSE OF ERROR ************\n\n")
.append(stackTrace.toString())
.append("\n************ DEVICE INFORMATION ***********\nBrand: ")
.append(Build.BRAND)
.append(LINE_SEPARATOR)
.append("Device: ")
.append(Build.DEVICE)
.append(LINE_SEPARATOR)
.append("Model: ")
.append(Build.MODEL)
.append(LINE_SEPARATOR)
.append("Id: ")
.append(Build.ID)
.append(LINE_SEPARATOR)
.append("Product: ")
.append(Build.PRODUCT)
.append(LINE_SEPARATOR)
.append("\n************ FIRMWARE ************\nSDK: ")
.append(Build.VERSION.SDK_INT)
.append(LINE_SEPARATOR)
.append("Release: ")
.append(Build.VERSION.RELEASE)
.append(LINE_SEPARATOR)
.append("Incremental: ")
.append(Build.VERSION.INCREMENTAL)
.append(LINE_SEPARATOR);
//after this you can do whatever you want , like i start an activity and show error log there
if (isUIThread()) {
invokeLogActivity(errorReport);
} else { //handle non UI thread throw uncaught exception
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
invokeLogActivity(errorReport);
}
});
}
}
private void invokeLogActivity(StringBuilder errorReport){
// Intent sendIntent = new Intent();
// sendIntent.setAction(Intent.ACTION_SEND);
// sendIntent.putExtra(Intent.EXTRA_TEXT, errorReport.toString());
// sendIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// sendIntent.setType("text/plain");
// context.startActivity(sendIntent);
Intent sendIntent = new Intent(mContext, ErrorReportActivity.class);
sendIntent.putExtra(Intent.EXTRA_TEXT, errorReport.toString());
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
sendIntent.setType("text/plain");
mContext.startActivity(sendIntent);
android.os.Process.killProcess(android.os.Process.myPid());
System.exit(1);
}
private boolean isUIThread() {
return Looper.getMainLooper().getThread() == Thread.currentThread();
}
}
+11 -5
View File
@@ -24,6 +24,7 @@ import android.accounts.Account;
import android.content.Context;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Environment;
import android.preference.PreferenceManager;
import android.webkit.MimeTypeMap;
@@ -91,7 +92,7 @@ public class FileStorageUtils {
* Get absolute path to tmp folder inside datafolder in sd-card for given accountName.
*/
public static String getTemporalPath(String accountName) {
return MainApp.getStoragePath()
return Environment.getExternalStorageDirectory().getAbsolutePath()
+ File.separator
+ MainApp.getDataFolder()
+ File.separator
@@ -114,7 +115,12 @@ public class FileStorageUtils {
}
public static String getLogPath() {
return MainApp.getStoragePath() + File.separator + MainApp.getDataFolder() + File.separator + "log";
return MainApp.getStoragePath()
+ File.separator
+ MainApp.getDataFolder()
+ MainApp.getAppContext().getResources().getString(R.string.log_name)
+ File.separator
+ "log";
}
/**
@@ -258,14 +264,14 @@ public class FileStorageUtils {
return files;
}
/**
* Sorts list by Date
* @param files
*/
public static Vector<OCFile> sortOCFilesByDate(Vector<OCFile> files){
final int multiplier = mSortAscending ? 1 : -1;
Collections.sort(files, new Comparator<OCFile>() {
@SuppressFBWarnings(value = "Bx", justification = "Would require stepping up API level")
public int compare(OCFile o1, OCFile o2) {
@@ -273,7 +279,7 @@ public class FileStorageUtils {
return multiplier * obj1.compareTo(o2.getModificationTimestamp());
}
});
return files;
}
@@ -19,7 +19,7 @@
*/
package com.owncloud.android.providers;
package org.nextcloud.providers;
import android.accounts.Account;
import android.app.SearchManager;
@@ -72,7 +72,7 @@ public class UsersAndGroupsSearchProvider extends ContentProvider {
private static final int RESULTS_PER_PAGE = 50;
private static final int REQUESTED_PAGE = 1;
public static final String AUTHORITY = "com.nextcloud.android.providers.UsersAndGroupsSearchProvider";
public static final String AUTHORITY = "org.nextcloud.beta.android.providers.UsersAndGroupsSearchProvider";
public static final String ACTION_SHARE_WITH = AUTHORITY + ".action.SHARE_WITH";
public static final String CONTENT = "content";