Jelajahi Sumber

Merge remote-tracking branch 'origin/fixPublicLink' into fixPublicLink

tobiasKaminsky 8 tahun lalu
induk
melakukan
aa069d3623
35 mengubah file dengan 210 tambahan dan 38 penghapusan
  1. TEMPAT SAMPAH
      res/drawable-hdpi/ic_search.png
  2. TEMPAT SAMPAH
      res/drawable-hdpi/ic_search_grey.png
  3. TEMPAT SAMPAH
      res/drawable-mdpi/ic_search.png
  4. TEMPAT SAMPAH
      res/drawable-mdpi/ic_search_grey.png
  5. TEMPAT SAMPAH
      res/drawable-xhdpi/ic_search.png
  6. TEMPAT SAMPAH
      res/drawable-xhdpi/ic_search_grey.png
  7. TEMPAT SAMPAH
      res/drawable-xxhdpi/ic_search.png
  8. TEMPAT SAMPAH
      res/drawable-xxhdpi/ic_search_grey.png
  9. TEMPAT SAMPAH
      res/drawable-xxxhdpi/ic_search.png
  10. TEMPAT SAMPAH
      res/drawable-xxxhdpi/ic_search_grey.png
  11. 6 0
      res/menu/main_menu.xml
  12. 8 2
      res/menu/upload_files_picker.xml
  13. 4 1
      res/values-cs-rCZ/strings.xml
  14. 2 1
      res/values-de-rDE/strings.xml
  15. 5 4
      res/values-de/strings.xml
  16. 4 1
      res/values-en-rGB/strings.xml
  17. 4 1
      res/values-fr/strings.xml
  18. 1 0
      res/values-id/strings.xml
  19. 2 1
      res/values-it/strings.xml
  20. 1 0
      res/values-nl/strings.xml
  21. 1 0
      res/values-pt-rBR/strings.xml
  22. 1 0
      res/values-ru/strings.xml
  23. 28 3
      res/values-tr/strings.xml
  24. 1 0
      res/values/strings.xml
  25. 1 1
      res/values/styles.xml
  26. 9 5
      src/com/owncloud/android/authentication/AuthenticatorActivity.java
  27. 1 1
      src/com/owncloud/android/files/services/ConnectivityActionReceiver.java
  28. 1 1
      src/com/owncloud/android/operations/UploadFileOperation.java
  29. 14 3
      src/com/owncloud/android/ui/activity/FileDisplayActivity.java
  30. 23 1
      src/com/owncloud/android/ui/adapter/FileListListAdapter.java
  31. 27 0
      src/com/owncloud/android/ui/adapter/FilterableListAdapter.java
  32. 28 4
      src/com/owncloud/android/ui/adapter/LocalFileListAdapter.java
  33. 28 6
      src/com/owncloud/android/ui/fragment/ExtendedListFragment.java
  34. 6 0
      src/com/owncloud/android/ui/fragment/LocalFileListFragment.java
  35. 4 2
      src/com/owncloud/android/utils/ConnectivityUtils.java

TEMPAT SAMPAH
res/drawable-hdpi/ic_search.png


TEMPAT SAMPAH
res/drawable-hdpi/ic_search_grey.png


TEMPAT SAMPAH
res/drawable-mdpi/ic_search.png


TEMPAT SAMPAH
res/drawable-mdpi/ic_search_grey.png


TEMPAT SAMPAH
res/drawable-xhdpi/ic_search.png


TEMPAT SAMPAH
res/drawable-xhdpi/ic_search_grey.png


TEMPAT SAMPAH
res/drawable-xxhdpi/ic_search.png


TEMPAT SAMPAH
res/drawable-xxhdpi/ic_search_grey.png


TEMPAT SAMPAH
res/drawable-xxxhdpi/ic_search.png


TEMPAT SAMPAH
res/drawable-xxxhdpi/ic_search_grey.png


+ 6 - 0
res/menu/main_menu.xml

@@ -20,6 +20,12 @@
 <menu xmlns:android="http://schemas.android.com/apk/res/android"
 <menu xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto">
     xmlns:app="http://schemas.android.com/apk/res-auto">
 
 
+    <item android:id="@+id/action_search"
+          android:icon="@drawable/ic_search"
+          android:title="@string/actionbar_search"
+          android:contentDescription="@string/actionbar_search"
+          app:actionViewClass="android.support.v7.widget.SearchView"
+          app:showAsAction="ifRoom|collapseActionView"/>
     <item
     <item
         android:id="@+id/action_create_dir"
         android:id="@+id/action_create_dir"
         android:icon="@drawable/ic_action_create_dir"
         android:icon="@drawable/ic_action_create_dir"

+ 8 - 2
res/menu/upload_files_picker.xml

@@ -19,18 +19,24 @@
 <menu xmlns:android="http://schemas.android.com/apk/res/android"
 <menu xmlns:android="http://schemas.android.com/apk/res/android"
       xmlns:app="http://schemas.android.com/apk/res-auto">
       xmlns:app="http://schemas.android.com/apk/res-auto">
 
 
+    <item android:id="@+id/action_search"
+          android:icon="@drawable/ic_search"
+          android:title="@string/actionbar_search"
+          android:contentDescription="@string/actionbar_search"
+          app:actionViewClass="android.support.v7.widget.SearchView"
+          app:showAsAction="ifRoom|collapseActionView"/>
     <item
     <item
         android:id="@+id/action_select_all"
         android:id="@+id/action_select_all"
         android:checkable="true"
         android:checkable="true"
         android:contentDescription="@string/select_all"
         android:contentDescription="@string/select_all"
         android:title="@string/select_all"
         android:title="@string/select_all"
         android:icon="@drawable/ic_select_all"
         android:icon="@drawable/ic_select_all"
-        app:showAsAction="always"/>
+        app:showAsAction="never"/>
     <item
     <item
         android:id="@+id/action_sort"
         android:id="@+id/action_sort"
         android:icon="@drawable/ic_sort_variant"
         android:icon="@drawable/ic_sort_variant"
         android:orderInCategory="2"
         android:orderInCategory="2"
-        app:showAsAction="ifRoom"
+        app:showAsAction="never"
         android:title="@string/actionbar_sort"
         android:title="@string/actionbar_sort"
         android:contentDescription="@string/actionbar_sort"/>
         android:contentDescription="@string/actionbar_sort"/>
 </menu>
 </menu>

+ 4 - 1
res/values-cs-rCZ/strings.xml

@@ -302,6 +302,7 @@
     <string name="preview_image_error_unknown_format">Obrázek nelze zobrazit</string>
     <string name="preview_image_error_unknown_format">Obrázek nelze zobrazit</string>
 
 
     <string name="error__upload__local_file_not_copied">%1$s nelze zkopírovat do místního adresáře %2$s</string>
     <string name="error__upload__local_file_not_copied">%1$s nelze zkopírovat do místního adresáře %2$s</string>
+    <string name="prefs_instant_upload_path_title">Složka pro okamžité nahrání</string>
     <string name="prefs_instant_upload_path_use_subfolders_title">Používat podadresáře</string>
     <string name="prefs_instant_upload_path_use_subfolders_title">Používat podadresáře</string>
     <string name="prefs_instant_upload_path_use_subfolders_summary">Ukládat v podadresářích podle roku a měsíce</string>
     <string name="prefs_instant_upload_path_use_subfolders_summary">Ukládat v podadresářích podle roku a měsíce</string>
 
 
