-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reliable uploads #919
Closed
Closed
Reliable uploads #919
Changes from all commits
Commits
Show all changes
86 commits
Select commit
Hold shift + click to select a range
5af3c6d
cleanup uploader. add comments. uncomment unused functions. rename.
ac002ce
rename DbHandler to UploadDbHandler. Increase DB version. Fix UploadS…
64827cf
refactoring, commenting, understanding code. added TODO for FileUploa…
efe1849
using enums
1369ef8
made UploadDbObject serializable
87d1c0e
mActiveUploads
0d12225
Merge remote-tracking branch 'upstream/develop' into retry_uploads
05d29d9
test commit
8ddb9db
test commit
9d28e9e
commenting, commenting, commenting!
6d3a3e2
Merge remote-tracking branch 'upstream/develop' into reliable_uploads
3e9ecca
now upload works again as good (or as bad) as before.
503bcc3
remove mDb.recreateDb()
ba7e62e
added first draft of uploadListActivity
79c3756
undo unintended change
d59fd3b
consistently use UploadList (instead UploadsList)
1664d9e
Merge branch 'develop' of github.com:owncloud/android into reliable_u…
2b85ed5
working on UploadListActivity
263164a
fix: do upload removed files
b2d8cec
sort by date
2ec1c65
fix onclick
537434d
use file icon
97aa4e2
Merge branch 'develop' of github.com:owncloud/android into reliable_u…
4d07fcc
Merge remote-tracking branch 'upstream/develop' into reliable_uploads
1096f40
making UploadService an IntentService
71c1bfb
removed obsolete file
b1e5654
undo classpath change
df7ca60
fixing double upload issues
07147e8
start FileUploadService on app start
e0e9a7c
remove debug cmd
8f768d8
added click action for UploadListActivity
d3be204
use FileStorageUtils.fillOCFile in SynchronizeFolderOperation
8e9cf48
added log output
39abd71
fixed multiple calls of ConnectivityActionReceiver
d1386ea
Use OCFile inside UploadDbObject,
6ca1c34
remove debug tag
d08e436
open UploadListActivity on click on upload failure notification
949c2ae
restructuring
d7499fd
moved upload helpers to UploadUtils
28de702
prepare delayed uploads
4018af1
commenting
37d3a72
add ExpandableListFragment which is inherits from ExtendedListFragment
eaab185
introduce divisions in upload list view
397dd7b
fix on click handler
cf63d7c
remove on long click, add context menu instead
86eccab
show details on simple click
7d2f573
added debug output
4518da5
fix progress notifications
9445692
fix cancel upload
9e6d8c1
set charging only default to false
3dacd24
update db when retrying upload
7428485
remove not needed service looper
142b894
display complete LATER reason
0ff6921
git added filesize
34b630b
fix store upload debug msg
982befe
fix GUI output
99d8243
Merge branch 'develop' of github.com:owncloud/android into reliable_u…
6ce8112
fix GUI options
82c7771
comments and less debug output
30f9abb
comment
2d0c347
Merge remote-tracking branch 'upstream/develop' into HEAD
0c0ef54
change upload list layout according to https://github.com/owncloud/an…
fd6d57f
removed unnecessary items from upload_list_item
11efd02
use settings layout for upload list (remove group header background, …
61de793
hide empty upload groups
3fdb78d
added right button for items in upload list (for cancel, retry, and r…
0da591d
give upload items as much vertical space as they need (wrap content)
5632045
refresh upload list on swipe down (this refreshes shown (relative) up…
6dae38c
allow separately clearing failed and finished uploads
a8e2cf6
tried to add clear button for upload groups. would be too much.
b8db750
allow user to force uploads which are delayed (due to wifi-only, char…
5879e1b
added laterReason for once failed uploads
1922752
typo
64c07f6
on click on item in upload list: open with default app
a22fbdf
make FileUploadService a Service (instead of IntentService)
875589a
move uploading to separate thread
5afd94b
service.stopself after uploads done
a690877
added cancel debug output
e764c7d
added progressbar for current item in upload list
0e05a97
fix
7741bd2
fix progressbar issues
d6625ee
fix progress notification
2ad3ef2
checks and debug output
e5e5b36
Merge branch 'develop' into reliable_uploads
3e6bcda
Merge branch 'develop' into reliable_uploads
3c2da89
Merge branch 'master' into reliable_uploads
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" > | ||
|
||
<TextView | ||
android:id="@+id/errorTextView" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" /> | ||
|
||
</ScrollView> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
This must be a clone of list_fragment.xml | ||
|
||
EXCEPT: ExpandableListView must be used for @+id/swipe_refresh_files_emptyView | ||
--> | ||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="0dp" | ||
android:layout_height="match_parent" | ||
android:layout_weight="1" > | ||
|
||
<android.support.v4.widget.SwipeRefreshLayout | ||
android:id="@+id/swipe_refresh_files" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" > | ||
|
||
<ExpandableListView | ||
android:id="@+id/list_root" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" /> | ||
|
||
</android.support.v4.widget.SwipeRefreshLayout> | ||
|
||
<android.support.v4.widget.SwipeRefreshLayout | ||
android:id="@+id/swipe_refresh_files_emptyView" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:visibility="gone" > | ||
|
||
<ScrollView | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" > | ||
|
||
<TextView | ||
android:id="@+id/empty_list_view" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_vertical|center_horizontal" | ||
android:text="@string/empty" | ||
android:layout_gravity="center" | ||
android:visibility="visible" /> | ||
|
||
</ScrollView> | ||
</android.support.v4.widget.SwipeRefreshLayout> | ||
</FrameLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:paddingTop="3dp" > | ||
|
||
<TextView | ||
android:id="@+id/uploadListGroupName" | ||
style="?android:attr/listSeparatorTextViewStyle" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_vertical" | ||
android:layout_toLeftOf="@+id/upload_group_right_button" | ||
android:divider="@null" | ||
android:dividerHeight="0dp" | ||
android:ellipsize="middle" | ||
android:showDividers="none" | ||
/> | ||
|
||
<!-- This would be just too many buttons. | ||
<Button | ||
android:id="@+id/upload_group_right_button" | ||
android:layout_width="wrap_content" | ||
android:layout_height="0dp" | ||
android:layout_alignBottom="@+id/uploadListGroupName" | ||
android:layout_alignParentRight="true" | ||
android:layout_alignParentTop="true" | ||
style="?android:attr/buttonStyleSmall" | ||
android:focusable="false" | ||
android:focusableInTouchMode="false" | ||
android:text="CLEAR" | ||
/> | ||
--> | ||
|
||
|
||
</RelativeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/ListItemLayout" | ||
android:layout_width="fill_parent" | ||
android:orientation="horizontal" | ||
android:layout_height="wrap_content"> | ||
|
||
<FrameLayout | ||
android:layout_width="56dp" | ||
android:layout_height="match_parent" | ||
android:focusable="false" | ||
android:focusableInTouchMode="false"> | ||
|
||
<ImageView | ||
android:id="@+id/imageView1" | ||
android:layout_width="@dimen/file_icon_size" | ||
android:layout_height="@dimen/file_icon_size" | ||
android:layout_gravity="center" | ||
android:src="@drawable/ic_menu_archive" /> | ||
|
||
</FrameLayout> | ||
|
||
<LinearLayout | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" | ||
android:gravity="center_vertical" | ||
android:orientation="vertical" > | ||
|
||
<TextView | ||
android:id="@+id/upload_name" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_vertical" | ||
android:ellipsize="middle" | ||
android:singleLine="true" | ||
android:textColor="#303030" | ||
android:textSize="16dip" /> | ||
|
||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:weightSum="1"> | ||
|
||
<TextView | ||
android:id="@+id/upload_local_path" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_weight=".5" | ||
android:textColor="@color/list_item_lastmod_and_filesize_text" | ||
android:textSize="12dip"/> | ||
|
||
<TextView | ||
android:id="@+id/upload_file_size" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:gravity="right" | ||
android:textColor="@color/list_item_lastmod_and_filesize_text" | ||
android:layout_weight=".5" | ||
android:textSize="12dip"/> | ||
|
||
</LinearLayout> | ||
|
||
<ProgressBar | ||
android:id="@+id/upload_progress_bar" | ||
style="?android:attr/progressBarStyleHorizontal" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:visibility="gone" | ||
/> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:weightSum="1"> | ||
|
||
<TextView | ||
android:id="@+id/upload_status" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_weight=".5" | ||
android:textColor="@color/list_item_lastmod_and_filesize_text" | ||
android:textSize="12dip"/> | ||
|
||
<TextView | ||
android:id="@+id/upload_date" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:gravity="right" | ||
android:textColor="@color/list_item_lastmod_and_filesize_text" | ||
android:layout_weight=".5" | ||
android:textSize="12dip"/> | ||
|
||
</LinearLayout> | ||
|
||
</LinearLayout> | ||
|
||
|
||
<FrameLayout | ||
android:layout_width="40dp" | ||
android:layout_height="match_parent" | ||
android:focusable="false" | ||
android:focusableInTouchMode="false" | ||
android:paddingLeft="8dp" | ||
> | ||
|
||
<Button | ||
android:id="@+id/upload_right_button" | ||
android:background ="@drawable/btn_small_round" | ||
android:layout_width="30dp" | ||
android:layout_height="30dp" | ||
android:layout_gravity="center" | ||
android:focusable="false" | ||
android:focusableInTouchMode="false" | ||
/> | ||
|
||
</FrameLayout> | ||
|
||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" > | ||
|
||
<fragment | ||
android:id="@+id/UploadListFragment" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:paddingLeft="25dp" | ||
android:paddingRight="25dp" | ||
android:layout_marginLeft="10dp" | ||
android:layout_marginRight="10dp" | ||
class="com.owncloud.android.ui.fragment.UploadListFragment" /> | ||
|
||
</FrameLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,13 @@ | |
android:title="@string/actionbar_sort" | ||
android:contentDescription="@string/actionbar_sort"/> | ||
|
||
<item | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that this option must be in the navigation drawer |
||
android:id="@+id/action_upload_list" | ||
android:icon="@drawable/ic_action_settings" | ||
android:orderInCategory="2" | ||
app:showAsAction="never" | ||
android:title="Open upload list"/> | ||
|
||
<!-- <item android:id="@+id/search" | ||
android:title="@string/actionbar_search" | ||
android:icon="@drawable/ic_action_search"></item> --> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<item android:id="@+id/action_open_file_with" android:title="@string/actionbar_open_with" android:icon="@android:drawable/ic_menu_set_as" android:orderInCategory="1" /> | ||
<item android:id="@+id/action_cancel_upload" android:title="@string/common_cancel_upload" android:icon="@android:drawable/ic_menu_close_clear_cancel" android:orderInCategory="1" /> | ||
<item android:id="@+id/action_remove_upload" android:title="@string/common_remove_upload" android:icon="@android:drawable/ic_menu_close_clear_cancel" android:orderInCategory="1" /> | ||
<item android:id="@+id/action_retry_upload" android:title="@string/common_retry_upload" android:icon="@android:drawable/ic_menu_close_clear_cancel" android:orderInCategory="1" /> | ||
<item android:id="@+id/action_see_details" android:title="@string/actionbar_see_details" android:icon="@android:drawable/ic_menu_info_details" android:orderInCategory="1" /> | ||
|
||
</menu> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
ownCloud Android client application | ||
|
||
Copyright (C) 2012 Bartek Przybylski | ||
Copyright (C) 2012-2013 ownCloud Inc. | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License version 2, | ||
as published by the Free Software Foundation. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android" > | ||
|
||
<item | ||
android:id="@+id/action_retry_uploads" | ||
android:title="Retry current uploads"/> | ||
<item | ||
android:id="@+id/action_clear_failed_uploads" | ||
android:title="Clear failed uploads"/> | ||
<item | ||
android:id="@+id/action_clear_finished_uploads" | ||
android:title="Clear finished uploads"/> | ||
</menu> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good feelings here.