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

Merge branch 'develop' into refactor_remote_operation_to_create_folder

David A. Velasco 11 жил өмнө
parent
commit
e1245bbda7

+ 2 - 2
AndroidManifest.xml

@@ -18,8 +18,8 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->
 <manifest package="com.owncloud.android"
-    android:versionCode="104006"
-    android:versionName="1.4.6" xmlns:android="http://schemas.android.com/apk/res/android">
+    android:versionCode="105000"
+    android:versionName="1.5.0" xmlns:android="http://schemas.android.com/apk/res/android">
 
     <uses-permission android:name="android.permission.GET_ACCOUNTS" />
     <uses-permission android:name="android.permission.USE_CREDENTIALS" />

+ 4 - 4
oc_jb_workaround/AndroidManifest.xml

@@ -1,18 +1,18 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.owncloud.android.workaround.accounts"
-    android:versionCode="0100008"
-    android:versionName="1.0.8" >
+    android:versionCode="0100010"
+    android:versionName="1.0.10" >
 
     <uses-sdk
         android:minSdkVersion="16"
-        android:targetSdkVersion="16" />
+        android:targetSdkVersion="19" />
 
     <application
         android:allowBackup="false"
         android:icon="@drawable/workaround_app_icon"
         android:label="@string/workaround_app_name"
-        android:theme="@style/AppTheme" >
+        >
         <service
             android:name=".AccountAuthenticatorService"
             android:exported="false">

BIN
oc_jb_workaround/res/drawable-hdpi/main_app_icon.png


BIN
oc_jb_workaround/res/drawable-hdpi/workaround_app_icon.png


BIN
oc_jb_workaround/res/drawable-ldpi/main_app_icon.png


BIN
oc_jb_workaround/res/drawable-ldpi/workaround_app_icon.png


BIN
oc_jb_workaround/res/drawable-mdpi/main_app_icon.png


BIN
oc_jb_workaround/res/drawable-mdpi/workaround_app_icon.png


+ 0 - 11
oc_jb_workaround/res/values-v11/styles.xml

@@ -1,11 +0,0 @@
-<resources>
-
-    <!--
-        Base application theme for API 11+. This theme completely replaces
-        AppBaseTheme from res/values/styles.xml on API 11+ devices.
-    -->
-    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
-        <!-- API 11 theme customizations can go here. -->
-    </style>
-
-</resources>

+ 0 - 12
oc_jb_workaround/res/values-v14/styles.xml

@@ -1,12 +0,0 @@
-<resources>
-
-    <!--
-        Base application theme for API 14+. This theme completely replaces
-        AppBaseTheme from BOTH res/values/styles.xml and
-        res/values-v11/styles.xml on API 14+ devices.
-    -->
-    <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
-        <!-- API 14 theme customizations can go here. -->
-    </style>
-
-</resources>

+ 17 - 0
oc_jb_workaround/res/values/setup.xml

@@ -1,4 +1,21 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--
+  ownCloud Android client application
+
+  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/>.
+-->
 <resources>
 
     <string name="workaround_app_name">ownCloud Jelly Bean Workaround for lost credentials</string>

+ 0 - 20
oc_jb_workaround/res/values/styles.xml

@@ -1,20 +0,0 @@
-<resources>
-
-    <!--
-        Base application theme, dependent on API level. This theme is replaced
-        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-    -->
-    <style name="AppBaseTheme" parent="android:Theme.Light">
-        <!--
-            Theme customizations available in newer API levels can go in
-            res/values-vXX/styles.xml, while customizations related to
-            backward-compatibility can go here.
-        -->
-    </style>
-
-    <!-- Application theme. -->
-    <style name="AppTheme" parent="AppBaseTheme">
-        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
-    </style>
-
-</resources>

BIN
res/drawable-hdpi/icon.png


BIN
res/drawable-hdpi/logo.png


BIN
res/drawable-ldpi/icon.png


BIN
res/drawable-ldpi/logo.png


BIN
res/drawable-mdpi/icon.png


BIN
res/drawable-mdpi/logo.png


+ 15 - 0
res/values-hu-rHU/strings.xml

