Merge branch 'develop' into oc_framework_cleanup_and_documentation
authorDavid A. Velasco <dvelasco@solidgear.es>
Mon, 20 Jan 2014 08:24:44 +0000 (09:24 +0100)
committerDavid A. Velasco <dvelasco@solidgear.es>
Mon, 20 Jan 2014 08:24:44 +0000 (09:24 +0100)
1  2 
oc_framework/src/com/owncloud/android/oc_framework/accounts/AccountUtils.java
oc_framework/src/com/owncloud/android/oc_framework/operations/RemoteOperationResult.java

@@@ -1,25 -1,18 +1,25 @@@
 -/* ownCloud Android client application
 +/* ownCloud Android Library is available under MIT license
 + *   Copyright (C) 2014 ownCloud (http://www.owncloud.org/)
   *   Copyright (C) 2012  Bartek Przybylski
 - *   Copyright (C) 2012-2013 ownCloud Inc.
 - *
 - *   This program is free software: you can redistribute it and/or modify
 - *   it under the terms of the GNU General Public License version 2,
 - *   as published by the Free Software Foundation.
 - *
 - *   This program is distributed in the hope that it will be useful,
 - *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 - *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 - *   GNU General Public License for more details.
 - *
 - *   You should have received a copy of the GNU General Public License
 - *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 + *   
 + *   Permission is hereby granted, free of charge, to any person obtaining a copy
 + *   of this software and associated documentation files (the "Software"), to deal
 + *   in the Software without restriction, including without limitation the rights
 + *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 + *   copies of the Software, and to permit persons to whom the Software is
 + *   furnished to do so, subject to the following conditions:
 + *   
 + *   The above copyright notice and this permission notice shall be included in
 + *   all copies or substantial portions of the Software.
 + *   
 + *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
 + *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 + *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
 + *   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 
 + *   BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 
 + *   ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
 + *   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 + *   THE SOFTWARE.
   *
   */
  
@@@ -118,8 -111,8 +118,8 @@@ public class AccountUtils 
      
      public static class AccountNotFoundException extends AccountsException {
          
-         /** Generated - should be refreshed every time the class changes!! */
-         private static final long serialVersionUID = -9013287181793186830L;
+               /** Generated - should be refreshed every time the class changes!! */
+               private static final long serialVersionUID = -1684392454798508693L;
          
          private Account mFailedAccount; 
                  
              return mFailedAccount;
          }
      }
  }
@@@ -1,25 -1,18 +1,25 @@@
 -/* ownCloud Android client application
 - *   Copyright (C) 2012 Bartek Przybylski
 - *   Copyright (C) 2012-2013 ownCloud Inc.
 - *
 - *   This program is free software: you can redistribute it and/or modify
 - *   it under the terms of the GNU General Public License version 2,
 - *   as published by the Free Software Foundation.
 - *
 - *   This program is distributed in the hope that it will be useful,
 - *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 - *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 - *   GNU General Public License for more details.
 - *
 - *   You should have received a copy of the GNU General Public License
 - *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 +/* ownCloud Android Library is available under MIT license
 + *   Copyright (C) 2014 ownCloud (http://www.owncloud.org/)
 + *   Copyright (C) 2012  Bartek Przybylski
 + *   
 + *   Permission is hereby granted, free of charge, to any person obtaining a copy
 + *   of this software and associated documentation files (the "Software"), to deal
 + *   in the Software without restriction, including without limitation the rights
 + *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 + *   copies of the Software, and to permit persons to whom the Software is
 + *   furnished to do so, subject to the following conditions:
 + *   
 + *   The above copyright notice and this permission notice shall be included in
 + *   all copies or substantial portions of the Software.
 + *   
 + *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
 + *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 + *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
 + *   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 
 + *   BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 
 + *   ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
 + *   CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 + *   THE SOFTWARE.
   *
   */
  
@@@ -40,6 -33,7 +40,7 @@@ import org.apache.commons.httpclient.He
  import org.apache.commons.httpclient.HttpException;
  import org.apache.commons.httpclient.HttpStatus;
  import org.apache.jackrabbit.webdav.DavException;
+ import org.json.JSONException;
  
  import com.owncloud.android.oc_framework.accounts.AccountUtils.AccountNotFoundException;
  import com.owncloud.android.oc_framework.network.CertificateCombinedException;
@@@ -58,9 -52,9 +59,9 @@@ import android.util.Log
   * @author David A. Velasco
   */
  public class RemoteOperationResult implements Serializable {
+       
        /** Generated - should be refreshed every time the class changes!! */
-       private static final long serialVersionUID = -2469951225222759283L;
+       private static final long serialVersionUID = -8257349554488668693L;
      
      private static final String TAG = "RemoteOperationResult";
      
              } else if (mException instanceof AccountsException) {
                  return "Exception while using account";
                  
+             } else if (mException instanceof JSONException) {
+               return "JSON exception";
+               
              } else {
                  return "Unexpected exception";
              }