Compare commits

...
773 Commits
Author SHA1 Message Date
Tobias Kaminsky 3cef68fab1 update dev 2017-08-02 2017-08-02 10:04:53 +02:00
tobiasKaminsky 2ac1b83896 Merge remote-tracking branch 'origin/dev' into dev 2017-08-02 10:03:44 +02:00
Tobias Kaminsky 2adf648391 update dev 2017-08-02 2017-08-02 09:58:45 +02:00
Tobias Kaminsky b4a85463b3 Merge remote-tracking branch 'nextcloud/master' into dev 2017-08-02 09:58:39 +02:00
Tobias Kaminsky 0c252ee628 Merge remote-tracking branch 'nextcloud/resizedImages' into dev 2017-08-02 09:58:37 +02:00
tobiasKaminsky a28ffbcb04 send resized image 2017-08-02 08:36:45 +02:00
tobiasKaminsky e1201af5da remove duplicated @NonNull 2017-08-02 08:11:46 +02:00
Tobias Kaminsky 3191d52845 update dev 2017-08-02 2017-08-02 00:30:47 +02:00
tobiasKaminsky 39c63d5402 Merge remote-tracking branch 'nextcloud/reduceLintErrors' into dev
# Conflicts:
#	scripts/lint/lint-results.txt
#	src/main/java/com/owncloud/android/ui/dialog/ConflictsResolveDialog.java
2017-08-01 16:01:54 +02:00
tobiasKaminsky a70028f6ff Merge remote-tracking branch 'nextcloud/domAPI' into dev
# Conflicts:
#	scripts/lint/lint-results.txt
#	src/main/res/values-sq/strings.xml
2017-08-01 16:01:37 +02:00
nextcloud-android-bot 28b86fea57 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-08-01 13:04:35 +00:00
Tobias Kaminsky 9ca37d4de6 Merge 58832b176d into 12cd1ba651 2017-08-01 12:03:33 +00:00
tobiasKaminsky 58832b176d fix: Wrong argument count, format string media_event_done requires 1 but format call supplies 0 2017-08-01 14:03:16 +02:00
nextcloud-android-bot 8f80f7ce57 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-08-01 10:13:11 +00:00
nextcloud-android-bot abf952c919 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-08-01 10:11:21 +00:00
Tobias Kaminsky 6a71cac2a2 Merge bd897d856c into 12cd1ba651 2017-08-01 10:07:39 +00:00
tobiasKaminsky bd897d856c enabling dom storage api 2017-08-01 12:06:52 +02:00
Tobias Kaminsky 393874eab6 Merge da5f6ef7e1 into 12cd1ba651 2017-08-01 09:59:00 +00:00
tobiasKaminsky da5f6ef7e1 Merge remote-tracking branch 'remotes/origin/master' into reduceErrors 2017-08-01 11:58:23 +02:00
tobiasKaminsky e5bbb7101c Merge remote-tracking branch 'remotes/origin/master' into reduceErrors 2017-08-01 11:31:54 +02:00
tobiasKaminsky c7d605c9d7 remove path 2017-08-01 11:11:01 +02:00
tobiasKaminsky fba917684c Conflict_message does not show file name/remote path so removing 2017-08-01 11:08:42 +02:00
tobiasKaminsky 0dcf16c362 String "Do you not have a server yet?\nClick here to get one from a provider" does not contain name 2017-08-01 10:49:28 +02:00
tobiasKaminsky 6763093efd fix: AppCompatActivity.invalidateOptionsMenu can only be called from within the same library group (groupId=com.android.support) 2017-08-01 10:37:59 +02:00
tobiasKaminsky 28e7caedda fix: Call requires API level 23 (current min is 14): isFingerprintReady 2017-08-01 10:30:23 +02:00
tobiasKaminsky d8cf4f8464 fix: The WIFI_SERVICE must be looked up on the Application context or memory will leak on devices < Android N. Try changing to .getApplicationContext() 2017-08-01 10:08:32 +02:00
Tobias Kaminsky 8724aa8ca2 daily dev 20170801 2017-08-01 00:38:22 +02:00
Tobias Kaminsky d7923e4808 update dev 2017-08-01 2017-08-01 00:30:54 +02:00
Tobias Kaminsky aa06d482f4 Merge remote-tracking branch 'nextcloud/master' into dev 2017-08-01 00:30:49 +02:00
tobiasKaminsky 19bc97c748 Merge remote-tracking branch 'remotes/origin/errorFeedback' into dev
# Conflicts:
#	src/main/java/com/owncloud/android/ui/activity/Preferences.java
2017-07-31 16:34:58 +02:00
tobiasKaminsky 4f6062d634 Merge remote-tracking branch 'remotes/origin/errorFeedback' into dev
# Conflicts:
#	src/main/java/com/owncloud/android/ui/activity/Preferences.java
2017-07-31 16:32:59 +02:00
Tobias Kaminsky 4c12656aef daily dev 20170731 2017-07-31 00:38:41 +02:00
Tobias Kaminsky 20691aec12 update dev 2017-07-31 2017-07-31 00:30:44 +02:00
Tobias Kaminsky 486cafea32 Merge remote-tracking branch 'nextcloud/master' into dev 2017-07-31 00:30:39 +02:00
Tobias Kaminsky 912ab03f95 daily dev 20170730 2017-07-30 00:38:29 +02:00
Tobias Kaminsky ebe0078618 update dev 2017-07-30 2017-07-30 00:31:03 +02:00
Tobias Kaminsky b0d7798f44 Merge remote-tracking branch 'nextcloud/master' into dev 2017-07-30 00:30:54 +02:00
Tobias Kaminsky 0459dabbe5 daily dev 20170729 2017-07-29 00:38:33 +02:00
Tobias Kaminsky 941c55e827 update dev 2017-07-29 2017-07-29 00:31:14 +02:00
Tobias Kaminsky 7ea3c81b9a Merge remote-tracking branch 'nextcloud/master' into dev 2017-07-29 00:31:12 +02:00
Tobias Kaminsky 2472fa28ab Merge remote-tracking branch 'nextcloud/folderObserver' into dev 2017-07-29 00:31:10 +02:00
Tobias Kaminsky f24981f70f Merge remote-tracking branch 'nextcloud/newWebLoginUntrustedCert' into dev 2017-07-29 00:31:04 +02:00
Tobias Kaminsky 2d656768c2 Merge remote-tracking branch 'nextcloud/showEmptyMessageAgain' into dev 2017-07-29 00:31:00 +02:00
Tobias Kaminsky 02541fb15c Merge remote-tracking branch 'nextcloud/emptyMessageReceiveExternalFiles' into dev 2017-07-29 00:30:53 +02:00
nextcloud-android-bot bf2d7904b3 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-28 13:11:40 +00:00
Andy Scherzinger 5c7a9ead2d Merge 6640923b34 into 13b841b67f 2017-07-28 13:01:27 +00:00
AndyScherzinger 6640923b34 Merge branch 'errorFeedback' of https://github.com/nextcloud/android into errorFeedback 2017-07-28 15:01:13 +02:00
AndyScherzinger 3b9bc59ec6 remove unused paddings (lint) 2017-07-28 15:00:53 +02:00
AndyScherzinger f7ec2264c5 Merge branch 'master' of https://github.com/nextcloud/android into dev
# Conflicts:
#	scripts/lint/lint-results.txt
#	src/main/res/values-es-rMX/strings.xml
2017-07-28 14:53:00 +02:00
tobiasKaminsky 732a65ca09 show empty message when receiving external files 2017-07-28 14:49:22 +02:00
tobiasKaminsky 237c3f48cb show empty message again 2017-07-28 14:48:46 +02:00
AndyScherzinger 85745e05fd remove codacy warnings 2017-07-28 14:46:40 +02:00
AndyScherzinger a6d3eb42ba remove unused dialog layout 2017-07-28 14:46:40 +02:00
AndyScherzinger 120a98c145 remove lint warnings 2017-07-28 14:46:40 +02:00
AndyScherzinger 76fa26bf71 Login error messages oC/1897 2017-07-28 14:46:39 +02:00
AndyScherzinger 1488aa2463 Improve error feedback oC/1881 2017-07-28 14:46:39 +02:00
tobiaskaminsky 7dd2ef968f comment out adding new downloadedf files to folder observer 2017-07-28 14:44:32 +02:00
AndyScherzinger 768223ba59 remove codacy warnings 2017-07-28 14:21:35 +02:00
AndyScherzinger 81ec210030 remove unused dialog layout 2017-07-28 14:21:35 +02:00
AndyScherzinger b3b656a02b remove lint warnings 2017-07-28 14:21:35 +02:00
AndyScherzinger 465d7e65c5 Login error messages oC/1897 2017-07-28 14:21:34 +02:00
AndyScherzinger 7fbdaaaf42 Improve error feedback oC/1881 2017-07-28 14:21:34 +02:00
Tobias Kaminsky 59f94d441b update dev 2017-07-28 2017-07-28 00:30:58 +02:00
Tobias Kaminsky ead643153d daily dev 20170727 2017-07-27 00:36:58 +02:00
Tobias Kaminsky 9649a23e7c update dev 2017-07-27 2017-07-27 00:31:14 +02:00
Tobias Kaminsky 088b99881c Merge remote-tracking branch 'nextcloud/showEmptyMessageAgain' into dev 2017-07-27 00:31:04 +02:00
Tobias Kaminsky 20223b6e39 daily dev 20170726 2017-07-26 00:38:57 +02:00
Tobias Kaminsky 14f7e27775 update dev 2017-07-26 2017-07-26 00:31:05 +02:00
Tobias Kaminsky f7d7cc282b Merge remote-tracking branch 'nextcloud/emptyMessageReceiveExternalFiles' into dev 2017-07-26 00:30:55 +02:00
nextcloud-android-bot 9e0e7646c9 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-26 00:30:36 +02:00
tobiasKaminsky 9569b494c4 show empty message again 2017-07-26 00:30:36 +02:00
nextcloud-android-bot 252d14d758 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-26 00:28:12 +02:00
tobiasKaminsky 37d458f13c show empty message when receiving external files 2017-07-26 00:28:12 +02:00
tobiasKaminsky 11e7657308 Merge remote-tracking branch 'nextcloud/dev-base' into dev 2017-07-25 16:30:13 +02:00
tobiasKaminsky e73f0de06a Merge remote-tracking branch 'nextcloud/folderObserver' into dev
# Conflicts:
#	scripts/lint/lint-results.txt
2017-07-25 16:30:10 +02:00
tobiasKaminsky 67a1d0ab39 Merge remote-tracking branch 'nextcloud/new_details_view_animations' into dev
# Conflicts:
#	scripts/lint/lint-results.txt
#	src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java
#	src/main/res/layout-land/account_setup.xml
#	src/main/res/values-sq/strings.xml
#	src/main/res/values/strings.xml
2017-07-25 16:30:03 +02:00
tobiasKaminsky 2c97fdbc5b Merge remote-tracking branch 'nextcloud/autoUploadCrashIfFilepathIsNull' into dev
# Conflicts:
#	scripts/lint/lint-results.txt
2017-07-25 16:28:44 +02:00
tobiasKaminsky 8e769f3dee Merge remote-tracking branch 'nextcloud/dailyBackupString' into dev
# Conflicts:
#	scripts/lint/lint-results.txt
2017-07-25 16:28:37 +02:00
tobiasKaminsky db9faef791 Merge remote-tracking branch 'nextcloud/showEmptyMessageAgain' into dev 2017-07-25 16:28:30 +02:00
tobiasKaminsky d3a0a22054 Merge remote-tracking branch 'nextcloud/emptyMessageReceiveExternalFiles' into dev
# Conflicts:
#	scripts/lint/lint-results.txt
2017-07-25 16:28:29 +02:00
tobiasKaminsky d7bbbeb8d0 Merge remote-tracking branch 'nextcloud/participateUrls' into dev
# Conflicts:
#	scripts/lint/lint-results.txt
#	src/main/res/values-es-rMX/strings.xml
2017-07-25 16:28:15 +02:00
tobiasKaminsky 74d3d0e861 always use newest lint-results --> try to avoid conflict 2017-07-25 16:27:26 +02:00
tobiasKaminsky 62ff71c7d7 always use newest lint-results --> try to avoid conflict 2017-07-25 16:26:52 +02:00
AndyScherzinger b485a43124 put variables to the top of the class 2017-07-25 13:57:55 +02:00
AndyScherzinger d0772cebda fix codacy warning 2017-07-25 13:57:54 +02:00
nextcloud-android-bot 852948c392 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-25 13:57:54 +02:00
nextcloud-android-bot 68451f9158 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-25 13:57:53 +02:00
AndyScherzinger 89a25330c5 code review 2017-07-25 13:57:53 +02:00
AndyScherzinger 33a2d9bf58 remove unused icon work 2017-07-25 13:57:52 +02:00
AndyScherzinger d2b8d547f2 remove unused icon work 2017-07-25 13:57:52 +02:00
AndyScherzinger 95baebb266 theme loading progress bar 2017-07-25 13:57:51 +02:00
AndyScherzinger 7af7d35764 replace deprecated android:singleLine with android:maxLines=1 2017-07-25 13:57:51 +02:00
AndyScherzinger 807f6cd685 raising padding on headline 2017-07-25 13:57:50 +02:00
AndyScherzinger 485b35d57f theming for zip icon 2017-07-25 13:57:50 +02:00
AndyScherzinger 0520619991 theme new details screen 2017-07-25 13:57:49 +02:00
AndyScherzinger 55035433c2 theming fixes for ProgressBar elements 2017-07-25 13:57:49 +02:00
AndyScherzinger f846cd6ba5 re-use existing view for better performance 2017-07-25 13:57:48 +02:00
AndyScherzinger e5c6f628e9 use proper mini headline styling using material body2 definition 2017-07-25 13:57:48 +02:00
AndyScherzinger df60247703 avoid re-assigning of var 2017-07-25 13:57:47 +02:00
AndyScherzinger 5d4b919126 codacy 2017-07-25 13:57:47 +02:00
AndyScherzinger 7f7775e171 Fix headline coloring 2017-07-25 13:57:46 +02:00
AndyScherzinger 96732fa4a5 fixed cherry picked new details 2017-07-25 13:57:46 +02:00
AndyScherzinger 8285c9bafa adapt to cherry pick 2017-07-25 13:57:45 +02:00
masensio a1ea1a3dcc Review some text sizes in details view 2017-07-25 13:57:45 +02:00
masensio 7fb8c6fe8a Review some margins in details view. Add method to show more than one item in share users list view (details view) 2017-07-25 13:57:44 +02:00
masensio 0174e42ac8 Fix favourite feature from details view 2017-07-25 13:57:44 +02:00
masensio 7d9ffe1110 Add share users to details view 2017-07-25 13:57:43 +02:00
masensio ff0115e139 Remove old file_details_fragment.xml
# Conflicts:
#	res/layout/file_details_fragment.xml
2017-07-25 13:57:43 +02:00
masensio 9b3b03cb75 Add share data to details view layout
# Conflicts:
#	owncloud-android-library
#	res/layout/file_details_fragment_new.xml
#	res/values/strings.xml
#	src/com/owncloud/android/ui/fragment/FileDetailFragment.java
2017-07-25 13:57:42 +02:00
tobiaskaminsky 6850dd96e0 Merge remote-tracking branch 'remotes/origin/dev-base' into dev 2017-07-25 07:56:45 +02:00
tobiasKaminsky e69ca41338 reset branch after check
send mail, address as parameter
2017-07-25 07:55:51 +02:00
tobiasKaminsky f820ca6b38 if conflicting branches, execute param1 2017-07-25 07:48:54 +02:00
tobiasKaminsky 7d7831ca5b check conflicting branches 2017-07-25 07:45:56 +02:00
Tobias Kaminsky aab09bafe0 daily dev 20170725 2017-07-25 00:41:30 +02:00
Tobias Kaminsky 864b859a44 update dev 2017-07-25 2017-07-25 00:32:05 +02:00
Tobias Kaminsky 5274f77d6a Merge remote-tracking branch 'jsrck/983_hide-folders' into dev 2017-07-25 00:30:50 +02:00
Tobias Kaminsky 585a92f88f update dev 2017-07-24 2017-07-24 08:54:45 +02:00
tobiasKaminsky ef6f19bb3d Merge remote-tracking branch 'remotes/origin/dev-base' into dev 2017-07-24 08:51:26 +02:00
tobiasKaminsky a748296ff3 grep case-insensitive 2017-07-24 08:50:55 +02:00
tobiasKaminsky 412ba319fc Merge remote-tracking branch 'origin/dev' into dev 2017-07-24 08:49:03 +02:00
tobiasKaminsky 8c571543dc Merge remote-tracking branch 'remotes/origin/dev-base' into dev 2017-07-24 08:48:48 +02:00
tobiasKaminsky baaf886493 wrong "updated" string 2017-07-24 08:48:14 +02:00
nextcloud-android-bot 47130fda40 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-24 06:44:16 +00:00
Tobias Kaminsky 563302588b Merge 7b00ec4b87 into affe12961d 2017-07-24 06:37:59 +00:00
tobiasKaminsky 7b00ec4b87 extract html code and make it non-translatable 2017-07-24 08:35:35 +02:00
Tobias Kaminsky effc84e37f daily dev 20170724 2017-07-24 00:41:09 +02:00
Tobias Kaminsky eff5a9fad8 update dev 2017-07-24 2017-07-24 00:31:26 +02:00
nextcloud-android-bot 92888da16d Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-23 15:05:20 +00:00
nextcloud-android-bot b49c0733b4 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-23 15:00:05 +00:00
nextcloud-android-bot 51c41d5a02 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-23 14:59:28 +00:00
Tobias Kaminsky 0d55ff519e Merge 90e9decd7e into 8072e4cdd2 2017-07-23 14:55:45 +00:00
tobiaskaminsky 90e9decd7e comment out adding new downloadedf files to folder observer 2017-07-23 16:55:23 +02:00
nextcloud-android-bot 5d10833038 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-23 14:50:43 +00:00
nextcloud-android-bot 6f2eecac26 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-23 14:48:31 +00:00
Tobias Kaminsky 20c4e4e824 Merge 3b4fe3ffed into 8072e4cdd2 2017-07-23 14:48:23 +00:00
tobiasKaminsky 3b4fe3ffed images can be deleted thus no filepath, but are still in media store.
Failed images are substracted from the "real" count.
2017-07-23 16:48:00 +02:00
tobiasKaminsky 2945f08955 + is now also white 2017-07-23 16:48:00 +02:00
Andy Scherzinger 2557fb878a Merge 6bf051db9b into 8072e4cdd2 2017-07-23 14:47:11 +00:00
AndyScherzinger 6bf051db9b resolves: #1207 make daily contact backup string translatable 2017-07-23 16:46:38 +02:00
Tobias Kaminsky 584aede1b4 Merge 4a5fa7e34d into 8072e4cdd2 2017-07-23 14:39:34 +00:00
tobiasKaminsky 4a5fa7e34d show empty message again 2017-07-23 16:39:07 +02:00
Tobias Kaminsky 01dad337c1 Merge 2e91f5873c into 8072e4cdd2 2017-07-23 14:38:45 +00:00
tobiasKaminsky 2e91f5873c show empty message when receiving external files 2017-07-23 16:38:35 +02:00
AndyScherzinger 8bd51eedb5 Merge branch 'master' of https://github.com/nextcloud/android into dev 2017-07-23 16:35:31 +02:00
Tobias Kaminsky 6c8336975c daily dev 20170723 2017-07-23 00:41:00 +02:00
Tobias Kaminsky 541ab1f0a1 update dev 2017-07-23 2017-07-23 00:31:05 +02:00
Tobias Kaminsky ad9c8598c2 Merge remote-tracking branch 'nextcloud/master' into dev 2017-07-23 00:31:04 +02:00
Tobias Kaminsky 9b4a3885b9 daily dev 20170722 2017-07-22 00:42:09 +02:00
Tobias Kaminsky 106a831462 update dev 2017-07-22 2017-07-22 00:32:28 +02:00
Tobias Kaminsky 5c5cad51bd Merge remote-tracking branch 'jsrck/master' into dev 2017-07-22 00:30:41 +02:00
Jonas Sandrock f46f54fd67 added line break, pull request #1196 2017-07-21 20:02:29 +02:00
tobiasKaminsky 7f065dcff6 Merge remote-tracking branch 'nextcloud/master' into dev 2017-07-21 10:42:25 +02:00
tobiasKaminsky 5f8d24fbc1 Merge remote-tracking branch 'nextcloud/resizedImages' into dev
# Conflicts:
#	scripts/lint/lint-results.txt
#	src/main/res/values-es-rMX/strings.xml
2017-07-21 10:42:25 +02:00
tobiasKaminsky 796a997a68 Merge remote-tracking branch 'nextcloud/emptyMessageReceiveExternalFiles' into dev 2017-07-21 10:41:44 +02:00
tobiasKaminsky e57709b1cf Merge remote-tracking branch 'jsrck/315-recommend' into dev
# Conflicts:
#	scripts/lint/lint-results.txt
2017-07-21 10:41:43 +02:00
Tobias Kaminsky 11db3ca799 update dev 2017-07-21 2017-07-21 10:33:17 +02:00
Tobias Kaminsky 5c189a7ff7 update dev 2017-07-21 2017-07-21 10:25:23 +02:00
tobiasKaminsky 38a0afb21b Merge remote-tracking branch 'remotes/origin/dev-base' into dev 2017-07-21 09:03:13 +02:00
tobiasKaminsky 8e661485ee show time in update file 2017-07-21 09:02:43 +02:00
Tobias Kaminsky 75afc1c3bc update dev 2017-07-21 2017-07-21 08:57:58 +02:00
Tobias Kaminsky 7c2e1d4c5c Merge remote-tracking branch 'jsrck/master' into dev 2017-07-21 08:57:41 +02:00
Tobias Kaminsky 28466b1c71 Merge remote-tracking branch 'nextcloud/showEmptyMessageAgain' into dev 2017-07-21 08:57:28 +02:00
Tobias Kaminsky 7e867bd21e update dev 2017-07-21 2017-07-21 07:24:23 +02:00
Tobias Kaminsky 7ccc15b6cc daily dev 20170721 2017-07-21 00:40:39 +02:00
Tobias Kaminsky c07c062eba update dev 2017-07-21 2017-07-21 00:30:59 +02:00
Jonas Sandrock effec21892 Enhance recommend to a friend #315 2017-07-20 18:27:48 +02:00
tobiasKaminsky ee77228f8b Merge remote-tracking branch 'origin/dev' into dev 2017-07-20 15:31:40 +02:00
tobiasKaminsky a5a42a91e5 Merge remote-tracking branch 'remotes/origin/dev-base' into dev 2017-07-20 15:31:33 +02:00
tobiasKaminsky 81a668e0f8 echo to file 2017-07-20 15:30:52 +02:00
Tobias Kaminsky 26737bcfac update dev 2017-07-20 2017-07-20 15:29:30 +02:00
tobiasKaminsky b0eac26998 Merge remote-tracking branch 'remotes/origin/dev-base' into dev 2017-07-20 15:15:17 +02:00
tobiasKaminsky f685b1a7ca use conflicting branches as exit code
beautify changelog
2017-07-20 15:14:39 +02:00
tobiasKaminsky 48ca0c28fe show empty message when receiving external files 2017-07-20 14:12:26 +02:00
tobiasKaminsky 2606fda318 show empty message again 2017-07-20 12:26:02 +02:00
nextcloud-android-bot 801b576cc7 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-20 08:38:11 +00:00
Tobias Kaminsky 4837d7e669 Merge e55ec3904c into 15cff7b33d 2017-07-20 08:22:29 +00:00
tobiasKaminsky e55ec3904c Merge remote-tracking branch 'remotes/origin/master' into resizedImages
# Conflicts:
#	src/main/res/values-es-rMX/strings.xml
#	src/main/res/values/strings.xml
2017-07-20 10:22:22 +02:00
tobiasKaminsky a731547dea Merge remote-tracking branch 'remotes/origin/master' into resizedImages
# Conflicts:
#	src/main/res/values-es-rMX/strings.xml
#	src/main/res/values/strings.xml
2017-07-20 10:09:46 +02:00
tobiasKaminsky 2db919d6e2 fix old merge 2017-07-20 10:06:42 +02:00
tobiasKaminsky 2d103c6299 Merge remote-tracking branch 'nextcloud/dev-base' into dev
# Conflicts:
#	build.gradle
#	src/main/res/values/strings.xml
2017-07-20 09:57:26 +02:00
tobiasKaminsky 3c7059f0bc Merge remote-tracking branch 'nextcloud/master' into dev 2017-07-20 09:56:53 +02:00
tobiasKaminsky 07dc1c14e2 Merge remote-tracking branch 'nextcloud/resizedImages' into dev
# Conflicts:
#	src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
2017-07-20 09:56:52 +02:00
tobiasKaminsky 5c334124fb Merge remote-tracking branch 'nextcloud/bugfix-454' into dev
# Conflicts:
#	src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java
#	src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java
#	src/main/java/com/owncloud/android/ui/preview/PreviewTextFragment.java
2017-07-20 09:56:19 +02:00
tobiasKaminsky ae0066edca Merge remote-tracking branch 'nextcloud/folderObserver' into dev 2017-07-20 09:51:53 +02:00
tobiasKaminsky 59888632f1 Merge remote-tracking branch 'nextcloud/new_details_view_animations' into dev 2017-07-20 09:51:52 +02:00
tobiasKaminsky b6d93deebf Merge remote-tracking branch 'nextcloud/autoUploadCrashIfFilepathIsNull' into dev 2017-07-20 09:51:51 +02:00
tobiasKaminsky c9e90d92dc Merge remote-tracking branch 'nextcloud/newWebLoginUntrustedCert' into dev
# Conflicts:
#	scripts/lint/lint-results.txt
2017-07-20 09:51:51 +02:00
tobiasKaminsky 7138fcfe7e Merge remote-tracking branch 'nextcloud/dailyBackupString' into dev
# Conflicts:
#	scripts/lint/lint-results.txt
#	src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java
2017-07-20 09:51:28 +02:00
tobiasKaminsky 55fc0800d6 use real class instead of params to transfer infos to ThumbnailGenerationTask 2017-07-20 09:40:34 +02:00
tobiasKaminsky 4e78a1fe17 on no resized image possible: show snackbar to download full image
note: this only works if the gallery app cannot generate a preview due to unsupported image type and it will fail if the file is corrupt.
2017-07-20 09:09:25 +02:00
tobiasKaminsky aba5f8b026 split up thumbnail and resized generation part 2017-07-20 08:41:11 +02:00
Tobias Kaminsky b52a377cbc update dev 2017-07-20 2017-07-20 00:31:56 +02:00
nextcloud-android-bot a3778d8500 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-19 06:47:48 +00:00
Tobias Kaminsky cb539ce664 Merge 33666acb1e into be778db165 2017-07-19 06:30:33 +00:00
Tobias Kaminsky 33666acb1e Merge branch 'master' into newWebLoginUntrustedCert 2017-07-19 08:30:31 +02:00
tobiasKaminsky 253e60b24a use logger 2017-07-19 08:29:33 +02:00
Tobias Kaminsky a5be86dc51 update dev 2017-07-19 2017-07-19 00:32:02 +02:00
AndyScherzinger 082a16dc1f resolves: #1207 make daily contact backup string translatable 2017-07-18 19:28:29 +02:00
nextcloud-android-bot 9312c9f9f5 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-18 13:14:57 +00:00
Andy Scherzinger 783720f890 Merge d2debf2317 into 58828bfa1e 2017-07-18 13:09:52 +00:00
AndyScherzinger d2debf2317 remove unused icon work 2017-07-18 15:09:14 +02:00
AndyScherzinger ae8ac7572f remove unused icon work 2017-07-18 15:09:14 +02:00
AndyScherzinger d131fab21a theme loading progress bar 2017-07-18 15:09:14 +02:00
AndyScherzinger 5ed1ddd6c5 replace deprecated android:singleLine with android:maxLines=1 2017-07-18 15:09:13 +02:00
AndyScherzinger 375ece2cb9 raising padding on headline 2017-07-18 15:09:13 +02:00
AndyScherzinger 31af29ec5c theming for zip icon 2017-07-18 15:09:13 +02:00
AndyScherzinger 30e4055b3f theme new details screen 2017-07-18 15:09:12 +02:00
AndyScherzinger 8058e01e2e theming fixes for ProgressBar elements 2017-07-18 15:09:12 +02:00
AndyScherzinger d40c94d011 re-use existing view for better performance 2017-07-18 15:09:11 +02:00
AndyScherzinger d984360203 use proper mini headline styling using material body2 definition 2017-07-18 15:09:11 +02:00
AndyScherzinger caf4eb0b7d avoid re-assigning of var 2017-07-18 15:09:11 +02:00
AndyScherzinger abb38517ec codacy 2017-07-18 15:09:10 +02:00
AndyScherzinger a4241ab0c7 Fix headline coloring 2017-07-18 15:09:10 +02:00
AndyScherzinger c2426b5eb5 fixed cherry picked new details 2017-07-18 15:09:10 +02:00
AndyScherzinger 5972e647a8 adapt to cherry pick 2017-07-18 15:09:09 +02:00
masensio 280c052596 Review some text sizes in details view 2017-07-18 15:09:09 +02:00
masensio d5c4626a7a Review some margins in details view. Add method to show more than one item in share users list view (details view) 2017-07-18 15:09:08 +02:00
masensio b8cdd8f860 Fix favourite feature from details view 2017-07-18 15:09:08 +02:00
masensio 3ff68f5626 Add share users to details view 2017-07-18 15:09:08 +02:00
masensio 0a3231d3b4 Remove old file_details_fragment.xml
# Conflicts:
#	res/layout/file_details_fragment.xml
2017-07-18 15:09:07 +02:00
masensio 9abc99bec7 Add share data to details view layout
# Conflicts:
#	owncloud-android-library
#	res/layout/file_details_fragment_new.xml
#	res/values/strings.xml
#	src/com/owncloud/android/ui/fragment/FileDetailFragment.java
2017-07-18 15:08:58 +02:00
nextcloud-android-bot 8122e8c7b5 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-18 12:07:52 +00:00
Tobias Kaminsky b065278cd3 Merge 5f4305734f into aa4e184495 2017-07-18 12:00:26 +00:00
tobiasKaminsky 5f4305734f on receiving untrusted ssl cert, test if it was previous accepted by user, otherwise cancel 2017-07-18 13:58:33 +02:00
tobiasKaminsky d80585e268 images can be deleted thus no filepath, but are still in media store.
Failed images are substracted from the "real" count.
2017-07-18 00:55:42 +02:00
tobiasKaminsky c96b39cd0a + is now also white 2017-07-18 00:55:38 +02:00
Tobias Kaminsky 0939b8e6c0 daily dev 20170718 2017-07-18 00:43:25 +02:00
Tobias Kaminsky 40394c9b3c update dev 2017-07-18 2017-07-18 00:31:12 +02:00
Tobias Kaminsky a9bed9aad8 Merge remote-tracking branch 'nextcloud/autoUploadCrashIfFilepathIsNull' into dev 2017-07-18 00:30:46 +02:00
tobiaskaminsky 0b3f91453c comment out adding new downloadedf files to folder observer 2017-07-18 00:22:48 +02:00
Jonas Sandrock b7dda612be Feature request: Select all (particularly in search) #637 2017-07-18 00:04:49 +02:00
tobiasKaminsky 898c8d7b89 images can be deleted thus no filepath, but are still in media store.
Failed images are substracted from the "real" count.
2017-07-17 14:05:08 +02:00
tobiasKaminsky 9706892dbd + is now also white 2017-07-17 14:01:20 +02:00
Tobias Kaminsky 488856cddc daily dev 20170717 2017-07-17 00:41:06 +02:00
Tobias Kaminsky b8620b6533 update dev 2017-07-17 2017-07-17 00:31:27 +02:00
Tobias Kaminsky e1a919a114 Merge remote-tracking branch 'nextcloud/folderObserver' into dev 2017-07-17 00:30:34 +02:00
Tobias Kaminsky d5396d4b5a Merge remote-tracking branch 'nextcloud/new_details_view_animations' into dev 2017-07-17 00:30:33 +02:00
AndyScherzinger 493532d38f theme loading progress bar 2017-07-16 23:51:05 +02:00
tobiaskaminsky 04ff7578be comment out adding new downloadedf files to folder observer 2017-07-16 22:49:37 +02:00
AndyScherzinger 6ebacfdc8f Merge branch 'new_details_view_animations' of https://github.com/nextcloud/android into dev
# Conflicts:
#	src/main/java/com/owncloud/android/ui/activity/ManageAccountsActivity.java
2017-07-16 22:31:12 +02:00
nextcloud-android-bot 2b2b49e85b Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-16 22:30:19 +02:00
AndyScherzinger 9e20de2c1b replace deprecated android:singleLine with android:maxLines=1 2017-07-16 22:30:19 +02:00
AndyScherzinger 3d0cfa3ae0 raising padding on headline 2017-07-16 22:30:19 +02:00
AndyScherzinger 3f7487d9d2 theming for zip icon 2017-07-16 22:30:18 +02:00
AndyScherzinger b5165e0d57 theme new details screen 2017-07-16 22:30:18 +02:00
AndyScherzinger 947d2cb550 theming fixes for ProgressBar elements 2017-07-16 22:30:17 +02:00
AndyScherzinger fecb47dc19 re-use existing view for better performance 2017-07-16 22:30:17 +02:00
AndyScherzinger 72894486ee use proper mini headline styling using material body2 definition 2017-07-16 22:30:17 +02:00
AndyScherzinger 44b98ca268 avoid re-assigning of var 2017-07-16 22:30:16 +02:00
AndyScherzinger 87bc77bfeb codacy 2017-07-16 22:30:16 +02:00
AndyScherzinger 03441093f4 Fix headline coloring 2017-07-16 22:30:15 +02:00
AndyScherzinger 404586ffcd fixed cherry picked new details 2017-07-16 22:30:15 +02:00
AndyScherzinger e3a02ef34e adapt to cherry pick 2017-07-16 22:30:15 +02:00
masensio 612e864182 Review some text sizes in details view 2017-07-16 22:30:14 +02:00
masensio 3b2a7c0d8b Review some margins in details view. Add method to show more than one item in share users list view (details view) 2017-07-16 22:30:14 +02:00
masensio c1754f5f2b Fix favourite feature from details view 2017-07-16 22:30:14 +02:00
masensio d093a69118 Add share users to details view 2017-07-16 22:30:13 +02:00
masensio 06f3870fcd Remove old file_details_fragment.xml
# Conflicts:
#	res/layout/file_details_fragment.xml
2017-07-16 22:30:13 +02:00
masensio de1b717251 Add share data to details view layout
# Conflicts:
#	owncloud-android-library
#	res/layout/file_details_fragment_new.xml
#	res/values/strings.xml
#	src/com/owncloud/android/ui/fragment/FileDetailFragment.java
2017-07-16 22:30:13 +02:00
AndyScherzinger 2bdbd280da Merge branch 'new_details_view_animations' of https://github.com/nextcloud/android into dev
# Conflicts:
#	build.gradle
#	scripts/lint/lint-results.txt
#	src/main/res/values/strings.xml
2017-07-16 19:28:12 +02:00
nextcloud-android-bot c98e2fbfa8 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-16 16:19:53 +00:00
Andy Scherzinger fd2be85b6b Merge 7a9d088adf into b796c1254c 2017-07-16 15:50:15 +00:00
AndyScherzinger 7a9d088adf replace deprecated android:singleLine with android:maxLines=1 2017-07-16 17:49:33 +02:00
AndyScherzinger 51a56f7c36 raising padding on headline 2017-07-16 17:49:32 +02:00
AndyScherzinger 93a3b2efac theming for zip icon 2017-07-16 17:49:32 +02:00
AndyScherzinger 5d10a54819 theme new details screen 2017-07-16 17:49:32 +02:00
AndyScherzinger 69e3a08209 theming fixes for ProgressBar elements 2017-07-16 17:49:31 +02:00
AndyScherzinger de2ecc66d9 re-use existing view for better performance 2017-07-16 17:49:31 +02:00
AndyScherzinger b1d0174b11 use proper mini headline styling using material body2 definition 2017-07-16 17:49:30 +02:00
AndyScherzinger e42a5405a5 avoid re-assigning of var 2017-07-16 17:49:30 +02:00
AndyScherzinger 88ca292fa3 codacy 2017-07-16 17:49:30 +02:00
AndyScherzinger 298996bca6 Fix headline coloring 2017-07-16 17:49:29 +02:00
AndyScherzinger 9d2b648383 fixed cherry picked new details 2017-07-16 17:49:29 +02:00
AndyScherzinger d1ac629d5c adapt to cherry pick 2017-07-16 17:49:28 +02:00
masensio 7d377209e8 Review some text sizes in details view 2017-07-16 17:49:28 +02:00
masensio cb9213bac3 Review some margins in details view. Add method to show more than one item in share users list view (details view) 2017-07-16 17:49:27 +02:00
masensio 1debe40a3f Fix favourite feature from details view 2017-07-16 17:49:27 +02:00
masensio 38028f7ef0 Add share users to details view 2017-07-16 17:49:27 +02:00
masensio b09f263e47 Remove old file_details_fragment.xml
# Conflicts:
#	res/layout/file_details_fragment.xml
2017-07-16 17:49:26 +02:00
masensio d0239d56f5 Add share data to details view layout
# Conflicts:
#	owncloud-android-library
#	res/layout/file_details_fragment_new.xml
#	res/values/strings.xml
#	src/com/owncloud/android/ui/fragment/FileDetailFragment.java
2017-07-16 17:49:26 +02:00
Tobias Kaminsky dd1ee0e13d daily dev 20170716 2017-07-16 00:41:55 +02:00
Tobias Kaminsky c120bcc40e update dev 2017-07-16 2017-07-16 00:31:58 +02:00
AndyScherzinger f8ffe99212 Merge branch 'new_details_view_animations' of https://github.com/nextcloud/android into dev
# Conflicts:
#	src/main/res/layout/file_details_share_user_item.xml
2017-07-15 12:47:41 +02:00
AndyScherzinger 06898aa8f7 Merge branch 'master' of https://github.com/nextcloud/android into dev
# Conflicts:
#	scripts/lint/lint-results.txt
#	src/main/java/com/owncloud/android/ui/adapter/FileListListAdapter.java
#	src/main/res/values-es-rMX/strings.xml
2017-07-15 12:46:32 +02:00
nextcloud-android-bot 37503b1b59 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-07-15 12:29:12 +02:00
AndyScherzinger ded5026866 replace deprecated android:singleLine with android:maxLines=1 2017-07-15 12:29:12 +02:00
AndyScherzinger 6cc518d0d8 raising padding on headline 2017-07-15 12:29:12 +02:00
AndyScherzinger 393d9aaea8 theming for zip icon 2017-07-15 12:29:11 +02:00
AndyScherzinger ee44c8da7f theme new details screen 2017-07-15 12:29:11 +02:00
AndyScherzinger 95072a5b3a theming fixes for ProgressBar elements 2017-07-15 12:29:10 +02:00
AndyScherzinger c7e1fe7b28 re-use existing view for better performance 2017-07-15 12:29:10 +02:00
AndyScherzinger 58e9010e9a use proper mini headline styling using material body2 definition 2017-07-15 12:29:10 +02:00
AndyScherzinger 4857af7aa4 avoid re-assigning of var 2017-07-15 12:29:09 +02:00
AndyScherzinger 9b528cf6fa codacy 2017-07-15 12:29:09 +02:00
AndyScherzinger 55d0570669 Fix headline coloring 2017-07-15 12:29:09 +02:00
AndyScherzinger 8a77916265 fixed cherry picked new details 2017-07-15 12:29:08 +02:00
AndyScherzinger 819c2ecfcb adapt to cherry pick 2017-07-15 12:29:08 +02:00
masensio ef2b7adc85 Review some text sizes in details view 2017-07-15 12:29:07 +02:00
masensio 889a587cf6 Review some margins in details view. Add method to show more than one item in share users list view (details view) 2017-07-15 12:29:07 +02:00
masensio 65774dd435 Fix favourite feature from details view 2017-07-15 12:29:07 +02:00
masensio 98992f8fca Add share users to details view 2017-07-15 12:29:06 +02:00
masensio fabaa22eae Remove old file_details_fragment.xml
# Conflicts:
#	res/layout/file_details_fragment.xml
2017-07-15 12:29:06 +02:00
masensio 4c9efdeefb Add share data to details view layout
# Conflicts:
#	owncloud-android-library
#	res/layout/file_details_fragment_new.xml
#	res/values/strings.xml
#	src/com/owncloud/android/ui/fragment/FileDetailFragment.java
2017-07-15 12:28:57 +02:00
Tobias Kaminsky 3016787717 update dev 2017-07-15 2017-07-15 00:30:57 +02:00
tobiasKaminsky ccc3df216e fix downloading/storing of thumbnail 2017-07-14 16:12:24 +02:00
Tobias Kaminsky 07850390e2 daily dev 20170714 2017-07-14 00:40:57 +02:00
Tobias Kaminsky de647c6c9e update dev 2017-07-14 2017-07-14 00:30:54 +02:00
Tobias Kaminsky 8e8a95ed29 Merge remote-tracking branch 'nextcloud/resizedImages' into dev 2017-07-14 00:30:52 +02:00
Tobias Kaminsky b382bcff28 Merge remote-tracking branch 'nextcloud/new_details_view_animations' into dev 2017-07-14 00:30:40 +02:00
AndyScherzinger 43ed561ec9 theming for zip icon 2017-07-13 18:15:41 +02:00
AndyScherzinger 32fc0750e6 theme new details screen 2017-07-13 17:47:52 +02:00
AndyScherzinger 17a53a948b theming fixes for ProgressBar elements 2017-07-13 17:47:33 +02:00
tobiasKaminsky 3314afbd81 merge 2017-07-13 15:40:59 +02:00
tobiasKaminsky 162473a025 Merge remote-tracking branch 'remotes/origin/master' into resizedImages
# Conflicts:
#	src/main/java/com/owncloud/android/ui/adapter/UploaderAdapter.java
#	src/main/java/third_parties/michaelOrtiz/TouchImageViewCustom.java
2017-07-13 15:39:55 +02:00
tobiasKaminsky 61a71d33d0 downloading is working if set in preferences 2017-07-13 15:26:10 +02:00
AndyScherzinger 73f59188d1 re-use existing view for better performance 2017-07-13 12:13:08 +02:00
AndyScherzinger 825f5aae69 use proper mini headline styling using material body2 definition 2017-07-13 12:13:08 +02:00
AndyScherzinger f1285579ce avoid re-assigning of var 2017-07-13 12:13:08 +02:00
AndyScherzinger 306401772b codacy 2017-07-13 12:13:07 +02:00
AndyScherzinger ef91e7fd57 Fix headline coloring 2017-07-13 12:13:07 +02:00
AndyScherzinger 3edb8416fa fixed cherry picked new details 2017-07-13 12:13:06 +02:00
AndyScherzinger e5b09d1433 adapt to cherry pick 2017-07-13 12:12:28 +02:00
masensio 7166163b03 Review some text sizes in details view 2017-07-13 12:12:28 +02:00
masensio 8af1976acb Review some margins in details view. Add method to show more than one item in share users list view (details view) 2017-07-13 12:12:27 +02:00
masensio 993e684a95 Fix favourite feature from details view 2017-07-13 12:12:27 +02:00
masensio 5c4036f6a2 Add share users to details view 2017-07-13 12:12:26 +02:00
masensio 7ca94042f4 Remove old file_details_fragment.xml
# Conflicts:
#	res/layout/file_details_fragment.xml
2017-07-13 12:12:26 +02:00
masensio cb03506b90 Add share data to details view layout
# Conflicts:
#	owncloud-android-library
#	res/layout/file_details_fragment_new.xml
#	res/values/strings.xml
#	src/com/owncloud/android/ui/fragment/FileDetailFragment.java
2017-07-13 12:12:23 +02:00
tobiasKaminsky 14eed9f5f1 Merge remote-tracking branch 'remotes/origin/master' into resizedImages
# Conflicts:
#	src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
#	src/main/java/com/owncloud/android/ui/adapter/FileListListAdapter.java
#	src/main/res/values/strings.xml
2017-07-13 11:25:38 +02:00
tobiasKaminsky b42ceec141 Merge remote-tracking branch 'remotes/origin/master' into resizedImages
# Conflicts:
#	src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
#	src/main/java/com/owncloud/android/ui/adapter/FileListListAdapter.java
#	src/main/res/values/strings.xml
2017-07-13 11:13:42 +02:00
tobiasKaminsky 2ae68242e1 preference setting: download or preview 2017-07-13 11:04:53 +02:00
Tobias Kaminsky a43978c797 daily dev 20170713 2017-07-13 00:40:20 +02:00
Tobias Kaminsky 0bebf0f20f update dev 2017-07-13 2017-07-13 00:31:46 +02:00
Tobias Kaminsky 2fa4f35afd Merge remote-tracking branch 'nextcloud/master' into dev 2017-07-13 00:31:38 +02:00
tobiasKaminsky 416db99d33 further work: image can now be download via snack 2017-07-12 17:05:06 +02:00
Tobias Kaminsky fed13409ca daily dev 20170712 2017-07-12 00:41:20 +02:00
Tobias Kaminsky 2da61fa0e7 update dev 2017-07-12 2017-07-12 00:31:06 +02:00
Tobias Kaminsky 5d130a2d6f Merge remote-tracking branch 'nextcloud/master' into dev 2017-07-12 00:31:05 +02:00
Tobias Kaminsky 5e7e216d65 Merge remote-tracking branch 'nextcloud/userTheming' into dev 2017-07-12 00:30:59 +02:00
Tobias Kaminsky 6bc2024c39 Merge remote-tracking branch 'nextcloud/ErrorInActivityListAdapter' into dev 2017-07-12 00:30:44 +02:00
tobiasKaminsky 2f2c0cfa28 renamed tag 2017-07-11 16:23:37 +02:00
tobiasKaminsky e49ef434a1 catch a rare exception while setting activity list adapter 2017-07-11 15:04:15 +02:00
Tobias Kaminsky ab77f4bfcf daily dev 20170711 2017-07-11 00:42:03 +02:00
Tobias Kaminsky 345d91c992 update dev 2017-07-11 2017-07-11 00:30:55 +02:00
Tobias Kaminsky 656306bac7 Merge remote-tracking branch 'nextcloud/userTheming' into dev 2017-07-11 00:30:44 +02:00
Tobias Kaminsky 5128498089 daily dev 20170710 2017-07-10 00:39:27 +02:00
Tobias Kaminsky 72acdd3def update dev 2017-07-10 2017-07-10 00:31:05 +02:00
Tobias Kaminsky b21cda7af4 Merge remote-tracking branch 'nextcloud/master' into dev 2017-07-10 00:30:58 +02:00
Tobias Kaminsky 9790941cbe daily dev 20170709 2017-07-09 00:40:07 +02:00
Tobias Kaminsky 0ce657f9d0 update dev 2017-07-09 2017-07-09 00:31:27 +02:00
Tobias Kaminsky 12fb16f294 Merge remote-tracking branch 'nextcloud/master' into dev 2017-07-09 00:31:26 +02:00
Tobias Kaminsky d22f5fe92c update dev 2017-07-08 2017-07-08 00:30:56 +02:00
Tobias Kaminsky 7a143d7d9e daily dev 20170707 2017-07-07 00:40:19 +02:00
Tobias Kaminsky d9cdcf224f update dev 2017-07-07 2017-07-07 00:30:50 +02:00
Tobias Kaminsky 47dec7d142 Merge remote-tracking branch 'nextcloud/master' into dev 2017-07-07 00:30:48 +02:00
Tobias Kaminsky 35c388d652 Merge remote-tracking branch 'nextcloud/userTheming' into dev 2017-07-07 00:30:43 +02:00
Tobias Kaminsky a27209c6ad daily dev 20170706 2017-07-06 00:41:07 +02:00
Tobias Kaminsky 4cc80785c2 update dev 2017-07-06 2017-07-06 00:30:49 +02:00
Tobias Kaminsky 846dacabf0 Merge remote-tracking branch 'nextcloud/sharedFolderMissing' into dev 2017-07-06 00:30:29 +02:00
tobiaskaminsky 888acbb701 fix no showing shares after "shared" view 2017-07-05 14:55:11 +02:00
Tobias Kaminsky 579d797c71 daily dev 20170705 2017-07-05 00:48:39 +02:00
Tobias Kaminsky ff4f506dc7 update dev 2017-07-05 2017-07-05 00:31:46 +02:00
tobiaskaminsky ed5fc8edc5 Merge remote-tracking branch 'remotes/origin/userTheming' into dev 2017-07-04 13:12:17 +02:00
Tobias Kaminsky f532d081ba update dev 2017-07-04 2017-07-04 00:31:07 +02:00
Tobias Kaminsky 5d26fd1788 update dev 2017-07-03 2017-07-03 00:31:28 +02:00
Tobias Kaminsky 262a1707b7 update dev 2017-07-02 2017-07-02 00:30:51 +02:00
Tobias Kaminsky db7ca579c3 daily dev 20170701 2017-07-01 00:41:02 +02:00
Tobias Kaminsky 0e97346535 update dev 2017-07-01 2017-07-01 00:30:58 +02:00
Tobias Kaminsky 5c99a3e976 Merge remote-tracking branch 'nextcloud/folderObserver' into dev 2017-07-01 00:30:41 +02:00
tobiasKaminsky 2d2e4501a0 resolved update conflicts, adapted to current system 2017-06-30 17:01:04 +02:00
tobiaskaminsky 790e12d6c9 comment out adding new downloadedf files to folder observer 2017-06-30 15:25:26 +02:00
Tobias Kaminsky a5f5d5cb34 daily dev 20170630 2017-06-30 00:41:49 +02:00
Tobias Kaminsky dccf68065f update dev 2017-06-30 2017-06-30 00:32:09 +02:00
Tobias Kaminsky 2d255030dc Merge remote-tracking branch 'nextcloud/1089_sharing_with_password_rule' into dev 2017-06-30 00:30:59 +02:00
tobiasKaminsky e758738f5a Merge remote-tracking branch 'remotes/origin/master' into resizedImages 2017-06-29 16:05:32 +02:00
nextcloud-android-bot 9daced6535 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-06-29 11:38:59 +02:00
tobiasKaminsky cb7388bc3a comment licence correctly 2017-06-29 11:38:59 +02:00
tobiasKaminsky 9906cec46b extract string resource, remove obsolete string 2017-06-29 11:38:58 +02:00
nextcloud-android-bot 7a7e2be550 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-06-29 11:38:58 +02:00
AndyScherzinger c3395d671e dp -> sp for text 2017-06-29 11:38:58 +02:00
AndyScherzinger 122ded3468 remove unused static and fix string format call 2017-06-29 11:38:57 +02:00
Augustin 75c90bbfc1 test commit for github build 2017-06-29 11:38:57 +02:00
augustin 6a263fdd11 1089_sharing_with_password_rule: don't ask for authentification when trying to share with too short password but ask for a new 2017-06-29 11:38:57 +02:00
Tobias Kaminsky fd40f8c624 daily dev 20170629 2017-06-29 00:40:44 +02:00
Tobias Kaminsky e07dec0e4f update dev 2017-06-29 2017-06-29 00:32:07 +02:00
Tobias Kaminsky f9d2776c0f Merge remote-tracking branch 'nextcloud/stopAsyncTasks' into dev 2017-06-29 00:30:53 +02:00
Tobias Kaminsky 0eeccd522f daily dev 20170628 2017-06-28 00:41:32 +02:00
Tobias Kaminsky d46917bc35 update dev 2017-06-28 2017-06-28 00:32:52 +02:00
Tobias Kaminsky d8d1bae404 Merge remote-tracking branch 'nextcloud/1089_sharing_with_password_rule' into dev 2017-06-28 00:31:52 +02:00
Tobias Kaminsky 6d93e85297 Merge remote-tracking branch 'nextcloud/settingsOn4x' into dev 2017-06-28 00:31:48 +02:00
nextcloud-android-bot d233585663 Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-06-27 11:25:29 +00:00
Tobias Kaminsky 9a985c3518 Merge 2cb1991199 into f9ec3574c1 2017-06-27 11:13:14 +00:00
tobiasKaminsky 2cb1991199 comment licence correctly 2017-06-27 13:13:08 +02:00
tobiasKaminsky b8b283cf86 extract string resource, remove obsolete string 2017-06-27 13:12:37 +02:00
tobiasKaminsky d7b7db5fb2 Merge remote-tracking branch 'origin/dev' into dev 2017-06-27 08:23:28 +02:00
tobiasKaminsky 299368a62a move to fastlane directory structure 2017-06-27 08:23:13 +02:00
Tobias Kaminsky ce329ebe23 daily dev 20170627 2017-06-27 00:42:05 +02:00
Tobias Kaminsky 616a84c230 update dev 2017-06-27 2017-06-27 00:31:48 +02:00
Tobias Kaminsky 2b55c309d8 Merge remote-tracking branch 'nextcloud/contactsBackupUI' into dev 2017-06-27 00:31:30 +02:00
Tobias Kaminsky 2c00e2ef6b Merge remote-tracking branch 'nextcloud/1089_sharing_with_password_rule' into dev 2017-06-27 00:31:18 +02:00
Tobias Kaminsky 97ca58f6f3 Merge remote-tracking branch 'nextcloud/settingsOn4x' into dev 2017-06-27 00:30:59 +02:00
Tobias Kaminsky b2c6dc4eae Merge remote-tracking branch 'nextcloud/shareDialog' into dev 2017-06-27 00:30:56 +02:00
Tobias Kaminsky f5cafc83ae Merge remote-tracking branch 'nextcloud/autoUploadRotationBug' into dev 2017-06-27 00:30:53 +02:00
Tobias Kaminsky a6377539a2 Merge remote-tracking branch 'nextcloud/autoUploadWithoutStoragePermission' into dev 2017-06-27 00:30:48 +02:00
nextcloud-android-bot 1cbe35259d Drone: update Lint results to reflect reduced error/warning count [skip ci] 2017-06-26 12:55:14 +00:00
tobiasKaminsky ca2562e54a delete lint-baseline as it is not working reliable 2017-06-26 14:47:32 +02:00
tobiasKaminsky 5f9e736a37 Merge remote-tracking branch 'remotes/origin/master' into dev-base2 2017-06-26 14:45:19 +02:00
tobiasKaminsky ea272cf862 remove obsolete strings 2017-06-26 14:37:07 +02:00
Tobias Kaminsky 83ce4e70f6 Merge 958f9e218d into 88e58e9c0c 2017-06-26 12:36:04 +00:00
AndyScherzinger 958f9e218d dp -> sp for text 2017-06-26 14:35:53 +02:00
tobiasKaminsky 5692f3e4c2 fix comment 2017-06-26 13:43:05 +02:00
tobiasKaminsky 0ab1fdc9dd fix dismissing dialog on rotation 2017-06-26 13:42:27 +02:00
AndyScherzinger e48d385aa5 remove unused static and fix string format call 2017-06-26 10:09:40 +02:00
tobiasKaminsky 773fbcddf9 click on shared/linked icon opens share dialog 2017-06-26 09:53:09 +02:00
Tobias Kaminsky 44a88f4543 daily dev 20170626 2017-06-26 00:40:15 +02:00
Tobias Kaminsky 022f741da7 update dev 2017-06-26 2017-06-26 00:31:08 +02:00
Tobias Kaminsky c81f07795f Merge remote-tracking branch 'nextcloud/master' into dev 2017-06-26 00:30:58 +02:00
Tobias Kaminsky 8272678a2d update dev 2017-06-25 2017-06-25 00:30:59 +02:00
Tobias Kaminsky 151f72a886 daily dev 20170624 2017-06-24 00:40:08 +02:00
Tobias Kaminsky 2074e2f362 update dev 2017-06-24 2017-06-24 00:31:29 +02:00
Tobias Kaminsky 65593dabcb Merge remote-tracking branch 'nextcloud/deleteFilesOnAccountRemoval' into dev 2017-06-24 00:30:47 +02:00
Tobias Kaminsky ce2fac33bf Merge remote-tracking branch 'nextcloud/removedSDcard' into dev 2017-06-24 00:30:43 +02:00
tobiasKaminsky 8b1ed6d18c delete all local files on account removal 2017-06-23 14:00:06 +02:00
Augustin c41cce2f04 test commit for github build 2017-06-23 08:25:51 +02:00
augustin da996aefc7 Merge branch 'master' into 1089_sharing_with_password_rule 2017-06-23 08:22:11 +02:00
Tobias Kaminsky a99b9c2845 daily dev 20170623 2017-06-23 00:45:31 +02:00
Tobias Kaminsky 198f829eef update dev 2017-06-23 2017-06-23 00:31:54 +02:00
Tobias Kaminsky 56ebf988c1 Merge remote-tracking branch 'nextcloud/transactionTooLarge' into dev 2017-06-23 00:31:02 +02:00
tobiasKaminsky 501830d67b debug code for https://github.com/nextcloud/android/issues/808 2017-06-22 12:36:45 +02:00
tobiasKaminsky ba092cee7b bump to evernote 1.1.10 2017-06-22 09:36:51 +02:00
tobiasKaminsky c4b1382bbf Merge remote-tracking branch 'origin/dev' into dev 2017-06-22 07:31:07 +02:00
tobiasKaminsky 15b47c2025 Merge remote-tracking branch 'remotes/origin/bruteforce' into dev 2017-06-22 07:30:56 +02:00
Tobias Kaminsky 522427427b daily dev 20170622 2017-06-22 00:43:45 +02:00
Tobias Kaminsky 77d22fd9bb update dev 2017-06-22 2017-06-22 00:31:47 +02:00
tobiasKaminsky 343f9bd3da Merge remote-tracking branch 'remotes/origin/contactsBackupUI' into dev 2017-06-21 16:47:08 +02:00
tobiasKaminsky 5a7a6667e7 fix npe if folder on server does not exist 2017-06-21 16:39:13 +02:00
tobiasKaminsky 515297e259 use snapshot 2017-06-21 11:31:43 +02:00
tobiasKaminsky 38d8175cdd use lib branch 2017-06-21 11:09:49 +02:00
tobiasKaminsky 13ac8c6dbf remove version dependency as NC can this in all supported version 2017-06-21 11:08:37 +02:00
tobiasKaminsky 7e909ea6b9 use grey theme if no theming of elements is possible 2017-06-21 10:52:02 +02:00
tobiasKaminsky 8c0e39c66c change ui for public release 2017-06-21 10:01:19 +02:00
tobiasKaminsky 400fc6ac5a show "contacts backup" eithen in drawer or settings 2017-06-21 10:01:18 +02:00
AndyScherzinger 6dd6c989e4 Merge branch 'master' of https://github.com/nextcloud/android into dev 2017-06-21 09:43:25 +02:00
Tobias Kaminsky 69a4d453a6 daily dev 20170621 2017-06-21 00:39:14 +02:00
Tobias Kaminsky bb8ae4e4c8 update dev 2017-06-21 2017-06-21 00:31:05 +02:00
Tobias Kaminsky 41e18d4129 Merge remote-tracking branch 'nextcloud/master' into dev 2017-06-21 00:31:04 +02:00
augustin d43bc03d0b 1089_sharing_with_password_rule: don't ask for authentification when trying to share with too short password but ask for a new 2017-06-19 20:07:26 +02:00
tobiaskaminsky bcc70fda0d set Cache size to 200mb 2017-06-19 16:51:12 +02:00
AndyScherzinger 524f9afaf8 Merge branch 'master' of https://github.com/nextcloud/android into dev
# Conflicts:
#	src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java
2017-06-19 13:29:47 +02:00
Tobias Kaminsky 21748b4899 daily dev 20170618 2017-06-18 00:39:16 +02:00
Tobias Kaminsky 28abcad91a update dev 2017-06-18 2017-06-18 00:30:38 +02:00
Tobias Kaminsky c632f3f453 Merge remote-tracking branch 'nextcloud/master' into dev 2017-06-18 00:30:37 +02:00
Tobias Kaminsky ecf148033b daily dev 20170617 2017-06-17 00:40:08 +02:00
Tobias Kaminsky 56bab2e418 update dev 2017-06-17 2017-06-17 00:31:09 +02:00
Tobias Kaminsky f17c0ef04b Merge remote-tracking branch 'nextcloud/master' into dev 2017-06-17 00:31:05 +02:00
tobiasKaminsky 76096d2e64 add image for fdroid 2017-06-16 16:39:26 +02:00
tobiasKaminsky 0d03ed96c0 try for fdroid 2017-06-16 15:07:20 +02:00
Tobias Kaminsky 810559126a daily dev 20170616 2017-06-16 00:39:54 +02:00
Tobias Kaminsky d9bff2a631 update dev 2017-06-16 2017-06-16 00:31:01 +02:00
Tobias Kaminsky fa9add4217 Merge remote-tracking branch 'nextcloud/master' into dev 2017-06-16 00:30:57 +02:00
Tobias Kaminsky 780592fbc6 daily dev 20170615 2017-06-15 00:39:48 +02:00
Tobias Kaminsky 7121523442 update dev 2017-06-15 2017-06-15 00:31:03 +02:00
Tobias Kaminsky 36ce0fd69b Merge remote-tracking branch 'nextcloud/master' into dev 2017-06-15 00:31:01 +02:00
AndyScherzinger a2e5c86db3 Merge branch 'tintingFix' of https://github.com/nextcloud/android into dev 2017-06-14 11:42:17 +02:00
AndyScherzinger 02ab0852e4 Merge branch 'master' of https://github.com/nextcloud/android into dev 2017-06-14 11:42:03 +02:00
Tobias Kaminsky 3b42f3b39d daily dev 20170614 2017-06-14 00:41:10 +02:00
Tobias Kaminsky 672c769790 update dev 2017-06-14 2017-06-14 00:30:55 +02:00
Tobias Kaminsky f6d15dbcd8 Merge remote-tracking branch 'nextcloud/master' into dev 2017-06-14 00:30:51 +02:00
Tobias Kaminsky d898829af2 daily dev 20170613 2017-06-13 00:39:28 +02:00
Tobias Kaminsky 741791f7ef update dev 2017-06-13 2017-06-13 00:30:55 +02:00
Tobias Kaminsky 89d9893434 Merge remote-tracking branch 'nextcloud/master' into dev 2017-06-13 00:30:47 +02:00
Tobias Kaminsky 938cf8c720 update dev 2017-06-12 2017-06-12 00:31:00 +02:00
Tobias Kaminsky 5d0c59593e update dev 2017-06-11 2017-06-11 00:31:18 +02:00
Tobias Kaminsky 8022ea5064 update dev 2017-06-10 2017-06-10 00:31:49 +02:00
Tobias Kaminsky 46631569e9 daily dev 20170609 2017-06-09 00:39:35 +02:00
Tobias Kaminsky a1819de1ee update dev 2017-06-09 2017-06-09 00:30:43 +02:00
Tobias Kaminsky 1bbfd6001f Merge remote-tracking branch 'nextcloud/master' into dev 2017-06-09 00:30:36 +02:00
Tobias Kaminsky 46fab4f07a daily dev 20170608 2017-06-08 00:39:35 +02:00
Tobias Kaminsky 4dec99d87d update dev 2017-06-08 2017-06-08 00:31:18 +02:00
AndyScherzinger eb9337d06e Merge branch 'master' of https://github.com/nextcloud/android into dev
# Conflicts:
#	src/main/java/com/owncloud/android/ui/activity/Preferences.java
2017-06-07 13:28:13 +02:00
Tobias Kaminsky fe855d651e update dev 2017-06-07 2017-06-07 00:31:12 +02:00
Tobias Kaminsky 19cebd610b daily dev 20170606 2017-06-06 00:39:08 +02:00
Tobias Kaminsky bd6fae8ff3 update dev 2017-06-06 2017-06-06 00:31:07 +02:00
Tobias Kaminsky 4f9389924e Merge remote-tracking branch 'nextcloud/master' into dev 2017-06-06 00:31:02 +02:00
Tobias Kaminsky 1dd48fc51c daily dev 20170605 2017-06-05 00:41:15 +02:00
Tobias Kaminsky 9d5b55e0a2 update dev 2017-06-05 2017-06-05 00:30:57 +02:00
Tobias Kaminsky b3d3c5b3bc Merge remote-tracking branch 'nextcloud/master' into dev 2017-06-05 00:30:52 +02:00
Tobias Kaminsky c773cbe777 daily dev 20170604 2017-06-04 00:38:38 +02:00
Tobias Kaminsky 72e19b55ad update dev 2017-06-04 2017-06-04 00:30:29 +02:00
Tobias Kaminsky a904dd4dc3 Merge remote-tracking branch 'nextcloud/master' into dev 2017-06-04 00:30:25 +02:00
Tobias Kaminsky c517ca339b daily dev 20170603 2017-06-03 00:40:40 +02:00
Tobias Kaminsky 425cac602c update dev 2017-06-03 2017-06-03 00:30:33 +02:00
Tobias Kaminsky 9b3f1acf89 Merge remote-tracking branch 'nextcloud/master' into dev 2017-06-03 00:30:29 +02:00
Tobias Kaminsky da7cf3a853 daily dev 20170602 2017-06-02 00:38:48 +02:00
Tobias Kaminsky 8c3639762a update dev 2017-06-02 2017-06-02 00:30:44 +02:00
Tobias Kaminsky dd78be073a Merge remote-tracking branch 'nextcloud/master' into dev 2017-06-02 00:30:38 +02:00
Tobias Kaminsky a1db7187f7 daily dev 20170601 2017-06-01 00:45:44 +02:00
Tobias Kaminsky a6d89a97e5 update dev 2017-06-01 2017-06-01 00:31:25 +02:00
Mario Danic 85490f7d44 Merge branch 'master' into dev
Signed-off-by: Mario Danic <[email protected]>