@@ -24,7 +24,11 @@
   <string name="prefs_log_summary_history">Ez megjeleníti a rögzitett eseményeket</string>
   <string name="prefs_log_delete_history_button">Elözmények törlése</string>
   <string name="prefs_help">Súgó</string>
+  <string name="prefs_recommend">Ajánlja egy barátjának</string>
+  <string name="prefs_feedback">Visszajelzés</string>
   <string name="prefs_imprint">Impresszum</string>
+  <string name="recommend_subject">Próbálja ki %1$s-t az okostelefonján!</string>
+  <string name="recommend_text">Kérem próbálja ki %1$s-t az okostelefonján!\nInnen tölthető le: %2$s</string>
   <string name="auth_check_server">Szerver állapot ellenörzés</string>
   <string name="auth_host_url">A kiszolgáló címe</string>
   <string name="auth_username">Felhasználói név</string>
@@ -91,6 +95,7 @@
   <string name="sync_foreign_files_forgotten_ticker">Néhány helyi fájlt figyelmen kívül hagytunk</string>
   <string name="sync_foreign_files_forgotten_content">%1$d fájlt nem sikerült a %2$s mappából  bemásolni</string>
   <string name="sync_foreign_files_forgotten_explanation">Az 1.3.16 verzió használatakor azok az állományok, amiket erről az eszközről töltenek fel, a helyi %1$s mappába másolódnak be, hogy elkerülhető legyen az adatveszteség, amikor ugyanazt az állományt több résztvevő is szinkronizál.\n\nEmiatt a változás miatt, az e program korábbi változataival feltöltött állományok a %2$s mappába másolódtak. Sajnos azonban egy a szinkronizáció közben fellépő hiba miatt ez a feladat csak részben valósult meg. Két lehetősége van: vagy úgy dönt, hogy maradjanak a fájl(ok) ahol vannak és akkor törölje a %3$s-re mutató linket, vagy pedig helyezze át az állomány(oka)t a %1$s mappába, és tartsa meg a %4$s-re mutató linket.\n\nAz alábbiakban látható a helyi fájl(ok) listája és a távoli fájl(ok) a %5$s mappában, amihez linkelve voltak.</string>
+  <string name="sync_current_folder_was_removed">A %1$s mappa már nem létezik</string>
   <string name="foreign_files_move">Helyezzük át mindet</string>
   <string name="foreign_files_success">Az összes fájlt áthelyeztük</string>
   <string name="foreign_files_fail">Egyes fájlokat nem sikerült áthelyezni</string>
@@ -116,6 +121,7 @@
   <string name="media_err_unsupported">Nem támogatott média kodek</string>
   <string name="media_err_io">Media fájl nem olvasható</string>
   <string name="media_err_malformed">Médiafájl kódolása nem megfelelő</string>
+  <string name="media_err_timeout">A lejátszás közben időtúllépés történt</string>
   <string name="media_err_invalid_progressive_playback">A média fájlt nem lehet streamelni.</string>
   <string name="media_err_unknown">A média fájlt nem tudja lejátszani a jelenlegi médialejátszó</string>
   <string name="media_err_security_ex">Biztonsági hiba amikor megpróbálja lejátszani a %1$s</string>
@@ -130,12 +136,15 @@
   <string name="auth_connection_established">A kapcsolat létrejött</string>
   <string name="auth_testing_connection">Kapcsolat tesztelése...</string>
   <string name="auth_not_configured_title">Hibás a kiszolgáló beállítása</string>
+  <string name="auth_account_not_new">Egy bejelentkezési beállítás már létezik ugyanehhez a kiszolgálóhoz és felhasználóhoz</string>
+  <string name="auth_account_not_the_same">A megadott felhasználó nem azonos ezzel a belépési jogosultsággal</string>
   <string name="auth_unknown_error_title">Ismeretlen hiba történt!</string>
   <string name="auth_unknown_host_title">A kiszolgáló nem található</string>
   <string name="auth_incorrect_path_title">Kiszolgáló nem található</string>
   <string name="auth_timeout_title">A kiszolgáló túl sokára válaszolt</string>
   <string name="auth_incorrect_address_title">Hibás URL</string>
   <string name="auth_ssl_general_error_title">Nem sikerült az SSL kapcsolat felépítése</string>