@@ -375,7 +376,8 @@ správce systému.</string>
     <string name="prefs_category_instant_uploading">Okamžitá odesílání</string>
     <string name="prefs_category_instant_uploading">Okamžitá odesílání</string>
     <string name="prefs_category_details">Podrobnosti</string>
     <string name="prefs_category_details">Podrobnosti</string>
 
 
-	<string name="sync_folder_failed_content">Synchronizaci adresáře %1$s nelze dokončit</string>
+	<string name="prefs_instant_video_upload_path_title">Složka pro okamžité nahrání videa</string>
+    <string name="sync_folder_failed_content">Synchronizaci adresáře %1$s nelze dokončit</string>
 
 
 	<string name="shared_subject_header">sdílené</string>
 	<string name="shared_subject_header">sdílené</string>
 	<string name="with_you_subject_header">s vámi</string>
 	<string name="with_you_subject_header">s vámi</string>
@@ -454,4 +456,5 @@ správce systému.</string>
     <string name="local_file_not_found_toast">Soubor nebyl nalezen v místním souborovém systému</string>
     <string name="local_file_not_found_toast">Soubor nebyl nalezen v místním souborovém systému</string>
     <string name="confirmation_remove_files_alert">Opravdu chcete odstranit vybrané položky?</string>
     <string name="confirmation_remove_files_alert">Opravdu chcete odstranit vybrané položky?</string>
     <string name="confirmation_remove_folders_alert">Opravdu chcete odstranit vybrané položky a jejich obsah?</string>
     <string name="confirmation_remove_folders_alert">Opravdu chcete odstranit vybrané položky a jejich obsah?</string>
+    <string name="actionbar_search">Hledat</string>
     </resources>
     </resources>

+ 2 - 1
res/values-de-rDE/strings.xml

@@ -72,7 +72,7 @@
     <string name="file_list_seconds_ago">Gerade eben</string>
     <string name="file_list_seconds_ago">Gerade eben</string>
     <string name="file_list_empty">Alles leer. Laden Sie etwas hoch!</string>
     <string name="file_list_empty">Alles leer. Laden Sie etwas hoch!</string>
     <string name="file_list_loading">Lade…</string>
     <string name="file_list_loading">Lade…</string>
-    <string name="file_list_no_app_for_file_type">Es wurde keine App für die Datei gefunden!</string>
+    <string name="file_list_no_app_for_file_type">Es wurde keine App für diesen Dateityp gefunden!</string>
     <string name="local_file_list_empty">Es befinden sich keine Dateien in diesem Ordner.</string>
     <string name="local_file_list_empty">Es befinden sich keine Dateien in diesem Ordner.</string>
     <string name="upload_list_empty">Keine Uploads verfügbar</string>
     <string name="upload_list_empty">Keine Uploads verfügbar</string>
     <string name="file_list_folder">Ordner</string>
     <string name="file_list_folder">Ordner</string>
@@ -457,6 +457,7 @@
     <string name="local_file_not_found_toast">Die Datei wurde im lokalen Dateisystem nicht gefunden</string>
     <string name="local_file_not_found_toast">Die Datei wurde im lokalen Dateisystem nicht gefunden</string>
     <string name="confirmation_remove_files_alert">Wollen Sie die ausgewählten Einträge wirklich löschen?</string>
     <string name="confirmation_remove_files_alert">Wollen Sie die ausgewählten Einträge wirklich löschen?</string>
     <string name="confirmation_remove_folders_alert">Wollen Sie die ausgewählten Einträge und deren Inhalte wirklich löschen?</string>
     <string name="confirmation_remove_folders_alert">Wollen Sie die ausgewählten Einträge und deren Inhalte wirklich löschen?</string>
+    <string name="actionbar_search">Suche</string>
     <plurals name="items_selected_count">
     <plurals name="items_selected_count">
         <item quantity="one">%d ausgewählt</item>
         <item quantity="one">%d ausgewählt</item>
         <item quantity="other">%d ausgewählt</item>
         <item quantity="other">%d ausgewählt</item>

+ 5 - 4
res/values-de/strings.xml

@@ -212,7 +212,7 @@
 	<string name="auth_bad_oc_version_title">Unbekannte Server-Version</string>
 	<string name="auth_bad_oc_version_title">Unbekannte Server-Version</string>
 	<string name="auth_wrong_connection_title">Verbindung konnte nicht aufgebaut werden</string>
 	<string name="auth_wrong_connection_title">Verbindung konnte nicht aufgebaut werden</string>
 	<string name="auth_secure_connection">Sichere Verbindung hergestellt</string>
 	<string name="auth_secure_connection">Sichere Verbindung hergestellt</string>
-	<string name="auth_unauthorized">Benutzername oder Passwort stimmen nicht!</string>
+	<string name="auth_unauthorized">Falscher Benutzername oder Passwort</string>
 	<string name="auth_oauth_error">Autorisierung nicht erfolgreich</string>
 	<string name="auth_oauth_error">Autorisierung nicht erfolgreich</string>
 	<string name="auth_oauth_error_access_denied">Zugriff durch den Autorisierungsserver abgelehnt</string>
 	<string name="auth_oauth_error_access_denied">Zugriff durch den Autorisierungsserver abgelehnt</string>
 	<string name="auth_wtf_reenter_URL">Unerwarteter Zustand; Bitte gib die Adresse des Servers erneut ein</string>
 	<string name="auth_wtf_reenter_URL">Unerwarteter Zustand; Bitte gib die Adresse des Servers erneut ein</string>
@@ -231,7 +231,7 @@
     <string name="unfavorite">Offline verfügbar Markierung entfernen</string>
     <string name="unfavorite">Offline verfügbar Markierung entfernen</string>
     <string name="common_rename">Umbenennen</string>
     <string name="common_rename">Umbenennen</string>
     <string name="common_remove">Löschen</string>
     <string name="common_remove">Löschen</string>
-    <string name="confirmation_remove_file_alert">Möchten Sie %1$s wirklich löschen?</string>
+    <string name="confirmation_remove_file_alert">Möchtest Du %1$s wirklich löschen?</string>
     <string name="confirmation_remove_folder_alert">Soll %1$s und dessen Inhalt entfernt werden?</string>
     <string name="confirmation_remove_folder_alert">Soll %1$s und dessen Inhalt entfernt werden?</string>
     <string name="confirmation_remove_local">Nur lokal</string>
     <string name="confirmation_remove_local">Nur lokal</string>
     <string name="remove_success_msg">Erfolgreich gelöscht</string>
     <string name="remove_success_msg">Erfolgreich gelöscht</string>
@@ -455,8 +455,9 @@
 
 
     <string name="permission_storage_access">Sie haben nicht die erforderlichen Rechte, um Dateien hoch- oder herunterzuladen.</string>
     <string name="permission_storage_access">Sie haben nicht die erforderlichen Rechte, um Dateien hoch- oder herunterzuladen.</string>
     <string name="local_file_not_found_toast">Die Datei wurde im lokalen Dateisystem nicht gefunden</string>
     <string name="local_file_not_found_toast">Die Datei wurde im lokalen Dateisystem nicht gefunden</string>
