Эх сурвалжийг харах

Merge pull request #1673 from nextcloud/fix-1264

Fix #1264
Andy Scherzinger 7 жил өмнө
parent
commit
ed8a51cae2
32 өөрчлөгдсөн 0 нэмэгдсэн , 70 устгасан
  1. 0 32
      src/main/java/com/owncloud/android/datamodel/UploadsStorageManager.java
  2. 0 6
      src/main/java/com/owncloud/android/ui/activity/UploadListActivity.java
  3. 0 3
      src/main/res/menu/upload_list_menu.xml
  4. 0 1
      src/main/res/values-cs-rCZ/strings.xml
  5. 0 1
      src/main/res/values-de-rDE/strings.xml
  6. 0 1
      src/main/res/values-de/strings.xml
  7. 0 1
      src/main/res/values-el/strings.xml
  8. 0 1
      src/main/res/values-en-rGB/strings.xml
  9. 0 1
      src/main/res/values-es-rAR/strings.xml
  10. 0 1
      src/main/res/values-es-rCO/strings.xml
  11. 0 1
      src/main/res/values-es-rMX/strings.xml
  12. 0 1
      src/main/res/values-es/strings.xml
  13. 0 1
      src/main/res/values-eu/strings.xml
  14. 0 1
      src/main/res/values-fr/strings.xml
  15. 0 1
      src/main/res/values-hu-rHU/strings.xml
  16. 0 1
      src/main/res/values-id/strings.xml
  17. 0 1
      src/main/res/values-is/strings.xml
  18. 0 1
      src/main/res/values-it/strings.xml
  19. 0 1
      src/main/res/values-lt-rLT/strings.xml
  20. 0 1
      src/main/res/values-nb-rNO/strings.xml
  21. 0 1
      src/main/res/values-nl/strings.xml
  22. 0 1
      src/main/res/values-pl/strings.xml
  23. 0 1
      src/main/res/values-pt-rBR/strings.xml
  24. 0 1
      src/main/res/values-ru/strings.xml
  25. 0 1
      src/main/res/values-sl/strings.xml
  26. 0 1
      src/main/res/values-sq/strings.xml
  27. 0 1
      src/main/res/values-sr/strings.xml
  28. 0 1
      src/main/res/values-sv/strings.xml
  29. 0 1
      src/main/res/values-tr/strings.xml
  30. 0 1
      src/main/res/values-zh-rCN/strings.xml
  31. 0 1
      src/main/res/values-zh-rTW/strings.xml
  32. 0 1
      src/main/res/values/strings.xml

+ 0 - 32
src/main/java/com/owncloud/android/datamodel/UploadsStorageManager.java

@@ -512,38 +512,6 @@ public class UploadsStorageManager extends Observable {
         return result;
     }
 