# Conflicts:
#	build.gradle
#	src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java
#	src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java
2017-05-31 22:34:33 +02:00
Tobias Kaminsky 0188e2e33d update dev 2017-05-31 2017-05-31 00:30:39 +02:00
Tobias Kaminsky ff1d344782 update dev 2017-05-30 2017-05-30 00:30:51 +02:00
Tobias Kaminsky fcfaf2bace daily dev 20170529 2017-05-29 00:40:38 +02:00
Tobias Kaminsky cf19728063 update dev 2017-05-29 2017-05-29 00:31:42 +02:00
Tobias Kaminsky f27605dc13 Merge remote-tracking branch 'nextcloud/master' into dev 2017-05-29 00:31:33 +02:00
Tobias Kaminsky 617f6e74b6 daily dev 20170528 2017-05-28 00:39:03 +02:00
Tobias Kaminsky cedf0be331 update dev 2017-05-28 2017-05-28 00:30:51 +02:00
Tobias Kaminsky 0e486d84e7 Merge remote-tracking branch 'nextcloud/master' into dev 2017-05-28 00:30:45 +02:00
Tobias Kaminsky 6e2cc8f38c daily dev 20170527 2017-05-27 00:39:50 +02:00
Tobias Kaminsky db5ac0206b update dev 2017-05-27 2017-05-27 00:30:36 +02:00
AndyScherzinger 14936b3c45 Merge branch 'master' of https://github.com/nextcloud/android into dev 2017-05-26 17:37:01 +02:00
Tobias Kaminsky a0780b7154 daily dev 20170526 2017-05-26 00:39:53 +02:00
Tobias Kaminsky 3b91dbb335 update dev 2017-05-26 2017-05-26 00:30:57 +02:00
Tobias Kaminsky 4789809df2 Merge remote-tracking branch 'nextcloud/master' into dev 2017-05-26 00:30:37 +02:00
Tobias Kaminsky 61178f3532 daily dev 20170525 2017-05-25 00:41:29 +02:00
Tobias Kaminsky d50d8c34c6 update dev 2017-05-25 2017-05-25 00:31:03 +02:00
Tobias Kaminsky 61db8db122 Merge remote-tracking branch 'nextcloud/master' into dev 2017-05-25 00:30:52 +02:00
AndyScherzinger 6276e743e2 Merge branch 'master' of https://github.com/nextcloud/android into dev 2017-05-24 15:21:18 +02:00
Tobias Kaminsky f6a2a8def2 daily dev 20170524 2017-05-24 00:42:09 +02:00
Tobias Kaminsky 25d4b54e5c update dev 2017-05-24 2017-05-24 00:32:01 +02:00
AndyScherzinger 940da7325d Merge branch 'master' of https://github.com/nextcloud/android into dev
# Conflicts:
#	src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java
#	src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java
2017-05-24 00:16:14 +02:00
AndyScherzinger 39620c105d Merge branch 'master' of https://github.com/nextcloud/android into dev
# Conflicts:
#	CHANGELOG.md
#	src/main/AndroidManifest.xml
2017-05-23 23:55:35 +02:00
Tobias Kaminsky cda7b00e84 update dev 2017-05-23 2017-05-23 00:31:04 +02:00
Tobias Kaminsky bfcf6b919b daily dev 20170522 2017-05-22 00:38:44 +02:00
Tobias Kaminsky 134ed43d34 update dev 2017-05-22 2017-05-22 00:31:14 +02:00
Tobias Kaminsky 5a8cd879f1 Merge remote-tracking branch 'nextcloud/master' into dev 2017-05-22 00:31:11 +02:00
Tobias Kaminsky 33478d2f7d daily dev 20170521 2017-05-21 00:41:20 +02:00
Tobias Kaminsky 2494c13a66 update dev 2017-05-21 2017-05-21 00:32:16 +02:00
Tobias Kaminsky edd4f7cae5 Merge remote-tracking branch 'nextcloud/master' into dev 2017-05-21 00:32:14 +02:00
Tobias Kaminsky 1339acd035 daily dev 20170520 2017-05-20 00:40:38 +02:00
Tobias Kaminsky 32a66b96c2 update dev 2017-05-20 2017-05-20 00:31:20 +02:00
Tobias Kaminsky 7d86c5282d Merge remote-tracking branch 'nextcloud/pinchZoom' into dev 2017-05-20 00:31:07 +02:00
Tobias Kaminsky e2c9dddda8 Merge remote-tracking branch 'nextcloud/searchViewWrongFiles' into dev 2017-05-20 00:30:59 +02:00
AndyScherzinger fffa235b79 Merge branch 'master' of https://github.com/nextcloud/android into dev 2017-05-19 18:42:54 +02:00
Tobias Kaminsky 532b65a66d daily dev 20170519 2017-05-19 00:40:37 +02:00
Tobias Kaminsky 52e91cb72a update dev 2017-05-19 2017-05-19 00:31:04 +02:00
Tobias Kaminsky e43c1b5fec Merge remote-tracking branch 'nextcloud/crashDueToEmptyString' into dev 2017-05-19 00:30:43 +02:00
Tobias Kaminsky 058bb9704a daily dev 20170518 2017-05-18 00:38:39 +02:00
Tobias Kaminsky d747efa134 update dev 2017-05-18 2017-05-18 00:30:46 +02:00
Tobias Kaminsky 8bf2cf8355 Merge remote-tracking branch 'nextcloud/crashDueToEmptyString' into dev 2017-05-18 00:30:31 +02:00
Tobias Kaminsky dbb6d997be update dev 2017-05-17 2017-05-17 15:07:54 +02:00
Tobias Kaminsky 4a8611738c Merge remote-tracking branch 'nextcloud/crashDueToEmptyString' into dev 2017-05-17 15:06:44 +02:00
tobiaskaminsky 55b80312f4 always enable logging on dev 2017-05-17 15:04:02 +02:00
Tobias Kaminsky b76e64b294 daily dev 20170517 2017-05-17 00:44:54 +02:00
Tobias Kaminsky 408646db01 update dev 2017-05-17 2017-05-17 00:32:16 +02:00
AndyScherzinger 7be1cdc2d5 Merge branch 'master' of https://github.com/nextcloud/android into dev
# Conflicts:
#	scripts/lint/lint-results.txt
2017-05-16 23:28:00 +02:00
Tobias Kaminsky 39bf645f1c update dev 2017-05-16 2017-05-16 14:27:25 +02:00
tobiaskaminsky 0239d3b955 Merge remote-tracking branch 'remotes/origin/crashDueToEmptyString' into dev 2017-05-16 14:19:58 +02:00
Tobias Kaminsky 702316c444 update dev 2017-05-16 2017-05-16 13:43:26 +02:00
Tobias Kaminsky 88cc730c0e daily dev 20170516 2017-05-16 00:41:06 +02:00
Tobias Kaminsky eb07297f91 update dev 2017-05-16 2017-05-16 00:32:19 +02:00
tobiasKaminsky bbbf55765d fix line wrap 2017-05-15 10:44:02 +02:00
tobiasKaminsky b3a23166ac fix line wrap 2017-05-15 10:43:39 +02:00
tobiasKaminsky dda2439393 Merge remote-tracking branch 'remotes/origin/logFolder' into dev 2017-05-15 09:12:51 +02:00
Tobias Kaminsky 96cda366cb daily dev 20170515 2017-05-15 00:40:44 +02:00
Tobias Kaminsky 944647dc72 update dev 2017-05-15 2017-05-15 00:32:06 +02:00
Tobias Kaminsky 6f6fe94218 Merge remote-tracking branch 'nextcloud/master' into dev 2017-05-15 00:31:58 +02:00
Tobias Kaminsky a04abec2f1 Merge branch 'dev' of github.com:/nextcloud/android into dev 2017-05-15 00:30:09 +02:00
Tobias Kaminsky 0145deb320 daily dev 20170514 2017-05-14 17:59:39 +02:00
AndyScherzinger ac8860e8fd Merge branch 'master' of https://github.com/nextcloud/android into dev 2017-05-13 23:32:14 +02:00
AndyScherzinger 34776e1125 Merge branch 'master' of https://github.com/nextcloud/android into dev
# Conflicts:
#	build.gradle
#	src/main/java/com/owncloud/android/ui/activity/ShareActivity.java
#	src/main/java/com/owncloud/android/ui/fragment/EditShareFragment.java
#	src/main/java/com/owncloud/android/ui/helpers/FileOperationsHelper.java
#	src/main/res/values/setup.xml
2017-05-13 16:05:12 +02:00
Tobias Kaminsky 0a2346491b update dev 2017-05-13 2017-05-13 09:04:31 +02:00
Tobias Kaminsky a7fb57daff Merge remote-tracking branch 'nextcloud/audioRotationBug' into dev 2017-05-13 09:04:08 +02:00
Tobias Kaminsky 5e9ba17298 update dev 2017-05-13 2017-05-13 00:31:05 +02:00
Tobias Kaminsky ed5093914d daily dev 20170512 2017-05-12 00:40:21 +02:00
Tobias Kaminsky 744bbe93bc update dev 2017-05-12 2017-05-12 00:31:03 +02:00
Tobias Kaminsky a6d6f88a79 Merge remote-tracking branch 'nextcloud/master' into dev 2017-05-12 00:30:41 +02:00
Tobias Kaminsky 28c8dc1613 daily dev 20170511 2017-05-11 00:39:20 +02:00
Tobias Kaminsky b3b8b4c9e1 update dev 2017-05-11 2017-05-11 00:31:09 +02:00
Tobias Kaminsky 5fa5175698 Merge remote-tracking branch 'nextcloud/master' into dev 2017-05-11 00:31:07 +02:00
Tobias Kaminsky 919dd1fef8 daily dev 20170510 2017-05-10 00:39:24 +02:00
Tobias Kaminsky af099f17c4 update dev 2017-05-10 2017-05-10 00:31:06 +02:00
Tobias Kaminsky ba9baafbe6 Merge remote-tracking branch 'nextcloud/master' into dev 2017-05-10 00:31:02 +02:00
Tobias Kaminsky c450bf1e1a daily dev 20170509 2017-05-09 00:39:29 +02:00
Tobias Kaminsky 94cc2fb38d update dev 2017-05-09 2017-05-09 00:31:01 +02:00
Tobias Kaminsky 31c0bc5cf8 Merge remote-tracking branch 'nextcloud/master' into dev 2017-05-09 00:30:57 +02:00
Tobias Kaminsky d89116d7ff daily dev 20170508 2017-05-08 00:40:48 +02:00
Tobias Kaminsky ba0452bb06 update dev 2017-05-08 2017-05-08 00:31:10 +02:00
Tobias Kaminsky baf36f4473 Merge remote-tracking branch 'nextcloud/master' into dev 2017-05-08 00:31:09 +02:00
Tobias Kaminsky 52ff0290e6 daily dev 20170507 2017-05-07 00:40:25 +02:00
Tobias Kaminsky aa83e6b41b update dev 2017-05-07 2017-05-07 00:31:24 +02:00
Tobias Kaminsky a0151fee46 Merge remote-tracking branch 'nextcloud/master' into dev 2017-05-07 00:31:21 +02:00
Tobias Kaminsky 1b39f35af6 daily dev 20170506 2017-05-06 00:40:14 +02:00
Tobias Kaminsky c6a317cd78 update dev 2017-05-06 2017-05-06 00:30:50 +02:00
Tobias Kaminsky 24417af511 Merge remote-tracking branch 'nextcloud/master' into dev 2017-05-06 00:30:46 +02:00
Tobias Kaminsky 0ed4459eac daily dev 20170505 2017-05-05 00:40:40 +02:00
Tobias Kaminsky 89efc52a6b update dev 2017-05-05 2017-05-05 00:31:16 +02:00
Tobias Kaminsky 4bdc3a1667 Merge remote-tracking branch 'nextcloud/master' into dev 2017-05-05 00:31:15 +02:00
AndyScherzinger 760c8c5d8f Merge branch 'master' of https://github.com/nextcloud/android into dev 2017-05-04 14:35:04 +02:00
Tobias Kaminsky c63cdcf6ef daily dev 20170504 2017-05-04 00:41:46 +02:00
Tobias Kaminsky 5d0b3559ca update dev 2017-05-04 2017-05-04 00:31:55 +02:00
Tobias Kaminsky 99e8bd3f71 Merge remote-tracking branch 'nextcloud/master' into dev 2017-05-04 00:31:49 +02:00
AndyScherzinger 219058770b Merge branch 'federated_sharing_edit_options' of https://github.com/nextcloud/android into dev
# Conflicts:
#	build.gradle
2017-05-03 18:27:09 +02:00
tobiasKaminsky f8dcfefea5 update dev 2017-05-03 2017-05-03 16:26:30 +02:00
tobiasKaminsky f07d88e197 Merge remote-tracking branch 'nextcloud/externalStorage' into dev 2017-05-03 16:25:26 +02:00
AndyScherzinger abb201c1c4 fix codacy warning 2017-05-03 15:00:34 +02:00
AndyScherzinger 1fb07f6692 fix import 2017-05-03 15:00:34 +02:00
AndyScherzinger 74eb71aded adaptes federated shares permission computation 2017-05-03 15:00:33 +02:00
AndyScherzinger acca3b5e08 fix compile error after lib merges
# Conflicts:
#	src/com/owncloud/android/ui/activity/ShareActivity.java
2017-05-03 15:00:33 +02:00
David A. Velasco d14657e493 Remove always-true component in condition, from CR 2017-05-03 15:00:33 +02:00
jabarros ab356b356a Fix var name in comment 2017-05-03 15:00:32 +02:00
jabarros eb581bdda5 Handle create, change and delete options in federated sharing in servers 9.1 or up
# Conflicts:
#	src/com/owncloud/android/ui/fragment/EditShareFragment.java
2017-05-03 15:00:32 +02:00
AndyScherzinger 25eb96ed0f fix codacy warning 2017-05-03 15:00:32 +02:00
AndyScherzinger c1baee06f6 reintroduce account for federated sharing permission 2017-05-03 15:00:31 +02:00
AndyScherzinger 4c3ebdf19f fix import 2017-05-03 15:00:31 +02:00
AndyScherzinger 243e940b22 adaptes federated shares permission computation 2017-05-03 15:00:30 +02:00
AndyScherzinger 86ef6701d3 fix compile error after lib merges
# Conflicts:
#	src/com/owncloud/android/ui/activity/ShareActivity.java
2017-05-03 15:00:30 +02:00
AndyScherzinger 742b803ea8 temp gradle dependency to library PR 2017-05-03 15:00:30 +02:00
AndyScherzinger 3ebef317ad add missing code fragments 2017-05-03 15:00:29 +02:00
David A. Velasco ac5a957ca1 Remove always-true component in condition, from CR 2017-05-03 15:00:29 +02:00
jabarros 0332ce4475 Fix var name in comment 2017-05-03 15:00:29 +02:00
jabarros c85c9904d7 Handle create, change and delete options in federated sharing in servers 9.1 or up
# Conflicts:
#	src/com/owncloud/android/ui/fragment/EditShareFragment.java
2017-05-03 15:00:26 +02:00
AndyScherzinger 55a55940f5 Merge branch 'master' of https://github.com/nextcloud/android into dev
# Conflicts:
#	src/main/res/values-fr/strings.xml
2017-05-03 14:45:56 +02:00
Tobias Kaminsky 8da05f4559 update dev 2017-05-03 2017-05-03 00:30:59 +02:00
Tobias Kaminsky dbe750d368 daily dev 20170502 2017-05-02 00:41:13 +02:00
Tobias Kaminsky a3b8019f0a update dev 2017-05-02 2017-05-02 00:31:47 +02:00
AndyScherzinger 7b74ed53ef Merge branch 'master' of https://github.com/nextcloud/android into dev
# Conflicts:
#	src/main/res/values/strings.xml
2017-05-01 18:39:17 +02:00
Tobias Kaminsky d45bb6b848 update dev 2017-05-01 2017-05-01 00:31:20 +02:00
Tobias Kaminsky c6c5ad5176 daily dev 20170430 2017-04-30 00:39:46 +02:00
Tobias Kaminsky 92600904a1 update dev 2017-04-30 2017-04-30 00:30:38 +02:00
Tobias Kaminsky 6428ed7c02 Merge remote-tracking branch 'nextcloud/master' into dev 2017-04-30 00:30:34 +02:00
Tobias Kaminsky 78775f143d daily dev 20170429 2017-04-29 00:46:36 +02:00
Tobias Kaminsky b6f0222caa update dev 2017-04-29 2017-04-29 00:32:27 +02:00
Tobias Kaminsky 2fe5a7d284 Merge remote-tracking branch 'nextcloud/master' into dev 2017-04-29 00:32:21 +02:00
AndyScherzinger b321407b77 Merge branch 'master' of https://github.com/nextcloud/android into dev
# Conflicts:
#	build.gradle
#	src/main/res/values/strings.xml
2017-04-28 10:37:36 +02:00
tobiasKaminsky 7e9a9040d3 reverting app id to beta as fdroid needs this 2017-04-28 10:33:10 +02:00
tobiasKaminsky 16b6b4c878 enable logger 2017-04-28 10:33:10 +02:00
tobiasKaminsky 0e62ecdcf0 build and use only generic release 2017-04-28 10:33:10 +02:00
tobiasKaminsky 5484adf4ab add date to commit messages 2017-04-28 10:33:09 +02:00
tobiasKaminsky 26ac31a362 improved changelog output 2017-04-28 10:33:09 +02:00
tobiasKaminsky d4099dd946 add dev-base to check 2017-04-28 10:33:08 +02:00
tobiasKaminsky 23f2bd43a1 new location of androidManifest 2017-04-28 10:33:08 +02:00
tobiasKaminsky 4cc79e1bcb inital state of dev base 2017-04-28 10:33:08 +02:00
Tobias Kaminsky b81c60cbe7 update dev 2017-04-28 2017-04-28 00:30:56 +02:00
Tobias Kaminsky 7431ea337c daily dev 20170427 2017-04-27 00:41:44 +02:00
Tobias Kaminsky 6a715b5a42 update dev 2017-04-27 2017-04-27 00:32:06 +02:00
Tobias Kaminsky 59353923c6 Merge remote-tracking branch 'nextcloud/master' into dev 2017-04-27 00:31:00 +02:00
Tobias Kaminsky 9121d12699 daily dev 20170426 2017-04-26 00:40:21 +02:00
Tobias Kaminsky 88dcd1f244 update dev 2017-04-26 2017-04-26 00:30:58 +02:00
Tobias Kaminsky 88e755f560 Merge remote-tracking branch 'nextcloud/master' into dev 2017-04-26 00:30:58 +02:00
Tobias Kaminsky 870cb1f794 daily dev 20170425 2017-04-25 00:48:21 +02:00
Tobias Kaminsky cbcef968e3 update dev 2017-04-25 2017-04-25 00:31:31 +02:00
AndyScherzinger 40edf50f86 Merge branch 'master' of https://github.com/nextcloud/android into dev
# Conflicts:
#	src/main/res/values-de-rDE/strings.xml
2017-04-24 08:47:37 +02:00
AndyScherzinger 0e9193594b Merge branch 'dev' of https://github.com/nextcloud/android into dev 2017-04-24 08:46:58 +02:00
Tobias Kaminsky c2c44c4bdf update dev 2017-04-24 2017-04-24 00:30:53 +02:00
Tobias Kaminsky 25ade84d89 update dev 2017-04-23 2017-04-23 00:32:00 +02:00
Tobias Kaminsky 3a9f25f496 update dev 2017-04-22 2017-04-22 00:40:32 +02:00
AndyScherzinger 1d50abafd4 remove unused image 2017-04-21 20:18:39 +02:00
AndyScherzinger ffdd318c5f Merge branch 'master' of https://github.com/nextcloud/android into dev
# Conflicts:
#	build.gradle
2017-04-21 20:08:58 +02:00
AndyScherzinger 82cec264f0 Merge branch 'master' of https://github.com/nextcloud/android into dev
# Conflicts:
#	build.gradle
#	src/main/AndroidManifest.xml
#	src/main/java/com/owncloud/android/authentication/PassCodeManager.java
#	src/main/java/com/owncloud/android/ui/activity/FingerprintActivity.java
#	src/main/java/com/owncloud/android/ui/activity/Preferences.java
#	src/main/res/layout/fingerprintlock.xml
#	src/main/res/values/setup.xml
#	src/main/res/values/strings.xml
2017-04-21 00:50:39 +02:00
Tobias Kaminsky f8f495d7fd update dev 2017-04-21 2017-04-21 00:32:05 +02:00
Tobias Kaminsky 3f9ccf96b0 update dev 2017-04-20 2017-04-20 00:31:17 +02:00
Tobias Kaminsky 9dc0271b99 daily dev 20170419 2017-04-19 00:38:19 +02:00
Tobias Kaminsky f5a9c4067e update dev 2017-04-19 2017-04-19 00:31:01 +02:00
Tobias Kaminsky aac405c430 Merge remote-tracking branch 'nextcloud/master' into dev 2017-04-19 00:30:56 +02:00
Tobias Kaminsky e93f404eb0 daily dev 20170418 2017-04-18 16:51:34 +02:00
Tobias Kaminsky fa0c0a4edb update dev 2017-04-18 2017-04-18 16:42:11 +02:00
Tobias Kaminsky bc94b966fd Merge remote-tracking branch 'nextcloud/master' into dev 2017-04-18 16:42:04 +02:00
Tobias Kaminsky 9b95160214 Merge remote-tracking branch 'nextcloud/master' into dev 2017-04-18 00:31:03 +02:00
Tobias Kaminsky 62e1aeba2c Merge remote-tracking branch 'nextcloud/master' into dev 2017-04-17 00:37:27 +02:00
Tobias Kaminsky 17c0322715 daily dev 20170415 2017-04-15 00:37:34 +02:00
Tobias Kaminsky c1871306f3 update dev 2017-04-15 2017-04-15 00:30:49 +02:00
Tobias Kaminsky bd8ad58cfc Merge remote-tracking branch 'nextcloud/master' into dev 2017-04-15 00:30:35 +02:00
Tobias Kaminsky b020cc51b7 daily dev 20170414 2017-04-14 00:37:03 +02:00
Tobias Kaminsky c77ffe2afb update dev 2017-04-14 2017-04-14 00:31:21 +02:00
tobiasKaminsky 50ba869b91 Merge remote-tracking branch 'remotes/origin/dev-base' into dev 2017-04-13 15:10:39 +02:00
tobiasKaminsky 991a84ad5e reverting app id to beta as fdroid needs this 2017-04-13 15:09:07 +02:00
Tobias Kaminsky af889a40ee update dev 2017-04-13 2017-04-13 14:50:21 +02:00
Tobias Kaminsky 7b4c1a9338 Merge remote-tracking branch 'nextcloud/dev-base' into dev 2017-04-13 14:49:06 +02:00
tobiasKaminsky 34bf82e59c enable logger 2017-04-13 14:48:06 +02:00
tobiasKaminsky ff67766cb6 build and use only generic release 2017-04-13 14:38:18 +02:00
Tobias Kaminsky a4e5a6f0e5 daily dev build 2017-04-13 14:29:46 +02:00
tobiasKaminsky 78afffb0c4 add date to commit messages 2017-04-13 14:25:48 +02:00
Tobias Kaminsky 9e5f3b8ca5 update dev 2017-04-13 14:18:52 +02:00
Tobias Kaminsky 111ebaf4bd Merge remote-tracking branch 'nextcloud/dev-base' into dev 2017-04-13 14:17:25 +02:00
tobiasKaminsky 2656b810f3 improved changelog output 2017-04-13 14:14:02 +02:00
Tobias Kaminsky 00f9ec9451 Merge remote-tracking branch 'nextcloud/dev-base' into dev 2017-04-13 10:04:21 +02:00
tobiasKaminsky 9cebde80af add dev-base to check 2017-04-13 10:02:16 +02:00
tobiasKaminsky d9362b73c1 new location of androidManifest 2017-04-13 09:59:33 +02:00
Tobias Kaminsky 2744da47b8 update dev 2017-04-13 09:56:01 +02:00
tobiasKaminsky 793c516f1f update dev 2017-04-13 09:27:52 +02:00
tobiasKaminsky 59f33abf53 Merge remote-tracking branch 'nextcloud/fix_file_modification_date_on_upload' into dev 2017-04-13 09:27:49 +02:00
tobiasKaminsky fe3746b61f Merge remote-tracking branch 'Flole998/master' into dev 2017-04-13 09:27:47 +02:00
tobiasKaminsky 0b6fbbc79f inital state of dev base 2017-04-13 09:14:19 +02:00
AndyScherzinger 836d7f670b fixes after rebase due to project structure changes 2017-04-05 19:21:02 +02:00
Flole de78b22e66 Fixed crashes when OEM removes Fingerprintmanager from system 2017-04-05 19:09:28 +02:00
Flole a287f8ecaf Removed useless check and double inverse 2017-04-05 19:09:26 +02:00
Flole998 4b21bf3687 Update strings.xml 2017-04-05 19:09:25 +02:00
Flole998 efb29b0fe9 Update strings.xml 2017-04-05 19:09:16 +02:00
Flole 9cfa1dafbe Fixing issues mentioned in review. 2017-04-05 19:09:14 +02:00
Flole def417dbd5 Made fingerprintmanager private 2017-04-05 19:08:59 +02:00
Flole f6fb0a5cf0 Fixed some issues 2017-04-05 19:08:58 +02:00
Flole 072a45bdd6 Fixed some issues 2017-04-05 19:08:56 +02:00
Flole 2c32f1dc37 Fixed some issues 2017-04-05 19:08:55 +02:00
Flole efedc11aaa Added Fingerprint Support 2017-04-05 19:08:54 +02:00
Flole 8c9bc8e595 Added Fingerprint Support 2017-04-05 19:08:16 +02:00
AndyScherzinger 638df22080 fix rebase 2017-04-05 11:28:19 +02:00
AndyScherzinger 9b60ca7798 use lib master since lib pr got merged 2017-04-05 11:28:19 +02:00
davigonz 03d0c9fa4a update to snapshot of lib version 2017-04-05 11:28:18 +02:00
davigonz 1d7a427bd4 Read modification time from the file in local filesystem and set it to the file
# Conflicts:
#	src/com/owncloud/android/operations/UploadFileOperation.java
2017-04-05 11:28:18 +02:00
tobiasKaminsky 46f7e0af4e setting / snackbar is working 2017-03-19 10:24:12 +01:00
tobiasKaminsky 1e653d5eaf wip snackbar 2017-03-18 07:14:36 +01:00
tobiasKaminsky 8f291127ba wip saving behaviour 2017-03-05 08:38:27 +01:00
tobiasKaminsky f862099e20 Merge remote-tracking branch 'remotes/origin/master' into resizedImages 2017-03-04 12:22:55 +01:00
tobiasKaminsky b25fe94af0 wip snackbars 2017-03-04 12:13:08 +01:00
Mario Danic 21becb9363 Add space 2017-02-23 11:31:33 +01:00
Mario Danic 88c478e40e Fix a weird weird bug 2017-02-23 11:31:33 +01:00
Mario Danic 6cc809e0c7 Fix an issue with restoring search and UI 2017-02-23 11:31:32 +01:00
Mario Danic 99da61cd22 Fix restore functionality 2017-02-23 11:31:32 +01:00
Mario Danic 649a9e0902 Fix review bugs 2017-02-23 11:31:31 +01:00
Mario Danic 77373f54b2 Remove an import that we dont need 2017-02-23 11:31:31 +01:00
Mario Danic da6bed8424 Fix a few tiny bugs 2017-02-23 11:31:31 +01:00
Mario Danic efe6692050 Fix a NPE 2017-02-23 11:31:30 +01:00
Mario Danic 874d10928b Combine ifs 2017-02-23 11:31:30 +01:00
Mario Danic fdd0a8016c Fix issues brought up by review 2017-02-23 11:31:30 +01:00
AndyScherzinger 03b1114e7b make finding bold 2017-02-23 11:31:29 +01:00
AndyScherzinger 1f6948a633 use primary color for highlighting 2017-02-23 11:31:29 +01:00
Mario Danic d7133e9a32 Fix a review issue in FileDisplayActivity 2017-02-23 11:31:29 +01:00
Mario Danic c7ba9715f7 Fix issues found by review 2017-02-23 11:31:28 +01:00
Mario Danic 89aceed2b3 Fix codacy issues 2017-02-23 11:31:28 +01:00
Mario Danic 86985234e4 Restore search state 2017-02-23 11:31:28 +01:00
Mario Danic 4757465a0a First step towards text search 2017-02-23 11:31:27 +01:00
Mario Danic b21b3ad9c8 Fix review bugs 2017-02-23 11:31:27 +01:00
Mario Danic 78ef8e37fe Remove an import that we dont need 2017-02-23 11:31:27 +01:00
Mario Danic 73593de509 Remove search in the media preview 2017-02-23 11:31:26 +01:00
Mario Danic 9dd89462fe Fix a few tiny bugs 2017-02-23 11:31:26 +01:00
Mario Danic 0ab852e785 Fix a NPE 2017-02-23 11:31:26 +01:00
Mario Danic afbf4b79ec Combine ifs 2017-02-23 11:31:25 +01:00
Mario Danic 5b2b20fedd Fix issues brought up by review 2017-02-23 11:31:25 +01:00
AndyScherzinger 1ae1f50384 make finding bold 2017-02-23 11:31:24 +01:00
AndyScherzinger 5140c797c1 use primary color for highlighting 2017-02-23 11:31:24 +01:00
Mario Danic 66f38a094f Fix a review issue in FileDisplayActivity 2017-02-23 11:31:24 +01:00
Mario Danic 57aaf139a2 Fix issues found by review 2017-02-23 11:31:23 +01:00
Mario Danic c3f4fe8ccd Fix codacy issues 2017-02-23 11:31:23 +01:00
Mario Danic 9194d2e10f Restore search state 2017-02-23 11:31:23 +01:00
Mario Danic 937bdfd66f First step towards text search 2017-02-23 11:31:19 +01:00
tobiasKaminsky 18a35a2586 fix some codacy issues 2017-02-13 12:55:02 +01:00
tobiasKaminsky 2d76982d47 Merge remote-tracking branch 'remotes/origin/master' into resizedImages 2017-02-13 12:48:55 +01:00
AndyScherzinger e8a92a0031 Merge branch 'master' of https://github.com/nextcloud/android into resizedImages 2017-01-21 14:36:10 +01:00
AndyScherzinger 816f532417 Merge branch 'master' of https://github.com/nextcloud/android into resizedImages 2017-01-10 22:26:51 +01:00
AndyScherzinger 65be7efa2d Merge branch 'master' of https://github.com/nextcloud/android into resizedImages 2017-01-04 18:24:32 +01:00
tobiasKaminsky d6115cbf85 Merge remote-tracking branch 'remotes/origin/master' into resizedImages
# Conflicts:
#	src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
2016-12-29 14:37:53 +01:00
tobiasKaminsky d1d99c5e3f send resized image also on filelist 2016-12-28 07:55:48 +01:00
tobiasKaminsky b203c48c51 Merge remote-tracking branch 'remotes/origin/master' into resizedImages 2016-11-16 12:29:26 +01:00
tobiasKaminsky cbc44a6014 Merge remote-tracking branch 'remotes/origin/master' into resizedImages 2016-09-18 09:13:16 +02:00
tobiasKaminsky 69661e6951 Merge remote-tracking branch 'remotes/origin/master' into resizedImages 2016-09-17 16:25:39 +02:00
tobiasKaminsky 9a2ae6cb0b fix bug: resized image was always used indepentent of download state 2016-09-03 12:15:06 +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
Andy Scherzinger 93bb169c6c GPLv3 2016-08-01 11:31:37 +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 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 eac4e49ceb fixed showing thumbnails in local file list (uploader) 2016-01-03 13:36:29 +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 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
123 changed files with 3277 additions and 1191 deletions