-    <string name="confirmation_remove_files_alert">Wollen Sie die ausgewählten Einträge wirklich löschen?</string>
-    <string name="confirmation_remove_folders_alert">Wollen Sie die ausgewählten Einträge und deren Inhalte wirklich löschen?</string>
+    <string name="confirmation_remove_files_alert">Willst Du die ausgewählten Einträge wirklich löschen?</string>
+    <string name="confirmation_remove_folders_alert">Willst Du die ausgewählten Einträge und deren Inhalte wirklich löschen?</string>
+    <string name="actionbar_search">Suche</string>
     <plurals name="items_selected_count">
     <plurals name="items_selected_count">
         <item quantity="one">%d ausgewählt</item>
         <item quantity="one">%d ausgewählt</item>
         <item quantity="other">%d ausgewählt</item>
         <item quantity="other">%d ausgewählt</item>

+ 4 - 1
res/values-en-rGB/strings.xml

@@ -303,6 +303,7 @@
     <string name="preview_image_error_unknown_format">This image cannot be shown</string>
     <string name="preview_image_error_unknown_format">This image cannot be shown</string>
 
 
     <string name="error__upload__local_file_not_copied">%1$s could not be copied to %2$s local folder</string>
     <string name="error__upload__local_file_not_copied">%1$s could not be copied to %2$s local folder</string>
+    <string name="prefs_instant_upload_path_title">Instant upload folder</string>
     <string name="prefs_instant_upload_path_use_subfolders_title">Use subfolders</string>
     <string name="prefs_instant_upload_path_use_subfolders_title">Use subfolders</string>
     <string name="prefs_instant_upload_path_use_subfolders_summary">Store in subfolders based on year and month</string>
     <string name="prefs_instant_upload_path_use_subfolders_summary">Store in subfolders based on year and month</string>
 
 
@@ -376,7 +377,8 @@
     <string name="prefs_category_instant_uploading">Instant uploads</string>
     <string name="prefs_category_instant_uploading">Instant uploads</string>
     <string name="prefs_category_details">Details</string>
     <string name="prefs_category_details">Details</string>
 
 
-	<string name="sync_folder_failed_content">Synchronisation of %1$s folder could not be completed</string>
+	<string name="prefs_instant_video_upload_path_title">Instant upload video folder</string>
+    <string name="sync_folder_failed_content">Synchronisation of %1$s folder could not be completed</string>
 
 
 	<string name="shared_subject_header">shared</string>
 	<string name="shared_subject_header">shared</string>
 	<string name="with_you_subject_header">with you</string>
 	<string name="with_you_subject_header">with you</string>
@@ -455,6 +457,7 @@
     <string name="local_file_not_found_toast">The file was not found in the local file system</string>
     <string name="local_file_not_found_toast">The file was not found in the local file system</string>
     <string name="confirmation_remove_files_alert">Do you really want to remove the selected items?</string>
     <string name="confirmation_remove_files_alert">Do you really want to remove the selected items?</string>
     <string name="confirmation_remove_folders_alert">Do you really want to remove the selected items and their contents?</string>
     <string name="confirmation_remove_folders_alert">Do you really want to remove the selected items and their contents?</string>
+    <string name="actionbar_search">Search</string>
     <plurals name="items_selected_count">
     <plurals name="items_selected_count">
         <item quantity="one">%d selected</item>
         <item quantity="one">%d selected</item>
         <item quantity="other">%d selected</item>
         <item quantity="other">%d selected</item>

+ 4 - 1
res/values-fr/strings.xml

@@ -308,6 +308,7 @@ Ci-dessous la liste des fichiers locaux, et les fichiers distants dans %5$s auxq
     <string name="preview_image_error_unknown_format">Cette image ne peut pas être affichée</string>
     <string name="preview_image_error_unknown_format">Cette image ne peut pas être affichée</string>
 
 
     <string name="error__upload__local_file_not_copied">%1$s n\'a pas pu être copié dans le dossier local %2$s</string>
     <string name="error__upload__local_file_not_copied">%1$s n\'a pas pu être copié dans le dossier local %2$s</string>
+    <string name="prefs_instant_upload_path_title">Téléversement immédiat du dossier</string>
     <string name="prefs_instant_upload_path_use_subfolders_title">Utiliser des sous-dossiers</string>
     <string name="prefs_instant_upload_path_use_subfolders_title">Utiliser des sous-dossiers</string>
     <string name="prefs_instant_upload_path_use_subfolders_summary">Stocker dans des sous-dossiers basés sur années et mois</string>
     <string name="prefs_instant_upload_path_use_subfolders_summary">Stocker dans des sous-dossiers basés sur années et mois</string>
 
 
@@ -380,7 +381,8 @@ Ci-dessous la liste des fichiers locaux, et les fichiers distants dans %5$s auxq
     <string name="prefs_category_instant_uploading">Téléversement immédiat</string>
     <string name="prefs_category_instant_uploading">Téléversement immédiat</string>
     <string name="prefs_category_details">Détails</string>
     <string name="prefs_category_details">Détails</string>
 
 
-	<string name="sync_folder_failed_content">La synchronisation du dossier %1$s n\'a pas pu être terminée</string>
+	<string name="prefs_instant_video_upload_path_title">Téléversement immédiat du dossier vidéos</string>
+    <string name="sync_folder_failed_content">La synchronisation du dossier %1$s n\'a pas pu être terminée</string>
 
 
 	<string name="shared_subject_header">a partagé</string>
 	<string name="shared_subject_header">a partagé</string>
 	<string name="with_you_subject_header">avec vous</string>
 	<string name="with_you_subject_header">avec vous</string>
@@ -459,6 +461,7 @@ Ci-dessous la liste des fichiers locaux, et les fichiers distants dans %5$s auxq
     <string name="local_file_not_found_toast">Le fichier n\'a pas été trouvé sur le système de fichier local</string>
     <string name="local_file_not_found_toast">Le fichier n\'a pas été trouvé sur le système de fichier local</string>
     <string name="confirmation_remove_files_alert">Voulez-vous vraiment supprimer les objets sélectionnés?</string>
     <string name="confirmation_remove_files_alert">Voulez-vous vraiment supprimer les objets sélectionnés?</string>
     <string name="confirmation_remove_folders_alert">Voulez-vous vraiment supprimer les objets sélectionnés et leurs contenus?</string>
     <string name="confirmation_remove_folders_alert">Voulez-vous vraiment supprimer les objets sélectionnés et leurs contenus?</string>
+    <string name="actionbar_search">Rechercher</string>
     <plurals name="items_selected_count">
     <plurals name="items_selected_count">
         <item quantity="one">%d sélectionné</item>
         <item quantity="one">%d sélectionné</item>
         <item quantity="other">%d sélectionnés</item>
         <item quantity="other">%d sélectionnés</item>

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