-    public long clearAllFinishedButNotDelayedUploads() {
-        Account account = AccountUtils.getCurrentOwnCloudAccount(mContext);
-
-        long result = 0;
-        if (account != null) {
-            String[] whereArgs = new String[3];
-            whereArgs[0] = String.valueOf(UploadStatus.UPLOAD_SUCCEEDED.value);
-            whereArgs[1] = String.valueOf(UploadStatus.UPLOAD_FAILED.value);
-            whereArgs[2] = account.name;
-            result = getDB().delete(
-                    ProviderTableMeta.CONTENT_URI_UPLOADS,
-                    ProviderTableMeta.UPLOADS_STATUS + "=? OR " + ProviderTableMeta.UPLOADS_STATUS + "=?" +
-                            AND + ProviderTableMeta.UPLOADS_LAST_RESULT +
-                            "<>" + UploadResult.LOCK_FAILED.getValue() +
-                            AND + ProviderTableMeta.UPLOADS_LAST_RESULT +
-                            "<>" + UploadResult.DELAYED_FOR_WIFI.getValue() +
-                            AND + ProviderTableMeta.UPLOADS_LAST_RESULT +
-                            "<>" + UploadResult.DELAYED_FOR_CHARGING.getValue() +
-                            AND + ProviderTableMeta.UPLOADS_LAST_RESULT +
-                            "<>" + UploadResult.DELAYED_IN_POWER_SAVE_MODE.getValue() +
-                            AND + ProviderTableMeta.UPLOADS_ACCOUNT_NAME + "== ?",
-                    whereArgs
-            );
-        }
-
-        Log_OC.d(TAG, "delete all finished uploads");
-        if (result > 0) {
-            notifyObserversNow();
-        }
-
-        return result;
-    }
 
     /**
      * Updates the persistent upload database with upload result.

+ 0 - 6
src/main/java/com/owncloud/android/ui/activity/UploadListActivity.java

@@ -228,12 +228,6 @@ public class UploadListActivity extends FileActivity implements UploadListFragme
                 uploadListFragment.updateUploads();
                 break;
 
-            case R.id.action_clear_finished_uploads:
-                storageManager = new UploadsStorageManager(getContentResolver(), getApplicationContext());
-                storageManager.clearAllFinishedButNotDelayedUploads();
-                uploadListFragment.updateUploads();
-                break;
-
             case R.id.action_force_rescan:
                 PersistableBundleCompat persistableBundleCompat = new PersistableBundleCompat();
                 persistableBundleCompat.putBoolean(FilesSyncJob.OVERRIDE_POWER_SAVING, true);

+ 0 - 3
src/main/res/menu/upload_list_menu.xml

@@ -32,9 +32,6 @@
         <item
             android:id="@+id/action_clear_successfull_uploads"
             android:title="@string/action_clear_successful_uploads"/>
-        <item
-            android:id="@+id/action_clear_finished_uploads"
-            android:title="@string/action_clear_finished_uploads"/>
     </group>
     <group
         android:id="@+id/upload_list_force_scan"

+ 0 - 1
src/main/res/values-cs-rCZ/strings.xml

@@ -505,7 +505,6 @@
     <string name="action_retry_uploads">Zkusit znovu selhavší nahrání</string>
     <string name="action_clear_failed_uploads">Vyčistit selhaná nahrávání</string>
     <string name="action_clear_successful_uploads">Vyčistit úspěšná nahrání</string>
-    <string name="action_clear_finished_uploads">Vyčistit dokončená nahrávání</string>
     <string name="action_force_rescan">Vynutit index</string>
 
     <string name="action_switch_grid_view">Zobrazení v mřížce</string>

+ 0 - 1
src/main/res/values-de-rDE/strings.xml

@@ -507,7 +507,6 @@
     <string name="action_retry_uploads">Gescheiterte Uploads neu starten</string>
     <string name="action_clear_failed_uploads">Gescheiterte Uploads entfernen</string>
     <string name="action_clear_successful_uploads">Lösche erfolgreich hochgeladene Dateien</string>
-    <string name="action_clear_finished_uploads">Alles aufräumen</string>
     <string name="action_force_rescan">Neuen Scan erzwingen</string>
 
     <string name="action_switch_grid_view">Rasteransicht</string>

+ 0 - 1
src/main/res/values-de/strings.xml

@@ -507,7 +507,6 @@
     <string name="action_retry_uploads">Gescheiterte Uploads neu starten</string>
     <string name="action_clear_failed_uploads">Gescheiterte Uploads entfernen</string>
     <string name="action_clear_successful_uploads">Lösche erfolgreich hochgeladene Dateien</string>
-    <string name="action_clear_finished_uploads">Alles aufräumen</string>
     <string name="action_force_rescan">Neuen Scan erzwingen</string>
 
     <string name="action_switch_grid_view">Rasteransicht</string>

+ 0 - 1
src/main/res/values-el/strings.xml

@@ -475,7 +475,6 @@
     <string name="action_retry_uploads">Επανάληψη αποτυχημένων μεταφορτώσεων</string>
     <string name="action_clear_failed_uploads">Εκκαθάριση αποτυχημένων μεταφορτώσεων</string>
     <string name="action_clear_successful_uploads">Εκκαθάριση επιτυχών μεταφορτώσεων</string>
-    <string name="action_clear_finished_uploads">Ολοκλήρωση εκκαθάρισης όλων</string>
     <string name="action_force_rescan">Επιβολή σάρωσης</string>
 
     <string name="action_switch_grid_view">Προβολή πλέγματος</string>

+ 0 - 1
src/main/res/values-en-rGB/strings.xml

@@ -506,7 +506,6 @@
     <string name="action_retry_uploads">Retry failed uploads</string>
     <string name="action_clear_failed_uploads">Clear failed uploads</string>
     <string name="action_clear_successful_uploads">Clear successful uploads</string>
-    <string name="action_clear_finished_uploads">Clear finished uploads</string>
     <string name="action_force_rescan">Force rescan</string>
 
     <string name="action_switch_grid_view">Grid view</string>

+ 0 - 1
src/main/res/values-es-rAR/strings.xml

@@ -470,7 +470,6 @@
     <string name="action_retry_uploads">Reintentar subidas fallidas</string>
     <string name="action_clear_failed_uploads">Borrar subidas fallidas</string>
     <string name="action_clear_successful_uploads">Borrar subidas exitosas</string>
-    <string name="action_clear_finished_uploads">Borrar cargas terminadas</string>
     <string name="action_force_rescan">Forzar reescaneo</string>
 
     <string name="action_switch_grid_view">Vista de cuadrícula</string>

+ 0 - 1
src/main/res/values-es-rCO/strings.xml

@@ -506,7 +506,6 @@
     <string name="action_retry_uploads">Reintentar cargas fallidas</string>
     <string name="action_clear_failed_uploads">Borrar cargas fallidas</string>
     <string name="action_clear_successful_uploads">Borrar cargas exitosas</string>
-    <string name="action_clear_finished_uploads">Eliminar todos</string>
     <string name="action_force_rescan">Forzar rescaneo</string>
 
     <string name="action_switch_grid_view">Vista de cuadrícula</string>

+ 0 - 1
src/main/res/values-es-rMX/strings.xml

@@ -506,7 +506,6 @@
     <string name="action_retry_uploads">Reintentar cargas fallidas</string>
     <string name="action_clear_failed_uploads">Borrar cargas fallidas</string>
     <string name="action_clear_successful_uploads">Borrar cargas exitosas</string>
-    <string name="action_clear_finished_uploads">Eliminar todos</string>
     <string name="action_force_rescan">Forzar rescaneo</string>
 
     <string name="action_switch_grid_view">Vista de cuadrícula</string>

+ 0 - 1
src/main/res/values-es/strings.xml

@@ -484,7 +484,6 @@
     <string name="action_retry_uploads">Reintentar cargas fallidas</string>
     <string name="action_clear_failed_uploads">Borrar cargas fallidas</string>
     <string name="action_clear_successful_uploads">Limpiar subidas exitosas</string>
-    <string name="action_clear_finished_uploads">Limpiar subidas finalizadas</string>
     <string name="action_force_rescan">Forzar reescaneo</string>
 
     <string name="action_switch_grid_view">Vista en cuadrícula</string>

+ 0 - 1
src/main/res/values-eu/strings.xml

@@ -416,7 +416,6 @@ Mesedez, baimendu berriz</string>
     <string name="action_retry_uploads">Erroredun igoerak berriz saiatu</string>
     <string name="action_clear_failed_uploads">Erroredun igoerak garbitu</string>
     <string name="action_clear_successful_uploads">Ondo igo diren igoerak garbitu</string>
-    <string name="action_clear_finished_uploads">Bukatutako igoerak garbitu</string>
     <string name="action_force_rescan">Bireskaneatzea behartu</string>
 
     <string name="action_switch_grid_view">Sare ikuspegia</string>

+ 0 - 1
src/main/res/values-fr/strings.xml

@@ -516,7 +516,6 @@ Attention la suppression est irréversible.</string>
     <string name="action_retry_uploads">Relancer les envois échoués</string>
     <string name="action_clear_failed_uploads">Effacer les envois échoués</string>
     <string name="action_clear_successful_uploads">Effacer les envois réussis</string>
-    <string name="action_clear_finished_uploads">Effacer les envois terminés</string>
     <string name="action_force_rescan">Actualiser</string>
 
     <string name="action_switch_grid_view">Affichage mosaïque</string>

+ 0 - 1
src/main/res/values-hu-rHU/strings.xml

@@ -508,7 +508,6 @@ Lépj kapcsolatba a rendszergazdával</string>
     <string name="action_retry_uploads">Sikertelen feltöltések újrapróbálása</string>
     <string name="action_clear_failed_uploads">Sikertelen feltöltések eltávolítása</string>
     <string name="action_clear_successful_uploads">Sikeres feltöltések eltávolítása</string>
-    <string name="action_clear_finished_uploads">Befejeződött feltöltések eltávolítása</string>
     <string name="action_force_rescan">Újra-átfésülés kényszerítése</string>
 
     <string name="action_switch_grid_view">Rács nézet</string>

+ 0 - 1
src/main/res/values-id/strings.xml

@@ -471,7 +471,6 @@
     <string name="action_retry_uploads">Ulangi unggahan yang gagal.</string>
     <string name="action_clear_failed_uploads">Bersihkan unggahan gagal.</string>
     <string name="action_clear_successful_uploads">Bersihkan unggahan yang berhasil.</string>
-    <string name="action_clear_finished_uploads">Bersihkan unggahan yang selesai.</string>
     <string name="action_force_rescan">Paksa untuk memindah ulang.</string>
 
     <string name="action_switch_grid_view">Tampilan kotak</string>

+ 0 - 1
src/main/res/values-is/strings.xml

@@ -523,7 +523,6 @@ Smelltu hér til að fá þér einn frá þjónustuaðila.</string>
     <string name="action_retry_uploads">Prófa aftur innsendingar sem mistókust</string>
     <string name="action_clear_failed_uploads">Hreinsa lista yfir innsendingar sem mistókust</string>
     <string name="action_clear_successful_uploads">Hreinsa lista yfir innsendingar sem tókust</string>
-    <string name="action_clear_finished_uploads">Hreinsa innsendingar sem er lokið</string>
     <string name="action_force_rescan">Þvinga endurskönnun</string>
 
     <string name="action_switch_grid_view">Reitir</string>

+ 0 - 1
src/main/res/values-it/strings.xml

@@ -514,7 +514,6 @@
     <string name="action_retry_uploads">Riprova caricamenti non riusciti</string>
     <string name="action_clear_failed_uploads">Cancella caricamenti non riusciti</string>
     <string name="action_clear_successful_uploads">Cancella i caricamenti completati</string>
-    <string name="action_clear_finished_uploads">Cancella caricamenti completati</string>
     <string name="action_force_rescan">Forza nuova scansione</string>
 
     <string name="action_switch_grid_view">Vista Griglia</string>

+ 0 - 1
src/main/res/values-lt-rLT/strings.xml

@@ -477,7 +477,6 @@
     <string name="action_retry_uploads">Pabandyti iš naujo nepavykusius įkėlimus</string>
     <string name="action_clear_failed_uploads">Išvalyti baigtus įkėlimus</string>
     <string name="action_clear_successful_uploads">Išvalyti sėkmingus įkėlimus</string>
-    <string name="action_clear_finished_uploads">Išvalyti baigtus įkėlimus</string>
     <string name="action_force_rescan">Inicijuoti skenavimą iš naujo</string>
 
     <string name="action_switch_grid_view">Tinklelio vaizdas</string>

+ 0 - 1
src/main/res/values-nb-rNO/strings.xml

@@ -505,7 +505,6 @@
     <string name="action_retry_uploads">Prøv å laste opp igjen.</string>
     <string name="action_clear_failed_uploads">Fjern feilede opplastinger</string>
     <string name="action_clear_successful_uploads">Fjern fullførte opplastinger</string>
-    <string name="action_clear_finished_uploads">Slett alle ferdige</string>
     <string name="action_force_rescan">Tving reskanning</string>
 
     <string name="action_switch_grid_view">Rutenett-visning</string>

+ 0 - 1
src/main/res/values-nl/strings.xml

@@ -507,7 +507,6 @@ Kies er eentje van een provider.</string>
     <string name="action_retry_uploads">Probeer mislukte uploads opnieuw</string>
     <string name="action_clear_failed_uploads">Wis mislukte uploads</string>
     <string name="action_clear_successful_uploads">Wis gelukte uploads</string>
-    <string name="action_clear_finished_uploads">Alle voltoooide opschonen</string>
     <string name="action_force_rescan">Indexering forceren</string>
 
     <string name="action_switch_grid_view">Rasterindeling </string>

+ 0 - 1
src/main/res/values-pl/strings.xml

@@ -506,7 +506,6 @@
     <string name="action_retry_uploads">Ponów nieudane wysyłanie</string>
     <string name="action_clear_failed_uploads">Wyczyść nieudane wysyłanie</string>
     <string name="action_clear_successful_uploads">Wyczyść udane wysyłanie</string>
-    <string name="action_clear_finished_uploads">Wyczyść zakończone wysyłania</string>
     <string name="action_force_rescan">Wymuś indeksowanie</string>
 
     <string name="action_switch_grid_view">Widok siatki</string>

+ 0 - 1
src/main/res/values-pt-rBR/strings.xml

@@ -522,7 +522,6 @@
     <string name="action_retry_uploads">Retentar envios falhados</string>
     <string name="action_clear_failed_uploads">Limpar envios falhados</string>
     <string name="action_clear_successful_uploads">Limpar envios concluídos</string>
-    <string name="action_clear_finished_uploads">Limpar envios termiandos</string>
     <string name="action_force_rescan">Forçar verificação</string>
 
     <string name="action_switch_grid_view">Vista da grade</string>

+ 0 - 1
src/main/res/values-ru/strings.xml

@@ -506,7 +506,6 @@
     <string name="action_retry_uploads">Повторить неудавшиеся</string>
     <string name="action_clear_failed_uploads">Убрать неудавшиеся</string>
     <string name="action_clear_successful_uploads">Убрать успешные</string>
-    <string name="action_clear_finished_uploads">Убрать завершённые</string>
     <string name="action_force_rescan">Перепроверить список</string>
 
     <string name="action_switch_grid_view">Вид сеткой</string>

+ 0 - 1
src/main/res/values-sl/strings.xml

@@ -469,7 +469,6 @@
     <string name="action_retry_uploads">Ponovi neuspela nalaganja</string>
     <string name="action_clear_failed_uploads">Pobriši neuspela nalaganja</string>
     <string name="action_clear_successful_uploads">Pobriši uspela nalaganja</string>
-    <string name="action_clear_finished_uploads">Pobriši končana nalaganja</string>
     <string name="action_force_rescan">Vsili osvežitev</string>
 
     <string name="action_switch_grid_view">Mrežni pogled</string>

+ 0 - 1
src/main/res/values-sq/strings.xml

@@ -502,7 +502,6 @@
     <string name="action_retry_uploads">Riprovoni ngarkimet e dështuara</string>
     <string name="action_clear_failed_uploads">Pastroni ngarkimet e dështuara</string>
     <string name="action_clear_successful_uploads">Fshi ngarkimet e suksesshme</string>
-    <string name="action_clear_finished_uploads">Pastro të gjithë të përfunduarit</string>
     <string name="action_force_rescan">Riskanim i detyruar</string>
 
     <string name="action_switch_grid_view">Pamje galeri</string>

+ 0 - 1
src/main/res/values-sr/strings.xml

@@ -526,7 +526,6 @@
     <string name="action_retry_uploads">Понови неуспела отпремања</string>
     <string name="action_clear_failed_uploads">Избриши неуспела отпремања</string>
     <string name="action_clear_successful_uploads">Очисти успела отпремања</string>
-    <string name="action_clear_finished_uploads">Очисти завршена отпремања</string>
     <string name="action_force_rescan">Форсирај поновно скенирање</string>
 
     <string name="action_switch_grid_view">Приказ мреже</string>

+ 0 - 1
src/main/res/values-sv/strings.xml

@@ -475,7 +475,6 @@
     <string name="action_retry_uploads">Försök igen med misslyckade uppladdningar</string>
     <string name="action_clear_failed_uploads">Ta bort misslyckade uppladdningar</string>
     <string name="action_clear_successful_uploads">Ta bort lyckade uppladdningar</string>
-    <string name="action_clear_finished_uploads">Ta bort färdiga uppladdningar</string>
     <string name="action_force_rescan">Tvinga ny genomsökning</string>
 
     <string name="action_switch_grid_view">Rutnätsvy</string>

+ 0 - 1
src/main/res/values-tr/strings.xml

@@ -507,7 +507,6 @@
     <string name="action_retry_uploads">Tamamlanamayan yüklemeler yinelensin</string>
     <string name="action_clear_failed_uploads">Tamamlanamayan yüklemeler silinsin</string>
     <string name="action_clear_successful_uploads">Sorunsuz yüklemeler temizlensin</string>
-    <string name="action_clear_finished_uploads">Tamamlanmış yüklemeleri temizle</string>
     <string name="action_force_rescan">Yeniden tarama dayatılsın</string>
 
     <string name="action_switch_grid_view">Tablo görünümü</string>

+ 0 - 1
src/main/res/values-zh-rCN/strings.xml

@@ -479,7 +479,6 @@
     <string name="action_retry_uploads">重试失败上传任务</string>
     <string name="action_clear_failed_uploads">清除失败上传任务</string>
     <string name="action_clear_successful_uploads">清除成功上传任务</string>
-    <string name="action_clear_finished_uploads">清除完成上传</string>
     <string name="action_force_rescan">强制重新扫描</string>
 
     <string name="action_switch_grid_view">网格视图</string>

+ 0 - 1
src/main/res/values-zh-rTW/strings.xml

@@ -453,7 +453,6 @@
     <string name="edit_share_unshare">停止分享</string>
     <string name="edit_share_done">完成</string>
 
-    <string name="action_clear_finished_uploads">清除已上傳項目</string>
     <string name="action_switch_grid_view">網格檢視</string>
     <string name="action_switch_list_view">清單檢視</string>
 

+ 0 - 1
src/main/res/values/strings.xml

@@ -526,7 +526,6 @@
     <string name="action_retry_uploads">Retry failed uploads</string>
     <string name="action_clear_failed_uploads">Clear failed uploads</string>
     <string name="action_clear_successful_uploads">Clear successful uploads</string>
-    <string name="action_clear_finished_uploads">Clear finished uploads</string>
     <string name="action_force_rescan">Force rescan</string>
 
     <string name="action_switch_grid_view">Grid view</string>