+  <string name="auth_ssl_unverified_server_title">Az SSL kiszolgáló tanúsítványát nem sikerült ellenőrizni</string>
   <string name="auth_bad_oc_version_title">Ismeretlen változat a kiszolgálón</string>
   <string name="auth_wrong_connection_title">A kapcsolat nem hozható létre</string>
   <string name="auth_secure_connection">Létrejött a titkosított kapcsolat</string>
@@ -143,7 +152,12 @@
   <string name="auth_oauth_error">Sikertelen azonosítás</string>
   <string name="auth_oauth_error_access_denied">Hozzáférés megtagadva az azonsítást végző szerver által</string>
   <string name="auth_wtf_reenter_URL">Nem várt állapot; kérlek, menj a szerver URL-jére újra.</string>
+  <string name="auth_expired_oauth_token_toast">A jogosultsága lejárt. Kérjük jelentkezzen be ismét!</string>
   <string name="auth_expired_basic_auth_toast">Kélek, írd be a jelenlegi jelszavadat</string>
+  <string name="auth_expired_saml_sso_token_toast">Lejárt a munkamenetének érvényessége. Kérjük jelentkezzen be ismét!</string>
+  <string name="auth_connecting_auth_server">Kapcsolódás a felhasználóazonosítást végző kiszolgálóhoz...</string>
+  <string name="auth_unsupported_auth_method">A kiszolgáló nem támogatja ezt a felhasználóazonosítási módszert</string>
+  <string name="auth_unsupported_multiaccount">%1$s nem támogat több bejelenkezési jogosultságot</string>
   <string name="fd_keep_in_sync">Automatikusan frissítse a fájlokat</string>
   <string name="common_rename">Átnevezés</string>
   <string name="common_remove">Eltávolítás</string>
@@ -164,6 +178,7 @@
   <string name="wait_a_moment">Egy pillanat...</string>
   <string name="filedisplay_unexpected_bad_get_content">Váratlan hiba; válassza ki a fájlt más programból</string>
   <string name="filedisplay_no_file_selected">Egy fájl sincs kiválasztva</string>
+  <string name="oauth_check_onoff">Bejelentkezés oAuth2-vel</string>
   <string name="oauth_login_connection">Kapcsolódás az oAuth2 szerverhez...</string>
   <string name="ssl_validator_header">A kiszolgálót nem sikerült azonosítani</string>
   <string name="ssl_validator_reason_cert_not_trusted">- A kiszolgáló tanúsítványa nem megbízható</string>

+ 12 - 6
res/values-sl/strings.xml

@@ -1,5 +1,7 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <resources>
+  <string name="about_version">različica %1$s</string>
+  <string name="actionbar_sync">Osveži račun</string>
   <string name="actionbar_upload">Pošlji datoteko</string>
   <string name="actionbar_upload_from_apps">Vsebina iz drugih programov</string>
   <string name="actionbar_upload_files">Datoteke</string>
@@ -21,6 +23,7 @@
   <string name="prefs_help">Pomoč</string>
   <string name="prefs_feedback">Odziv</string>
   <string name="prefs_imprint">Natis</string>
+  <string name="auth_check_server">Preveri strežnik</string>
   <string name="auth_host_url">Naslov strežnika</string>
   <string name="auth_username">Uporabniško ime</string>
   <string name="auth_password">Geslo</string>
@@ -93,10 +96,11 @@
   <string name="pincode_configure_your_pin_explanation">Koda PIN bo zahtevana vsakič pred zagonom programa.</string>
   <string name="pincode_reenter_your_pincode">Ponovno vnesite kodo PIN programa</string>
   <string name="pincode_remove_your_pincode">Odstrani kodo PIN programa</string>
-  <string name="pincode_mismatch">Vrednosti kodo PIN programa nista enaki</string>
-  <string name="pincode_wrong">Nepravilen kodo PIN programa</string>
+  <string name="pincode_mismatch">Vrednosti kod PIN programa nista enaki</string>
+  <string name="pincode_wrong">Nepravilna koda PIN programa</string>
   <string name="pincode_removed">Koda PIN programa je odstranjena</string>
   <string name="pincode_stored">Koda PIN programa je shranjena</string>