@@ -457,6 +457,7 @@
     <string name="local_file_not_found_toast">Berkas tidak ditemukan di sistem berkas lokal</string>
     <string name="local_file_not_found_toast">Berkas tidak ditemukan di sistem berkas lokal</string>
     <string name="confirmation_remove_files_alert">Apakah Anda yakin ingin menghapus item terpilih?</string>
     <string name="confirmation_remove_files_alert">Apakah Anda yakin ingin menghapus item terpilih?</string>
     <string name="confirmation_remove_folders_alert">Apakah Anda yakin ingin menghapus item terpilih dan isinya?</string>
     <string name="confirmation_remove_folders_alert">Apakah Anda yakin ingin menghapus item terpilih dan isinya?</string>
+    <string name="actionbar_search">Cari</string>
     <plurals name="items_selected_count">
     <plurals name="items_selected_count">
         <item quantity="other">%d dipilih</item>
         <item quantity="other">%d dipilih</item>
     </plurals>
     </plurals>

+ 2 - 1
res/values-it/strings.xml

@@ -4,7 +4,7 @@
     <string name="about_android">Applicazione per Android di %1$s</string>
     <string name="about_android">Applicazione per Android di %1$s</string>
     <string name="about_version">versione %1$s</string>
     <string name="about_version">versione %1$s</string>
     <string name="actionbar_sync">Aggiorna account</string>
     <string name="actionbar_sync">Aggiorna account</string>
-    <string name="actionbar_upload">Carica un file</string>
+    <string name="actionbar_upload">Carica</string>
     <string name="actionbar_upload_from_apps">Contenuti da altre applicazioni</string>
     <string name="actionbar_upload_from_apps">Contenuti da altre applicazioni</string>
     <string name="actionbar_upload_files">File</string>
     <string name="actionbar_upload_files">File</string>
     <string name="actionbar_open_with">Apri con</string>
     <string name="actionbar_open_with">Apri con</string>
@@ -457,6 +457,7 @@
     <string name="local_file_not_found_toast">Il file non è stato trovato nel file system locale</string>
     <string name="local_file_not_found_toast">Il file non è stato trovato nel file system locale</string>
     <string name="confirmation_remove_files_alert">Vuoi davvero rimuovere gli elementi selezionati?</string>
     <string name="confirmation_remove_files_alert">Vuoi davvero rimuovere gli elementi selezionati?</string>
     <string name="confirmation_remove_folders_alert">Vuoi davvero rimuovere gli elementi selezionati e il loro contenuto?</string>
     <string name="confirmation_remove_folders_alert">Vuoi davvero rimuovere gli elementi selezionati e il loro contenuto?</string>
+    <string name="actionbar_search">Cerca</string>
     <plurals name="items_selected_count">
     <plurals name="items_selected_count">
         <item quantity="one">%d selezionato</item>
         <item quantity="one">%d selezionato</item>
         <item quantity="other">%d selezionati</item>
         <item quantity="other">%d selezionati</item>

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

@@ -460,6 +460,7 @@ Neem contact op met je beheerder</string>
     <string name="local_file_not_found_toast">Het bestand is niet te vinden binnen het lokale bestandssysteem.</string>
     <string name="local_file_not_found_toast">Het bestand is niet te vinden binnen het lokale bestandssysteem.</string>
     <string name="confirmation_remove_files_alert">Wil je de geselecteerde objecten echt verwijderen?</string>
     <string name="confirmation_remove_files_alert">Wil je de geselecteerde objecten echt verwijderen?</string>
     <string name="confirmation_remove_folders_alert">Wil je de geselecteerde objecten en hun inhoud echt verwijderen?</string>
     <string name="confirmation_remove_folders_alert">Wil je de geselecteerde objecten en hun inhoud echt verwijderen?</string>
+    <string name="actionbar_search">Zoeken</string>
     <plurals name="items_selected_count">
     <plurals name="items_selected_count">
         <item quantity="one">%d geselecteerd</item>
         <item quantity="one">%d geselecteerd</item>
         <item quantity="other">%d geselecteerd</item>
         <item quantity="other">%d geselecteerd</item>

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

@@ -457,6 +457,7 @@
     <string name="local_file_not_found_toast">O arquivo não foi encontrado no sistema de arquivos local</string>
     <string name="local_file_not_found_toast">O arquivo não foi encontrado no sistema de arquivos local</string>
     <string name="confirmation_remove_files_alert">Deseja realmente remover os itens selecionados?</string>
     <string name="confirmation_remove_files_alert">Deseja realmente remover os itens selecionados?</string>
     <string name="confirmation_remove_folders_alert">Deseja realmente remover os itens selecionados e seus conteúdos?</string>
     <string name="confirmation_remove_folders_alert">Deseja realmente remover os itens selecionados e seus conteúdos?</string>
+    <string name="actionbar_search">Pesquisar</string>
     <plurals name="items_selected_count">
     <plurals name="items_selected_count">
         <item quantity="one">%d selecionado</item>
         <item quantity="one">%d selecionado</item>
         <item quantity="other">%d selecionados</item>
         <item quantity="other">%d selecionados</item>

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

@@ -457,6 +457,7 @@
     <string name="local_file_not_found_toast">Файл не был найден в локальной файловой системе</string>
     <string name="local_file_not_found_toast">Файл не был найден в локальной файловой системе</string>
     <string name="confirmation_remove_files_alert">Вы действительно хотите удалить выбранные элементы?</string>
     <string name="confirmation_remove_files_alert">Вы действительно хотите удалить выбранные элементы?</string>
     <string name="confirmation_remove_folders_alert">Вы действительно хотите удалить выбранные элементы и их содержимое?</string>
     <string name="confirmation_remove_folders_alert">Вы действительно хотите удалить выбранные элементы и их содержимое?</string>
+    <string name="actionbar_search">Поиск</string>
     <plurals name="items_selected_count">
     <plurals name="items_selected_count">
         <item quantity="one">%d выбран</item>
         <item quantity="one">%d выбран</item>
         <item quantity="few">%d выбрано</item>
         <item quantity="few">%d выбрано</item>

+ 28 - 3
res/values-tr/strings.xml

@@ -17,8 +17,10 @@
     <string-array name="actionbar_sortby">
     <string-array name="actionbar_sortby">
     	<item>A-Z</item>
     	<item>A-Z</item>
     	<item>Yeniden - Eskiye</item>
     	<item>Yeniden - Eskiye</item>
+    	<item>En Büyük - En Küçük</item>
     </string-array>
     </string-array>
     <string name="drawer_item_all_files">Tüm dosyalar</string>
     <string name="drawer_item_all_files">Tüm dosyalar</string>
+    <string name="drawer_item_on_device">Aygıtta</string>
     <string name="drawer_item_settings">Ayarlar</string>
     <string name="drawer_item_settings">Ayarlar</string>
     <string name="drawer_item_uploads_list">Yüklemeler</string>
     <string name="drawer_item_uploads_list">Yüklemeler</string>
 	<string name="drawer_close">Kapat</string>
 	<string name="drawer_close">Kapat</string>
@@ -61,8 +63,12 @@
     <string name="uploader_wrn_no_account_setup_btn_text">Kurulum</string>
     <string name="uploader_wrn_no_account_setup_btn_text">Kurulum</string>
     <string name="uploader_wrn_no_account_quit_btn_text">Çıkış</string>
     <string name="uploader_wrn_no_account_quit_btn_text">Çıkış</string>
     <string name="uploader_error_title_no_file_to_upload">Yüklenecek dosya yok</string>
     <string name="uploader_error_title_no_file_to_upload">Yüklenecek dosya yok</string>