No files matched your search

+1
View File
@@ -0,0 +1 @@
scripts/lint/lint-results.txt merge=theirs
+775 -2
View File
@@ -1,5 +1,778 @@
## 1.4.3 (May 22, 2017)
- Hotfix: ignore oauth header for now and use basic auth to allow new logins for nc12
## 2017-08-02 10:04
New branches:
/
Updated branches:
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
Conflicting branches:
/
## 2017-08-02 09:58
New branches:
/
Updated branches:
- Resized images (nextcloud/resizedImages) [https://github.com/nextcloud/android/pull/69] updated
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
Conflicting branches:
/
## 2017-08-02 00:30
New branches:
/
Updated branches:
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
Conflicting branches:
/
## 2017-08-01 00:30
New branches:
/
Updated branches:
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
Conflicting branches:
/
## 2017-07-31 00:30
New branches:
/
Updated branches:
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
Conflicting branches:
- Error feedback improvement (nextcloud/errorFeedback) [https://github.com/nextcloud/android/pull/1198] conflicting
## 2017-07-30 00:31
New branches:
/
Updated branches:
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
Conflicting branches:
- Error feedback improvement (nextcloud/errorFeedback) [https://github.com/nextcloud/android/pull/1198] conflicting
## 2017-07-29 00:31
New branches:
- On receiving untrusted ssl cert, test if it was previously accepted user (nextcloud/newWebLoginUntrustedCert) [https://github.com/nextcloud/android/pull/1206] added
Updated branches:
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- Show empty message when receiving external files (nextcloud/emptyMessageReceiveExternalFiles) [https://github.com/nextcloud/android/pull/1214] updated
- Show empty message again (nextcloud/showEmptyMessageAgain) [https://github.com/nextcloud/android/pull/1213] updated
- On receiving untrusted ssl cert, test if it was previously accepted user (nextcloud/newWebLoginUntrustedCert) [https://github.com/nextcloud/android/pull/1206] updated
- Comment out adding all new downloaded files to folder observer (nextcloud/folderObserver) [https://github.com/nextcloud/android/pull/1155] updated
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
Conflicting branches:
- Error feedback improvement (nextcloud/errorFeedback) [https://github.com/nextcloud/android/pull/1198] conflicting
## 2017-07-28 00:30
New branches:
/
Updated branches:
/
Conflicting branches:
- Extract html code and make it non-translatable (nextcloud/participateUrls) [https://github.com/nextcloud/android/pull/1224] conflicting
- Show empty message when receiving external files (nextcloud/emptyMessageReceiveExternalFiles) [https://github.com/nextcloud/android/pull/1214] conflicting
- Show empty message again (nextcloud/showEmptyMessageAgain) [https://github.com/nextcloud/android/pull/1213] conflicting
- resolves: #1207 make daily contact backup string translatable (nextcloud/dailyBackupString) [https://github.com/nextcloud/android/pull/1208] conflicting
- On receiving untrusted ssl cert, test if it was previously accepted user (nextcloud/newWebLoginUntrustedCert) [https://github.com/nextcloud/android/pull/1206] conflicting
- Auto upload crash if filepath is null (nextcloud/autoUploadCrashIfFilepathIsNull) [https://github.com/nextcloud/android/pull/1201] conflicting
- Comment out adding all new downloaded files to folder observer (nextcloud/folderObserver) [https://github.com/nextcloud/android/pull/1155] conflicting
- Master (nextcloud/master) [https://github.com/nextcloud/android] conflicting
## 2017-07-27 00:31
New branches:
/
Updated branches:
- Show empty message again (nextcloud/showEmptyMessageAgain) [https://github.com/nextcloud/android/pull/1213] updated
Conflicting branches:
- resolves: #1207 make daily contact backup string translatable (nextcloud/dailyBackupString) [https://github.com/nextcloud/android/pull/1208] conflicting
- Auto upload crash if filepath is null (nextcloud/autoUploadCrashIfFilepathIsNull) [https://github.com/nextcloud/android/pull/1201] conflicting
- revamped details screen (nextcloud/new_details_view_animations) [https://github.com/nextcloud/android/pull/1156] conflicting
- Comment out adding all new downloaded files to folder observer (nextcloud/folderObserver) [https://github.com/nextcloud/android/pull/1155] conflicting
- Master (nextcloud/master) [https://github.com/nextcloud/android] conflicting
## 2017-07-26 00:31
New branches:
- Show empty message when receiving external files (nextcloud/emptyMessageReceiveExternalFiles) [https://github.com/nextcloud/android/pull/1214] added
Updated branches:
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- Show empty message when receiving external files (nextcloud/emptyMessageReceiveExternalFiles) [https://github.com/nextcloud/android/pull/1214] updated
Conflicting branches:
/
## 2017-07-25 00:32
New branches:
- On device: show only folders containing downloaded files #983 (jsrck/983_hide-folders) [https://github.com/nextcloud/android/pull/1220] added
Updated branches:
- On device: show only folders containing downloaded files #983 (jsrck/983_hide-folders) [https://github.com/nextcloud/android/pull/1220] updated
Conflicting branches:
- Extract html code and make it non-translatable (nextcloud/participateUrls) [https://github.com/nextcloud/android/pull/1224] conflicting
- Show empty message when receiving external files (nextcloud/emptyMessageReceiveExternalFiles) [https://github.com/nextcloud/android/pull/1214] conflicting
- Show empty message again (nextcloud/showEmptyMessageAgain) [https://github.com/nextcloud/android/pull/1213] conflicting
- resolves: #1207 make daily contact backup string translatable (nextcloud/dailyBackupString) [https://github.com/nextcloud/android/pull/1208] conflicting
- Auto upload crash if filepath is null (nextcloud/autoUploadCrashIfFilepathIsNull) [https://github.com/nextcloud/android/pull/1201] conflicting
- revamped details screen (nextcloud/new_details_view_animations) [https://github.com/nextcloud/android/pull/1156] conflicting
- Comment out adding all new downloaded files to folder observer (nextcloud/folderObserver) [https://github.com/nextcloud/android/pull/1155] conflicting
- Master (nextcloud/master) [https://github.com/nextcloud/android] conflicting
## 2017-07-24 08:54
New branches:
/
Updated branches:
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
Conflicting branches:
/
## 2017-07-24 00:31
New branches:
/
Updated branches:
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
Conflicting branches:
/
## 2017-07-23 00:31
New branches:
/
Updated branches:
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
Conflicting branches:
/
## 2017-07-22 00:32
New branches:
/
Updated branches:
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- Feature request: Select all particularly in search #637 (jsrck/master) [https://github.com/nextcloud/android/pull/1196] updated
Conflicting branches:
/
## 2017-07-21 10:33
New branches:
/
Updated branches:
/
Conflicting branches:
/
## 2017-07-21 10:25
New branches:
/
Updated branches:
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
Conflicting branches:
/
## 2017-07-21 08:57
New branches:
- Show empty message again (nextcloud/showEmptyMessageAgain) [https://github.com/nextcloud/android/pull/1213] added
- Feature request: Select all particularly in search #637 (jsrck/master) [https://github.com/nextcloud/android/pull/1196] added
Updated branches:
- Show empty message again (nextcloud/showEmptyMessageAgain) [https://github.com/nextcloud/android/pull/1213] updated
- Feature request: Select all particularly in search #637 (jsrck/master) [https://github.com/nextcloud/android/pull/1196] updated
Conflicting branches:
/
## 2017-07-21 07:24
New branches:
/
Updated branches:
/
Conflicting branches:
/
## 2017-07-21 00:30
/
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
/
## 2017-07-20 15:29
/
/
/
## 2017-07-20 00:31
no new branches added
no branches updated
## 2017-07-19 00:32
no new branches added
no branches updated
## 2017-07-18 00:31
- Auto upload crash if filepath is null (nextcloud/autoUploadCrashIfFilepathIsNull) [https://github.com/nextcloud/android/pull/1201] added
- Auto upload crash if filepath is null (nextcloud/autoUploadCrashIfFilepathIsNull) [https://github.com/nextcloud/android/pull/1201] updated
## 2017-07-17 00:31
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- revamped details screen (nextcloud/new_details_view_animations) [https://github.com/nextcloud/android/pull/1156] updated
- Comment out adding all new downloaded files to folder observer (nextcloud/folderObserver) [https://github.com/nextcloud/android/pull/1155] updated
## 2017-07-16 00:31
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
## 2017-07-15 00:30
no new branches added
no branches updated
## 2017-07-14 00:30
- revamped details screen (nextcloud/new_details_view_animations) [https://github.com/nextcloud/android/pull/1156] added
- Resized images (nextcloud/resizedImages) [https://github.com/nextcloud/android/pull/69] added
- revamped details screen (nextcloud/new_details_view_animations) [https://github.com/nextcloud/android/pull/1156] updated
- Resized images (nextcloud/resizedImages) [https://github.com/nextcloud/android/pull/69] updated
## 2017-07-13 00:31
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-07-12 00:31
- Catch a rare exception while setting activity list adapter (nextcloud/ErrorInActivityListAdapter) [https://github.com/nextcloud/android/pull/1173] added
- Catch a rare exception while setting activity list adapter (nextcloud/ErrorInActivityListAdapter) [https://github.com/nextcloud/android/pull/1173] updated
- Theming Dynamically use server color (nextcloud/userTheming) [https://github.com/nextcloud/android/pull/1031] updated
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-07-11 00:30
no new branches added
- Theming Dynamically use server color (nextcloud/userTheming) [https://github.com/nextcloud/android/pull/1031] updated
## 2017-07-10 00:31
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-07-09 00:31
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-07-08 00:30
no new branches added
no branches updated
## 2017-07-07 00:30
- Theming Dynamically use server color (nextcloud/userTheming) [https://github.com/nextcloud/android/pull/1031] added
- Theming Dynamically use server color (nextcloud/userTheming) [https://github.com/nextcloud/android/pull/1031] updated
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-07-06 00:30
- Fix: no shared folders after \ (nextcloud/sharedFolderMissing) [https://github.com/nextcloud/android/pull/1165] added
- Fix: no shared folders after \ (nextcloud/sharedFolderMissing) [https://github.com/nextcloud/android/pull/1165] updated
## 2017-07-05 00:31
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
## 2017-07-04 00:31
no new branches added
no branches updated
## 2017-07-03 00:31
no new branches added
no branches updated
## 2017-07-02 00:30
no new branches added
no branches updated
## 2017-07-01 00:30
- Comment out adding all new downloaded files to folder observer (nextcloud/folderObserver) [https://github.com/nextcloud/android/pull/1155] added
- Comment out adding all new downloaded files to folder observer (nextcloud/folderObserver) [https://github.com/nextcloud/android/pull/1155] updated
## 2017-06-30 00:32
no new branches added
- 1089 sharing with password rule (nextcloud/1089_sharing_with_password_rule) [https://github.com/nextcloud/android/pull/1110] updated
## 2017-06-29 00:31
- Cancel pending thumbnail tasks (nextcloud/stopAsyncTasks) [https://github.com/nextcloud/android/pull/1149] added
- Cancel pending thumbnail tasks (nextcloud/stopAsyncTasks) [https://github.com/nextcloud/android/pull/1149] updated
## 2017-06-28 00:32
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- Fix settings on android 4.x (nextcloud/settingsOn4x) [https://github.com/nextcloud/android/pull/1133] updated
- 1089 sharing with password rule (nextcloud/1089_sharing_with_password_rule) [https://github.com/nextcloud/android/pull/1110] updated
## 2017-06-27 00:31
- Prevent NPE when disabling \ (nextcloud/autoUploadWithoutStoragePermission) [https://github.com/nextcloud/android/pull/1140] added
- Auto upload rotation bug (nextcloud/autoUploadRotationBug) [https://github.com/nextcloud/android/pull/1138] added
- Opens share by clicking icon in file listing (nextcloud/shareDialog) [https://github.com/nextcloud/android/pull/1135] added
- Fix settings on android 4.x (nextcloud/settingsOn4x) [https://github.com/nextcloud/android/pull/1133] added
- 1089 sharing with password rule (nextcloud/1089_sharing_with_password_rule) [https://github.com/nextcloud/android/pull/1110] added
- Enhance UI\ (nextcloud/contactsBackupUI) [https://github.com/nextcloud/android/pull/1027] added
- Prevent NPE when disabling \ (nextcloud/autoUploadWithoutStoragePermission) [https://github.com/nextcloud/android/pull/1140] updated
- Auto upload rotation bug (nextcloud/autoUploadRotationBug) [https://github.com/nextcloud/android/pull/1138] updated
- Opens share by clicking icon in file listing (nextcloud/shareDialog) [https://github.com/nextcloud/android/pull/1135] updated
- Fix settings on android 4.x (nextcloud/settingsOn4x) [https://github.com/nextcloud/android/pull/1133] updated
- 1089 sharing with password rule (nextcloud/1089_sharing_with_password_rule) [https://github.com/nextcloud/android/pull/1110] updated
- Enhance UI\ (nextcloud/contactsBackupUI) [https://github.com/nextcloud/android/pull/1027] updated
## 2017-06-26 00:31
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-06-25 00:30
no new branches added
no branches updated
## 2017-06-24 00:31
- Sdcard: test if writable before offering it (nextcloud/removedSDcard) [https://github.com/nextcloud/android/pull/1119] added
- Delete all local files on account removal (nextcloud/deleteFilesOnAccountRemoval) [https://github.com/nextcloud/android/pull/1109] added
- Sdcard: test if writable before offering it (nextcloud/removedSDcard) [https://github.com/nextcloud/android/pull/1119] updated
- Delete all local files on account removal (nextcloud/deleteFilesOnAccountRemoval) [https://github.com/nextcloud/android/pull/1109] updated
## 2017-06-23 00:31
- Transaction too large (nextcloud/transactionTooLarge) [https://github.com/nextcloud/android/pull/1102] added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- Transaction too large (nextcloud/transactionTooLarge) [https://github.com/nextcloud/android/pull/1102] updated
## 2017-06-22 00:31
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
## 2017-06-21 00:31
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-06-18 00:30
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-06-17 00:31
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-06-16 00:31
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-06-15 00:31
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-06-14 00:30
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-06-13 00:30
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-06-12 00:31
no new branches added
no branches updated
## 2017-06-11 00:31
no new branches added
no branches updated
## 2017-06-10 00:30
no new branches added
no branches updated
## 2017-06-09 00:30
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-06-08 00:31
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
## 2017-06-07 00:31
no new branches added
no branches updated
## 2017-06-06 00:31
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-06-05 00:30
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-06-04 00:30
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-06-03 00:30
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-06-02 00:30
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-06-01 00:31
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
## 2017-05-31 00:30
no new branches added
no branches updated
## 2017-05-30 00:30
no new branches added
no branches updated
## 2017-05-29 00:31
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-28 00:30
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-27 00:30
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
## 2017-05-26 00:30
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-25 00:30
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-24 00:31
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
## 2017-05-23 00:30
no new branches added
no branches updated
## 2017-05-22 00:31
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-21 00:32
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-20 00:31
- Search view wrong files (nextcloud/searchViewWrongFiles) [https://github.com/nextcloud/android/pull/896] added
- Pinch zoom (nextcloud/pinchZoom) [https://github.com/nextcloud/android/pull/143] added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- Search view wrong files (nextcloud/searchViewWrongFiles) [https://github.com/nextcloud/android/pull/896] updated
- Pinch zoom (nextcloud/pinchZoom) [https://github.com/nextcloud/android/pull/143] updated
## 2017-05-19 00:31
no new branches added
- Crash due to non-existing empty string (nextcloud/crashDueToEmptyString) [https://github.com/nextcloud/android/pull/995] updated
## 2017-05-18 00:30
no new branches added
- Crash due to non-existing empty string (nextcloud/crashDueToEmptyString) [https://github.com/nextcloud/android/pull/995] updated
## 2017-05-17 15:07
- Crash due to non-existing empty string (nextcloud/crashDueToEmptyString) [https://github.com/nextcloud/android/pull/995] added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- Crash due to non-existing empty string (nextcloud/crashDueToEmptyString) [https://github.com/nextcloud/android/pull/995] updated
## 2017-05-17 00:32
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
## 2017-05-16 14:27
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
## 2017-05-16 13:43
no new branches added
no branches updated
## 2017-05-16 00:31
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
## 2017-05-15 00:32
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-13 09:04
- Re-use second fragment if available (nextcloud/audioRotationBug) [https://github.com/nextcloud/android/pull/985] added
- Re-use second fragment if available (nextcloud/audioRotationBug) [https://github.com/nextcloud/android/pull/985] updated
## 2017-05-13 00:31
no new branches added
no branches updated
## 2017-05-12 00:31
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-11 00:31
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-10 00:31
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-09 00:30
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-08 00:31
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-07 00:31
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-06 00:30
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-05 00:31
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-04 00:31
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-03 16:25
- Enhance external Sdcard usage (nextcloud/externalStorage) [https://github.com/nextcloud/android/pull/947] added
- Enhance external Sdcard usage (nextcloud/externalStorage) [https://github.com/nextcloud/android/pull/947] updated
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-05-03 00:30
no new branches added
no branches updated
## 2017-05-02 00:31
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
## 2017-05-01 00:31
no new branches added
no branches updated
## 2017-04-30 00:30
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-04-29 00:32
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-04-28 00:30
no new branches added
no branches updated
## 2017-04-27 00:31
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-04-26 00:30
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-04-25 00:31
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
## 2017-04-24 00:30
no new branches added
no branches updated
## 2017-04-23 00:31
no new branches added
no branches updated
## 2017-04-22 00:40
no new branches added
no branches updated
## 2017-04-21 00:31
no new branches added
no branches updated
## 2017-04-20 00:31
no new branches added
no branches updated
## 2017-04-19 00:30
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-04-18 16:42
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-04-15 00:30
no new branches added
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 2017-04-14 00:31
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
## 2017-04-13 14:50
no new branches added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
## 2017-04-13 14:18
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] added
- Dev base (nextcloud/dev-base) [https://github.com/nextcloud/android/tree/dev-base] added
- Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] updated
## 2017-04-13 09:55
## 2017-04-13 09:27
- Added fingerprint support (Flole998/master) [https://github.com/nextcloud/android/pull/624] updated
- Fix file modification date on upload (nextcloud/fix_file_modification_date_on_upload) [https://github.com/nextcloud/android/pull/451] updated
- Master (nextcloud/master) [https://github.com/nextcloud/android] updated
## 1.4.2 (March 14, 2017)
- Auto Upload for newly taken photos/images (Android 6+)
+24 -3
View File
@@ -75,13 +75,17 @@ android {
multiDexEnabled true
applicationId "com.nextcloud.android.beta"
versionCode 20170802
versionName "20170802"
// adapt structure from Eclipse to Gradle/Android Studio expectations;
// see http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Configuring-the-Structure
productFlavors {
// used for f-droid
generic {
applicationId 'com.nextcloud.client'
applicationId 'com.nextcloud.android.beta'
}
gplay {
@@ -121,6 +125,10 @@ android {
exclude 'META-INF/LICENSE'
}
signingConfigs {
release
}
task checkstyle(type: Checkstyle) {
configFile = file("${rootProject.projectDir}/checkstyle.xml")
configProperties.checkstyleSuppressionsPath = file("${project.rootDir}/config/quality/checkstyle/suppressions.xml").absolutePath
@@ -172,6 +180,19 @@ 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
}
dependencies {
@@ -179,7 +200,7 @@ dependencies {
compile name: 'touch-image-view'
compile 'com.android.support:multidex:1.0.1'
compile 'com.github.nextcloud:android-library:1.0.22'
compile 'com.github.nextcloud:android-library:dev-SNAPSHOT'
compile "com.android.support:support-v4:${supportLibraryVersion}"
compile "com.android.support:design:${supportLibraryVersion}"
compile 'com.jakewharton:disklrucache:2.0.2'
@@ -188,7 +209,7 @@ dependencies {
compile 'com.github.tobiasKaminsky:android-floating-action-button:1.10.2'
compile 'com.google.code.findbugs:annotations:2.0.1'
compile group: 'commons-io', name: 'commons-io', version: '2.4'
compile 'com.github.evernote:android-job:v1.1.9'
compile 'com.github.evernote:android-job:v1.1.10'
compile 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
compile 'org.greenrobot:eventbus:3.0.0'
+13
View File
@@ -0,0 +1,13 @@
2017-08-02 10:04:46
Branches: 10
[00 / 10] Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] was updated successfully
[01 / 10] Enabling dom storage api (nextcloud/domAPI) [https://github.com/nextcloud/android/pull/1253] no update needed
[02 / 10] Reduce lint errors (nextcloud/reduceLintErrors) [https://github.com/nextcloud/android/pull/1252] no update needed
[03 / 10] Show empty message when receiving external files (nextcloud/emptyMessageReceiveExternalFiles) [https://github.com/nextcloud/android/pull/1214] no update needed
[04 / 10] Show empty message again (nextcloud/showEmptyMessageAgain) [https://github.com/nextcloud/android/pull/1213] no update needed
[05 / 10] Error feedback improvement (nextcloud/errorFeedback) [https://github.com/nextcloud/android/pull/1198] no update needed
[06 / 10] Comment out adding all new downloaded files to folder observer (nextcloud/folderObserver) [https://github.com/nextcloud/android/pull/1155] no update needed
[07 / 10] Search inside of text files (nextcloud/bugfix-454) [https://github.com/nextcloud/android/pull/565] no update needed
[08 / 10] Resized images (nextcloud/resizedImages) [https://github.com/nextcloud/android/pull/69] no update needed
[09 / 10] Master (nextcloud/master) [https://github.com/nextcloud/android] no update needed
[10 / 10] Dev base (nextcloud/dev-base) [https://github.com/nextcloud/android/tree/dev-base] no update needed
@@ -0,0 +1,5 @@
Die Nextcloud App erlaubt Dir Zugriff auf alle Dateien in Deiner Nextcloud.
Die ist die Dev-Version der offiziellen Nextcloud App und enthält neue Features, die noch nicht ausgiebig getestet wurden. Dies kann zu Datenverlust oder Instabilität führen. Die App ist nur zum Testen der neuen Funktionen, melden von Fehlern und nicht für den alltäglichen Einsatz vorgesehen.
Die Dev-Version kann parallel zu der offiziellen Nextcloud-App installiert werden.
Binary file not shown.

After

Width:  |  Height:  |  Size: 821 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

@@ -0,0 +1 @@
Die Nextcloud App erlaubt Dir Zugriff auf alle Dateien in Deiner Nextcloud.
@@ -0,0 +1 @@
Nextcloud Dev
@@ -0,0 +1,4 @@
A safe home for all your data. Access & share your files, calendars, contacts, mail & more from any device, on your terms.
This is a dev version of the official Nextcloid app and includes brand-new, untested features which might lead to instabilities and data loss. The app is designed for users willing to test the new features and to report bugs if they occur. Do not use it for your productive work!
The dev version can be installed alongside the official Nextcloud app which is available at F-Droid, too. Once a day it is checked if the source code was updated, so there can be longer pauses between builds.
Binary file not shown.

After

Width:  |  Height:  |  Size: 821 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

@@ -0,0 +1 @@
A safe home for all your data. Access & share your files, calendars, contacts, mail & more from any device, on your terms.
@@ -0,0 +1 @@
Nextcloud Dev
+31
View File
@@ -0,0 +1,31 @@
Flole998/master
jsrck/983_hide-folders
jsrck/master
nextcloud/1089_sharing_with_password_rule
nextcloud/audioRotationBug
nextcloud/autoUploadCrashIfFilepathIsNull
nextcloud/autoUploadRotationBug
nextcloud/autoUploadWithoutStoragePermission
nextcloud/contactsBackupUI
nextcloud/crashDueToEmptyString
nextcloud/deleteFilesOnAccountRemoval
nextcloud/dev
nextcloud/emptyMessageReceiveExternalFiles
nextcloud/ErrorInActivityListAdapter
nextcloud/externalStorage
nextcloud/fix_file_modification_date_on_upload
nextcloud/folderObserver
nextcloud/master
nextcloud/new_details_view_animations
nextcloud/newWebLoginUntrustedCert
nextcloud/pinchZoom
nextcloud/removedSDcard
nextcloud/resizedImages
nextcloud/searchViewWrongFiles
nextcloud/settingsOn4x
nextcloud/sharedFolderMissing
nextcloud/shareDialog
nextcloud/showEmptyMessageAgain
nextcloud/stopAsyncTasks
nextcloud/transactionTooLarge
nextcloud/userTheming
+44
View File
@@ -0,0 +1,44 @@
#!/bin/bash
date=$(date +%Y%m%d)
# use the current date
mkdir -p ~/apks
echo $date > ~/apks/latest
# always use dev branch for android library
sed -i s"#'com.github.nextcloud:android-library.*#'com.github.nextcloud:android-library:dev-SNAPSHOT'#" build.gradle
# use current date for version code/name
sed -i s"#android:versionCode=.*#android:versionCode=\"$date\"#" src/main/AndroidManifest.xml
sed -i s"#versionCode .*#versionCode $date#" build.gradle
sed -i s"#android:versionName=.*\"#android:versionName=\"$date\"#" src/main/AndroidManifest.xml
sed -i s"#versionName .*#versionName \"$date\"#" build.gradle
# sed -e 's#\@string/app_name#Nextcloud dev#' -e 's#\@string/copy_link#Copy link#' -e 's#\@string/share_dialog_title#Sharing#' -e 's#\@string/manage_space_title#Manage space#' src/main/AndroidManifest.xml -i
# build signed apk
gradle assembleGenericRelease >> /tmp/dev.log 2>&1
if [ $? != 0 ] ; then
echo "Build error!"
exit 1
fi
mv build/outputs/apk/android-generic-release.apk ~/apks/nextcloud-dev-$date.apk
ln -s nextcloud-dev-$date.apk latest.apk
mv latest.apk ~/apks/
# remove all but the latest 5 apks
/bin/ls -t ~/apks/*.apk | awk 'NR>6' | xargs rm -f
git add .
git commit -m "daily dev $date"
git push
git tag dev-$date
git push origin dev-$date
# remove all but the latest 5 tags
git tag|grep dev | sort -r | awk 'NR>5' | xargs -n 1 git push --delete origin
git tag|grep dev | sort -r | awk 'NR>5' | xargs -n 1 git tag -d
+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
currentCommit=$(git rev-parse HEAD)
statusFile="devUpdateStatus"
touch mergedBranches
# check if branch was changed
git pull -q || exit
branches=$(scripts/getBranchesForDev)
branchesCount=$(echo "$branches" | wc -l)
count=1
conflictingBranches=0
date "+%F %X" > $statusFile
while read -r branch; do
branchName=$(echo $branch | cut -d"(" -f2 | cut -d")" -f1 | tr ":" "/")
if [ $(echo $branchName | grep -c "^origin") -eq 0 ] ; then
# remote repo
git fetch -q $(echo $branchName | cut -f1 -d"/") 1> /dev/null
fi
mergeOutput=$(git merge --no-edit $branchName)
if [ $? -ne 0 ] ; then
echo "[$(printf "%02d" $count) / $(printf "%02d" $branchesCount)] $branch CONFLICT" >> $statusFile
let conflictingBranches++
git merge --abort
fi
let count++
done <<< "$branches"
if [ $conflictingBranches -gt 0 ] ; then
grep -i conflict $statusFile | mail -s "[Nextcloud-Dev] $(date '+%F %X') Conflicting branches!" $1
fi
# reset to previous commit, delete all inbetween commits
git reset --hard $currentCommit
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
source ~/.git/githubPass
pullRequests=$(curl -u "$GITHUB_USER:$GITHUB_PASS" 2>/dev/null https://api.github.com/search/issues?q=repo:nextcloud/android+state:open+type:pr+label:%22ready%20for%20dev%22 | grep pulls | cut -d'"' -f4)
for pr in $pullRequests; do
xml=$(curl -u "$GITHUB_USER:$GITHUB_PASS" 2> /dev/null $pr)
branchName=$(echo "$xml" | grep \"label\" | head -n1 | cut -d'"' -f 4| tr ":" "/")
title=$(echo "$xml" | grep "title" | head -n1 | cut -d'"' -f 4 | tr -d "(" | tr -d ")" | tr -d "[" | tr -d "]")
htmlUrl=$(echo "$xml" |grep html_url | grep pull | cut -d'"' -f4)
echo "$title ("$branchName") ["$htmlUrl"]"
done
# manually add master and dev-base branch
echo "Master (nextcloud/master) [https://github.com/nextcloud/android]"
echo "Dev base (nextcloud/dev-base) [https://github.com/nextcloud/android/tree/dev-base]"
## add remote repos
for repoUrl in $(curl -u "$GITHUB_USER:$GITHUB_PASS" 2> /dev/null $pullRequests | grep \"git_url\" | sort | uniq | cut -f4 -d"\"" ); do
repoName=$(echo $repoUrl | cut -f4 -d"/")
git remote add $repoName $repoUrl 2>/dev/null
done
+1 -1
View File
@@ -1,2 +1,2 @@
DO NOT TOUCH; GENERATED BY DRONE
<span class="mdl-layout-title">Lint Report: 41 errors and 779 warnings</span>
<span class="mdl-layout-title">Lint Report: 20 errors and 678 warnings</span>
+97
View File
@@ -0,0 +1,97 @@
#!/bin/bash
statusFile="devUpdateStatus"
touch mergedBranches
# check if branch was changed
git fetch
devBranchWasUpdated=$(git status | grep "dem selben Stand" -c)
git pull -q || exit
branches=$(scripts/getBranchesForDev)
branchesCount=$(echo "$branches" | wc -l)
count=1
conflictingBranches=0
date "+%F %X" > $statusFile
echo "Branches: $branchesCount" >> $statusFile
if [ $devBranchWasUpdated -eq 0 ]; then
# branch was updated outside, so build new dev
echo "[00 / $(printf "%02d" $branchesCount)] Dev branch (nextcloud/dev) [https://github.com/nextcloud/android/tree/dev] was updated successfully" >> $statusFile
fi
while read -r branch; do
echo -n "[$(printf "%02d" $count) / $(printf "%02d" $branchesCount)] " >> $statusFile
branchName=$(echo $branch | cut -d"(" -f2 | cut -d")" -f1 | tr ":" "/")
if [ $(echo $branchName | grep -c "^origin") -eq 0 ] ; then
# remote repo
git fetch -q $(echo $branchName | cut -f1 -d"/") 1> /dev/null
fi
mergeOutput=$(git merge --no-edit $branchName)
if [ $? -ne 0 ] ; then
echo "$branch CONFLICT" >> $statusFile
let conflictingBranches++
git merge --abort
else
if [ $(echo $mergeOutput | grep "up-to-date" -c) -eq 0 ] ; then
# branch has newer state
echo "$branch merged successfully" >> $statusFile
else
echo "$branch no update needed" >> $statusFile
fi
fi
let count++
done <<< "$branches"
## Update Changelog.md
tmpFile=$(tempfile)
cp CHANGELOG.md $tmpFile
echo "## $(date '+%F %H:%M')" > CHANGELOG.md
## add new branches
echo "New branches:" >> CHANGELOG.md
if [ $(comm -13 mergedBranches <(cat devUpdateStatus | grep succ | cut -d"(" -f2 | cut -d")" -f1 | sort) | wc -l) -gt 0 ] ; then
egrep "$(comm -13 mergedBranches <(cat devUpdateStatus | grep succ | cut -d"(" -f2 | cut -d")" -f1 | sort) )" devUpdateStatus | cut -d"]" -f2 | sed s'#$#]#'g | sed s'#^#-#'g | sed s'#$# added#'g >> CHANGELOG.md
else
echo "/" >> CHANGELOG.md
fi
cat devUpdateStatus | grep succ | cut -d"(" -f2 | cut -d")" -f1 >> mergedBranches
sort -u mergedBranches -o mergedBranches_unique
mv mergedBranches_unique mergedBranches
echo >> CHANGELOG.md
## add updated branches
echo "Updated branches:" >> CHANGELOG.md
if [ $(cat devUpdateStatus | grep succ -c) -gt 0 ]; then
cat devUpdateStatus | grep succ | cut -d"]" -f2 | sed s'#$#]#'g | sed s'#^#-#'g | sed s'#$# updated#'g >> CHANGELOG.md
else
echo "/" >> CHANGELOG.md
fi
echo >> CHANGELOG.md
## add conflicted branches
echo "Conflicting branches:" >> CHANGELOG.md
if [ $(cat devUpdateStatus | grep conflict -ci) -gt 0 ]; then
cat devUpdateStatus | grep -i conflict | cut -d"]" -f2 | sed s'#$#]#'g | sed s'#^#-#'g | sed s'#$# conflicting#'g >> CHANGELOG.md
else
echo "/" >> CHANGELOG.md
fi
echo >> CHANGELOG.md
cat $tmpFile >> CHANGELOG.md
git add .
git commit -m "update dev $(date +%F)"
git push
exit $conflictingBranches
+43
View File
@@ -0,0 +1,43 @@
#!/bin/bash
echo -n "git pull:"
git pull || exit
echo
branches=$(scripts/getBranchesForDev)
branchesCount=$(echo "$branches" | wc -l)
count=1
echo "Branches: $branchesCount"
while read -u 3 -r branch; do
branchName=$(echo $branch | cut -d"(" -f2 | cut -d")" -f1 | tr ":" "/")
echo -n "[$(printf "%02d" $count) / $(printf "%02d" $branchesCount)] $branch"
if [ $(echo $branchName | grep -c "^origin") -eq 0 ] ; then
# remote repo
git fetch -q $(echo $branchName | cut -f1 -d"/") 1> /dev/null
fi
git merge --no-edit $branchName 1> /dev/null
if [ $? -ne 0 ] ; then
echo "resolve conflict in androidStudio, after resolving press RETURN"
read
git add . && git commit --no-edit 1> /dev/null
else
echo " merged"
fi
let count++
done 3<<< "$branches"
echo "git push? [y/n]"
read -r result
if [ $result = "y" ] ; then
git push
fi
+1 -1
View File
@@ -8,7 +8,7 @@
"client_info": {
"mobilesdk_app_id": "",
"android_client_info": {
"package_name": "com.nextcloud.client"
"package_name": "com.nextcloud.android.beta"
}
},
"oauth_client": [],
+12 -5
View File
@@ -20,8 +20,8 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.owncloud.android"
android:versionCode="10040399"
android:versionName="1.4.3">
android:versionCode="20170802"
android:versionName="20170802">
<uses-sdk
android:minSdkVersion="14"
@@ -84,8 +84,9 @@
<activity android:name=".ui.activity.UserInfoActivity" />
<activity android:name=".ui.activity.NotificationsActivity"/>
<activity android:name=".ui.activity.ParticipateActivity" />
<activity android:name=".ui.activity.ActivitiesListActivity"
android:configChanges="orientation|screenSize|keyboardHidden" />
<activity
android:name=".ui.activity.ActivitiesListActivity"
android:configChanges="orientation|screenSize|keyboardHidden"/>
<activity android:name=".ui.activity.FolderSyncActivity" />
<activity android:name=".ui.activity.UploadFilesActivity" />
<activity android:name=".ui.activity.ExternalSiteWebView"
@@ -182,6 +183,12 @@
android:resource="@xml/exposed_filepaths" />
</provider>
<provider
android:name=".providers.DiskLruImageCacheFileProvider"
android:authorities="org.nextcloud.imageCache.provider"
android:exported="true">
</provider>
<activity
android:name=".authentication.AuthenticatorActivity"
android:exported="true"
@@ -219,7 +226,7 @@
<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.errorhandling.ErrorShowActivity" />
@@ -112,11 +112,9 @@ public class MainApp extends MultiDexApplication {
// initialise thumbnails cache on background thread
new ThumbnailsCacheManager.InitDiskCacheTask().execute();
if (BuildConfig.DEBUG) {
// use app writable dir, no permissions needed
Log_OC.startLogging(getAppContext());
Log_OC.d("Debug", "start logging");
}
// use app writable dir, no permissions needed
Log_OC.startLogging(getAppContext());
Log_OC.d("Debug", "start logging");
cleanOldEntries();
updateAutoUploadEntries();
@@ -35,8 +35,8 @@ import com.owncloud.android.lib.common.accounts.AccountUtils.Constants;
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
import com.owncloud.android.ui.activity.ManageAccountsActivity;
import com.owncloud.android.operations.GetCapabilitiesOperarion;
import com.owncloud.android.ui.activity.ManageAccountsActivity;
import java.util.Locale;
@@ -82,7 +82,7 @@ public class AccountUtils {
if (defaultAccount == null && ocAccounts.length > 0) {
// take first which is not pending for removal account as fallback
for (Account account: ocAccounts) {
for (Account account : ocAccounts) {
boolean pendingForRemoval = arbitraryDataProvider.getBooleanValue(account,
ManageAccountsActivity.PENDING_FOR_REMOVAL);
@@ -60,6 +60,7 @@ import android.os.Handler;
import android.os.IBinder;
import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import android.support.design.widget.Snackbar;
import android.support.design.widget.TextInputLayout;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
@@ -122,6 +123,7 @@ import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.OnSslUntrustedCertListener;
import com.owncloud.android.utils.AnalyticsUtils;
import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.ErrorMessageAdapter;
import java.io.ByteArrayInputStream;
import java.security.cert.Certificate;
@@ -210,7 +212,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
private TextView mServerStatusView;
private TextWatcher mHostUrlInputWatcher;
private int mServerStatusText = 0, mServerStatusIcon = 0;
private String mServerStatusText;
private int mServerStatusIcon = 0;
private boolean mServerIsChecked = false;
private boolean mServerIsValid = false;
@@ -229,7 +232,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
private WebView mLoginWebView;
private int mAuthStatusText = 0, mAuthStatusIcon = 0;
private String mAuthStatusText;
private int mAuthStatusIcon = 0;
private String mAuthToken = "";
private AuthenticatorAsyncTask mAsyncTask;
@@ -367,11 +371,12 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
mLoginWebView.getSettings().setAllowFileAccess(false);
mLoginWebView.getSettings().setJavaScriptEnabled(true);
mLoginWebView.getSettings().setDomStorageEnabled(true);
mLoginWebView.getSettings().setUserAgentString(getWebLoginUserAgent());
mLoginWebView.getSettings().setSaveFormData(false);
mLoginWebView.getSettings().setSavePassword(false);
if (baseURL != null && !baseURL.isEmpty()){
if (baseURL != null && !baseURL.isEmpty()) {
Map<String, String> headers = new HashMap<>();
headers.put(RemoteOperation.OCS_API_HEADER, RemoteOperation.OCS_API_HEADER_VALUE);
mLoginWebView.loadUrl(baseURL + WEB_LOGIN, headers);
@@ -562,7 +567,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
/// step 2 - set properties of UI elements (text, visibility, enabled...)
Button welcomeLink = (Button) findViewById(R.id.welcome_link);
welcomeLink.setVisibility(isWelcomeLinkVisible ? View.VISIBLE : View.GONE);
welcomeLink.setText(String.format(getString(R.string.auth_register), getString(R.string.app_name)));
welcomeLink.setText(getString(R.string.auth_register));
TextView instructionsView = (TextView) findViewById(R.id.instructions_message);
if (instructionsMessageText != null) {
@@ -600,7 +605,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
mServerInfo.mIsSslConn = mServerInfo.mBaseUrl.startsWith(HTTPS_PROTOCOL);
}
} else {
mServerStatusText = savedInstanceState.getInt(KEY_SERVER_STATUS_TEXT);
mServerStatusText = savedInstanceState.getString(KEY_SERVER_STATUS_TEXT);
mServerStatusIcon = savedInstanceState.getInt(KEY_SERVER_STATUS_ICON);
mServerIsValid = savedInstanceState.getBoolean(KEY_SERVER_VALID);
@@ -665,7 +670,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
if (mAuthStatusIcon != 0) {
Log_OC.d(TAG, "onTextChanged: hiding authentication status");
mAuthStatusIcon = 0;
mAuthStatusText = 0;
mAuthStatusText = "";
showAuthStatus();
}
}
@@ -712,7 +717,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
}
} else {
isPasswordExposed = savedInstanceState.getBoolean(KEY_PASSWORD_EXPOSED, false);
mAuthStatusText = savedInstanceState.getInt(KEY_AUTH_STATUS_TEXT);
mAuthStatusText = savedInstanceState.getString(KEY_AUTH_STATUS_TEXT);
mAuthStatusIcon = savedInstanceState.getInt(KEY_AUTH_STATUS_ICON);
mAuthToken = savedInstanceState.getString(KEY_AUTH_TOKEN);
}
@@ -817,7 +822,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
if (!webViewLoginMethod) {
/// Server PRE-fragment state
outState.putInt(KEY_SERVER_STATUS_TEXT, mServerStatusText);
outState.putString(KEY_SERVER_STATUS_TEXT, mServerStatusText);
outState.putInt(KEY_SERVER_STATUS_ICON, mServerStatusIcon);
outState.putBoolean(KEY_SERVER_CHECKED, mServerIsChecked);
outState.putBoolean(KEY_SERVER_VALID, mServerIsValid);
@@ -825,7 +830,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
/// Authentication PRE-fragment state
outState.putBoolean(KEY_PASSWORD_EXPOSED, isPasswordVisible());
outState.putInt(KEY_AUTH_STATUS_ICON, mAuthStatusIcon);
outState.putInt(KEY_AUTH_STATUS_TEXT, mAuthStatusText);
outState.putString(KEY_AUTH_STATUS_TEXT, mAuthStatusText);
outState.putString(KEY_AUTH_TOKEN, mAuthToken);
}
@@ -1074,7 +1079,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
}
if (mHostUrlInput != null) {
mServerStatusText = R.string.auth_testing_connection;
mServerStatusText = getResources().getString(R.string.auth_testing_connection);
mServerStatusIcon = R.drawable.progress_small;
showServerStatus();
}
@@ -1090,7 +1095,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
}
} else {
mServerStatusText = 0;
mServerStatusText = "";
mServerStatusIcon = 0;
if (!webViewLoginMethod) {
showServerStatus();
@@ -1173,7 +1178,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
mServerInfo.mBaseUrl == null ||
mServerInfo.mBaseUrl.length() == 0) {
mServerStatusIcon = R.drawable.ic_alert;
mServerStatusText = R.string.auth_wtf_reenter_URL;
mServerStatusText = getResources().getString(R.string.auth_wtf_reenter_URL);
showServerStatus();
mOkButton.setEnabled(false);
return;
@@ -1232,7 +1237,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
private void startOauthorization() {
// be gentle with the user
mAuthStatusIcon = R.drawable.progress_small;
mAuthStatusText = R.string.oauth_login_connection;
mAuthStatusText = getResources().getString(R.string.oauth_login_connection);
showAuthStatus();
// GET AUTHORIZATION request
@@ -1264,7 +1269,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
private void startSamlBasedFederatedSingleSignOnAuthorization() {
/// be gentle with the user
mAuthStatusIcon = R.drawable.progress_small;
mAuthStatusText = R.string.auth_connecting_auth_server;
mAuthStatusText = getResources().getString(R.string.auth_connecting_auth_server);
showAuthStatus();
/// Show SAML-based SSO web dialog
@@ -1504,74 +1509,74 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
switch (result.getCode()) {
case OK_SSL:
mServerStatusIcon = R.drawable.ic_lock_white;
mServerStatusText = R.string.auth_secure_connection;
mServerStatusText = getResources().getString(R.string.auth_secure_connection);
break;
case OK_NO_SSL:
case OK:
if (mHostUrlInput.getText().toString().trim().toLowerCase().startsWith(HTTP_PROTOCOL)) {
mServerStatusText = R.string.auth_connection_established;
mServerStatusText = getResources().getString(R.string.auth_connection_established);
mServerStatusIcon = R.drawable.ic_ok;
} else {
mServerStatusText = R.string.auth_nossl_plain_ok_title;
mServerStatusText = getResources().getString(R.string.auth_nossl_plain_ok_title);
mServerStatusIcon = R.drawable.ic_lock_open_white;
}
break;
case NO_NETWORK_CONNECTION:
mServerStatusIcon = R.drawable.no_network;
mServerStatusText = R.string.auth_no_net_conn_title;
mServerStatusText = getResources().getString(R.string.auth_no_net_conn_title);
break;
case SSL_RECOVERABLE_PEER_UNVERIFIED:
mServerStatusText = R.string.auth_ssl_unverified_server_title;
mServerStatusText = getResources().getString(R.string.auth_ssl_unverified_server_title);
break;
case BAD_OC_VERSION:
mServerStatusText = R.string.auth_bad_oc_version_title;
mServerStatusText = getResources().getString(R.string.auth_bad_oc_version_title);
break;
case WRONG_CONNECTION:
mServerStatusText = R.string.auth_wrong_connection_title;
mServerStatusText = getResources().getString(R.string.auth_wrong_connection_title);
break;
case TIMEOUT:
mServerStatusText = R.string.auth_timeout_title;
mServerStatusText = getResources().getString(R.string.auth_timeout_title);
break;
case INCORRECT_ADDRESS:
mServerStatusText = R.string.auth_incorrect_address_title;
mServerStatusText = getResources().getString(R.string.auth_incorrect_address_title);
break;
case SSL_ERROR:
mServerStatusText = R.string.auth_ssl_general_error_title;
mServerStatusText = getResources().getString(R.string.auth_ssl_general_error_title);
break;
case UNAUTHORIZED:
mServerStatusText = R.string.auth_unauthorized;
mServerStatusText = getResources().getString(R.string.auth_unauthorized);
break;
case HOST_NOT_AVAILABLE:
mServerStatusText = R.string.auth_unknown_host_title;
mServerStatusText = getResources().getString(R.string.auth_unknown_host_title);
break;
case INSTANCE_NOT_CONFIGURED:
mServerStatusText = R.string.auth_not_configured_title;
mServerStatusText = getResources().getString(R.string.auth_not_configured_title);
break;
case FILE_NOT_FOUND:
mServerStatusText = R.string.auth_incorrect_path_title;
mServerStatusText = getResources().getString(R.string.auth_incorrect_path_title);
break;
case OAUTH2_ERROR:
mServerStatusText = R.string.auth_oauth_error;
mServerStatusText = getResources().getString(R.string.auth_oauth_error);
break;
case OAUTH2_ERROR_ACCESS_DENIED:
mServerStatusText = R.string.auth_oauth_error_access_denied;
mServerStatusText = getResources().getString(R.string.auth_oauth_error_access_denied);
break;
case UNHANDLED_HTTP_CODE:
case UNKNOWN_ERROR:
mServerStatusText = R.string.auth_unknown_error_title;
mServerStatusText = getResources().getString(R.string.auth_unknown_error_title);
break;
case OK_REDIRECT_TO_NON_SECURE_CONNECTION:
mServerStatusIcon = R.drawable.ic_lock_open_white;
mServerStatusText = R.string.auth_redirect_non_secure_connection_title;
mServerStatusText = getResources().getString(R.string.auth_redirect_non_secure_connection_title);
break;
case MAINTENANCE_MODE:
mServerStatusText = R.string.maintenance_mode;
mServerStatusText = getResources().getString(R.string.maintenance_mode);
break;
default:
mServerStatusText = 0;
mServerStatusText = "";
mServerStatusIcon = 0;
break;
}
@@ -1589,85 +1594,48 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
switch (result.getCode()) {
case OK_SSL:
mAuthStatusIcon = R.drawable.ic_lock_white;
mAuthStatusText = R.string.auth_secure_connection;
mAuthStatusText = getResources().getString(R.string.auth_secure_connection);
break;
case OK_NO_SSL:
case OK:
if (mHostUrlInput.getText().toString().trim().toLowerCase().startsWith(HTTP_PROTOCOL)) {
mAuthStatusText = R.string.auth_connection_established;
mAuthStatusText = getResources().getString(R.string.auth_connection_established);
mAuthStatusIcon = R.drawable.ic_ok;
} else {
mAuthStatusText = R.string.auth_nossl_plain_ok_title;
mAuthStatusText = getResources().getString(R.string.auth_nossl_plain_ok_title);
mAuthStatusIcon = R.drawable.ic_lock_open_white;
}
break;
case NO_NETWORK_CONNECTION:
mAuthStatusIcon = R.drawable.no_network;
mAuthStatusText = R.string.auth_no_net_conn_title;
mAuthStatusText = getResources().getString(R.string.auth_no_net_conn_title);
break;
case SSL_RECOVERABLE_PEER_UNVERIFIED:
mAuthStatusText = R.string.auth_ssl_unverified_server_title;
break;
case BAD_OC_VERSION:
mAuthStatusText = R.string.auth_bad_oc_version_title;
break;
case WRONG_CONNECTION:
mAuthStatusText = R.string.auth_wrong_connection_title;
mAuthStatusText = getResources().getString(R.string.auth_ssl_unverified_server_title);
break;
case TIMEOUT:
mAuthStatusText = R.string.auth_timeout_title;
break;
case INCORRECT_ADDRESS:
mAuthStatusText = R.string.auth_incorrect_address_title;
break;
case SSL_ERROR:
mAuthStatusText = R.string.auth_ssl_general_error_title;
break;
case UNAUTHORIZED:
mAuthStatusText = R.string.auth_unauthorized;
mAuthStatusText = getResources().getString(R.string.auth_timeout_title);
break;
case HOST_NOT_AVAILABLE:
mAuthStatusText = R.string.auth_unknown_host_title;
break;
case INSTANCE_NOT_CONFIGURED:
mAuthStatusText = R.string.auth_not_configured_title;
break;
case FILE_NOT_FOUND:
mAuthStatusText = R.string.auth_incorrect_path_title;
break;
case OAUTH2_ERROR:
mAuthStatusText = R.string.auth_oauth_error;
break;
case OAUTH2_ERROR_ACCESS_DENIED:
mAuthStatusText = R.string.auth_oauth_error_access_denied;
break;
case ACCOUNT_NOT_NEW:
mAuthStatusText = R.string.auth_account_not_new;
break;
case ACCOUNT_NOT_THE_SAME:
mAuthStatusText = R.string.auth_account_not_the_same;
mAuthStatusText = getResources().getString(R.string.auth_unknown_host_title);
break;
case UNHANDLED_HTTP_CODE:
case UNKNOWN_ERROR:
mAuthStatusText = R.string.auth_unknown_error_title;
break;
default:
mAuthStatusText = 0;
mAuthStatusIcon = 0;
mAuthStatusText = ErrorMessageAdapter.getErrorCauseMessage(result, null, getResources());
}
}
private void updateStatusIconFailUserName(int failedStatusText){
mAuthStatusIcon = R.drawable.ic_alert;
mAuthStatusText = failedStatusText;
mAuthStatusText = getResources().getString(failedStatusText);
}
private void updateServerStatusIconNoRegularAuth() {
mServerStatusIcon = R.drawable.ic_alert;
mServerStatusText = R.string.auth_can_not_auth_against_server;
mServerStatusText = getResources().getString(R.string.auth_can_not_auth_against_server);
}
/**
@@ -1772,7 +1740,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
updateServerStatusIconAndText(result);
showServerStatus();
mAuthStatusIcon = 0;
mAuthStatusText = 0;
mAuthStatusText = "";
if (!webViewLoginMethod) {
showAuthStatus();
@@ -1990,7 +1958,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
* to the last check on the ownCloud server.
*/
private void showServerStatus() {
if (mServerStatusIcon == 0 && mServerStatusText == 0) {
if (mServerStatusIcon == 0 && "".equals(mServerStatusText)) {
mServerStatusView.setVisibility(View.INVISIBLE);
} else {
mServerStatusView.setText(mServerStatusText);
@@ -2005,7 +1973,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
* to the interactions with the OAuth authorization server.
*/
private void showAuthStatus() {
if (mAuthStatusIcon == 0 && mAuthStatusText == 0) {
if (mAuthStatusIcon == 0 && "".equals(mAuthStatusText)) {
mAuthStatusView.setVisibility(View.INVISIBLE);
} else {
mAuthStatusView.setText(mAuthStatusText);
@@ -2218,7 +2186,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
@Override
public void onFailedSavingCertificate() {
dismissDialog(SAML_DIALOG_TAG);
Toast.makeText(this, R.string.ssl_validator_not_saved, Toast.LENGTH_LONG).show();
showSnackMessage(R.string.ssl_validator_not_saved);
}
@Override
@@ -2296,11 +2264,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
dialog.show(ft, CREDENTIALS_DIALOG_TAG);
if (!mIsFirstAuthAttempt) {
Toast.makeText(
getApplicationContext(),
getText(R.string.saml_authentication_wrong_pass),
Toast.LENGTH_LONG
).show();
showSnackMessage(R.string.saml_authentication_wrong_pass);
} else {
mIsFirstAuthAttempt = false;
}
@@ -2312,4 +2276,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
public void doNegativeAuthenticatioDialogClick() {
mIsFirstAuthAttempt = true;
}
private void showSnackMessage(int messageResource) {
Snackbar.make(findViewById(android.R.id.content), messageResource, Snackbar.LENGTH_LONG).show();
}
}
@@ -23,6 +23,7 @@ import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.PowerManager;
import android.preference.PreferenceManager;
import android.view.WindowManager;
@@ -71,26 +72,22 @@ public class PassCodeManager {
}
public void onActivityStarted(Activity activity) {
if (!sExemptOfPasscodeActivites.contains(activity.getClass()) &&
passCodeShouldBeRequested()
){
if (!sExemptOfPasscodeActivites.contains(activity.getClass()) && passCodeShouldBeRequested()) {
Intent i = new Intent(MainApp.getAppContext(), PassCodeActivity.class);
i.setAction(PassCodeActivity.ACTION_CHECK);
i.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
activity.startActivity(i);
}
if (!sExemptOfPasscodeActivites.contains(activity.getClass()) &&
fingerprintShouldBeRequested() && FingerprintActivity.isFingerprintReady(MainApp.getAppContext())
){
Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&
fingerprintShouldBeRequested() && FingerprintActivity.isFingerprintReady(MainApp.getAppContext())) {
Intent i = new Intent(MainApp.getAppContext(), FingerprintActivity.class);
i.setAction(PassCodeActivity.ACTION_CHECK);
i.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
activity.startActivity(i);
}
mVisibleActivitiesCounter++; // keep it AFTER passCodeShouldBeRequested was checked
@@ -1,4 +1,4 @@
/**
/*
* ownCloud Android client application
*
* @author Tobias Kaminsky
@@ -22,18 +22,22 @@
package com.owncloud.android.datamodel;
import android.accounts.Account;
import android.content.Context;
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.WindowManager;
import android.widget.ImageView;
import com.owncloud.android.MainApp;
@@ -45,6 +49,7 @@ import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
import com.owncloud.android.ui.adapter.DiskLruImageCache;
import com.owncloud.android.ui.preview.PreviewImageFragment;
import com.owncloud.android.utils.BitmapUtils;
import com.owncloud.android.utils.DisplayUtils.AvatarGenerationListener;
import com.owncloud.android.utils.FileStorageUtils;
@@ -73,7 +78,7 @@ public class ThumbnailsCacheManager {
private static DiskLruImageCache mThumbnailCache = null;
private static boolean mThumbnailCacheStarting = true;
private static final int DISK_CACHE_SIZE = 1024 * 1024 * 10; // 10MB
private static final int DISK_CACHE_SIZE = 1024 * 1024 * 200; // 200MB
private static final CompressFormat mCompressFormat = CompressFormat.JPEG;
private static final int mCompressQuality = 70;
private static OwnCloudClient mClient = null;
@@ -90,7 +95,7 @@ public class ThumbnailsCacheManager {
R.drawable.file_movie
);
public static class InitDiskCacheTask extends AsyncTask<File, Void, Void> {
@Override
@@ -102,17 +107,17 @@ public class ThumbnailsCacheManager {
try {
// 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() +
File.separator + CACHE_FOLDER;
Log_OC.d(TAG, "create dir: " + cachePath);
final File diskCacheDir = new File(cachePath);
mThumbnailCache = new DiskLruImageCache(
diskCacheDir,
DISK_CACHE_SIZE,
mCompressFormat,
mCompressQuality
);
File cacheDir = MainApp.getAppContext().getExternalCacheDir();
if (cacheDir != null) {
String cachePath = cacheDir.getPath() + File.separator + CACHE_FOLDER;
Log_OC.d(TAG, "create dir: " + cachePath);
File diskCacheDir = new File(cachePath);
mThumbnailCache = new DiskLruImageCache(diskCacheDir, DISK_CACHE_SIZE, mCompressFormat,
mCompressQuality);
} else {
throw new Exception();
}
} catch (Exception e) {
Log_OC.d(TAG, "Thumbnail cache could not be opened ", e);
mThumbnailCache = null;
@@ -135,17 +140,32 @@ public class ThumbnailsCacheManager {
return Math.round(r.getDimension(R.dimen.file_icon_size_grid));
}
/**
* Converts dimension of screen as point
*
* @return Point
*/
private static Point getScreenDimension() {
WindowManager wm = (WindowManager) MainApp.getAppContext().
getSystemService(Context.WINDOW_SERVICE);
Display display = wm.getDefaultDisplay();
Point point = new Point();
display.getSize(point);
return point;
}
/**
* Add thumbnail to cache
* @param imageKey: thumb key
* @param bitmap: image for extracting thumbnail
* @param path: image path
* @param px: thumbnail dp
* @param pxW: thumbnail width in pixel
* @param pxH: thumbnail height in pixel
* @return Bitmap
*/
private static Bitmap addThumbnailToCache(String imageKey, Bitmap bitmap, String path, int px){
private static Bitmap addThumbnailToCache(String imageKey, Bitmap bitmap, String path, int pxW, int pxH) {
Bitmap thumbnail = ThumbnailUtils.extractThumbnail(bitmap, px, px);
Bitmap thumbnail = ThumbnailUtils.extractThumbnail(bitmap, pxW, pxH);
// Rotate image, obeying exif tag
thumbnail = BitmapUtils.rotateImage(thumbnail,path);
@@ -155,8 +175,8 @@ public class ThumbnailsCacheManager {
return thumbnail;
}
public static void addBitmapToCache(String key, Bitmap bitmap) {
private static void addBitmapToCache(String key, Bitmap bitmap) {
synchronized (mThumbnailsDiskCacheLock) {
if (mThumbnailCache != null) {
mThumbnailCache.put(key, bitmap);
@@ -181,7 +201,176 @@ public class ThumbnailsCacheManager {
return null;
}
public static class ThumbnailGenerationTask extends AsyncTask<Object, Void, Bitmap> {
public static class ResizedImageGenerationTask extends AsyncTask<Object, Void, Bitmap> {
private PreviewImageFragment previewImageFragment;
private FileDataStorageManager storageManager;
private Account account;
private WeakReference<ImageView> imageViewReference;
private OCFile file;
public ResizedImageGenerationTask(PreviewImageFragment previewImageFragment, ImageView imageView,
FileDataStorageManager storageManager, Account account)
throws IllegalArgumentException {
this.previewImageFragment = previewImageFragment;
imageViewReference = new WeakReference<>(imageView);
this.storageManager = storageManager;
this.account = account;
}
@Override
protected Bitmap doInBackground(Object... params) {
Bitmap thumbnail = null;
file = (OCFile) params[0];
try {
if (account != null) {
OwnCloudAccount ocAccount = new OwnCloudAccount(account, MainApp.getAppContext());
mClient = OwnCloudClientManagerFactory.getDefaultSingleton().getClientFor(ocAccount,
MainApp.getAppContext());
}
thumbnail = doResizedImageInBackground();
if (MimeTypeUtil.isVideo(file) && thumbnail != null) {
thumbnail = addVideoOverlay(thumbnail);
}
} catch (OutOfMemoryError oome) {
System.gc();
} catch (Throwable t) {
// the app should never break due to a problem with thumbnails
Log_OC.e(TAG, "Generation of thumbnail for " + file + " failed", t);
}
return thumbnail;
}
private Bitmap doResizedImageInBackground() {
Bitmap thumbnail;
String imageKey = "r" + String.valueOf(file.getRemoteId());
// Check disk cache in background thread
thumbnail = getBitmapFromDiskCache(imageKey);
// Not found in disk cache
if (thumbnail == null || file.needsUpdateThumbnail()) {
Point p = getScreenDimension();
int pxW = p.x;
int pxH = p.y;
if (file.isDown()) {
Bitmap bitmap = BitmapUtils.decodeSampledBitmapFromFile(
file.getStoragePath(), pxW, pxH);
if (bitmap != null) {
// Handle PNG
if (file.getMimetype().equalsIgnoreCase("image/png")) {
bitmap = handlePNG(bitmap, pxW);
}
thumbnail = addThumbnailToCache(imageKey, bitmap, file.getStoragePath(), pxW, pxH);
file.setNeedsUpdateThumbnail(false);
storageManager.saveFile(file);
}
} else {
// Download thumbnail from server
OwnCloudVersion serverOCVersion = AccountUtils.getServerVersion(account);
if (mClient != null && serverOCVersion != null) {
if (serverOCVersion.supportsRemoteThumbnails()) {
GetMethod getMethod = null;
try {
// resized image via gallery app
String uri = mClient.getBaseUri() + "" +
"/index.php/apps/gallery/api/preview/" +
Integer.parseInt(file.getRemoteId().substring(0, 8)) +
"/" + pxW + "/" + pxH;
Log_OC.d(TAG, "generate resizedImage: " + file.getFileName() +
" URI: " + uri);
getMethod = new GetMethod(uri);
getMethod.setRequestHeader("Cookie",
"nc_sameSiteCookielax=true;nc_sameSiteCookiestrict=true");
int status = mClient.executeMethod(getMethod);
if (status == HttpStatus.SC_OK) {
InputStream inputStream = getMethod.getResponseBodyAsStream();
thumbnail = BitmapFactory.decodeStream(inputStream);
} else {
mClient.exhaustResponse(getMethod.getResponseBodyAsStream());
}
// Handle PNG
if (file.getMimetype().equalsIgnoreCase("image/png")) {
thumbnail = handlePNG(thumbnail, pxW);
}
// Add thumbnail to cache
if (thumbnail != null) {
Log_OC.d(TAG, "add thumbnail to cache: " + file.getFileName());
addBitmapToCache(imageKey, thumbnail);
}
} catch (Exception e) {
Log_OC.d(TAG, e.getMessage(), e);
} finally {
if (getMethod != null) {
getMethod.releaseConnection();
}
}
} else {
Log_OC.d(TAG, "Server too old");
}
}
}
}
return thumbnail;
}
protected void onPostExecute(Bitmap bitmap) {
if (imageViewReference != null) {
final ImageView imageView = imageViewReference.get();
if (bitmap != null) {
final ResizedImageGenerationTask bitmapWorkerTask = getResizedImageGenerationWorkerTask(imageView);
if (this == bitmapWorkerTask) {
String tagId = String.valueOf(file.getFileId());
if (String.valueOf(imageView.getTag()).equals(tagId)) {
imageView.setImageBitmap(bitmap);
}
}
} else {
previewImageFragment.setErrorPreviewMessage();
}
}
}
}
public static class ThumbnailGenerationTaskObject {
private Object file;
private String imageKey;
public ThumbnailGenerationTaskObject(Object file, String imageKey) {
this.file = file;
this.imageKey = imageKey;
}
private Object getFile() {
return file;
}
private String getImageKey() {
return imageKey;
}
}
public static class ThumbnailGenerationTask extends AsyncTask<ThumbnailGenerationTaskObject, Void, Bitmap> {
private final WeakReference<ImageView> mImageViewReference;
private static Account mAccount;
private ArrayList<ThumbnailGenerationTask> mAsyncTasks = null;
@@ -199,7 +388,7 @@ public class ThumbnailsCacheManager {
Account account, ArrayList<ThumbnailGenerationTask> asyncTasks)
throws IllegalArgumentException {
// Use a WeakReference to ensure the ImageView can be garbage collected
mImageViewReference = new WeakReference<ImageView>(imageView);
mImageViewReference = new WeakReference<>(imageView);
if (storageManager == null) {
throw new IllegalArgumentException("storageManager must not be NULL");
}
@@ -223,12 +412,12 @@ public class ThumbnailsCacheManager {
public ThumbnailGenerationTask(ImageView imageView) {
// Use a WeakReference to ensure the ImageView can be garbage collected
mImageViewReference = new WeakReference<ImageView>(imageView);
mImageViewReference = new WeakReference<>(imageView);
}
@SuppressFBWarnings("Dm")
@Override
protected Bitmap doInBackground(Object... params) {
protected Bitmap doInBackground(ThumbnailGenerationTaskObject... params) {
Bitmap thumbnail = null;
try {
@@ -241,18 +430,17 @@ public class ThumbnailsCacheManager {
getClientFor(ocAccount, MainApp.getAppContext());
}
mFile = params[0];
if (params.length == 2) {
mImageKey = (String) params[1];
}
ThumbnailGenerationTaskObject object = params[0];
mFile = object.getFile();
mImageKey = object.getImageKey();
if (mFile instanceof OCFile) {
thumbnail = doOCFileInBackground();
thumbnail = doThumbnailFromOCFileInBackground();
if (MimeTypeUtil.isVideo((OCFile) mFile) && thumbnail != null) {
thumbnail = addVideoOverlay(thumbnail);
}
} else if (mFile instanceof File) {
} else if (mFile instanceof File) {
thumbnail = doFileInBackground();
String url = ((File) mFile).getAbsolutePath();
@@ -296,42 +484,31 @@ public class ThumbnailsCacheManager {
}
}
/**
* Converts size of file icon from dp to pixel
* @return int
*/
private int getThumbnailDimension(){
// Converts dp to pixel
Resources r = MainApp.getAppContext().getResources();
Double d = Math.pow(2,Math.floor(Math.log(r.getDimension(R.dimen.file_icon_size_grid))/Math.log(2)));
return d.intValue();
}
private Bitmap doOCFileInBackground() {
OCFile file = (OCFile)mFile;
final String imageKey = String.valueOf(file.getRemoteId());
private Bitmap doThumbnailFromOCFileInBackground() {
Bitmap thumbnail;
OCFile file = (OCFile) mFile;
String imageKey = "t" + String.valueOf(file.getRemoteId());
// 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;
int pxH;
pxW = pxH = getThumbnailDimension();
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);
@@ -344,10 +521,12 @@ public class ThumbnailsCacheManager {
if (serverOCVersion.supportsRemoteThumbnails()) {
getMethod = null;
try {
// thumbnail
String uri = mClient.getBaseUri() + "" +
"/index.php/apps/files/api/v1/thumbnail/" +
px + "/" + px + Uri.encode(file.getRemotePath(), "/");
Log_OC.d("Thumbnail", "URI: " + uri);
pxW + "/" + pxH + Uri.encode(file.getRemotePath(), "/");
Log_OC.d(TAG, "generate thumbnail: " + file.getFileName() +
" URI: " + uri);
getMethod = new GetMethod(uri);
getMethod.setRequestHeader("Cookie",
"nc_sameSiteCookielax=true;nc_sameSiteCookiestrict=true");
@@ -355,20 +534,22 @@ public class ThumbnailsCacheManager {
if (status == HttpStatus.SC_OK) {
InputStream inputStream = getMethod.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);
}
thumbnail = ThumbnailUtils.extractThumbnail(bitmap, pxW, pxH);
} else {
mClient.exhaustResponse(getMethod.getResponseBodyAsStream());
}
// Handle PNG
if (file.getMimetype().equalsIgnoreCase("image/png")) {
thumbnail = handlePNG(thumbnail, pxW);
}
// Add thumbnail to cache
if (thumbnail != null) {
Log_OC.d(TAG, "add thumbnail to cache: " + file.getFileName());
addBitmapToCache(imageKey, thumbnail);
}
} catch (Exception e) {
Log_OC.d(TAG, e.getMessage(), e);
} finally {
@@ -387,6 +568,18 @@ public class ThumbnailsCacheManager {
}
/**
* Converts size of file icon from dp to pixel
*
* @return int
*/
private int getThumbnailDimension() {
// Converts dp to pixel
Resources r = MainApp.getAppContext().getResources();
Double d = Math.pow(2, Math.floor(Math.log(r.getDimension(R.dimen.file_icon_size_grid)) / Math.log(2)));
return d.intValue();
}
private Bitmap doFileInBackground() {
File file = (File)mFile;
@@ -397,19 +590,22 @@ public class ThumbnailsCacheManager {
imageKey = String.valueOf(file.hashCode());
}
// local file should always generate a thumbnail
mImageKey = "t" + mImageKey;
// Check disk cache in background thread
Bitmap thumbnail = getBitmapFromDiskCache(imageKey);
// Not found in disk cache
if (thumbnail == null) {
int pxW;
int pxH;
pxW = pxH = getThumbnailDimension();
int px = getThumbnailDimension();
Bitmap bitmap = BitmapUtils.decodeSampledBitmapFromFile(
file.getAbsolutePath(), px, px);
Bitmap bitmap = BitmapUtils.decodeSampledBitmapFromFile(file.getAbsolutePath(), pxW, pxH);
if (bitmap != null) {
thumbnail = addThumbnailToCache(imageKey, bitmap, file.getPath(), px);
thumbnail = addThumbnailToCache(imageKey, bitmap, file.getPath(), pxW, pxH);
}
}
return thumbnail;
@@ -502,7 +698,7 @@ public class ThumbnailsCacheManager {
Bitmap bitmap = BitmapUtils.decodeSampledBitmapFromFile(file.getAbsolutePath(), px, px);
if (bitmap != null) {
thumbnail = addThumbnailToCache(imageKey, bitmap, file.getPath(), px);
thumbnail = addThumbnailToCache(imageKey, bitmap, file.getPath(), px, px);
}
}
return thumbnail;
@@ -563,27 +759,6 @@ public class ThumbnailsCacheManager {
}
}
/**
* Add thumbnail to cache
* @param imageKey: thumb key
* @param bitmap: image for extracting thumbnail
* @param path: image path
* @param px: thumbnail dp
* @return Bitmap
*/
private Bitmap addThumbnailToCache(String imageKey, Bitmap bitmap, String path, int px){
Bitmap thumbnail = ThumbnailUtils.extractThumbnail(bitmap, px, px);
// 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
@@ -676,7 +851,7 @@ public class ThumbnailsCacheManager {
return false;
}
public static boolean cancelPotentialAvatarWork(Object file, ImageView imageView) {
private static boolean cancelPotentialAvatarWork(Object file, ImageView imageView) {
final AvatarGenerationTask avatarWorkerTask = getAvatarWorkerTask(imageView);
if (avatarWorkerTask != null) {
@@ -695,7 +870,7 @@ public class ThumbnailsCacheManager {
return true;
}
public static boolean cancelPotentialAvatarWork(Object file, MenuItem menuItem) {
private static boolean cancelPotentialAvatarWork(Object file, MenuItem menuItem) {
final AvatarGenerationTask avatarWorkerTask = getAvatarWorkerTask(menuItem);
if (avatarWorkerTask != null) {
@@ -714,7 +889,7 @@ public class ThumbnailsCacheManager {
return true;
}
public static ThumbnailGenerationTask getBitmapWorkerTask(ImageView imageView) {
private static ThumbnailGenerationTask getBitmapWorkerTask(ImageView imageView) {
if (imageView != null) {
final Drawable drawable = imageView.getDrawable();
if (drawable instanceof AsyncThumbnailDrawable) {
@@ -725,6 +900,17 @@ public class ThumbnailsCacheManager {
return null;
}
private static ResizedImageGenerationTask getResizedImageGenerationWorkerTask(ImageView imageView) {
if (imageView != null) {
final Drawable drawable = imageView.getDrawable();
if (drawable instanceof AsyncResizedImageDrawable) {
final AsyncResizedImageDrawable asyncDrawable = (AsyncResizedImageDrawable) drawable;
return asyncDrawable.getBitmapWorkerTask();
}
}
return null;
}
public static Bitmap addVideoOverlay(Bitmap thumbnail){
Bitmap playButton = BitmapFactory.decodeResource(MainApp.getAppContext().getResources(),
R.drawable.view_play);
@@ -769,7 +955,7 @@ public class ThumbnailsCacheManager {
return resultBitmap;
}
public static AvatarGenerationTask getAvatarWorkerTask(Object callContext) {
private static AvatarGenerationTask getAvatarWorkerTask(Object callContext) {
if (callContext instanceof ImageView) {
return getAvatarWorkerTask(((ImageView)callContext).getDrawable());
} else if (callContext instanceof MenuItem) {
@@ -798,7 +984,20 @@ public class ThumbnailsCacheManager {
bitmapWorkerTaskReference = new WeakReference<>(bitmapWorkerTask);
}
public ThumbnailGenerationTask getBitmapWorkerTask() {
private ThumbnailGenerationTask getBitmapWorkerTask() {
return bitmapWorkerTaskReference.get();
}
}
public static class AsyncResizedImageDrawable extends BitmapDrawable {
private final WeakReference<ResizedImageGenerationTask> bitmapWorkerTaskReference;
public AsyncResizedImageDrawable(Resources res, Bitmap bitmap, ResizedImageGenerationTask bitmapWorkerTask) {
super(res, bitmap);
bitmapWorkerTaskReference = new WeakReference<>(bitmapWorkerTask);
}
private ResizedImageGenerationTask getBitmapWorkerTask() {
return bitmapWorkerTaskReference.get();
}
}
@@ -806,17 +1005,12 @@ public class ThumbnailsCacheManager {
public static class AsyncMediaThumbnailDrawable extends BitmapDrawable {
private final WeakReference<MediaThumbnailGenerationTask> bitmapWorkerTaskReference;
public AsyncMediaThumbnailDrawable(
Resources res, Bitmap bitmap, MediaThumbnailGenerationTask bitmapWorkerTask
) {
public AsyncMediaThumbnailDrawable(Resources res, Bitmap bitmap,
MediaThumbnailGenerationTask bitmapWorkerTask) {
super(res, bitmap);
bitmapWorkerTaskReference = new WeakReference<>(bitmapWorkerTask);
}
public MediaThumbnailGenerationTask getBitmapWorkerTask() {
return bitmapWorkerTaskReference.get();
}
}
public static class AsyncAvatarDrawable extends BitmapDrawable {
@@ -827,11 +1021,10 @@ public class ThumbnailsCacheManager {
) {
super(res, bitmap);
avatarWorkerTaskReference =
new WeakReference<AvatarGenerationTask>(avatarWorkerTask);
avatarWorkerTaskReference = new WeakReference<>(avatarWorkerTask);
}
public AvatarGenerationTask getAvatarWorkerTask() {
private AvatarGenerationTask getAvatarWorkerTask() {
return avatarWorkerTaskReference.get();
}
}
@@ -848,4 +1041,8 @@ public class ThumbnailsCacheManager {
return resultBitmap;
}
}
@@ -1,18 +1,18 @@
/**
/*
* ownCloud Android client application
*
* @author David A. Velasco
* Copyright (C) 2016 ownCloud Inc.
* <p/>
*
* 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.
* <p/>
*
* 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.
* <p/>
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -35,7 +35,8 @@ public enum UploadResult {
DELAYED_FOR_WIFI(9),
SERVICE_INTERRUPTED(10),
DELAYED_FOR_CHARGING(11),
MAINTENANCE_MODE(12);
MAINTENANCE_MODE(12),
SSL_RECOVERABLE_PEER_UNVERIFIED(13);
private final int value;
@@ -77,6 +78,8 @@ public enum UploadResult {
return DELAYED_FOR_CHARGING;
case 12:
return MAINTENANCE_MODE;
case 13:
return SSL_RECOVERABLE_PEER_UNVERIFIED;
}
return null;
}
@@ -92,7 +95,6 @@ public enum UploadResult {
case WRONG_CONNECTION:
case INCORRECT_ADDRESS:
case SSL_ERROR:
case SSL_RECOVERABLE_PEER_UNVERIFIED:
return NETWORK_CONNECTION;
case ACCOUNT_EXCEPTION:
case UNAUTHORIZED:
@@ -113,13 +115,15 @@ public enum UploadResult {
return DELAYED_FOR_WIFI;
case DELAYED_FOR_CHARGING:
return DELAYED_FOR_CHARGING;
case MAINTENANCE_MODE:
return MAINTENANCE_MODE;
case SSL_RECOVERABLE_PEER_UNVERIFIED:
return SSL_RECOVERABLE_PEER_UNVERIFIED;
case UNKNOWN_ERROR:
if (result.getException() instanceof java.io.FileNotFoundException) {
return FILE_ERROR;
}
return UNKNOWN;
case MAINTENANCE_MODE:
return MAINTENANCE_MODE;
default:
return UNKNOWN;
}
@@ -980,11 +980,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();
File file = new File(mCurrentUpload.getOriginalStoragePath());
String remoteId = mCurrentUpload.getFile().getRemoteId();
task.execute(params);
task.execute(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(file, remoteId));
}
}
@@ -224,7 +224,7 @@ public class MediaService extends Service implements OnCompletionListener, OnPre
super.onCreate();
Log_OC.d(TAG, "Creating ownCloud media service");
mWifiLock = ((WifiManager) getSystemService(Context.WIFI_SERVICE)).
mWifiLock = ((WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE)).
createWifiLock(WifiManager.WIFI_MODE_FULL, MEDIA_WIFI_LOCK_TAG);
mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
@@ -499,7 +499,7 @@ public class MediaService extends Service implements OnCompletionListener, OnPre
/** Called when media player is done playing current song. */
public void onCompletion(MediaPlayer player) {
Toast.makeText(this, String.format(getString(R.string.media_event_done, mFile.getFileName())), Toast.LENGTH_LONG).show();
Toast.makeText(this, String.format(getString(R.string.media_event_done), mFile.getFileName()), Toast.LENGTH_LONG).show();
if (mMediaController != null) {
// somebody is still bound to the service
player.seekTo(0);
@@ -118,16 +118,15 @@ public class DetectAuthenticationMethodOperation extends RemoteOperation {
Log_OC.d(TAG, "Authentication method found: " + authenticationMethodToString(authMethod));
if (!authMethod.equals(AuthenticationMethod.UNKNOWN)) {
result = new RemoteOperationResult(true, result.getHttpCode(), null);
result = new RemoteOperationResult(true, result.getHttpCode(), result.getHttpPhrase(), null);
}
ArrayList<Object> data = new ArrayList<Object>();
ArrayList<Object> data = new ArrayList<>();
data.add(authMethod);
result.setData(data);
return result; // same result instance, so that other errors
// can be handled by the caller transparently
}
private String authenticationMethodToString(AuthenticationMethod value) {
switch (value){
case NONE:
@@ -100,15 +100,15 @@ public class OAuth2GetAccessToken extends RemoteOperation {
result = new RemoteOperationResult(ResultCode.OAUTH2_ERROR);
} else {
result = new RemoteOperationResult(true, status, postMethod.getResponseHeaders());
ArrayList<Object> data = new ArrayList<Object>();
result = new RemoteOperationResult(true, postMethod);
ArrayList<Object> data = new ArrayList<>();
data.add(mResultTokenMap);
result.setData(data);
}
} else {
result = new RemoteOperationResult(false, postMethod);
client.exhaustResponse(postMethod.getResponseBodyAsStream());
result = new RemoteOperationResult(false, status, postMethod.getResponseHeaders());
}
}
@@ -64,22 +64,22 @@ public class UpdateOCVersionOperation extends RemoteOperation {
String statUrl = accountMngr.getUserData(mAccount, Constants.KEY_OC_BASE_URL);
statUrl += AccountUtils.STATUS_PATH;
RemoteOperationResult result = null;
GetMethod get = null;
GetMethod getMethod = null;
String webDav = client.getWebdavUri().toString();
try {
get = new GetMethod(statUrl);
int status = client.executeMethod(get);
getMethod = new GetMethod(statUrl);
int status = client.executeMethod(getMethod);
if (status != HttpStatus.SC_OK) {
client.exhaustResponse(get.getResponseBodyAsStream());
result = new RemoteOperationResult(false, status, get.getResponseHeaders());
result = new RemoteOperationResult(false, getMethod);
client.exhaustResponse(getMethod.getResponseBodyAsStream());
} else {
String response = get.getResponseBodyAsString();
String response = getMethod.getResponseBodyAsString();
if (response != null) {
JSONObject json = new JSONObject(response);
if (json != null && json.getString("version") != null) {
if (json.getString("version") != null) {
String version = json.getString("version");
mOwnCloudVersion = new OwnCloudVersion(version);
@@ -112,8 +112,8 @@ public class UpdateOCVersionOperation extends RemoteOperation {
Log_OC.e(TAG, "Check for update of ownCloud server version at " + webDav + ": " + result.getLogMessage(), e);
} finally {
if (get != null) {
get.releaseConnection();
if (getMethod != null) {
getMethod.releaseConnection();
}
}
return result;
@@ -448,7 +448,13 @@ public class UploadFileOperation extends SyncOperation {
} else if (mLocalBehaviour == FileUploader.LOCAL_BEHAVIOUR_DELETE) {
originalFile.delete();
try {
if (!originalFile.delete()) {
Log_OC.e(TAG, "Deletion of " + originalFile.getName() + " failed!");
}
} catch (Exception e) {
Log_OC.e(TAG, "Deletion of " + originalFile.getName() + " failed with " + e.getMessage());
}
getStorageManager().deleteFileInMediaScan(originalFile.getAbsolutePath());
saveUploadedFile(client);
} else {
@@ -848,7 +854,7 @@ public class UploadFileOperation extends SyncOperation {
// generate new Thumbnail
final ThumbnailsCacheManager.ThumbnailGenerationTask task =
new ThumbnailsCacheManager.ThumbnailGenerationTask(getStorageManager(), mAccount);
task.execute(file);
task.execute(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(file, file.getRemoteId()));
}
private void updateOCFile(OCFile file, RemoteFile remoteFile) {
@@ -0,0 +1,131 @@
/*
* 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.providers;
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 java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
public class DiskLruImageCacheFileProvider extends ContentProvider {
public static final String AUTHORITY = "org.nextcloud.imageCache.provider";
@Override
public boolean onCreate() {
return true;
}
private OCFile getFile(Uri uri) {
Account account = AccountUtils.getCurrentOwnCloudAccount(MainApp.getAppContext());
FileDataStorageManager fileDataStorageManager = new FileDataStorageManager(account,
MainApp.getAppContext().getContentResolver());
return fileDataStorageManager.getFileByPath(uri.getPath());
}
@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) {
e.printStackTrace();
}
fos.write(bitmapdata);
fos.flush();
fos.close();
} catch (IOException e) {
e.printStackTrace();
}
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;
}
}
@@ -59,7 +59,7 @@ public class AccountRemovalJob extends Job implements AccountManagerCallback<Boo
PersistableBundleCompat bundle = params.getExtras();
Account account = AccountUtils.getOwnCloudAccountByName(context, bundle.getString(ACCOUNT, ""));
if (account != null ) {
if (account != null) {
AccountManager am = (AccountManager) context.getSystemService(ACCOUNT_SERVICE);
am.removeAccount(account, this, null);
@@ -168,8 +168,8 @@ public class FileObserverService extends Service {
return Service.START_STICKY;
} else if (ACTION_ADD_OBSERVED_FILE.equals(intent.getAction())) {
OCFile file = (OCFile) intent.getParcelableExtra(ARG_FILE);
Account account = (Account) intent.getParcelableExtra(ARG_ACCOUNT);
OCFile file = intent.getParcelableExtra(ARG_FILE);
Account account = intent.getParcelableExtra(ARG_ACCOUNT);
addObservedFile(file, account);
} else if (ACTION_DEL_OBSERVED_FILE.equals(intent.getAction())) {
@@ -359,7 +359,7 @@ public class FileObserverService extends Service {
&& downloadedFile.exists()) {
// no matter if the download was successful or not; the
// file could be down anyway due to a former download or upload
observer.startWatching(downloadedFile.getName());
// observer.startWatching(downloadedFile.getName());
Log_OC.d(TAG, "Resuming observance of " + downloadedFile.getAbsolutePath());
} else if (intent.getAction().equals(FileDownloader.getDownloadAddedMessage())) {
@@ -26,8 +26,8 @@ import android.accounts.AuthenticatorException;
import android.accounts.OperationCanceledException;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.graphics.PorterDuff;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.design.widget.BottomNavigationView;
import android.support.v4.widget.SwipeRefreshLayout;
@@ -95,7 +95,7 @@ public class ConflictsResolveActivity extends FileActivity implements OnConflict
// current Account
if (file != null) {
setFile(file);
ConflictsResolveDialog d = ConflictsResolveDialog.newInstance(file.getRemotePath(), this);
ConflictsResolveDialog d = ConflictsResolveDialog.newInstance(this);
d.showDialog(this);
} else {
@@ -237,7 +237,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
if (mIsAccountChooserActive) {
toggleAccountList();
}
invalidateOptionsMenu();
supportInvalidateOptionsMenu();
mDrawerToggle.setDrawerIndicatorEnabled(isDrawerIndicatorAvailable());
if (pendingRunnable != null) {
@@ -250,7 +250,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
public void onDrawerOpened(View drawerView) {
super.onDrawerOpened(drawerView);
mDrawerToggle.setDrawerIndicatorEnabled(true);
invalidateOptionsMenu();
supportInvalidateOptionsMenu();
}
};
@@ -624,7 +624,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
ArrayList<Account> persistingAccounts = new ArrayList<>();
for (Account acc: accounts) {
for (Account acc : accounts) {
boolean pendingForRemoval = arbitraryDataProvider.getBooleanValue(acc,
ManageAccountsActivity.PENDING_FOR_REMOVAL);
@@ -675,7 +675,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
mNavigationView.getMenu().removeGroup(R.id.drawer_menu_accounts);
// add all accounts to list
for (Account account: accounts) {
for (Account account : accounts) {
try {
// show all accounts except the currently active one and those pending for removal
@@ -1213,7 +1213,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
ArrayList<Account> persistingAccounts = new ArrayList<>();
for (Account acc: accountsAll) {
for (Account acc : accountsAll) {
boolean pendingForRemoval = arbitraryDataProvider.getBooleanValue(acc,
ManageAccountsActivity.PENDING_FOR_REMOVAL);
@@ -26,6 +26,7 @@ import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.support.design.widget.Snackbar;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AppCompatActivity;
import android.text.method.ScrollingMovementMethod;
@@ -61,8 +62,7 @@ import java.util.ArrayList;
*
* Shown when the error notification summarizing the list of errors is clicked by the user.
*/
public class ErrorsWhileCopyingHandlerActivity extends AppCompatActivity
implements OnClickListener {
public class ErrorsWhileCopyingHandlerActivity extends AppCompatActivity implements OnClickListener {
private static final String TAG = ErrorsWhileCopyingHandlerActivity.class.getSimpleName();
@@ -282,9 +282,12 @@ public class ErrorsWhileCopyingHandlerActivity extends AppCompatActivity
finish();
} else {
Toast t = Toast.makeText(ErrorsWhileCopyingHandlerActivity.this,
getString(R.string.foreign_files_fail), Toast.LENGTH_LONG);
t.show();
Snackbar snackbar = Snackbar.make(
findViewById(android.R.id.content),
R.string.foreign_files_fail,
Snackbar.LENGTH_LONG
);
snackbar.show();
}
}
}
@@ -110,7 +110,8 @@ public class ExternalSiteWebView extends FileActivity {
webSettings.setAllowFileAccess(false);
// enable javascript
webview.getSettings().setJavaScriptEnabled(true);
webSettings.setJavaScriptEnabled(true);
webSettings.setDomStorageEnabled(true);
final Activity activity = this;
final ProgressBar progressBar = (ProgressBar) findViewById(R.id.progressBar);
@@ -31,6 +31,7 @@ import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.support.design.widget.Snackbar;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
@@ -40,7 +41,6 @@ import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.authentication.AuthenticatorActivity;
import com.owncloud.android.datamodel.ArbitraryDataProvider;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.files.services.FileDownloader;
import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder;
@@ -56,6 +56,7 @@ 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.operations.CreateShareViaLinkOperation;
import com.owncloud.android.operations.CreateShareWithShareeOperation;
import com.owncloud.android.operations.GetSharesForFileOperation;
import com.owncloud.android.operations.SynchronizeFileOperation;
@@ -80,6 +81,8 @@ public abstract class FileActivity extends DrawerActivity
public static final String EXTRA_FILE = "com.owncloud.android.ui.activity.FILE";
public static final String EXTRA_ACCOUNT = "com.owncloud.android.ui.activity.ACCOUNT";
public static final String EXTRA_SEARCH = "com.owncloud.android.ui.activity.SEARCH";
public static final String EXTRA_SEARCH_QUERY = "com.owncloud.android.ui.activity.SEARCH_QUERY";
public static final String EXTRA_FROM_NOTIFICATION =
"com.owncloud.android.ui.activity.FROM_NOTIFICATION";
@@ -302,7 +305,7 @@ public abstract class FileActivity extends DrawerActivity
dismissLoadingDialog();
if (!result.isSuccess() && (
if (!result.isSuccess() && ! (operation instanceof CreateShareViaLinkOperation) && (
result.getCode() == ResultCode.UNAUTHORIZED ||
(result.isException() && result.getException() instanceof AuthenticatorException)
)) {
@@ -310,10 +313,7 @@ public abstract class FileActivity extends DrawerActivity
requestCredentialsUpdate(this);
if (result.getCode() == ResultCode.UNAUTHORIZED) {
Toast t = Toast.makeText(this, ErrorMessageAdapter.getErrorCauseMessage(result,
operation, getResources()),
Toast.LENGTH_LONG);
t.show();
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
}
} else if (!result.isSuccess() && ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED.equals(result.getCode())) {
@@ -331,10 +331,7 @@ public abstract class FileActivity extends DrawerActivity
updateFileFromDB();
} else if (result.getCode() != ResultCode.CANCELLED) {
Toast t = Toast.makeText(this,
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
Toast.LENGTH_LONG);
t.show();
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
}
} else if (operation instanceof SynchronizeFileOperation) {
@@ -345,10 +342,7 @@ public abstract class FileActivity extends DrawerActivity
updateFileFromDB();
} else {
Toast t = Toast.makeText(this,
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
Toast.LENGTH_LONG);
t.show();
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
}
}
}
@@ -384,8 +378,7 @@ public abstract class FileActivity extends DrawerActivity
}
OwnCloudClient client;
OwnCloudAccount ocAccount = new OwnCloudAccount(account, context);
client = (OwnCloudClientManagerFactory.getDefaultSingleton().
removeClientFor(ocAccount));
client = (OwnCloudClientManagerFactory.getDefaultSingleton().removeClientFor(ocAccount));
if (client != null) {
OwnCloudCredentials cred = client.getCredentials();
if (cred != null) {
@@ -411,7 +404,7 @@ public abstract class FileActivity extends DrawerActivity
startActivityForResult(updateAccountCredentials, REQUEST_CODE__UPDATE_CREDENTIALS);
} catch (com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException e) {
Toast.makeText(context, R.string.auth_account_does_not_exist, Toast.LENGTH_SHORT).show();
showSnackMessage(getString(R.string.auth_account_does_not_exist));
}
}
@@ -448,7 +441,7 @@ public abstract class FileActivity extends DrawerActivity
operation, getResources()), Toast.LENGTH_LONG);
msg.show();
}
invalidateOptionsMenu();
supportInvalidateOptionsMenu();
}
}
@@ -590,4 +583,12 @@ public abstract class FileActivity extends DrawerActivity
// nothing to do
}
/**
* Show a temporary message in a Snackbar bound to the content view
*
* @param message Message to show.
*/
public void showSnackMessage(String message) {
Snackbar.make(findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG).show();
}
}
@@ -58,7 +58,6 @@ import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Toast;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
@@ -99,7 +98,6 @@ import com.owncloud.android.ui.preview.PreviewMediaFragment;
import com.owncloud.android.ui.preview.PreviewTextFragment;
import com.owncloud.android.ui.preview.PreviewVideoActivity;
import com.owncloud.android.utils.DataHolderUtil;
import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.ErrorMessageAdapter;
import com.owncloud.android.utils.MimeTypeUtil;
import com.owncloud.android.utils.PermissionUtil;
@@ -170,6 +168,9 @@ public class FileDisplayActivity extends HookActivity
private SearchView searchView;
private String mSearchQuery = "";
private boolean mSearchOpen;
@Override
protected void onCreate(Bundle savedInstanceState) {
Log_OC.v(TAG, "onCreate() start");
@@ -673,10 +674,10 @@ public class FileDisplayActivity extends HookActivity
// populate list of menu items to show/hide when drawer is opened/closed
mDrawerMenuItemstoShowHideList = new ArrayList<>(4);
mDrawerMenuItemstoShowHideList.add(menu.findItem(R.id.action_search));
mDrawerMenuItemstoShowHideList.add(menu.findItem(R.id.action_sort));
mDrawerMenuItemstoShowHideList.add(menu.findItem(R.id.action_sync_account));
mDrawerMenuItemstoShowHideList.add(menu.findItem(R.id.action_switch_view));
mDrawerMenuItemstoShowHideList.add(menu.findItem(R.id.action_search));
//focus the SearchView
if (!TextUtils.isEmpty(searchQuery)) {
@@ -733,7 +734,7 @@ public class FileDisplayActivity extends HookActivity
}
});
return true;
return super.onCreateOptionsMenu(menu);
}
@@ -921,14 +922,10 @@ public class FileDisplayActivity extends HookActivity
} else {
Log_OC.d(TAG, "User clicked on 'Update' with no selection");
Toast t = Toast.makeText(this, getString(R.string.filedisplay_no_file_selected),
Toast.LENGTH_LONG);
t.show();
return;
showSnackMessage(getString(R.string.filedisplay_no_file_selected));
}
}
private void requestUploadOfContentFromApps(Intent contentIntent, int resultCode) {
ArrayList<Parcelable> streamsToUpload = new ArrayList<>();
@@ -1214,15 +1211,14 @@ public class FileDisplayActivity extends HookActivity
getStorageManager().getFileByPath(getCurrentDir().getRemotePath());
if (currentDir == null) {
// current folder was removed from the server
Toast.makeText(FileDisplayActivity.this,
// current folder was removed from the server
showSnackMessage(
String.format(
getString(R.string.
sync_current_folder_was_removed),
synchFolderRemotePath),
Toast.LENGTH_LONG)
.show();
synchFolderRemotePath
)
);
browseToRoot();
@@ -1244,11 +1240,9 @@ public class FileDisplayActivity extends HookActivity
}
mSyncInProgress = (!FileSyncAdapter.EVENT_FULL_SYNC_END.equals(event) &&
!RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
.equals(event));
!RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED.equals(event));
if (RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED.
equals(event) &&
if (RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED.equals(event) &&
synchResult != null && !synchResult.isSuccess()) {
/// TODO refactor and make common
@@ -1301,10 +1295,10 @@ public class FileDisplayActivity extends HookActivity
private void setBackgroundText() {
final OCFileListFragment ocFileListFragment = getListOfFilesFragment();
if (ocFileListFragment != null) {
if (!mSyncInProgress) {
ocFileListFragment.setEmptyListMessage(ExtendedListFragment.SearchType.NO_SEARCH);
} else {
if (mSyncInProgress) {
ocFileListFragment.setEmptyListLoadingMessage();
} else {
ocFileListFragment.setEmptyListMessage(ExtendedListFragment.SearchType.NO_SEARCH);
}
} else {
Log_OC.e(TAG, "OCFileListFragment is null");
@@ -1358,13 +1352,12 @@ public class FileDisplayActivity extends HookActivity
}
if (renamedInUpload) {
String newName = (new File(uploadedRemotePath)).getName();
Toast msg = Toast.makeText(
context,
showSnackMessage(
String.format(
getString(R.string.filedetails_renamed_in_upload_msg),
newName),
Toast.LENGTH_LONG);
msg.show();
newName
)
);
}
if (uploadWasFine || getFile().fileExists()) {
((FileDetailFragment) details).updateFileDetails(false, true);
@@ -1650,7 +1643,7 @@ public class FileDisplayActivity extends HookActivity
showDetails(file);
}
}
invalidateOptionsMenu();
supportInvalidateOptionsMenu();
}
}
@@ -1663,10 +1656,7 @@ public class FileDisplayActivity extends HookActivity
*/
private void onRemoveFileOperationFinish(RemoveFileOperation operation,
RemoteOperationResult result) {
Toast msg = Toast.makeText(this,
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
Toast.LENGTH_LONG);
msg.show();
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
if (result.isSuccess()) {
OCFile removedFile = operation.getFile();
@@ -1681,7 +1671,7 @@ public class FileDisplayActivity extends HookActivity
if (getStorageManager().getFileById(removedFile.getParentId()).equals(getCurrentDir())) {
refreshListOfFilesFragment(false);
}
invalidateOptionsMenu();
supportInvalidateOptionsMenu();
} else {
if (result.isSslRecoverableException()) {
mLastSslUntrustedServerResult = result;
@@ -1704,10 +1694,7 @@ public class FileDisplayActivity extends HookActivity
refreshListOfFilesFragment(false);
} else {
try {
Toast msg = Toast.makeText(FileDisplayActivity.this,
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
Toast.LENGTH_LONG);
msg.show();
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
} catch (NotFoundException e) {
Log_OC.e(TAG, "Error while trying to show fail message ", e);
@@ -1727,10 +1714,7 @@ public class FileDisplayActivity extends HookActivity
refreshListOfFilesFragment(false);
} else {
try {
Toast msg = Toast.makeText(FileDisplayActivity.this,
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
Toast.LENGTH_LONG);
msg.show();
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
} catch (NotFoundException e) {
Log_OC.e(TAG, "Error while trying to show fail message ", e);
@@ -1781,10 +1765,7 @@ public class FileDisplayActivity extends HookActivity
}
} else {
Toast msg = Toast.makeText(this,
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
Toast.LENGTH_LONG);
msg.show();
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
if (result.isSslRecoverableException()) {
mLastSslUntrustedServerResult = result;
@@ -1799,7 +1780,7 @@ public class FileDisplayActivity extends HookActivity
if (result.isSuccess() && operation.transferWasRequested()) {
OCFile syncedFile = operation.getLocalFile();
onTransferStateChanged(syncedFile, true, true);
invalidateOptionsMenu();
supportInvalidateOptionsMenu();
refreshShowDetails();
}
}
@@ -1817,10 +1798,7 @@ public class FileDisplayActivity extends HookActivity
refreshListOfFilesFragment(false);
} else {
try {
Toast msg = Toast.makeText(FileDisplayActivity.this,
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
Toast.LENGTH_LONG);
msg.show();
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
} catch (NotFoundException e) {
Log_OC.e(TAG, "Error while trying to show fail message ", e);
@@ -2014,6 +1992,8 @@ public class FileDisplayActivity extends HookActivity
Bundle args = new Bundle();
args.putParcelable(EXTRA_FILE, file);
args.putParcelable(EXTRA_ACCOUNT, getAccount());
args.putBoolean(EXTRA_SEARCH, mSearchOpen);
args.putString(EXTRA_SEARCH_QUERY, mSearchQuery);
Fragment textPreviewFragment = Fragment.instantiate(getApplicationContext(),
PreviewTextFragment.class.getName(), args);
setSecondFragment(textPreviewFragment);
@@ -2135,4 +2115,8 @@ public class FileDisplayActivity extends HookActivity
EventBus.getDefault().post(new TokenPushEvent());
}
public void setSearchQuery(String query) {
mSearchQuery = query;
}
}
@@ -20,8 +20,6 @@
package com.owncloud.android.ui.activity;
import android.Manifest;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.KeyguardManager;
import android.content.Context;
import android.content.Intent;
@@ -71,7 +69,7 @@ import javax.crypto.SecretKey;
/**
* Activity to handle access to the app based on the fingerprint.
*/
@TargetApi(Build.VERSION_CODES.M)
@RequiresApi(Build.VERSION_CODES.M)
public class FingerprintActivity extends AppCompatActivity {
private static final String TAG = FingerprintActivity.class.getSimpleName();
@@ -274,28 +272,21 @@ public class FingerprintActivity extends AppCompatActivity {
return false;
}
@RequiresApi(api = Build.VERSION_CODES.M)
static public boolean isFingerprintReady(Context context) {
try {
FingerprintManager fingerprintManager =
(FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE);
if (ActivityCompat.checkSelfPermission(context, Manifest.permission.USE_FINGERPRINT)
!= PackageManager.PERMISSION_GRANTED) {
return false;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
return fingerprintManager.isHardwareDetected() && fingerprintManager.hasEnrolledFingerprints();
}
return ActivityCompat.checkSelfPermission(context, Manifest.permission.USE_FINGERPRINT) ==
PackageManager.PERMISSION_GRANTED && fingerprintManager.isHardwareDetected() &&
fingerprintManager.hasEnrolledFingerprints();
} catch (Exception e) {
return false;
}
return false;
}
}
@SuppressLint("NewApi")
@RequiresApi(Build.VERSION_CODES.M)
class FingerprintHandler extends FingerprintManager.AuthenticationCallback {
private TextView text;
@@ -39,7 +39,6 @@ import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
@@ -418,10 +417,7 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
refreshListOfFilesFragment(false);
} else {
try {
Toast msg = Toast.makeText(FolderPickerActivity.this,
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
Toast.LENGTH_LONG);
msg.show();
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
} catch (NotFoundException e) {
Log_OC.e(TAG, "Error while trying to show fail message " , e);
@@ -460,13 +456,13 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
getStorageManager().getFileByPath(getCurrentFolder().getRemotePath());
if (currentDir == null) {
// current folder was removed from the server
Toast.makeText( FolderPickerActivity.this,
String.format(
getString(R.string.sync_current_folder_was_removed),
getCurrentFolder().getFileName()),
Toast.LENGTH_LONG)
.show();
// current folder was removed from the server
showSnackMessage(
String.format(
getString(R.string.sync_current_folder_was_removed),
getCurrentFolder().getFileName()
)
);
browseToRoot();
} else {
@@ -26,6 +26,7 @@ import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
@@ -35,7 +36,6 @@ import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.utils.Log_OC;
@@ -187,16 +187,14 @@ public class LogHistoryActivity extends ToolbarActivity {
try {
startActivity(intent);
} catch (ActivityNotFoundException e) {
Toast.makeText(this, getString(R.string.log_send_no_mail_app), Toast.LENGTH_LONG).show();
Snackbar.make(findViewById(android.R.id.content), R.string.log_send_no_mail_app, Snackbar.LENGTH_LONG).show();
Log_OC.i(TAG, "Could not find app for sending log history.");
}
}
/**
*
* Class for loading the log data async
*
*/
private class LoadingLogTask extends AsyncTask<String, Void, String> {
private final WeakReference<TextView> textViewReference;
@@ -29,6 +29,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
@@ -60,11 +61,13 @@ import com.owncloud.android.ui.helpers.FileOperationsHelper;
import com.owncloud.android.utils.AnalyticsUtils;
import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.ThemeUtils;
import com.owncloud.android.utils.FileStorageUtils;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import org.parceler.Parcels;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Set;
@@ -433,7 +436,7 @@ public class ManageAccountsActivity extends FileActivity
Account[] accounts = AccountManager.get(this).getAccountsByType(MainApp.getAccountType());
String newAccountName = "";
for (Account acc: accounts) {
for (Account acc : accounts) {
if (!account.name.equalsIgnoreCase(acc.name)) {
newAccountName = acc.name;
break;
@@ -457,6 +460,30 @@ public class ManageAccountsActivity extends FileActivity
super.onBackPressed();
}
deleteAccountFiles(account);
}
private void deleteAccountFiles(final Account account) {
AsyncTask removalTask = new AsyncTask() {
@Override
protected Object doInBackground(Object[] params) {
FileDataStorageManager storageManager = new FileDataStorageManager(account, getContentResolver());
File tempDir = new File(FileStorageUtils.getTemporalPath(account.name));
File saveDir = new File(FileStorageUtils.getSavePath(account.name));
FileStorageUtils.deleteRecursively(tempDir, storageManager);
FileStorageUtils.deleteRecursively(saveDir, storageManager);
// delete all database entries
storageManager.deleteAllFiles();
return true;
}
};
removalTask.execute();
}
/**
@@ -24,13 +24,13 @@ import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.design.widget.Snackbar;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.utils.Log_OC;
@@ -142,9 +142,11 @@ public class ManageSpaceActivity extends AppCompatActivity {
protected void onPostExecute(Boolean result) {
super.onPostExecute(result);
if (!result) {
Toast.makeText(getApplicationContext(),
getString(R.string.manage_space_clear_data),
Toast.LENGTH_LONG).show();
Snackbar.make(
findViewById(android.R.id.content),
R.string.manage_space_clear_data,
Snackbar.LENGTH_LONG
).show();
} else {
finish();
System.exit(0);
@@ -27,6 +27,7 @@ import android.content.SharedPreferences;
import android.graphics.PorterDuff;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.text.Editable;
import android.text.TextWatcher;
@@ -37,7 +38,6 @@ import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.utils.Log_OC;
@@ -377,9 +377,8 @@ public class PassCodeActivity extends AppCompatActivity {
private void showErrorAndRestart(int errorMessage, int headerMessage,
int explanationVisibility) {
Arrays.fill(mPassCodeDigits, null);
CharSequence errorSeq = getString(errorMessage);
Toast.makeText(this, errorSeq, Toast.LENGTH_LONG).show();
mPassCodeHdr.setText(headerMessage); // TODO check if really needed
Snackbar.make(findViewById(android.R.id.content), getString(errorMessage), Snackbar.LENGTH_LONG).show();
mPassCodeHdr.setText(headerMessage); // TODO check if really needed
mPassCodeHdrExplanation.setVisibility(explanationVisibility); // TODO check if really needed
clearBoxes();
}
@@ -1,4 +1,4 @@
/**
/*
* ownCloud Android client application
*
* @author Bartek Przybylski
@@ -33,6 +33,7 @@ import android.content.res.Configuration;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
@@ -47,6 +48,7 @@ import android.preference.PreferenceScreen;
import android.preference.SwitchPreference;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.support.design.widget.Snackbar;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatDelegate;
import android.support.v7.widget.Toolbar;
@@ -76,7 +78,11 @@ import com.owncloud.android.utils.AnalyticsUtils;
import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.ThemeUtils;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.concurrent.ExecutionException;
/**
* An Activity that allows the user to change the application's settings.
@@ -284,11 +290,7 @@ public class Preferences extends PreferenceActivity
return true;
} else {
if (incoming) {
Toast.makeText(
MainApp.getAppContext(),
R.string.prefs_fingerprint_notsetup,
Toast.LENGTH_LONG)
.show();
showSnackMessage(R.string.prefs_fingerprint_notsetup);
fPrint.setChecked(false);
}
SharedPreferences appPrefs =
@@ -350,11 +352,7 @@ public class Preferences extends PreferenceActivity
launchDavDroidLogin();
} catch (Throwable t) {
Log_OC.e(TAG, "Base Uri for account could not be resolved to call DAVdroid!", t);
Toast.makeText(
MainApp.getAppContext(),
R.string.prefs_calendar_contacts_address_resolve_error,
Toast.LENGTH_SHORT)
.show();
showSnackMessage(R.string.prefs_calendar_contacts_address_resolve_error);
}
return true;
}
@@ -665,6 +663,54 @@ public class Preferences extends PreferenceActivity
loadExternalSettingLinks(preferenceCategoryMore);
loadStoragePath();
/* Link to dev apks */
Preference pDevLink = findPreference("dev_link");
if (pDevLink != null) {
pDevLink.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 devApkLink = (String) getText(R.string.dev_link) + latestVersion + ".apk";
Uri uriUrl = Uri.parse(devApkLink);
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;
}
}
});
}
/* Link to dev changelog */
Preference pChangelogLink = findPreference("changelog_link");
if (pChangelogLink != null) {
pChangelogLink.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
String devChangelogLink = getString(R.string.dev_changelog);
Uri uriUrl = Uri.parse(devChangelogLink);
Intent intent = new Intent(Intent.ACTION_VIEW, uriUrl);
startActivity(intent);
return true;
}
});
}
}
private void launchDavDroidLogin()
@@ -697,11 +743,7 @@ public class Preferences extends PreferenceActivity
Uri.parse("https://f-droid.org/repository/browse/?fdid=at.bitfire.davdroid"));
startActivity(downloadIntent);
Toast.makeText(
MainApp.getAppContext(),
R.string.prefs_calendar_contacts_no_store_error,
Toast.LENGTH_SHORT)
.show();
showSnackMessage(R.string.prefs_calendar_contacts_no_store_error);
}
}
}
@@ -834,7 +876,7 @@ public class Preferences extends PreferenceActivity
}
appPrefs.putBoolean(PassCodeActivity.PREFERENCE_SET_PASSCODE, true);
appPrefs.apply();
Toast.makeText(this, R.string.pass_code_stored, Toast.LENGTH_LONG).show();
showSnackMessage(R.string.pass_code_stored);
}
} else if (requestCode == ACTION_CONFIRM_PASSCODE && resultCode == RESULT_OK) {
if (data.getBooleanExtra(PassCodeActivity.KEY_CHECK_RESULT, false)) {
@@ -844,10 +886,10 @@ public class Preferences extends PreferenceActivity
appPrefs.putBoolean(PassCodeActivity.PREFERENCE_SET_PASSCODE, false);
appPrefs.apply();
Toast.makeText(this, R.string.pass_code_removed, Toast.LENGTH_LONG).show();
showSnackMessage(R.string.pass_code_removed);
}
} else if (requestCode == ACTION_REQUEST_CODE_DAVDROID_SETUP && resultCode == RESULT_OK) {
Toast.makeText(this, R.string.prefs_calendar_contacts_sync_setup_successful, Toast.LENGTH_LONG).show();
showSnackMessage(R.string.prefs_calendar_contacts_sync_setup_successful);
}
}
@@ -1042,4 +1084,36 @@ public class Preferences extends PreferenceActivity
public void onCancelMigration() {
// Migration was canceled so we don't do anything
}
/**
* Show a temporary message in a Snackbar bound to the content view
*
* @param messageResource Message to show.
*/
private void showSnackMessage(int messageResource) {
Snackbar.make(findViewById(android.R.id.content), messageResource, Snackbar.LENGTH_LONG).show();
}
/**
*
* 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.dev_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,9 +38,13 @@ import android.graphics.PorterDuff;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcelable;
import android.support.annotation.DrawableRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.content.ContextCompat;
@@ -60,10 +64,12 @@ import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
@@ -143,6 +149,12 @@ public class ReceiveExternalFilesActivity extends FileActivity
private final static String FILENAME_ENCODING = "UTF-8";
private LinearLayout mEmptyListContainer;
private TextView mEmptyListMessage;
private TextView mEmptyListHeadline;
private ImageView mEmptyListIcon;
private ProgressBar mEmptyListProgress;
@Override
protected void onCreate(Bundle savedInstanceState) {
prepareStreamsToUpload();
@@ -711,6 +723,7 @@ public class ReceiveExternalFilesActivity extends FileActivity
private void populateDirectoryList() {
setContentView(R.layout.uploader_layout);
setupEmptyList();
setupToolbar();
ActionBar actionBar = getSupportActionBar();
@@ -735,41 +748,85 @@ public class ReceiveExternalFilesActivity extends FileActivity
mFile = getStorageManager().getFileByPath(full_path);
if (mFile != null) {
Vector<OCFile> files = getStorageManager().getFolderContent(mFile, false);
sortFileList(files);
List<HashMap<String, Object>> data = new LinkedList<>();
for (OCFile f : files) {
HashMap<String, Object> h = new HashMap<>();
h.put("dirname", f);
data.add(h);
if (files.size() == 0) {
setMessageForEmptyList(
R.string.file_list_empty_headline,
R.string.empty,
R.drawable.ic_list_empty_upload,
true
);
} else {
mEmptyListContainer.setVisibility(View.GONE);
sortFileList(files);
List<HashMap<String, Object>> data = new LinkedList<>();
for (OCFile f : files) {
HashMap<String, Object> h = new HashMap<>();
h.put("dirname", f);
data.add(h);
}
UploaderAdapter sa = new UploaderAdapter(this,
data,
R.layout.uploader_list_item_layout,
new String[]{"dirname"},
new int[]{R.id.filename},
getStorageManager(), getAccount());
mListView.setAdapter(sa);
Button btnChooseFolder = (Button) findViewById(R.id.uploader_choose_folder);
btnChooseFolder.setOnClickListener(this);
btnChooseFolder.getBackground().setColorFilter(ThemeUtils.primaryColor(getAccount()),
PorterDuff.Mode.SRC_ATOP);
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(ThemeUtils.primaryColor(getAccount())));
ThemeUtils.colorStatusBar(this, ThemeUtils.primaryDarkColor(getAccount()));
ThemeUtils.colorToolbarProgressBar(this, ThemeUtils.primaryColor(getAccount()));
Button btnNewFolder = (Button) findViewById(R.id.uploader_cancel);
btnNewFolder.setOnClickListener(this);
mListView.setOnItemClickListener(this);
}
UploaderAdapter sa = new UploaderAdapter(this,
data,
R.layout.uploader_list_item_layout,
new String[] {"dirname"},
new int[] {R.id.filename},
getStorageManager(), getAccount());
mListView.setAdapter(sa);
Button btnChooseFolder = (Button) findViewById(R.id.uploader_choose_folder);
btnChooseFolder.setOnClickListener(this);
btnChooseFolder.getBackground().setColorFilter(ThemeUtils.primaryColor(getAccount()),
PorterDuff.Mode.SRC_ATOP);
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(ThemeUtils.primaryColor(getAccount())));
ThemeUtils.colorStatusBar(this, ThemeUtils.primaryDarkColor(getAccount()));
ThemeUtils.colorToolbarProgressBar(this, ThemeUtils.primaryColor(getAccount()));
Button btnNewFolder = (Button) findViewById(R.id.uploader_cancel);
btnNewFolder.setOnClickListener(this);
mListView.setOnItemClickListener(this);
}
}
protected void setupEmptyList() {
mEmptyListContainer = (LinearLayout) findViewById(R.id.empty_list_view);
mEmptyListMessage = (TextView) findViewById(R.id.empty_list_view_text);
mEmptyListHeadline = (TextView) findViewById(R.id.empty_list_view_headline);
mEmptyListIcon = (ImageView) findViewById(R.id.empty_list_icon);
mEmptyListProgress = (ProgressBar) findViewById(R.id.empty_list_progress);
mEmptyListProgress.getIndeterminateDrawable().setColorFilter(ThemeUtils.primaryColor(),
PorterDuff.Mode.SRC_IN);
}
public void setMessageForEmptyList(@StringRes final int headline, @StringRes final int message,
@DrawableRes final int icon, final boolean tintIcon) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
if (mEmptyListContainer != null && mEmptyListMessage != null) {
mEmptyListHeadline.setText(headline);
mEmptyListMessage.setText(message);
if (tintIcon) {
mEmptyListIcon.setImageDrawable(ThemeUtils.tintDrawable(icon, ThemeUtils.primaryColor()));
}
mEmptyListIcon.setVisibility(View.VISIBLE);
mEmptyListProgress.setVisibility(View.GONE);
mEmptyListMessage.setVisibility(View.VISIBLE);
}
}
});
}
@Override
public void onSavedCertificate() {
startSyncFolderOperation(getCurrentDir());
@@ -927,10 +984,7 @@ public class ReceiveExternalFilesActivity extends FileActivity
populateDirectoryList();
} else {
try {
Toast msg = Toast.makeText(this,
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
Toast.LENGTH_LONG);
msg.show();
showSnackMessage(ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()));
} catch (NotFoundException e) {
Log_OC.e(TAG, "Error while trying to show fail message ", e);
@@ -1049,12 +1103,12 @@ public class ReceiveExternalFilesActivity extends FileActivity
if (currentDir == null) {
// current folder was removed from the server
Toast.makeText(context,
showSnackMessage(
String.format(
getString(R.string.sync_current_folder_was_removed),
getCurrentFolder().getFileName()),
Toast.LENGTH_LONG)
.show();
getCurrentFolder().getFileName()
)
);
browseToRoot();
} else {
@@ -1,20 +1,20 @@
/**
/*
* ownCloud Android client application
*
* @author masensio
* @author David A. Velasco
* @author Juan Carlos González Cabrero
* Copyright (C) 2015 ownCloud Inc.
* <p/>
*
* 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.
* <p/>
*
* 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.
* <p/>
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -25,6 +25,7 @@ import android.app.SearchManager;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
@@ -347,13 +348,14 @@ public class ShareActivity extends FileActivity
chooserDialog.show(getSupportFragmentManager(), FTAG_CHOOSER_DIALOG);
} else {
// Detect Failure (403) --> maybe needs password
// Detect Failure (403) or Unauthorized (401) --> maybe needs password
String password = operation.getPassword();
if (result.getCode() == RemoteOperationResult.ResultCode.SHARE_FORBIDDEN &&
(password == null || password.length() == 0) &&
getCapabilities().getFilesSharingPublicEnabled().isUnknown()) {
if (((result.getCode() == RemoteOperationResult.ResultCode.SHARE_FORBIDDEN &&
(password == null || password.length() == 0) &&
getCapabilities().getFilesSharingPublicEnabled().isUnknown()) ||
result.getCode() == RemoteOperationResult.ResultCode.UNAUTHORIZED) ) {
// Was tried without password, but not sure that it's optional.
Toast.makeText(this, R.string.enter_valid_password, Toast.LENGTH_SHORT).show();
// Try with password before giving up; see also ShareFileFragment#OnShareViaLinkListener
ShareFileFragment shareFileFragment = getShareFileFragment();
if (shareFileFragment != null
@@ -363,10 +365,11 @@ public class ShareActivity extends FileActivity
}
} else {
Toast t = Toast.makeText(this,
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
Toast.LENGTH_LONG);
t.show();
Snackbar.make(
findViewById(android.R.id.content),
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
Snackbar.LENGTH_LONG
).show();
}
}
@@ -39,7 +39,6 @@ import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
@@ -54,8 +53,8 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.operations.CheckCurrentCredentialsOperation;
import com.owncloud.android.ui.fragment.UploadListFragment;
import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.AnalyticsUtils;
import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.MimeTypeUtil;
import java.io.File;
@@ -162,8 +161,7 @@ public class UploadListActivity extends FileActivity implements UploadListFragme
/// TODO is this path still active?
File f = new File(file.getLocalPath());
if(!f.exists()) {
Toast.makeText(this, "Cannot open. Local file does not exist.",
Toast.LENGTH_SHORT).show();
showSnackMessage(getString(R.string.local_file_not_found_toast));
} else {
openFileWithDefault(file.getLocalPath());
}
@@ -184,9 +182,8 @@ public class UploadListActivity extends FileActivity implements UploadListFragme
try {
startActivity(myIntent);
} catch (ActivityNotFoundException e) {
Toast.makeText(this, "Found no app to open this file.", Toast.LENGTH_LONG).show();
showSnackMessage(getString(R.string.file_list_no_app_for_file_type));
Log_OC.i(TAG, "Could not find app for sending log history.");
}
}
@@ -271,6 +271,7 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
WebView webView = (WebView) v.findViewById(R.id.whatsNewWebView);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setDomStorageEnabled(true);
webView.getSettings().setAllowFileAccess(false);
webView.setWebViewClient(new WebViewClient());
webView.loadUrl(mWebUrl);
@@ -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 {
@@ -23,6 +23,7 @@ import android.accounts.Account;
import android.content.Context;
import android.database.DataSetObserver;
import android.graphics.Bitmap;
import android.support.design.widget.Snackbar;
import android.text.format.DateUtils;
import android.view.LayoutInflater;
import android.view.View;
@@ -34,7 +35,6 @@ import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
@@ -392,10 +392,11 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
requester.retry(mParentActivity, upload);
refreshView();
} else {
final String message = String.format(
mParentActivity.getString(R.string.local_file_not_found_toast)
);
Toast.makeText(mParentActivity, message, Toast.LENGTH_SHORT).show();
Snackbar.make(
v.getRootView().findViewById(android.R.id.content),
mParentActivity.getString(R.string.local_file_not_found_toast),
Snackbar.LENGTH_LONG
).show();
}
}
});
@@ -408,9 +409,10 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
ImageView fileIcon = (ImageView) view.findViewById(R.id.thumbnail);
fileIcon.setImageResource(R.drawable.file);
/** Cancellation needs do be checked and done before changing the drawable in fileIcon, or
/*
* Cancellation needs do be checked and done before changing the drawable in fileIcon, or
* {@link ThumbnailsCacheManager#cancelPotentialWork} will NEVER cancel any task.
**/
*/
OCFile fakeFileToCheatThumbnailsCacheManagerInterface = new OCFile(upload.getRemotePath());
fakeFileToCheatThumbnailsCacheManagerInterface.setStoragePath(upload.getLocalPath());
fakeFileToCheatThumbnailsCacheManagerInterface.setMimetype(upload.getMimeType());
@@ -451,7 +453,8 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
task
);
fileIcon.setImageDrawable(asyncDrawable);
task.execute(fakeFileToCheatThumbnailsCacheManagerInterface);
task.execute(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(
fakeFileToCheatThumbnailsCacheManagerInterface, null));
}
}
@@ -487,7 +490,7 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
task
);
fileIcon.setImageDrawable(asyncDrawable);
task.execute(file);
task.execute(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(file, null));
Log_OC.v(TAG, "Executing task to generate a new thumbnail");
}
}
@@ -580,11 +583,6 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
R.string.uploads_view_upload_status_service_interrupted
);
break;
case UNKNOWN:
status = mParentActivity.getString(
R.string.uploads_view_upload_status_unknown_fail
);
break;
case CANCELLED:
// should not get here ; cancelled uploads should be wiped out
status = mParentActivity.getString(
@@ -598,8 +596,17 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
case MAINTENANCE_MODE:
status = mParentActivity.getString(R.string.maintenance_mode);
break;
case SSL_RECOVERABLE_PEER_UNVERIFIED:
status =
mParentActivity.getString(
R.string.uploads_view_upload_status_failed_ssl_certificate_not_trusted
);
break;
case UNKNOWN:
status = mParentActivity.getString(R.string.uploads_view_upload_status_unknown_fail);
break;
default:
status = "Naughty devs added a new fail result but no description for the user";
status = "New fail result but no description for the user";
break;
}
break;
@@ -271,7 +271,6 @@ public class FileListListAdapter extends BaseAdapter {
});
}
case GRID_ITEM:
// filename
fileName = (TextView) view.findViewById(R.id.Filename);
@@ -369,7 +368,9 @@ public class FileListListAdapter extends BaseAdapter {
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" + String.valueOf(file.getRemoteId())
);
if (thumbnail != null && !file.needsUpdateThumbnail()) {
if (MimeTypeUtil.isVideo(file)) {
@@ -385,7 +386,6 @@ public class FileListListAdapter extends BaseAdapter {
final ThumbnailsCacheManager.ThumbnailGenerationTask task =
new ThumbnailsCacheManager.ThumbnailGenerationTask(
fileIcon, mStorageManager, mAccount, asyncTasks);
if (thumbnail == null) {
if (MimeTypeUtil.isVideo(file)) {
thumbnail = ThumbnailsCacheManager.mDefaultVideo;
@@ -401,7 +401,8 @@ public class FileListListAdapter extends BaseAdapter {
);
fileIcon.setImageDrawable(asyncDrawable);
asyncTasks.add(task);
task.execute(file);
task.execute(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(file,
file.getRemoteId()));
} catch (IllegalArgumentException e) {
Log_OC.d(TAG, "ThumbnailGenerationTask : " + e.getMessage());
}
@@ -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" + String.valueOf(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(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(file, null));
Log_OC.v(TAG, "Executing task to generate a new thumbnail");
} // else, already being generated, don't restart it
@@ -122,7 +122,7 @@ public class UploaderAdapter extends SimpleAdapter {
task
);
fileIcon.setImageDrawable(asyncDrawable);
task.execute(file);
task.execute(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(file, file.getRemoteId()));
}
}
} else {
@@ -1,4 +1,4 @@
/**
/*
* ownCloud Android client application
*
* @author Bartek Przybylski
@@ -24,6 +24,7 @@ package com.owncloud.android.ui.dialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
@@ -38,7 +39,7 @@ import com.owncloud.android.R;
*/
public class ConflictsResolveDialog extends DialogFragment {
public static enum Decision {
public enum Decision {
CANCEL,
KEEP_BOTH,
OVERWRITE,
@@ -46,35 +47,32 @@ public class ConflictsResolveDialog extends DialogFragment {
}
OnConflictDecisionMadeListener mListener;
public static ConflictsResolveDialog newInstance(String path, OnConflictDecisionMadeListener listener) {
public static ConflictsResolveDialog newInstance(OnConflictDecisionMadeListener listener) {
ConflictsResolveDialog f = new ConflictsResolveDialog();
Bundle args = new Bundle();
args.putString("remotepath", path);
f.setArguments(args);
f.mListener = listener;
return f;
}
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
String remotepath = getArguments().getString("remotepath");
return new AlertDialog.Builder(getActivity(), R.style.Theme_ownCloud_Dialog)
.setIcon(R.drawable.ic_warning)
.setTitle(R.string.conflict_title)
.setMessage(String.format(getString(R.string.conflict_message), remotepath))
.setPositiveButton(R.string.conflict_use_local_version,
new DialogInterface.OnClickListener() {
.setIcon(R.drawable.ic_warning)
.setTitle(R.string.conflict_title)
.setMessage(getString(R.string.conflict_message))
.setPositiveButton(R.string.conflict_use_local_version,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (mListener != null) {
mListener.conflictDecisionMade(Decision.OVERWRITE);
}
}
})
.setNeutralButton(R.string.conflict_keep_both,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (mListener != null) {
mListener.conflictDecisionMade(Decision.OVERWRITE);
}
}
})
.setNeutralButton(R.string.conflict_keep_both,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (mListener != null) {
@@ -82,16 +80,16 @@ public class ConflictsResolveDialog extends DialogFragment {
}
}
})
.setNegativeButton(R.string.conflict_use_server_version,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (mListener != null) {
mListener.conflictDecisionMade(Decision.SERVER);
.setNegativeButton(R.string.conflict_use_server_version,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (mListener != null) {
mListener.conflictDecisionMade(Decision.SERVER);
}
}
})
.create();
}
})
.create();
}
public void showDialog(AppCompatActivity activity) {
@@ -120,6 +118,6 @@ public class ConflictsResolveDialog extends DialogFragment {
}
public interface OnConflictDecisionMadeListener {
public void conflictDecisionMade(Decision decision);
void conflictDecisionMade(Decision decision);
}
}
@@ -24,6 +24,7 @@ import android.app.Dialog;
import android.content.DialogInterface;
import android.graphics.PorterDuff;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
@@ -31,7 +32,6 @@ import android.view.View;
import android.view.WindowManager.LayoutParams;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
@@ -116,10 +116,7 @@ public class CreateFolderDialogFragment
.getText().toString().trim();
if (newFolderName.length() <= 0) {
Toast.makeText(
getActivity(),
R.string.filename_empty,
Toast.LENGTH_LONG).show();
showSnackMessage(R.string.filename_empty);
return;
}
boolean serverWithForbiddenChars = ((ComponentsGetter)getActivity()).
@@ -132,7 +129,7 @@ public class CreateFolderDialogFragment
} else {
messageId = R.string.filename_forbidden_characters;
}
Toast.makeText(getActivity(), messageId, Toast.LENGTH_LONG).show();
showSnackMessage(messageId);
return;
}
@@ -143,5 +140,17 @@ public class CreateFolderDialogFragment
getFileOperationsHelper().createFolder(path, false);
}
}
/**
* Show a temporary message in a Snackbar bound to the content view of the parent Activity
*
* @param messageResource Message to show.
*/
private void showSnackMessage(int messageResource) {
Snackbar.make(
getActivity().findViewById(android.R.id.content),
messageResource,
Snackbar.LENGTH_LONG
).show();
}
}
@@ -30,6 +30,7 @@ import android.app.Dialog;
import android.content.DialogInterface;
import android.graphics.PorterDuff;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
@@ -37,7 +38,6 @@ import android.view.View;
import android.view.WindowManager.LayoutParams;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
@@ -130,10 +130,7 @@ public class RenameFileDialogFragment
.getText().toString().trim();
if (newFileName.length() <= 0) {
Toast.makeText(
getActivity(),
R.string.filename_empty,
Toast.LENGTH_LONG).show();
showSnackMessage(R.string.filename_empty);
return;
}
@@ -147,7 +144,7 @@ public class RenameFileDialogFragment
} else {
messageId = R.string.filename_forbidden_characters;
}
Toast.makeText(getActivity(), messageId, Toast.LENGTH_LONG).show();
showSnackMessage(messageId);
return;
}
@@ -156,4 +153,17 @@ public class RenameFileDialogFragment
}
}
/**
* Show a temporary message in a Snackbar bound to the content view of the parent Activity
*
* @param messageResource Message to show.
*/
private void showSnackMessage(int messageResource) {
Snackbar.make(
getActivity().findViewById(android.R.id.content),
messageResource,
Snackbar.LENGTH_LONG
).show();
}
}
@@ -138,6 +138,7 @@ public class SamlWebViewDialog extends DialogFragment {
WebSettings webSettings = mSsoWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setDomStorageEnabled(true);
webSettings.setSavePassword(false);
webSettings.setUserAgentString(MainApp.getUserAgent());
webSettings.setSaveFormData(false);
@@ -184,8 +185,8 @@ public class SamlWebViewDialog extends DialogFragment {
@Override
public void onDestroyView() {
Log_OC.v(TAG, "onDestroyView");
if ((ViewGroup)mSsoWebView.getParent() != null) {
if (mSsoWebView.getParent() != null) {
((ViewGroup)mSsoWebView.getParent()).removeView(mSsoWebView);
}
@@ -22,6 +22,7 @@ import android.app.Dialog;
import android.content.DialogInterface;
import android.graphics.PorterDuff;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
@@ -29,7 +30,6 @@ import android.view.View;
import android.view.WindowManager;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
@@ -115,10 +115,11 @@ public class SharePasswordDialogFragment extends DialogFragment
.getText().toString();
if (password.length() <= 0) {
Toast.makeText(
getActivity(),
Snackbar.make(
getActivity().findViewById(android.R.id.content),
R.string.share_link_empty_password,
Toast.LENGTH_LONG).show();
Snackbar.LENGTH_LONG
).show();
return;
}
@@ -75,7 +75,6 @@ import com.owncloud.android.ui.activity.UploadFilesActivity;
import com.owncloud.android.ui.adapter.FileListListAdapter;
import com.owncloud.android.ui.adapter.LocalFileListAdapter;
import com.owncloud.android.ui.events.SearchEvent;
import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.ThemeUtils;
import org.greenrobot.eventbus.EventBus;
@@ -788,7 +787,7 @@ public class ExtendedListFragment extends Fragment
@Override
public void run() {
if (searchType == SearchType.NO_SEARCH && mEmptyListProgress.getVisibility() == View.GONE) {
if (searchType == SearchType.NO_SEARCH) {
setMessageForEmptyList(
R.string.file_list_empty_headline,
R.string.file_list_empty,
@@ -320,17 +320,16 @@ public class FileDetailFragment extends FileFragment implements OnClickListener,
return true;
}
case R.id.action_send_file: {
// Obtain the file
if (!getFile().isDown()) { // Download the file
Log_OC.d(TAG, getFile().getRemotePath() + " : File must be downloaded");
((FileDisplayActivity) mContainerActivity).startDownloadForSending(getFile(),
OCFileListFragment.DOWNLOAD_SEND);
// Obtain the file
if (!getFile().isDown()) { // Download the file
Log_OC.d(TAG, getFile().getRemotePath() + " : File must be downloaded");
((FileDisplayActivity) mContainerActivity).startDownloadForSending(getFile(),
OCFileListFragment.DOWNLOAD_SEND);
} else {
mContainerActivity.getFileOperationsHelper().sendDownloadedFile(getFile());
}
return true;
}
else {
mContainerActivity.getFileOperationsHelper().sendDownloadedFile(getFile());
}
return true;
}
default:
return super.onOptionsItemSelected(item);
}
@@ -497,7 +496,7 @@ public class FileDetailFragment extends FileFragment implements OnClickListener,
task
);
iv.setImageDrawable(asyncDrawable);
task.execute(file);
task.execute(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(file, file.getRemoteId()));
}
}
} else {
@@ -37,6 +37,7 @@ import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.support.design.widget.BottomNavigationView;
import android.support.design.widget.Snackbar;
import android.support.v4.widget.DrawerLayout;
import android.support.v4.widget.SwipeRefreshLayout;
import android.util.SparseBooleanArray;
@@ -52,7 +53,6 @@ import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
@@ -393,7 +393,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
/**
* registers {@link android.view.View.OnClickListener} and {@link android.view.View.OnLongClickListener}
* on the Upload mini FAB for the linked action and {@link Toast} showing the underlying action.
* on the Upload mini FAB for the linked action and {@link Snackbar} showing the underlying action.
*/
private void registerFabUploadListeners() {
getFabUpload().setOnClickListener(new View.OnClickListener() {
@@ -409,7 +409,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
getFabUpload().setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
Toast.makeText(getActivity(), R.string.actionbar_upload, Toast.LENGTH_SHORT).show();
showSnackMessage(R.string.actionbar_upload);
return true;
}
});
@@ -417,7 +417,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
/**
* registers {@link android.view.View.OnClickListener} and {@link android.view.View.OnLongClickListener}
* on the 'Create Dir' mini FAB for the linked action and {@link Toast} showing the underlying action.
* on the 'Create Dir' mini FAB for the linked action and {@link Snackbar} showing the underlying action.
*/
private void registerFabMkDirListeners() {
getFabMkdir().setOnClickListener(new View.OnClickListener() {
@@ -434,7 +434,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
getFabMkdir().setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
Toast.makeText(getActivity(), R.string.actionbar_mkdir, Toast.LENGTH_SHORT).show();
showSnackMessage(R.string.actionbar_mkdir);
return true;
}
});
@@ -442,7 +442,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
/**
* registers {@link android.view.View.OnClickListener} and {@link android.view.View.OnLongClickListener}
* on the Upload from App mini FAB for the linked action and {@link Toast} showing the underlying action.
* on the Upload from App mini FAB for the linked action and {@link Snackbar} showing the underlying action.
*/
private void registerFabUploadFromAppListeners() {
getFabUploadFromApp().setOnClickListener(new View.OnClickListener() {
@@ -466,9 +466,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
getFabUploadFromApp().setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
Toast.makeText(getActivity(),
R.string.actionbar_upload_from_apps,
Toast.LENGTH_SHORT).show();
showSnackMessage(R.string.actionbar_upload_from_apps);
return true;
}
});
@@ -932,14 +930,21 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
return true;
}
case R.id.action_send_file: {
// Obtain the file
if (!singleFile.isDown()) { // Download the file
Log_OC.d(TAG, singleFile.getRemotePath() + " : File must be downloaded");
((FileDisplayActivity) mContainerActivity).startDownloadForSending(singleFile, DOWNLOAD_SEND);
if (MimeTypeUtil.isImage(singleFile) && !singleFile.isDown()) {
mContainerActivity.getFileOperationsHelper().sendCachedImage(singleFile);
return true;
} else {
mContainerActivity.getFileOperationsHelper().sendDownloadedFile(singleFile);
// Obtain the file
if (!singleFile.isDown()) { // Download the file
Log_OC.d(TAG, singleFile.getRemotePath() + " : File must be downloaded");
((FileDisplayActivity) mContainerActivity).startDownloadForSending(singleFile,
DOWNLOAD_SEND);
} else {
mContainerActivity.getFileOperationsHelper().sendDownloadedFile(singleFile);
}
return true;
}
return true;
}
case R.id.action_set_as_wallpaper: {
if (singleFile.isDown()) {
@@ -1617,4 +1622,17 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
}
}
/**
* Show a temporary message in a Snackbar bound to the content view of the parent Activity
*
* @param messageResource Message to show.
*/
private void showSnackMessage(int messageResource) {
Snackbar.make(
getActivity().findViewById(android.R.id.content),
messageResource,
Snackbar.LENGTH_LONG
).show();
}
}
@@ -43,7 +43,6 @@ import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils;
@@ -247,8 +246,11 @@ public class ShareFileFragment extends Fragment implements ShareUserListAdapter.
// Show Search Fragment
mListener.showSearchUsersAndGroups();
} else {
String message = getString(R.string.share_sharee_unavailable);
Toast.makeText(getActivity(), message, Toast.LENGTH_LONG).show();
Snackbar.make(
getActivity().findViewById(android.R.id.content),
getString(R.string.share_sharee_unavailable),
Snackbar.LENGTH_LONG
).show();
}
}
});
@@ -45,6 +45,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.ShareType;
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
import com.owncloud.android.providers.DiskLruImageCacheFileProvider;
import com.owncloud.android.services.OperationsService;
import com.owncloud.android.services.observer.FileObserverService;
import com.owncloud.android.ui.activity.FileActivity;
@@ -190,10 +191,10 @@ public class FileOperationsHelper {
)
);
} catch (ActivityNotFoundException anfe) {
showNoAppForFileTypeToast(mFileActivity.getApplicationContext());
mFileActivity.showSnackMessage(mFileActivity.getString(R.string.file_list_no_app_for_file_type));
}
} else {
showNoAppForFileTypeToast(mFileActivity.getApplicationContext());
mFileActivity.showSnackMessage(mFileActivity.getString(R.string.file_list_no_app_for_file_type));
}
} else {
@@ -201,18 +202,6 @@ public class FileOperationsHelper {
}
}
/**
* Displays a toast stating that no application could be found to open the file.
*
* @param context the context to be able to show a toast.
*/
private void showNoAppForFileTypeToast(Context context) {
Toast.makeText(context,
R.string.file_list_no_app_for_file_type, Toast.LENGTH_SHORT)
.show();
}
/**
* Helper method to share a file via a public link. Starts a request to do it in {@link OperationsService}
*
@@ -242,11 +231,7 @@ public class FileOperationsHelper {
} else {
// Show a Message
Toast t = Toast.makeText(
mFileActivity, mFileActivity.getString(R.string.share_link_no_support_share_api),
Toast.LENGTH_LONG
);
t.show();
mFileActivity.showSnackMessage(mFileActivity.getString(R.string.share_link_no_support_share_api));
}
}
@@ -267,11 +252,7 @@ public class FileOperationsHelper {
}
} else {
// Show a Message
Toast t = Toast.makeText(
mFileActivity, mFileActivity.getString(R.string.share_link_no_support_share_api),
Toast.LENGTH_LONG
);
t.show();
mFileActivity.showSnackMessage(mFileActivity.getString(R.string.share_link_no_support_share_api));
}
}
@@ -360,11 +341,7 @@ public class FileOperationsHelper {
} else {
// Show a Message
Toast t = Toast.makeText(mFileActivity,
mFileActivity.getString(R.string.share_link_no_support_share_api),
Toast.LENGTH_LONG);
t.show();
mFileActivity.showSnackMessage(mFileActivity.getString(R.string.share_link_no_support_share_api));
}
}
@@ -378,7 +355,6 @@ public class FileOperationsHelper {
intent.putExtra(FileActivity.EXTRA_FILE, file);
intent.putExtra(FileActivity.EXTRA_ACCOUNT, mFileActivity.getAccount());
mFileActivity.startActivity(intent);
}
@@ -532,6 +508,22 @@ public class FileOperationsHelper {
}
}
public void sendCachedImage(OCFile file) {
// // TODO check if already exists in cache, else download resized image first
if (file != null) {
Intent sendIntent = new Intent(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
mFileActivity.startActivity(Intent.createChooser(sendIntent, "Send"));
} else {
Log_OC.wtf(TAG, "Trying to send a NULL OCFile");
}
}
public void setPictureAs(OCFile file) {
if (file != null) {
if (file.isDown()) {
@@ -31,6 +31,7 @@ public class ImageViewCustom extends AppCompatImageView {
private long mMovieDuration;
private long mMovieRunDuration;
private long mLastTick;
protected PreviewImageFragment previewImageFragment;
public ImageViewCustom(Context context) {
super(context);
@@ -143,4 +144,7 @@ public class ImageViewCustom extends AppCompatImageView {
}
}
public void setPreviewImageFragment(PreviewImageFragment previewImageFragment) {
this.previewImageFragment = previewImageFragment;
}
}
@@ -26,6 +26,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.IBinder;
import android.support.v4.view.ViewPager;
@@ -41,6 +42,7 @@ import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.datamodel.VirtualFolderType;
import com.owncloud.android.db.PreferenceManager;
import com.owncloud.android.files.services.FileDownloader;
import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder;
import com.owncloud.android.files.services.FileUploader;
@@ -121,13 +123,13 @@ public class PreviewImageActivity extends FileActivity implements
}
}
});
if (savedInstanceState != null) {
mRequestWaitingForBinder = savedInstanceState.getBoolean(KEY_WAITING_FOR_BINDER);
} else {
mRequestWaitingForBinder = false;
}
}
private void initViewPager() {
@@ -149,7 +151,7 @@ public class PreviewImageActivity extends FileActivity implements
}
mPreviewImagePagerAdapter = new PreviewImagePagerAdapter(getSupportFragmentManager(),
parentFolder, getAccount(), getStorageManager(), MainApp.isOnlyOnDevice());
parentFolder, getAccount(), getStorageManager(), MainApp.isOnlyOnDevice(), getBaseContext());
}
mViewPager = (ExtendedViewPager) findViewById(R.id.fragmentPager);
@@ -195,7 +197,7 @@ public class PreviewImageActivity extends FileActivity implements
private void onSynchronizeFileOperationFinish(SynchronizeFileOperation operation,
RemoteOperationResult result) {
if (result.isSuccess()) {
invalidateOptionsMenu();
supportInvalidateOptionsMenu();
}
}
@@ -325,7 +327,7 @@ public class PreviewImageActivity extends FileActivity implements
finish();
}
private void requestForDownload(OCFile file) {
public void requestForDownload(OCFile file) {
if (mDownloaderBinder == null) {
Log_OC.d(TAG, "requestForDownload called without binder to download service");
@@ -349,13 +351,16 @@ public class PreviewImageActivity extends FileActivity implements
mHasSavedPosition = true;
if (mDownloaderBinder == null) {
mRequestWaitingForBinder = true;
} else {
OCFile currentFile = mPreviewImagePagerAdapter.getFileAt(position);
getSupportActionBar().setTitle(currentFile.getFileName());
setDrawerIndicatorEnabled(false);
if (!currentFile.isDown()
&& !mPreviewImagePagerAdapter.pendingErrorAt(position)) {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
String behaviour = sharedPreferences.getString("preview_behaviour", "PREVIEW_BEHAVIOUR_PREVIEW");
boolean resizedBehaviour = behaviour.equalsIgnoreCase("PREVIEW_BEHAVIOUR_PREVIEW");
if (!currentFile.isDown() && !mPreviewImagePagerAdapter.pendingErrorAt(position) && !resizedBehaviour) {
requestForDownload(currentFile);
}
@@ -456,6 +461,10 @@ public class PreviewImageActivity extends FileActivity implements
}
}
public void switchToFullScreen() {
hideSystemUI(mFullScreenAnchorView);
}
@Override
protected void onAccountSet(boolean stateWasRecovered) {
super.onAccountSet(stateWasRecovered);
@@ -473,7 +482,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
@@ -35,6 +35,7 @@ import android.os.Bundle;
import android.os.Process;
import android.support.annotation.DrawableRes;
import android.support.annotation.StringRes;
import android.support.design.widget.Snackbar;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
@@ -52,8 +53,10 @@ import android.widget.TextView;
import com.caverock.androidsvg.SVG;
import com.caverock.androidsvg.SVGParseException;
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;
@@ -87,7 +90,7 @@ 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 static final String SCREEN_NAME = "Image Preview";
private TouchImageViewCustom mImageView;
@@ -99,6 +102,8 @@ public class PreviewImageFragment extends FileFragment {
protected ImageView mMultiListIcon;
protected ProgressBar mMultiListProgress;
private Boolean mShowResizedImage = false;
public Bitmap mBitmap = null;
private static final String TAG = PreviewImageFragment.class.getSimpleName();
@@ -121,11 +126,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;
}
@@ -157,6 +165,7 @@ public class PreviewImageFragment extends FileFragment {
// not right now
mIgnoreFirstSavedState = args.getBoolean(ARG_IGNORE_FIRST);
mShowResizedImage = args.getBoolean(ARG_SHOW_RESIZED_IMAGE);
setHasOptionsMenu(true);
}
@@ -170,6 +179,7 @@ public class PreviewImageFragment extends FileFragment {
super.onCreateView(inflater, container, savedInstanceState);
View view = inflater.inflate(R.layout.preview_image_fragment, container, false);
mImageView = (TouchImageViewCustom) view.findViewById(R.id.image);
mImageView.setPreviewImageFragment(this);
mImageView.setVisibility(View.GONE);
view.setOnClickListener(new OnClickListener() {
@@ -196,6 +206,14 @@ public class PreviewImageFragment extends FileFragment {
return view;
}
public void switchToFullScreen() {
((PreviewImageActivity) getActivity()).switchToFullScreen();
}
public void downloadFile() {
((PreviewImageActivity) getActivity()).requestForDownload(getFile());
}
protected void setupMultiView(View view) {
mMultiListContainer = (LinearLayout) view.findViewById(R.id.empty_list_view);
mMultiListMessage = (TextView) view.findViewById(R.id.empty_list_view_text);
@@ -221,9 +239,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");
}
}
@@ -241,10 +256,60 @@ public class PreviewImageFragment extends FileFragment {
public void onStart() {
super.onStart();
if (getFile() != null) {
mLoadBitmapTask = new LoadBitmapTask(mImageView);
//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()) {
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);
mImageView.setVisibility(View.VISIBLE);
mBitmap = thumbnail;
} else {
thumbnail = ThumbnailsCacheManager.mDefaultImg;
}
// generate new resized image
if (ThumbnailsCacheManager.cancelPotentialThumbnailWork(getFile(), mImageView) &&
mContainerActivity.getStorageManager() != null) {
final ThumbnailsCacheManager.ResizedImageGenerationTask task =
new ThumbnailsCacheManager.ResizedImageGenerationTask(PreviewImageFragment.this,
mImageView,
mContainerActivity.getStorageManager(),
mContainerActivity.getStorageManager().getAccount());
if (resizedImage == null) {
resizedImage = thumbnail;
}
final ThumbnailsCacheManager.AsyncResizedImageDrawable asyncDrawable =
new ThumbnailsCacheManager.AsyncResizedImageDrawable(
MainApp.getAppContext().getResources(),
resizedImage,
task
);
mImageView.setImageDrawable(asyncDrawable);
task.execute(getFile());
}
}
mMultiView.setVisibility(View.GONE);
if (getResources() != null) {
mImageView.setBackgroundColor(getResources().getColor(R.color.black));
}
mImageView.setVisibility(View.VISIBLE);
} else {
mLoadBitmapTask = new LoadBitmapTask(mImageView);
mLoadBitmapTask.execute(getFile());
}
}
}
@@ -359,9 +424,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;
@@ -652,6 +723,16 @@ public class PreviewImageFragment extends FileFragment {
}
}
public void setErrorPreviewMessage() {
Snackbar.make(mMultiView, "No resized image possible. Download full image?", Snackbar.LENGTH_INDEFINITE)
.setAction("Yes", new OnClickListener() {
@Override
public void onClick(View v) {
downloadFile();
}
}).show();
}
/**
* Helper method to test if an {@link OCFile} can be passed to a {@link PreviewImageFragment}
* to be previewed.
@@ -678,19 +759,22 @@ public class PreviewImageFragment extends FileFragment {
getFile().getMimetype().equalsIgnoreCase("image/svg+xml")) && getActivity() != null
&& getActivity() instanceof PreviewImageActivity && getResources() != null) {
PreviewImageActivity previewImageActivity = (PreviewImageActivity) getActivity();
LayerDrawable layerDrawable = (LayerDrawable) mImageView.getDrawable();
Drawable layerOne;
if (previewImageActivity.getSystemUIVisible()) {
layerOne = getResources().getDrawable(R.color.white);
} else {
layerOne = getResources().getDrawable(R.drawable.backrepeat);
if (mImageView.getDrawable() instanceof LayerDrawable) {
LayerDrawable layerDrawable = (LayerDrawable) mImageView.getDrawable();
Drawable layerOne;
if (previewImageActivity.getSystemUIVisible()) {
layerOne = getResources().getDrawable(R.color.white);
} else {
layerOne = getResources().getDrawable(R.drawable.backrepeat);
}
layerDrawable.setDrawableByLayerId(layerDrawable.getId(0), layerOne);
mImageView.setImageDrawable(layerDrawable);
mImageView.invalidate();
}
layerDrawable.setDrawableByLayerId(layerDrawable.getId(0), layerOne);
mImageView.setImageDrawable(layerDrawable);
mImageView.invalidate();
}
}
@@ -20,6 +20,8 @@
package com.owncloud.android.ui.preview;
import android.accounts.Account;
import android.content.Context;
import android.content.SharedPreferences;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
@@ -28,6 +30,7 @@ import android.view.ViewGroup;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.datamodel.VirtualFolderType;
import com.owncloud.android.db.PreferenceManager;
import com.owncloud.android.ui.fragment.FileFragment;
import com.owncloud.android.utils.FileStorageUtils;
@@ -50,7 +53,8 @@ public class PreviewImagePagerAdapter extends FragmentStatePagerAdapter {
private Set<Integer> mObsoletePositions;
private Set<Integer> mDownloadErrors;
private FileDataStorageManager mStorageManager;
private Context mContext;
private Map<Integer, FileFragment> mCachedFragments;
/**
@@ -63,7 +67,7 @@ public class PreviewImagePagerAdapter extends FragmentStatePagerAdapter {
*/
public PreviewImagePagerAdapter(FragmentManager fragmentManager, OCFile parentFolder,
Account account, FileDataStorageManager storageManager,
boolean onlyOnDevice) {
boolean onlyOnDevice, Context context) {
super(fragmentManager);
if (fragmentManager == null) {
@@ -76,6 +80,7 @@ public class PreviewImagePagerAdapter extends FragmentStatePagerAdapter {
throw new IllegalArgumentException("NULL storage manager");
}
mContext = context;
mAccount = account;
mStorageManager = storageManager;
mImageFiles = mStorageManager.getFolderImages(parentFolder, onlyOnDevice);
@@ -140,20 +145,27 @@ public class PreviewImagePagerAdapter extends FragmentStatePagerAdapter {
OCFile file = mImageFiles.get(i);
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));
fragment = PreviewImageFragment.newInstance(file, mObsoletePositions.contains(i), false);
} else {
fragment = FileDownloadFragment.newInstance(
file, mAccount, mObsoletePositions.contains(Integer.valueOf(i))
);
if (mDownloadErrors.contains(i)) {
fragment = FileDownloadFragment.newInstance(file, mAccount, true);
((FileDownloadFragment)fragment).setError(true);
mDownloadErrors.remove(i);
} else {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(mContext);
boolean behaviour = sharedPreferences.getString("preview_behaviour", "PREVIEW_BEHAVIOUR_PREVIEW")
.equalsIgnoreCase("PREVIEW_BEHAVIOUR_PREVIEW");
if (behaviour) {
fragment = PreviewImageFragment.newInstance(file, mObsoletePositions.contains(i), true);
} else {
fragment = FileDownloadFragment.newInstance(file, mAccount, mObsoletePositions.contains(i));
}
}
}
mObsoletePositions.remove(Integer.valueOf(i));
mObsoletePositions.remove(i);
return fragment;
}
@@ -22,6 +22,10 @@ package com.owncloud.android.ui.preview;
import android.accounts.Account;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.support.v4.view.MenuItemCompat;
import android.support.v7.widget.SearchView;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
@@ -44,6 +48,7 @@ import com.owncloud.android.ui.dialog.RemoveFilesDialogFragment;
import com.owncloud.android.ui.fragment.FileFragment;
import com.owncloud.android.utils.AnalyticsUtils;
import com.owncloud.android.utils.MimeTypeUtil;
import com.owncloud.android.utils.StringUtils;
import java.io.BufferedWriter;
import java.io.FileInputStream;
@@ -55,7 +60,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;
public class PreviewTextFragment extends FileFragment {
public class PreviewTextFragment extends FileFragment implements SearchView.OnQueryTextListener {
private static final String EXTRA_FILE = "FILE";
private static final String EXTRA_ACCOUNT = "ACCOUNT";
private static final String TAG = PreviewTextFragment.class.getSimpleName();
@@ -66,6 +71,14 @@ public class PreviewTextFragment extends FileFragment {
private TextView mTextPreview;
private TextLoadAsyncTask mTextLoadTask;
private String mOriginalText;
private Handler mHandler;
private SearchView mSearchView;
private String mSearchQuery = "";
private boolean mSearchOpen;
private RelativeLayout mMultiView;
protected LinearLayout mMultiListContainer;
@@ -100,7 +113,6 @@ public class PreviewTextFragment extends FileFragment {
View ret = inflater.inflate(R.layout.text_file_preview, container, false);
mTextPreview = (TextView) ret.findViewById(R.id.text_preview);
mMultiView = (RelativeLayout) ret.findViewById(R.id.multi_view);
@@ -136,6 +148,7 @@ public class PreviewTextFragment extends FileFragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
OCFile file = getFile();
@@ -149,6 +162,11 @@ public class PreviewTextFragment extends FileFragment {
mAccount = args.getParcelable(FileDisplayActivity.EXTRA_ACCOUNT);
}
if (args.containsKey(FileDisplayActivity.EXTRA_SEARCH_QUERY)) {
mSearchQuery = args.getString(FileDisplayActivity.EXTRA_SEARCH_QUERY);
}
mSearchOpen = args.getBoolean(FileDisplayActivity.EXTRA_SEARCH, false);
if (savedInstanceState == null) {
if (file == null) {
throw new IllegalStateException("Instanced with a NULL OCFile");
@@ -156,12 +174,14 @@ public class PreviewTextFragment extends FileFragment {
if (mAccount == null) {
throw new IllegalStateException("Instanced with a NULL ownCloud Account");
}
} else {
file = savedInstanceState.getParcelable(EXTRA_FILE);
mAccount = savedInstanceState.getParcelable(EXTRA_ACCOUNT);
}
mHandler = new Handler();
setFile(file);
setHasOptionsMenu(true);
}
/**
@@ -182,12 +202,55 @@ public class PreviewTextFragment extends FileFragment {
loadAndShowTextPreview();
}
private void loadAndShowTextPreview() {
mTextLoadTask = new TextLoadAsyncTask(new WeakReference<TextView>(mTextPreview));
mTextLoadTask.execute(getFile().getStoragePath());
}
@Override
public boolean onQueryTextSubmit(String query) {
performSearch(query, 0);
return true;
}
@Override
public boolean onQueryTextChange(final String newText) {
performSearch(newText, 500);
return true;
}
private void performSearch(final String query, int delay) {
mHandler.removeCallbacksAndMessages(null);
if (mOriginalText != null) {
if (getActivity() != null && getActivity() instanceof FileDisplayActivity) {
FileDisplayActivity fileDisplayActivity = (FileDisplayActivity) getActivity();
fileDisplayActivity.setSearchQuery(query);
}
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
if (query != null && !query.isEmpty()) {
if (getContext() != null && getContext().getResources() != null) {
String coloredText = StringUtils.searchAndColor(mOriginalText, query,
getContext().getResources().getColor(R.color.primary));
mTextPreview.setText(Html.fromHtml(coloredText.replace("\n", "<br \\>")));
}
} else {
mTextPreview.setText(mOriginalText);
}
}
}, delay);
}
if (delay == 0 && mSearchView != null) {
mSearchView.clearFocus();
}
}
/**
* Reads the file to preview and shows its contents. Too critical to be anonymous.
*/
@@ -254,7 +317,12 @@ public class PreviewTextFragment extends FileFragment {
final TextView textView = mTextViewReference.get();
if (textView != null) {
textView.setText(new String(stringWriter.getBuffer()));
mOriginalText = stringWriter.toString();
mSearchView.setOnQueryTextListener(PreviewTextFragment.this);
textView.setText(mOriginalText);
if (mSearchOpen) {
mSearchView.setQuery(mSearchQuery, true);
}
textView.setVisibility(View.VISIBLE);
}
@@ -273,6 +341,18 @@ public class PreviewTextFragment extends FileFragment {
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.file_actions_menu, menu);
MenuItem menuItem = menu.findItem(R.id.action_search);
menuItem.setVisible(true);
mSearchView = (SearchView) MenuItemCompat.getActionView(menuItem);
mSearchView.setMaxWidth(Integer.MAX_VALUE);
if (mSearchOpen) {
mSearchView.setIconified(false);
mSearchView.setQuery(mSearchQuery, false);
mSearchView.clearFocus();
}
}
/**
@@ -81,6 +81,7 @@ public class PreviewVideoActivity extends FileActivity implements OnCompletionLi
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log_OC.v(TAG, "onCreate");
setContentView(R.layout.video_layout);
@@ -1,25 +1,29 @@
/**
* ownCloud Android client application
* ownCloud Android client application
*
* @author masensio
* Copyright (C) 2014 ownCloud Inc.
* @author masensio
* 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,
* as published by the Free Software Foundation.
* 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.
* 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/>.
*
* 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.utils;
import android.content.res.Resources;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.owncloud.android.R;
import com.owncloud.android.lib.common.operations.RemoteOperation;
@@ -47,101 +51,76 @@ 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 {
/**
* Return an internationalized user message corresponding to an operation result
* and the operation performed.
*
* @param result Result of a {@link RemoteOperation} performed.
* @param operation Operation performed.
* @param res Reference to app resources, for i18n.
* @return User message corresponding to 'result' and 'operation'.
*/
@NonNull
public static String getErrorCauseMessage(
RemoteOperationResult result,
RemoteOperation operation,
Resources res
) {
String message = getSpecificMessageForResultAndOperation(result, operation, res);
public static String getErrorCauseMessage(RemoteOperationResult result,
RemoteOperation operation, Resources res) {
if (message == null || message.length() <= 0) {
message = getCommonMessageForResult(result, res);
}
if (message == null || message.length() <= 0) {
message = getGenericErrorMessageForOperation(operation, res);
}
if (message == null) {
if (result.isSuccess()) {
message = res.getString(R.string.common_ok);
} else {
message = res.getString(R.string.common_error_unknown);
}
}
return message;
}
/**
* Return a user message corresponding to an operation result and specific for the operation
* performed.
*
* @param result Result of a {@link RemoteOperation} performed.
* @param operation Operation performed.
* @param res Reference to app resources, for i18n.
* @return User message corresponding to 'result' and 'operation', or NULL if there is no
* specific message for both.
*/
@Nullable
private static String getSpecificMessageForResultAndOperation(
RemoteOperationResult result,
RemoteOperation operation,
Resources res
) {
String message = null;
if (!result.isSuccess() && isCommonError(result.getCode())) {
message = getCommonErrorMessage(result, res);
} else if (operation instanceof UploadFileOperation) {
if (result.isSuccess()) {
message = String.format(
res.getString(R.string.uploader_upload_succeeded_content_single),
((UploadFileOperation) operation).getFileName());
} else {
if (result.getCode() == ResultCode.LOCAL_STORAGE_FULL
|| result.getCode() == ResultCode.LOCAL_STORAGE_NOT_COPIED) {
message = String.format(
res.getString(R.string.error__upload__local_file_not_copied),
((UploadFileOperation) operation).getFileName(),
res.getString(R.string.app_name));
/*
} else if (result.getCode() == ResultCode.QUOTA_EXCEEDED) {
message = res.getString(R.string.failed_upload_quota_exceeded_text);
*/
} else if (result.getCode() == ResultCode.FORBIDDEN) {
message = String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.uploader_upload_forbidden_permissions));
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
message = res.getString(R.string.filename_forbidden_charaters_from_server);
} else {
message = String.format(
res.getString(R.string.uploader_upload_failed_content_single),
((UploadFileOperation) operation).getFileName());
}
}
if (operation instanceof UploadFileOperation) {
message = getMessageForUploadFileOperation(result, (UploadFileOperation) operation, res);
} else if (operation instanceof DownloadFileOperation) {
if (result.isSuccess()) {
message = String.format(
res.getString(R.string.downloader_download_succeeded_content),
new File(((DownloadFileOperation) operation).getSavePath()).getName());
} else {
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
message = res.getString(R.string.downloader_download_file_not_found);
} else {
message = String.format(
res.getString(R.string.downloader_download_failed_content), new File(
((DownloadFileOperation) operation).getSavePath()).getName());
}
}
message = getMessageForDownloadFileOperation(result, (DownloadFileOperation) operation, res);
} else if (operation instanceof RemoveFileOperation) {
if (result.isSuccess()) {
message = res.getString(R.string.remove_success_msg);
} else {
if (result.getCode().equals(ResultCode.FORBIDDEN)) {
// Error --> No permissions
message = String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.forbidden_permissions_delete));
} else {
message = res.getString(R.string.remove_fail_msg);
}
}
message = getMessageForRemoveFileOperation(result, res);
} else if (operation instanceof RenameFileOperation) {
if (result.getCode().equals(ResultCode.INVALID_LOCAL_FILE_NAME)) {
message = res.getString(R.string.rename_local_fail_msg);
} else if (result.getCode().equals(ResultCode.FORBIDDEN)) {
// Error --> No permissions
message = String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.forbidden_permissions_rename));
} else if (result.getCode().equals(ResultCode.INVALID_CHARACTER_IN_NAME)) {
message = res.getString(R.string.filename_forbidden_characters);
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
message = res.getString(R.string.filename_forbidden_charaters_from_server);
} else {
message = res.getString(R.string.rename_server_fail_msg);
}
message = getMessageForRenameFileOperation(result, res);
} else if (operation instanceof SynchronizeFileOperation) {
if (!((SynchronizeFileOperation) operation).transferWasRequested()) {
@@ -149,143 +128,252 @@ public class ErrorMessageAdapter {
}
} else if (operation instanceof CreateFolderOperation) {
if (result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME) {
message = res.getString(R.string.filename_forbidden_characters);
} else if (result.getCode().equals(ResultCode.FORBIDDEN)) {
message = String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.forbidden_permissions_create));
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
message = res.getString(R.string.filename_forbidden_charaters_from_server);
} else {
message = res.getString(R.string.create_dir_fail_msg);
}
message = getMessageForCreateFolderOperation(result, res);
} else if (operation instanceof CreateShareViaLinkOperation ||
operation instanceof CreateShareWithShareeOperation) {
if (result.getData() != null && result.getData().size() > 0) {
message = (String) result.getData().get(0); // share API sends its own error messages
} else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
message = res.getString(R.string.share_link_file_no_exist);
} else if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
// Error --> No permissions
message = String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.share_link_forbidden_permissions));
} else { // Generic error
// Show a Message, operation finished without success
message = res.getString(R.string.share_link_file_error);
}
message = getMessageForCreateShareOperations(result, res);
} else if (operation instanceof UnshareOperation) {
if (result.getData() != null && result.getData().size() > 0) {
message = (String) result.getData().get(0); // share API sends its own error messages
} else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
message = res.getString(R.string.unshare_link_file_no_exist);
} else if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
// Error --> No permissions
message = String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.unshare_link_forbidden_permissions));
} else { // Generic error
// Show a Message, operation finished without success
message = res.getString(R.string.unshare_link_file_error);
}
message = getMessageForUnshareOperation(result, res);
} else if (operation instanceof UpdateShareViaLinkOperation ||
operation instanceof UpdateSharePermissionsOperation) {
if (result.getData() != null && result.getData().size() > 0) {
message = (String) result.getData().get(0); // share API sends its own error messages
} else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
message = res.getString(R.string.update_link_file_no_exist);
} else if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
// Error --> No permissions
message = String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.update_link_forbidden_permissions));
} else { // Generic error
// Show a Message, operation finished without success
message = res.getString(R.string.update_link_file_error);
}
message = getMessageForUpdateShareOperations(result, res);
} else if (operation instanceof MoveFileOperation) {
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
message = res.getString(R.string.move_file_not_found);
} else if (result.getCode() == ResultCode.INVALID_MOVE_INTO_DESCENDANT) {
message = res.getString(R.string.move_file_invalid_into_descendent);
} else if (result.getCode() == ResultCode.INVALID_OVERWRITE) {
message = res.getString(R.string.move_file_invalid_overwrite);
} else if (result.getCode() == ResultCode.FORBIDDEN) {
message = String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.forbidden_permissions_move));
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
message = res.getString(R.string.filename_forbidden_charaters_from_server);
} else { // Generic error
// Show a Message, operation finished without success
message = res.getString(R.string.move_file_error);
}
message = getMessageForMoveFileOperation(result, res);
} else if (operation instanceof SynchronizeFolderOperation) {
if (!result.isSuccess()) {
String folderPathName = new File(
((SynchronizeFolderOperation) operation).getFolderPath()).getName();
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
message = String.format(res.getString(R.string.sync_current_folder_was_removed),
folderPathName);
} else { // Generic error
// Show a Message, operation finished without success
message = String.format(res.getString(R.string.sync_folder_failed_content),
folderPathName);
}
}
message = getMessageForSynchronizeFolderOperation(result, (SynchronizeFolderOperation) operation, res);
} else if (operation instanceof CopyFileOperation) {
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
message = res.getString(R.string.copy_file_not_found);
} else if (result.getCode() == ResultCode.INVALID_COPY_INTO_DESCENDANT) {
message = res.getString(R.string.copy_file_invalid_into_descendent);
} else if (result.getCode() == ResultCode.INVALID_OVERWRITE) {
message = res.getString(R.string.copy_file_invalid_overwrite);
} else if (result.getCode() == ResultCode.FORBIDDEN) {
message = String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.forbidden_permissions_copy));
} else { // Generic error
// Show a Message, operation finished without success
message = res.getString(R.string.copy_file_error);
}
message = getMessageForCopyFileOperation(result, res);
}
return message;
}
private static String getCommonErrorMessage(RemoteOperationResult result, Resources res) {
private static String getMessageForSynchronizeFolderOperation(
RemoteOperationResult result,
SynchronizeFolderOperation operation,
Resources res
) {
if (!result.isSuccess() && result.getCode() == ResultCode.FILE_NOT_FOUND) {
return String.format(
res.getString(R.string.sync_current_folder_was_removed),
new File(operation.getFolderPath()).getName()
);
}
return
null;
}
private static String getMessageForMoveFileOperation(RemoteOperationResult result, Resources res) {
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
return res.getString(R.string.move_file_not_found);
} else if (result.getCode() == ResultCode.INVALID_MOVE_INTO_DESCENDANT) {
return res.getString(R.string.move_file_invalid_into_descendent);
} else if (result.getCode() == ResultCode.INVALID_OVERWRITE) {
return res.getString(R.string.move_file_invalid_overwrite);
} else if (result.getCode() == ResultCode.FORBIDDEN) {
return String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.forbidden_permissions_move));
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
return res.getString(R.string.filename_forbidden_charaters_from_server);
}
return null;
}
private static String getMessageForUpdateShareOperations(RemoteOperationResult result, Resources res) {
if (result.getData() != null && result.getData().size() > 0) {
return (String) result.getData().get(0); // share API sends its own error messages
} else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
return res.getString(R.string.update_link_file_no_exist);
} else if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
// Error --> No permissions
return String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.update_link_forbidden_permissions));
}
return null;
}
private static String getMessageForUnshareOperation(RemoteOperationResult result, Resources res) {
if (result.getData() != null && result.getData().size() > 0) {
return (String) result.getData().get(0); // share API sends its own error messages
} else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
return res.getString(R.string.unshare_link_file_no_exist);
} else if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
// Error --> No permissions
return String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.unshare_link_forbidden_permissions));
}
return null;
}
private static String getMessageForCopyFileOperation(RemoteOperationResult result, Resources res) {
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
return res.getString(R.string.copy_file_not_found);
} else if (result.getCode() == ResultCode.INVALID_COPY_INTO_DESCENDANT) {
return res.getString(R.string.copy_file_invalid_into_descendent);
} else if (result.getCode() == ResultCode.INVALID_OVERWRITE) {
return res.getString(R.string.copy_file_invalid_overwrite);
} else if (result.getCode() == ResultCode.FORBIDDEN) {
return String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.forbidden_permissions_copy));
}
return null;
}
private static String getMessageForCreateShareOperations(RemoteOperationResult result, Resources res) {
if (result.getData() != null && result.getData().size() > 0) {
return (String) result.getData().get(0); // share API sends its own error messages
} else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
return res.getString(R.string.share_link_file_no_exist);
} else if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
// Error --> No permissions
return String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.share_link_forbidden_permissions));
}
return null;
}
private static String getMessageForCreateFolderOperation(RemoteOperationResult result, Resources res) {
if (result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME) {
return res.getString(R.string.filename_forbidden_characters);
} else if (result.getCode().equals(ResultCode.FORBIDDEN)) {
return String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.forbidden_permissions_create));
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
return res.getString(R.string.filename_forbidden_charaters_from_server);
}
return null;
}
private static String getMessageForRenameFileOperation(RemoteOperationResult result, Resources res) {
if (result.getCode().equals(ResultCode.INVALID_LOCAL_FILE_NAME)) {
return res.getString(R.string.rename_local_fail_msg);
} else if (result.getCode().equals(ResultCode.FORBIDDEN)) {
// Error --> No permissions
return String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.forbidden_permissions_rename));
} else if (result.getCode().equals(ResultCode.INVALID_CHARACTER_IN_NAME)) {
return res.getString(R.string.filename_forbidden_characters);
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
return res.getString(R.string.filename_forbidden_charaters_from_server);
}
return null;
}
private static String getMessageForRemoveFileOperation(RemoteOperationResult result, Resources res) {
if (result.isSuccess()) {
return res.getString(R.string.remove_success_msg);
} else {
if (result.getCode().equals(ResultCode.FORBIDDEN)) {
// Error --> No permissions
return String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.forbidden_permissions_delete));
}
}
return null;
}
private static String getMessageForDownloadFileOperation(
RemoteOperationResult result,
DownloadFileOperation operation,
Resources res
) {
if (result.isSuccess()) {
return String.format(
res.getString(R.string.downloader_download_succeeded_content),
new File(operation.getSavePath()).getName());
} else {
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
return res.getString(R.string.downloader_download_file_not_found);
}
}
return null;
}
private static String getMessageForUploadFileOperation(
RemoteOperationResult result,
UploadFileOperation operation,
Resources res
) {
if (result.isSuccess()) {
return String.format(
res.getString(R.string.uploader_upload_succeeded_content_single),
operation.getFileName());
} else {
if (result.getCode() == ResultCode.LOCAL_STORAGE_FULL
|| result.getCode() == ResultCode.LOCAL_STORAGE_NOT_COPIED) {
return String.format(
res.getString(R.string.error__upload__local_file_not_copied),
operation.getFileName(),
res.getString(R.string.app_name));
} else if (result.getCode() == ResultCode.FORBIDDEN) {
return String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.uploader_upload_forbidden_permissions));
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
return res.getString(R.string.filename_forbidden_charaters_from_server);
}
}
return null;
}
/**
* Return a user message corresponding to an operation result with no knowledge about the operation
* performed.
*
* @param result Result of a {@link RemoteOperation} performed.
* @param res Reference to app resources, for i18n.
* @return User message corresponding to 'result'.
*/
@Nullable
private static String getCommonMessageForResult(RemoteOperationResult result, Resources res) {
String message = null;
if (!result.isSuccess()) {
if (result.getCode() == ResultCode.WRONG_CONNECTION) {
message = res.getString(R.string.network_error_socket_exception);
@@ -294,24 +382,130 @@ public class ErrorMessageAdapter {
if (result.getException() instanceof SocketTimeoutException) {
message = res.getString(R.string.network_error_socket_timeout_exception);
} else if (result.getException() instanceof ConnectTimeoutException) {
message = res.getString(R.string.network_error_connect_timeout_exception);
}
} else if (result.getCode() == ResultCode.HOST_NOT_AVAILABLE) {
message = res.getString(R.string.network_host_not_available);
} else if (result.getCode() == ResultCode.MAINTENANCE_MODE) {
message = res.getString(R.string.maintenance_mode);
} else if (result.getCode() == ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED) {
message = res.getString(
R.string.uploads_view_upload_status_failed_ssl_certificate_not_trusted
);
} else if (result.getCode() == ResultCode.BAD_OC_VERSION) {
message = res.getString(
R.string.auth_bad_oc_version_title
);
} else if (result.getCode() == ResultCode.INCORRECT_ADDRESS) {
message = res.getString(
R.string.auth_incorrect_address_title
);
} else if (result.getCode() == ResultCode.SSL_ERROR) {
message = res.getString(
R.string.auth_ssl_general_error_title
);
} else if (result.getCode() == ResultCode.UNAUTHORIZED) {
message = res.getString(
R.string.auth_unauthorized
);
} else if (result.getCode() == ResultCode.INSTANCE_NOT_CONFIGURED) {
message = res.getString(
R.string.auth_not_configured_title
);
} else if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
message = res.getString(
R.string.auth_incorrect_path_title
);
} else if (result.getCode() == ResultCode.OAUTH2_ERROR) {
message = res.getString(
R.string.auth_oauth_error
);
} else if (result.getCode() == ResultCode.OAUTH2_ERROR_ACCESS_DENIED) {
message = res.getString(
R.string.auth_oauth_error_access_denied
);
} else if (result.getCode() == ResultCode.ACCOUNT_NOT_NEW) {
message = res.getString(
R.string.auth_account_not_new
);
} else if (result.getCode() == ResultCode.ACCOUNT_NOT_THE_SAME) {
message = res.getString(
R.string.auth_account_not_the_same
);
} else if (result.getHttpPhrase() != null && result.getHttpPhrase().length() > 0) {
// last chance: error message from server
message = result.getHttpPhrase();
}
}
return message;
}
private static boolean isCommonError(RemoteOperationResult.ResultCode code) {
return code == ResultCode.WRONG_CONNECTION ||
code == ResultCode.TIMEOUT ||
code == ResultCode.HOST_NOT_AVAILABLE ||
code == ResultCode.MAINTENANCE_MODE;
/**
* Return a user message corresponding to a generic error for a given operation.
*
* @param operation Operation performed.
* @param res Reference to app resources, for i18n.
* @return User message corresponding to a generic error of 'operation'.
*/
@Nullable
private static String getGenericErrorMessageForOperation(RemoteOperation operation, Resources res) {
String message = null;
if (operation instanceof UploadFileOperation) {
message = String.format(
res.getString(R.string.uploader_upload_failed_content_single),
((UploadFileOperation) operation).getFileName());
} else if (operation instanceof DownloadFileOperation) {
message = String.format(
res.getString(R.string.downloader_download_failed_content),
new File(((DownloadFileOperation) operation).getSavePath()).getName()
);
} else if (operation instanceof RemoveFileOperation) {
message = res.getString(R.string.remove_fail_msg);
} else if (operation instanceof RenameFileOperation) {
message = res.getString(R.string.rename_server_fail_msg);
} else if (operation instanceof CreateFolderOperation) {
message = res.getString(R.string.create_dir_fail_msg);
} else if (operation instanceof CreateShareViaLinkOperation ||
operation instanceof CreateShareWithShareeOperation
) {
message = res.getString(R.string.share_link_file_error);
} else if (operation instanceof UnshareOperation) {
message = res.getString(R.string.unshare_link_file_error);
} else if (operation instanceof UpdateShareViaLinkOperation ||
operation instanceof UpdateSharePermissionsOperation
) {
message = res.getString(R.string.update_link_file_error);
} else if (operation instanceof MoveFileOperation) {
message = res.getString(R.string.move_file_error);
} else if (operation instanceof SynchronizeFolderOperation) {
String folderPathName = new File(
((SynchronizeFolderOperation) operation).getFolderPath()
).getName();
message = String.format(res.getString(R.string.sync_folder_failed_content), folderPathName);
} else if (operation instanceof CopyFileOperation) {
message = res.getString(R.string.copy_file_error);
}
return message;
}
}
@@ -135,8 +135,8 @@ public class MimeTypeUtil {
* Returns the resource identifier of an image to use as icon associated to a type of folder.
*
* @param isSharedViaUsers flag if the folder is shared via the users system
* @param isSharedViaLink flag if the folder is publicly shared via link
* @param account account which color should be used
* @param isSharedViaLink flag if the folder is publicly shared via link
* @param account account which color should be used
* @return Identifier of an image resource.
*/
public static Drawable getFolderTypeIcon(boolean isSharedViaUsers, boolean isSharedViaLink, Account account) {
@@ -0,0 +1,56 @@
/**
* Nextcloud Android client application
*
* @author Mario Danic
* Copyright (C) 2017 Nextcloud GmbH.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) 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.utils;
import android.support.annotation.ColorInt;
import android.text.TextUtils;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Helper class for handling and manipulation of Strings.
*/
public class StringUtils {
public static String searchAndColor(String text, String searchText, @ColorInt int color) {
if (TextUtils.isEmpty(text) || TextUtils.isEmpty(searchText)) {
return text;
}
Matcher m = Pattern.compile(searchText, Pattern.CASE_INSENSITIVE | Pattern.LITERAL)
.matcher(text);
StringBuffer sb = new StringBuffer();
while (m.find()) {
String replacement = m.group().replace(
m.group(),
"<font color='" + color + "'><b>" + m.group() + "</b></font>"
);
m.appendReplacement(sb, Matcher.quoteReplacement(replacement));
}
m.appendTail(sb);
return sb.toString();
}
}
@@ -63,7 +63,7 @@ public class ThemeUtils {
try {
float adjust;
if (darkTheme()){
if (darkTheme()) {
adjust = +0.1f;
} else {
adjust = -0.1f;
@@ -120,6 +120,7 @@ public class ThemeUtils {
/**
* Tests if dark color is set
*
* @return true if dark theme -> e.g.use light font color, darker accent color
*/
public static boolean darkTheme() {
@@ -74,7 +74,7 @@ public class ActionEditText extends AppCompatEditText {
getDrawingRect(mButtonRect);
mButtonRect.top += 10;
mButtonRect.bottom -= 10;
mButtonRect.left = (int) (getWidth() - mTextBounds.width() - 18);
mButtonRect.left = getWidth() - mTextBounds.width() - 18;
mButtonRect.right = getWidth() - 10;
btn_rect = mButtonRect;
File diff suppressed because it is too large. Load diff
+34 -34
View File
@@ -109,22 +109,22 @@
</android.support.design.widget.TextInputLayout>
<ImageButton
android:id="@+id/testServerButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|right"
android:layout_marginRight="@dimen/alternate_half_padding"
android:padding="@dimen/zero"
android:scaleType="fitCenter"
android:src="@drawable/arrow_right"
android:tint="@color/white"
android:background="@android:color/transparent"
android:onClick="onTestServerConnectionClick"
android:contentDescription="@string/test_server_button"
/>
<ImageButton
android:id="@+id/testServerButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|right"
android:layout_marginRight="@dimen/alternate_half_padding"
android:padding="@dimen/zero"
android:scaleType="fitCenter"
android:src="@drawable/arrow_right"
android:tint="@color/white"
android:background="@android:color/transparent"
android:onClick="onTestServerConnectionClick"
android:contentDescription="@string/test_server_button"
/>
<ImageButton
<ImageButton
android:id="@+id/embeddedRefreshButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -207,10 +207,10 @@
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout_account_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
android:id="@+id/input_layout_account_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<EditText
android:id="@+id/account_username"
@@ -226,10 +226,10 @@
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout_account_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:id="@+id/input_layout_account_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:passwordToggleDrawable="@drawable/password_visibility_selector"
app:passwordToggleTint="@color/white">
@@ -272,17 +272,17 @@
android:paddingTop="@dimen/standard_half_padding">
<android.support.v7.widget.AppCompatButton
android:id="@+id/buttonOK"
android:theme="@style/Button.Login"
style="@style/Button.Login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/standard_padding"
android:layout_gravity="center_horizontal"
android:enabled="false"
android:text="@string/setup_btn_connect"
android:contentDescription="@string/setup_btn_connect"
android:visibility="gone"/>
android:id="@+id/buttonOK"
android:theme="@style/Button.Login"
style="@style/Button.Login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="@dimen/standard_padding"
android:layout_gravity="center_horizontal"
android:enabled="false"
android:text="@string/setup_btn_connect"
android:contentDescription="@string/setup_btn_connect"
android:visibility="gone"/>
<LinearLayout
android:layout_width="match_parent"
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
@@ -60,7 +60,6 @@
android:layout_gravity="start"
android:layout_marginTop="@dimen/standard_half_margin"
android:textColor="@color/color_accent"
android:paddingLeft="@dimen/zero"
style="@style/TextAppearance.AppCompat.Body2"
/>
@@ -96,7 +95,6 @@
android:layout_gravity="start"
android:layout_marginTop="@dimen/standard_half_margin"
android:textColor="@color/color_accent"
android:paddingLeft="@dimen/zero"
style="@style/TextAppearance.AppCompat.Body2"
/>
</LinearLayout>
+1 -1
View File
@@ -49,7 +49,7 @@
android:padding="8dp"
android:text="@string/fingerprint_scan_finger"
android:textColor="@android:color/black"
android:textSize="32dp"/>
android:textSize="32sp"/>
<ImageView
android:id="@+id/fingerprinticon"
+5 -4
View File
@@ -110,7 +110,7 @@
android:id="@+id/file_size"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Size MB"
android:text="@string/placeholder_filesize"
android:textColor="@color/list_item_lastmod_and_filesize_text"
android:textSize="@dimen/two_line_secondary_text_size"/>
@@ -119,7 +119,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text=", "
android:text="@string/file_item_metadata_separator"
android:paddingRight="@dimen/standard_quarter_padding"
android:textColor="@color/list_item_lastmod_and_filesize_text"
android:textSize="@dimen/two_line_secondary_text_size"/>
@@ -128,7 +129,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text="Mod Date"
android:text="@string/placeholder_timestamp"
android:textColor="@color/list_item_lastmod_and_filesize_text"
android:textSize="@dimen/two_line_secondary_text_size"/>
@@ -170,6 +171,6 @@
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/list_divider_background"></View>
android:background="@color/list_divider_background"/>
</LinearLayout>
+1 -1
View File
@@ -38,6 +38,6 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/standard_margin"
android:text="@string/common_loading" />
android:text="@string/common_loading"/>
</LinearLayout>
+2
View File
@@ -38,6 +38,8 @@
android:dividerHeight="1dip">
</ListView>
<include layout="@layout/empty_list"/>
</FrameLayout>
<LinearLayout
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: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 38 KiB

+4 -4
View File
@@ -304,10 +304,10 @@
<string name="filedisplay_no_file_selected">Žádný soubor nebyl vybrán</string>
<string name="activity_chooser_title">Odeslat odkaz &#8230;</string>
<string name="wait_for_tmp_copy_from_private_storage">Kopírování souboru z privátního úložiště</string>
<string name="oauth_check_onoff">Přihlásit se s OAuth 2.0</string>
<string name="oauth_login_connection">Připojuji se k OAuth 2.0 serveru...</string>
<string name="oauth_check_onoff">Přihlásit se s OAuth 2.0</string>
<string name="oauth_login_connection">Připojuji se k OAuth 2.0 serveru...</string>
<string name="ssl_validator_header">Identitu stránky nelze ověřit</string>
<string name="ssl_validator_reason_cert_not_trusted">- Certifikát serveru je nedůvěryhodný</string>
<string name="ssl_validator_reason_cert_expired">- Certifikátu serveru vypršela platnost</string>
+5 -6
View File
@@ -305,10 +305,10 @@
<string name="filedisplay_no_file_selected">Keine Datei gewählt</string>
<string name="activity_chooser_title">Link senden an &#8230;</string>
<string name="wait_for_tmp_copy_from_private_storage">Kopiere Datei vom privatem Speicher</string>
<string name="oauth_check_onoff">Anmelden mit OAuth 2.0</string>
<string name="oauth_login_connection">Verbinde mit dem OAuth 2.0-Server …</string>
<string name="oauth_check_onoff">Anmelden mit OAuth 2.0</string>
<string name="oauth_login_connection">Verbinde mit dem OAuth 2.0-Server …</string>
<string name="ssl_validator_header">Die Identität der Website konnte nicht überprüft werden</string>
<string name="ssl_validator_reason_cert_not_trusted">- Das Zertifikat des Servers ist nicht vertrauenswürdig</string>
<string name="ssl_validator_reason_cert_expired">- Das Zertifikat des Servers ist abgelaufen</string>
@@ -622,7 +622,6 @@
<string name="welcome_feature_3_text">Schützen Sie Ihre Fotos</string>
<string name="whats_new_skip">Überspringen</string>
<string name="fingerprint_scan_finger">Bitte scannen Sie Ihren Finger</string>
<string name="fingerprint_unknown">Finger nicht erkannt</string>
@@ -669,5 +668,5 @@
<string name="folder_sync_folders">Ordner auswählen</string>
<string name="test_server_button">Prüfe Server-Verbindung</string>
<string name="test_server_button">Prüfe Server-Verbindung</string>
</resources>
Loaded 100 of 123 files, more files were not shown because too many files have changed in this diff. Show more