+  <string name="media_notif_ticker">Predvajalnik glasbe %1$s</string>
   <string name="media_state_playing">%1$s (predvajanja)</string>
   <string name="media_state_loading">%1$s (nalaganja)</string>
   <string name="media_err_nothing_to_play">Medijskih datotek ni bilo mogoče najti</string>
@@ -112,15 +116,15 @@
   <string name="auth_nossl_plain_ok_title">Varna povezava ni na voljo.</string>
   <string name="auth_connection_established">Povezava je vzpostavljena</string>
   <string name="auth_testing_connection">Preizkušanje povezave ...</string>
-  <string name="auth_not_configured_title">Nastavitve servera so napačno oblikovane</string>
-  <string name="auth_unknown_error_title">Prišlo je do neznane napake</string>
+  <string name="auth_not_configured_title">Napačno oblikovane nastavitve strežnika</string>
+  <string name="auth_unknown_error_title">Prišlo je do neznane napake!</string>
   <string name="auth_unknown_host_title">Gostitelja ni mogoče najti</string>
   <string name="auth_incorrect_path_title">Namestitve servera ni mogoče najti</string>
   <string name="auth_timeout_title">Strežnik je potreboval preveč časa za odgovor</string>
   <string name="auth_incorrect_address_title">Napačno oblikovan naslov URL</string>
   <string name="auth_ssl_general_error_title">Začenjanje SSL je spodletelo</string>
-  <string name="auth_bad_oc_version_title">Neprepoznana različica strežnika servera</string>
-  <string name="auth_wrong_connection_title">Povezave ni mogoče vzpostaviti</string>
+  <string name="auth_bad_oc_version_title">Nepoznana različica strežnika</string>
+  <string name="auth_wrong_connection_title">Ni mogoče vzpostaviti povezave</string>
   <string name="auth_secure_connection">Varna povezava je vzpostavljena</string>
   <string name="fd_keep_in_sync">Datoteka naj bo posodobljena</string>
   <string name="common_rename">Preimenuj</string>
@@ -165,6 +169,7 @@
   <string name="ssl_validator_label_signature">Podpis:</string>
   <string name="ssl_validator_label_signature_algorithm">Algoritem:</string>
   <string name="placeholder_sentence">To je vsebnik predmetov.</string>
+  <string name="placeholder_filetype">Slika PNG</string>
   <string name="placeholder_filesize">389 KB</string>
   <string name="placeholder_timestamp">2012/05/18 12:23 PM</string>
   <string name="placeholder_media_time">12:23:45</string>
@@ -179,6 +184,7 @@
   <string name="preview_image_error_unknown_format">Te slike ni mogoče prikazati</string>
   <string name="error__upload__local_file_not_copied">Datoteke %1$s ni mogoče kopirati v krajevno mapo %2$s.</string>
   <string name="failed_upload_all_cb">izberi vse</string>
+  <string name="failed_upload_headline_retryall_btn">vse izbrane poskusi znova</string>
   <string name="failed_upload_load_more_images">Naloži več slik</string>
   <string name="failed_upload_failure_text">Sporočilo o napaki:</string>
 </resources>

+ 1 - 1
res/values/strings.xml

@@ -232,7 +232,7 @@
     <string name="preview_image_error_unknown_format">This image can not be shown</string>
     
     <string name="error__upload__local_file_not_copied">%1$s could not be copied to %2$s local directory</string>
-    <string name="actionbar_failed_instant_upload">Failed InstantUpload"</string>
+    <string name="actionbar_failed_instant_upload">Failed InstantUpload</string>
     <string name="failed_upload_headline_text">Failed instant uploads</string>
     <string name="failed_upload_headline_hint">Summary of all failed instant uploads</string>
     <string name="failed_upload_all_cb">select all</string>

+ 25 - 15
src/com/owncloud/android/files/OwnCloudFileObserver.java