+    <string name="uploader_error_message_received_piece_of_text">%1$s bir metin parçasını dosya olarak karşıya yükleyemez.</string>
     <string name="uploader_error_message_no_file_to_upload">Alınan veri hiç geçerii dosya içermiyor.</string>
     <string name="uploader_error_message_no_file_to_upload">Alınan veri hiç geçerii dosya içermiyor.</string>
     <string name="uploader_error_title_file_cannot_be_uploaded">Dosya yüklenemiyor</string>
     <string name="uploader_error_title_file_cannot_be_uploaded">Dosya yüklenemiyor</string>
+    <string name="uploader_error_message_read_permission_not_granted">%1$s alınan bir dosyayı okumaya yetkili değil</string>
+    <string name="uploader_error_message_source_file_not_found">Karşıya yüklenecek dosya konumunda bulunamadı. Lütfen dosyanın var olduğundan emin olun.</string>
+    <string name="uploader_error_message_source_file_not_copied">Geçici bir klasöre dosya kopyalama sırasında bir hata oluştu. Tekrar göndermeyi deneyin.</string>
     <string name="file_list_seconds_ago">saniyeler önce</string>
     <string name="file_list_seconds_ago">saniyeler önce</string>
     <string name="file_list_empty">Burada hiçbir şey yok. Bir şeyler yükleyin!</string>
     <string name="file_list_empty">Burada hiçbir şey yok. Bir şeyler yükleyin!</string>
     <string name="file_list_loading">Yükleniyor...</string>
     <string name="file_list_loading">Yükleniyor...</string>
@@ -99,6 +105,7 @@
     <string name="about_title">Hakkında</string>
     <string name="about_title">Hakkında</string>
     <string name="change_password">Parola değiştir</string>
     <string name="change_password">Parola değiştir</string>
     <string name="delete_account">Hesabı kaldır</string>
     <string name="delete_account">Hesabı kaldır</string>
+    <string name="delete_account_warning">%s hesabı silinsin mi?\\n\\nSilme işlemi geri alınamaz.</string>
     <string name="create_account">Hesap oluştur</string>
     <string name="create_account">Hesap oluştur</string>
     <string name="upload_chooser_title">Şuradan yükle...</string>
     <string name="upload_chooser_title">Şuradan yükle...</string>
     <string name="uploader_info_dirname">Klasör adı</string>
     <string name="uploader_info_dirname">Klasör adı</string>
@@ -224,6 +231,7 @@
     <string name="unfavorite">Çevrimdışı erişimden kaldır</string>
     <string name="unfavorite">Çevrimdışı erişimden kaldır</string>
     <string name="common_rename">Yeniden adlandır</string>
     <string name="common_rename">Yeniden adlandır</string>
     <string name="common_remove">Kaldır</string>
     <string name="common_remove">Kaldır</string>
+    <string name="confirmation_remove_file_alert">Gerçekten %1$s dosyasını kaldırmak istiyor musunuz?</string>
     <string name="confirmation_remove_folder_alert">Gerçekten %1$s ve içeriğini kaldırmak istediğinizden emin misiniz?</string>
     <string name="confirmation_remove_folder_alert">Gerçekten %1$s ve içeriğini kaldırmak istediğinizden emin misiniz?</string>
     <string name="confirmation_remove_local">Sadece yerel</string>
     <string name="confirmation_remove_local">Sadece yerel</string>
     <string name="remove_success_msg">Kaldırma başarılı</string>
     <string name="remove_success_msg">Kaldırma başarılı</string>
@@ -295,7 +303,11 @@
     <string name="preview_image_error_unknown_format">Bu resim gösterilemiyor</string>
     <string name="preview_image_error_unknown_format">Bu resim gösterilemiyor</string>
 
 
     <string name="error__upload__local_file_not_copied">%1$s, %2$s yerel klasörüne kopyalanamadı</string>
     <string name="error__upload__local_file_not_copied">%1$s, %2$s yerel klasörüne kopyalanamadı</string>
-    <string name="share_link_no_support_share_api">Üzgünüz, paylaşım sunucunuzda etkin değil. Lütfen yöneticinizle
+    <string name="prefs_instant_upload_path_title">Anında yükleme klasörü</string>
+    <string name="prefs_instant_upload_path_use_subfolders_title">Alt klasörleri kullan</string>
+    <string name="prefs_instant_upload_path_use_subfolders_summary">Yıla ve aya göre alt dizinlere kaydet</string>
+
+	<string name="share_link_no_support_share_api">Üzgünüz, paylaşım sunucunuzda etkin değil. Lütfen yöneticinizle
                 iletişime geçin.</string>
                 iletişime geçin.</string>
 	<string name="share_link_file_no_exist">Paylaşma başarısız. Lütfen dosyanın mevcut olup olmadığını denetleyin</string>
 	<string name="share_link_file_no_exist">Paylaşma başarısız. Lütfen dosyanın mevcut olup olmadığını denetleyin</string>
 	<string name="share_link_file_error">Bu dosya veya klasörü paylaşmaya çalışılırken bir hata oluştu</string>
 	<string name="share_link_file_error">Bu dosya veya klasörü paylaşmaya çalışılırken bir hata oluştu</string>
@@ -310,7 +322,10 @@
 
 
     <string name="copy_link">Bağlantıyı kopyala</string>
     <string name="copy_link">Bağlantıyı kopyala</string>
     <string name="clipboard_text_copied">Panoya kopyalandı</string>
     <string name="clipboard_text_copied">Panoya kopyalandı</string>
+    <string name="clipboard_no_text_to_copy">Panoya kopyalanacak metin alınmadı</string>
     <string name="clipboard_uxexpected_error">Panoya kopyalanırken beklenmeyen bir hata oluştu</string>
     <string name="clipboard_uxexpected_error">Panoya kopyalanırken beklenmeyen bir hata oluştu</string>
+    <string name="clipboard_label">%1$s kaynağından metin kopyalandı</string>
+
     <string name="error_cant_bind_to_operations_service">Ciddi hata: işlem gerçekleştirilemiyor</string>
     <string name="error_cant_bind_to_operations_service">Ciddi hata: işlem gerçekleştirilemiyor</string>
 
 
     <string name="network_error_socket_exception">Sunucuya bağlanılırken bir hata oluştu.</string>
     <string name="network_error_socket_exception">Sunucuya bağlanılırken bir hata oluştu.</string>
@@ -362,7 +377,8 @@
     <string name="prefs_category_instant_uploading">Anında yüklemeler</string>
     <string name="prefs_category_instant_uploading">Anında yüklemeler</string>
     <string name="prefs_category_details">Ayrıntılar</string>
     <string name="prefs_category_details">Ayrıntılar</string>
 
 
-	<string name="sync_folder_failed_content">%1$s klasörünün eşitlemesi tamamlanamadı</string>
+	<string name="prefs_instant_video_upload_path_title">Anında video yükleme klasörü</string>
+    <string name="sync_folder_failed_content">%1$s klasörünün eşitlemesi tamamlanamadı</string>
 
 
 	<string name="shared_subject_header">sizinle</string>
 	<string name="shared_subject_header">sizinle</string>
 	<string name="with_you_subject_header">paylaştı</string>
 	<string name="with_you_subject_header">paylaştı</string>
@@ -433,9 +449,18 @@
     <string name="action_switch_list_view">Liste görünümü</string>
     <string name="action_switch_list_view">Liste görünümü</string>
 
 
     <string name="manage_space_title">Alanı ayarla</string>
     <string name="manage_space_title">Alanı ayarla</string>
+    <string name="manage_space_description">%1$s tarafından verilmiş olan ayarlar, veritabanı ve sunucu sertiffikaları kalıcı olarak silinecek. \\n\\nİndirilen dosyalara dokunulmayacak.\\n\\nBu işlem biraz vakit alacaktır.</string>
     <string name="manage_space_clear_data">Verileri temizle</string>
     <string name="manage_space_clear_data">Verileri temizle</string>
     <string name="manage_space_error">Bazı dosyalar silinemedi</string>
     <string name="manage_space_error">Bazı dosyalar silinemedi</string>
 
 
     <string name="permission_storage_access">Dosya yüklemek ve indirmek için ek izin gerekiyor.</string>
     <string name="permission_storage_access">Dosya yüklemek ve indirmek için ek izin gerekiyor.</string>
     <string name="local_file_not_found_toast">Dosya yerel dosya sisteminde bulunamadı.</string>
     <string name="local_file_not_found_toast">Dosya yerel dosya sisteminde bulunamadı.</string>
-    </resources>
+    <string name="confirmation_remove_files_alert">Seçilen öğeleri gerçekten kaldırmak istiyor musunuz?</string>
+    <string name="confirmation_remove_folders_alert">Seçilen öğeleri ve içeriklerini gerçekten kaldırmak istiyor musunuz?</string>
+    <string name="actionbar_search">Ara</string>
+    <plurals name="items_selected_count">
+        <item quantity="one">%d seçili</item>
+        <item quantity="other">%d seçili</item>
+    </plurals>
+
+</resources>

+ 1 - 0
res/values/strings.xml

@@ -457,6 +457,7 @@
     <string name="local_file_not_found_toast">The file was not found in the local file system</string>
     <string name="local_file_not_found_toast">The file was not found in the local file system</string>
     <string name="confirmation_remove_files_alert">Do you really want to remove the selected items?</string>
     <string name="confirmation_remove_files_alert">Do you really want to remove the selected items?</string>
     <string name="confirmation_remove_folders_alert">Do you really want to remove the selected items and their contents?</string>
     <string name="confirmation_remove_folders_alert">Do you really want to remove the selected items and their contents?</string>
+    <string name="actionbar_search">Search</string>
     <plurals name="items_selected_count">
     <plurals name="items_selected_count">
         <!--
         <!--
              As a developer, you should always supply "one" and "other"
              As a developer, you should always supply "one" and "other"

+ 1 - 1
res/values/styles.xml

@@ -85,7 +85,7 @@
 		<!-- Close button icon -->
 		<!-- Close button icon -->
 		<item name="closeIcon">@drawable/ic_close</item>
 		<item name="closeIcon">@drawable/ic_close</item>
 		<!-- Search button icon -->
 		<!-- Search button icon -->
-		<item name="searchIcon">@drawable/ic_search</item>
+		<item name="searchIcon">@drawable/ic_search_grey</item>
 		<!-- Layout for query suggestion rows // unused for now, staying with the standard layout -->
 		<!-- Layout for query suggestion rows // unused for now, staying with the standard layout -->
 		<!--<item name="suggestionRowLayout">...</item>-->
 		<!--<item name="suggestionRowLayout">...</item>-->
 	</style>
 	</style>

+ 9 - 5
src/com/owncloud/android/authentication/AuthenticatorActivity.java

@@ -632,7 +632,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
         outState.putBoolean(KEY_AUTH_IS_FIRST_ATTEMPT_TAG, mIsFirstAuthAttempt);
         outState.putBoolean(KEY_AUTH_IS_FIRST_ATTEMPT_TAG, mIsFirstAuthAttempt);
 
 
         /// AsyncTask (User and password)
         /// AsyncTask (User and password)