@@ -28,8 +28,6 @@ import com.owncloud.android.oc_framework.operations.RemoteOperationResult.Result
 import com.owncloud.android.ui.activity.ConflictsResolveActivity;
 import com.owncloud.android.utils.Log_OC;
 
-
-
 import android.accounts.Account;
 import android.content.Context;
 import android.content.Intent;
@@ -37,45 +35,57 @@ import android.os.FileObserver;
 
 public class OwnCloudFileObserver extends FileObserver {
 
-    public static int CHANGES_ONLY = CLOSE_WRITE;
+    private static int MASK = (FileObserver.MODIFY | FileObserver.CLOSE_WRITE);
     
     private static String TAG = OwnCloudFileObserver.class.getSimpleName();
     
     private String mPath;
     private int mMask;
     private Account mOCAccount;
-    //private OCFile mFile;
     private Context mContext;
+    private boolean mModified;
 
     
-    public OwnCloudFileObserver(String path, Account account, Context context, int mask) {
-        super(path, mask);
+    public OwnCloudFileObserver(String path, Account account, Context context) {
+        super(path, MASK);
         if (path == null)
             throw new IllegalArgumentException("NULL path argument received"); 
-        /*if (file == null)
-            throw new IllegalArgumentException("NULL file argument received");*/ 
         if (account == null)
             throw new IllegalArgumentException("NULL account argument received"); 
         if (context == null)
             throw new IllegalArgumentException("NULL context argument received");
-        /*if (!path.equals(file.getStoragePath()) && !path.equals(FileStorageUtils.getDefaultSavePathFor(account.name, file)))
-            throw new IllegalArgumentException("File argument is not linked to the local file set in path argument"); */
         mPath = path;
-        //mFile = file;
         mOCAccount = account;
         mContext = context; 
-        mMask = mask;
+        mModified = false;
     }
     
+    
     @Override
     public void onEvent(int event, String path) {
         Log_OC.d(TAG, "Got file modified with event " + event + " and path " + mPath + ((path != null) ? File.separator + path : ""));
-        if ((event & mMask) == 0) {
+        if ((event & MASK) == 0) {
             Log_OC.wtf(TAG, "Incorrect event " + event + " sent for file " + mPath + ((path != null) ? File.separator + path : "") +
                          " with registered for " + mMask + " and original path " +
                          mPath);
-            return;
-        }
+        } else {
+            if ((event & FileObserver.MODIFY) != 0) {
+                // file changed
+                mModified = true;
+            }
+            // not sure if it's possible, but let's assume that both kind of events can be received at the same time
+            if ((event & FileObserver.CLOSE_WRITE) != 0) {
+                // file closed
+                if (mModified) {
+                    mModified = false;
+                    startSyncOperation();
+                }
+            }
+        }  
+    }
+
+    
+    private void startSyncOperation() {
         FileDataStorageManager storageManager = new FileDataStorageManager(mOCAccount, mContext.getContentResolver());
         OCFile file = storageManager.getFileByLocalPath(mPath);     // a fresh object is needed; many things could have occurred to the file since it was registered to observe
                                                                     // again, assuming that local files are linked to a remote file AT MOST, SOMETHING TO BE DONE; 

+ 2 - 4
src/com/owncloud/android/files/services/FileObserverService.java

@@ -162,8 +162,7 @@ public class FileObserverService extends Service {
             OwnCloudFileObserver observer =
                     new OwnCloudFileObserver(   path, 
                                                 account, 
-                                                getApplicationContext(), 
-                                                OwnCloudFileObserver.CHANGES_ONLY);
+                                                getApplicationContext());
             mObserversMap.put(path, observer);
             if (new File(path).exists()) {
                 observer.startWatching();
@@ -202,8 +201,7 @@ public class FileObserverService extends Service {
             /// the local file was never registered to observe before
             observer = new OwnCloudFileObserver(    localPath, 
                                                     account, 
-                                                    getApplicationContext(), 
-                                                    OwnCloudFileObserver.CHANGES_ONLY);
+                                                    getApplicationContext());
             mObserversMap.put(localPath, observer);
             Log_OC.d(TAG, "Observer added for path " + localPath);