-        outState.putString(KEY_USERNAME, mUsernameInput.getText().toString());
+        outState.putString(KEY_USERNAME, mUsernameInput.getText().toString().trim());
         outState.putString(KEY_PASSWORD, mPasswordInput.getText().toString());
         outState.putString(KEY_PASSWORD, mPasswordInput.getText().toString());
 
 
         if (mAsyncTask != null) {
         if (mAsyncTask != null) {
@@ -886,14 +886,18 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
 
 
     private void showPassword() {
     private void showPassword() {
         mPasswordInput.setInputType(
         mPasswordInput.setInputType(
-                InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
+                InputType.TYPE_CLASS_TEXT |
+                InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD |
+                InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS
         );
         );
         showViewPasswordButton();
         showViewPasswordButton();
     }
     }
 
 
     private void hidePassword() {
     private void hidePassword() {
         mPasswordInput.setInputType(
         mPasswordInput.setInputType(
-                InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD
+                InputType.TYPE_CLASS_TEXT |
+                InputType.TYPE_TEXT_VARIATION_PASSWORD |
+                InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS
         );
         );
         showViewPasswordButton();
         showViewPasswordButton();
     }
     }
@@ -944,7 +948,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
      */
      */
     private void checkBasicAuthorization() {
     private void checkBasicAuthorization() {
         /// get basic credentials entered by user
         /// get basic credentials entered by user
-        String username = mUsernameInput.getText().toString();
+        String username = mUsernameInput.getText().toString().trim();
         String password = mPasswordInput.getText().toString();
         String password = mPasswordInput.getText().toString();
 
 
         /// be gentle with the user
         /// be gentle with the user
@@ -1053,7 +1057,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
                 success = createAccount(result);
                 success = createAccount(result);
             } else {
             } else {
 
 
-                if (!mUsernameInput.getText().toString().equals(username)) {
+                if (!mUsernameInput.getText().toString().trim().equals(username)) {
                     // fail - not a new account, but an existing one; disallow
                     // fail - not a new account, but an existing one; disallow
                     result = new RemoteOperationResult(ResultCode.ACCOUNT_NOT_THE_SAME);
                     result = new RemoteOperationResult(ResultCode.ACCOUNT_NOT_THE_SAME);
                     mAuthToken = "";
                     mAuthToken = "";

+ 1 - 1
src/com/owncloud/android/files/services/ConnectivityActionReceiver.java

@@ -140,7 +140,7 @@ public class ConnectivityActionReceiver extends BroadcastReceiver {
                     networkType == ConnectivityManager.TYPE_WIFI;
                     networkType == ConnectivityManager.TYPE_WIFI;
 
 
             if (couldBeWifiAction) {
             if (couldBeWifiAction) {
-                if (ConnectivityUtils.isAppConnectedViaWiFi(context)) {
+                if (ConnectivityUtils.isAppConnectedViaUnmeteredWiFi(context)) {
                     Log_OC.d(TAG, "WiFi connected");
                     Log_OC.d(TAG, "WiFi connected");
                     wifiConnected(context);
                     wifiConnected(context);
                 } else {
                 } else {

+ 1 - 1
src/com/owncloud/android/operations/UploadFileOperation.java

@@ -464,7 +464,7 @@ public class UploadFileOperation extends SyncOperation {
         );
         );
         return (
         return (
             (delayInstantPicture || delayInstantVideo) &&
             (delayInstantPicture || delayInstantVideo) &&
-            !ConnectivityUtils.isAppConnectedViaWiFi(mContext)
+            !ConnectivityUtils.isAppConnectedViaUnmeteredWiFi(mContext)
         );
         );
     }
     }
 
 

+ 14 - 3
src/com/owncloud/android/ui/activity/FileDisplayActivity.java

@@ -133,6 +133,8 @@ public class FileDisplayActivity extends HookActivity
 
 
     private OCFile mWaitingToSend;
     private OCFile mWaitingToSend;
 
 
+    private Collection<MenuItem> mDrawerMenuItemstoShowHideList;
+
 
 
     @Override
     @Override
     protected void onCreate(Bundle savedInstanceState) {
     protected void onCreate(Bundle savedInstanceState) {
@@ -518,9 +520,10 @@ public class FileDisplayActivity extends HookActivity
     @Override
     @Override
     public boolean onPrepareOptionsMenu(Menu menu) {
     public boolean onPrepareOptionsMenu(Menu menu) {
         boolean drawerOpen = isDrawerOpen();
         boolean drawerOpen = isDrawerOpen();
-        menu.findItem(R.id.action_sort).setVisible(!drawerOpen);
-        menu.findItem(R.id.action_sync_account).setVisible(!drawerOpen);
-        menu.findItem(R.id.action_switch_view).setVisible(!drawerOpen);
+
+        for (MenuItem menuItem:mDrawerMenuItemstoShowHideList) {
+            menuItem.setVisible(!drawerOpen);
+        }
 
 
         return super.onPrepareOptionsMenu(menu);
         return super.onPrepareOptionsMenu(menu);
     }
     }
@@ -530,6 +533,14 @@ public class FileDisplayActivity extends HookActivity
         MenuInflater inflater = getMenuInflater();
         MenuInflater inflater = getMenuInflater();
         inflater.inflate(R.menu.main_menu, menu);
         inflater.inflate(R.menu.main_menu, menu);
         menu.findItem(R.id.action_create_dir).setVisible(false);
         menu.findItem(R.id.action_create_dir).setVisible(false);
+
+        // populate list of menu items to show/hide when drawer is opened/closed
+        mDrawerMenuItemstoShowHideList = new ArrayList<>(4);
+        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));
+
         return true;
         return true;
     }
     }
 
 

+ 23 - 1
src/com/owncloud/android/ui/adapter/FileListListAdapter.java

@@ -61,9 +61,10 @@ import java.util.Vector;
  * This Adapter populates a ListView with all files and folders in an ownCloud
  * This Adapter populates a ListView with all files and folders in an ownCloud
  * instance.
  * instance.
  */
  */
-public class FileListListAdapter extends BaseAdapter implements ListAdapter {
+public class FileListListAdapter extends BaseAdapter implements FilterableListAdapter {
 
 
     private Context mContext;
     private Context mContext;
+    private Vector<OCFile> mFilesAll = new Vector<OCFile>();
     private Vector<OCFile> mFiles = null;
     private Vector<OCFile> mFiles = null;
     private boolean mJustFolders;
     private boolean mJustFolders;
 
 
@@ -402,6 +403,10 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
         }
         }
 
 
         mFiles = FileStorageUtils.sortOcFolder(mFiles);
         mFiles = FileStorageUtils.sortOcFolder(mFiles);
+
+        mFilesAll.clear();
+        mFilesAll.addAll(mFiles);
+
         notifyDataSetChanged();
         notifyDataSetChanged();
     }
     }
 
 
@@ -452,4 +457,21 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
         return files;
         return files;
     }
     }
 
 
+    public void filter(String text){
+        if(text.isEmpty()){
+            mFiles.clear();
+            mFiles.addAll(mFilesAll);
+        } else {
+            ArrayList<OCFile> result = new ArrayList<>();
+            text = text.toLowerCase();
+            for(OCFile file: mFilesAll){
+                if(file.getFileName().toLowerCase().contains(text)){
+                    result.add(file);
+                }
+            }
+            mFiles.clear();
+            mFiles.addAll(result);
+        }
+        notifyDataSetChanged();
+    }
 }
 }

+ 27 - 0
src/com/owncloud/android/ui/adapter/FilterableListAdapter.java

@@ -0,0 +1,27 @@
+/**
+ *   Nextcloud Android client application
+ *
+ *   Copyright (C) 2016 Tobias Kaminsky
+ *   Copyright (C) 2016 Nextcloud.
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ *   License as published by the Free Software Foundation; either
+ *   version 3 of the License, or any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ *   You should have received a copy of the GNU Affero General Public
+ *   License along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package com.owncloud.android.ui.adapter;
+
+import android.widget.ListAdapter;
+
+public interface FilterableListAdapter extends ListAdapter {
+    void filter(String text);
+}

+ 28 - 4
src/com/owncloud/android/ui/adapter/LocalFileListAdapter.java

@@ -27,7 +27,6 @@ import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewGroup;
 import android.widget.BaseAdapter;
 import android.widget.BaseAdapter;
 import android.widget.ImageView;
 import android.widget.ImageView;
-import android.widget.ListAdapter;
 import android.widget.ListView;
 import android.widget.ListView;
 import android.widget.TextView;
 import android.widget.TextView;
 
 
@@ -41,21 +40,24 @@ import com.owncloud.android.utils.FileStorageUtils;
 import com.owncloud.android.utils.MimetypeIconUtil;
 import com.owncloud.android.utils.MimetypeIconUtil;
 
 
 import java.io.File;
 import java.io.File;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Arrays;
 import java.util.Comparator;
 import java.util.Comparator;
+import java.util.Vector;
 
 
 /**
 /**
  * This Adapter populates a ListView with all files and directories contained
  * This Adapter populates a ListView with all files and directories contained
  * in a local directory
  * in a local directory
  */
  */
-public class LocalFileListAdapter extends BaseAdapter implements ListAdapter {
+public class LocalFileListAdapter extends BaseAdapter implements FilterableListAdapter {
 
 
     private static final String TAG = LocalFileListAdapter.class.getSimpleName();
     private static final String TAG = LocalFileListAdapter.class.getSimpleName();
 
 
     private Context mContext;
     private Context mContext;
     private File mDirectory;
     private File mDirectory;
     private File[] mFiles = null;
     private File[] mFiles = null;
-    
+    private Vector<File> mFilesAll = new Vector<File>();
+
     public LocalFileListAdapter(File directory, Context context) {
     public LocalFileListAdapter(File directory, Context context) {
         mContext = context;
         mContext = context;
 
 
@@ -106,7 +108,7 @@ public class LocalFileListAdapter extends BaseAdapter implements ListAdapter {
                     .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                     .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
             view = inflator.inflate(R.layout.list_item, null);
             view = inflator.inflate(R.layout.list_item, null);
         }
         }
-        if (mFiles != null && mFiles.length > position) {
+        if (mFiles != null && mFiles.length > position && mFiles[position] != null) {
             File file = mFiles[position];
             File file = mFiles[position];
             
             
             TextView fileName = (TextView) view.findViewById(R.id.Filename);
             TextView fileName = (TextView) view.findViewById(R.id.Filename);
@@ -245,6 +247,12 @@ public class LocalFileListAdapter extends BaseAdapter implements ListAdapter {
             });
             });
 
 
             mFiles = FileStorageUtils.sortLocalFolder(mFiles);
             mFiles = FileStorageUtils.sortLocalFolder(mFiles);
+
+            mFilesAll.clear();
+
+            for (File mFile : mFiles) {
+                mFilesAll.add(mFile);
+            }
         }
         }
         notifyDataSetChanged();
         notifyDataSetChanged();
     }
     }
@@ -259,4 +267,20 @@ public class LocalFileListAdapter extends BaseAdapter implements ListAdapter {
         mFiles = FileStorageUtils.sortLocalFolder(mFiles);
         mFiles = FileStorageUtils.sortLocalFolder(mFiles);
         notifyDataSetChanged();
         notifyDataSetChanged();
     }
     }
+
+    public void filter(String text){
+        if(text.isEmpty()){
+            mFiles = mFilesAll.toArray(new File[1]);
+        } else {
+            ArrayList<File> result = new ArrayList<>();
+            text = text.toLowerCase();
+            for (File file: mFilesAll) {
+                if (file.getName().toLowerCase().contains(text)) {
+                    result.add(file);
+                }
+            }
+            mFiles = result.toArray(new File[1]);
+        }
+        notifyDataSetChanged();
+    }
 }
 }

+ 28 - 6
src/com/owncloud/android/ui/fragment/ExtendedListFragment.java

@@ -22,8 +22,13 @@ package com.owncloud.android.ui.fragment;
 
 
 import android.os.Bundle;
 import android.os.Bundle;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.Fragment;
+import android.support.v4.view.MenuItemCompat;
 import android.support.v4.widget.SwipeRefreshLayout;
 import android.support.v4.widget.SwipeRefreshLayout;
+import android.support.v7.widget.SearchView;
 import android.view.LayoutInflater;
 import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
 import android.view.View;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewGroup;
 import android.widget.AbsListView;
 import android.widget.AbsListView;
@@ -39,14 +44,14 @@ import com.owncloud.android.R;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.ui.ExtendedListView;
 import com.owncloud.android.ui.ExtendedListView;
 import com.owncloud.android.ui.activity.OnEnforceableRefreshListener;
 import com.owncloud.android.ui.activity.OnEnforceableRefreshListener;
-import com.owncloud.android.ui.adapter.FileListListAdapter;
+import com.owncloud.android.ui.adapter.FilterableListAdapter;
 
 
 import java.util.ArrayList;
 import java.util.ArrayList;
 
 
 import third_parties.in.srain.cube.GridViewWithHeaderAndFooter;
 import third_parties.in.srain.cube.GridViewWithHeaderAndFooter;
 
 
 public class ExtendedListFragment extends Fragment
 public class ExtendedListFragment extends Fragment
-        implements OnItemClickListener, OnEnforceableRefreshListener {
+        implements OnItemClickListener, OnEnforceableRefreshListener, SearchView.OnQueryTextListener {
 
 
     protected static final String TAG = ExtendedListFragment.class.getSimpleName();
     protected static final String TAG = ExtendedListFragment.class.getSimpleName();
 
 
@@ -83,9 +88,9 @@ public class ExtendedListFragment extends Fragment
     private GridViewWithHeaderAndFooter mGridView;
     private GridViewWithHeaderAndFooter mGridView;
     private View mGridFooterView;
     private View mGridFooterView;
 
 
-    private ListAdapter mAdapter;
+    private FilterableListAdapter mAdapter;
 
 
-    protected void setListAdapter(ListAdapter listAdapter) {
+    protected void setListAdapter(FilterableListAdapter listAdapter) {
         mAdapter = listAdapter;
         mAdapter = listAdapter;
         mCurrentListView.setAdapter(listAdapter);
         mCurrentListView.setAdapter(listAdapter);
         mCurrentListView.invalidateViews();
         mCurrentListView.invalidateViews();
@@ -134,8 +139,25 @@ public class ExtendedListFragment extends Fragment
     public boolean isGridEnabled(){
     public boolean isGridEnabled(){
         return (mCurrentListView == mGridView);
         return (mCurrentListView == mGridView);
     }
     }
-    
-    
+
+    @Override
+    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+        final MenuItem item = menu.findItem(R.id.action_search);
+        final SearchView searchView = (SearchView) MenuItemCompat.getActionView(item);
+        searchView.setOnQueryTextListener(this);
+    }
+
+    public boolean onQueryTextChange(String query) {
+        mAdapter.filter(query);
+        return true;
+    }
+
+    @Override
+    public boolean onQueryTextSubmit(String query) {
+        mAdapter.filter(query);
+        return true;
+    }
+
     @Override
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container,
     public View onCreateView(LayoutInflater inflater, ViewGroup container,
                              Bundle savedInstanceState) {
                              Bundle savedInstanceState) {

+ 6 - 0
src/com/owncloud/android/ui/fragment/LocalFileListFragment.java

@@ -55,6 +55,12 @@ public class LocalFileListFragment extends ExtendedListFragment {
     /** Adapter to connect the data from the directory with the View object */
     /** Adapter to connect the data from the directory with the View object */
     private LocalFileListAdapter mAdapter = null;
     private LocalFileListAdapter mAdapter = null;
 
 
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setHasOptionsMenu(true);
+    }
+
     /**
     /**
      * {@inheritDoc}
      * {@inheritDoc}
      */
      */

+ 4 - 2
src/com/owncloud/android/utils/ConnectivityUtils.java

@@ -22,6 +22,7 @@ package com.owncloud.android.utils;
 import android.content.Context;
 import android.content.Context;
 import android.net.ConnectivityManager;
 import android.net.ConnectivityManager;
 import android.net.NetworkInfo;
 import android.net.NetworkInfo;
+import android.support.v4.net.ConnectivityManagerCompat;
 
 
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.lib.common.utils.Log_OC;
 
 
@@ -29,12 +30,13 @@ public class ConnectivityUtils {
 
 
     private final static String TAG = ConnectivityUtils.class.getName();
     private final static String TAG = ConnectivityUtils.class.getName();
 
 
-    public static boolean isAppConnectedViaWiFi(Context context) {
+    public static boolean isAppConnectedViaUnmeteredWiFi(Context context) {
         ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
         ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
         boolean result =
         boolean result =
                 cm != null && cm.getActiveNetworkInfo() != null
                 cm != null && cm.getActiveNetworkInfo() != null
                 && cm.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_WIFI
                 && cm.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_WIFI
-                && cm.getActiveNetworkInfo().getState() == NetworkInfo.State.CONNECTED;
+                && cm.getActiveNetworkInfo().getState() == NetworkInfo.State.CONNECTED
+                && !ConnectivityManagerCompat.isActiveNetworkMetered(cm);
         Log_OC.d(TAG, "is AppConnectedViaWifi returns " + result);
         Log_OC.d(TAG, "is AppConnectedViaWifi returns " + result);
         return result;
         return result;
     }
     }