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

cleanup + fix lint issues

AndyScherzinger 6 жил өмнө
parent
commit
5ea05288eb

+ 8 - 8
src/main/java/com/owncloud/android/ui/adapter/UserListAdapter.java

@@ -1,27 +1,27 @@
 /*
  * Nextcloud Android client application
  *
+ * @author masensio
  * @author Andy Scherzinger
+ * Copyright (C) 2015 ownCloud GmbH
  * Copyright (C) 2018 Andy Scherzinger
  *
- * 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 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 AFFERO GENERAL PUBLIC LICENSE for more details.
+ * GNU 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/>.
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 package com.owncloud.android.ui.adapter;
 
 import android.accounts.Account;
-import android.app.Activity;
 import android.content.Context;
 import android.graphics.drawable.Drawable;
 import android.support.annotation.NonNull;

+ 2 - 0
src/main/java/com/owncloud/android/ui/helpers/FileOperationsHelper.java

@@ -4,7 +4,9 @@
  * @author masensio
  * @author David A. Velasco
  * @author Juan Carlos González Cabrero
+ * @author Andy Scherzinger
  * Copyright (C) 2015 ownCloud Inc.
+ * Copyright (C) 2018 Andy Scherzinger
  * 
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2,

+ 5 - 1
src/main/java/com/owncloud/android/utils/BitmapUtils.java

@@ -34,7 +34,9 @@ import com.owncloud.android.lib.common.utils.Log_OC;
 
 import org.apache.commons.codec.binary.Hex;
 
+import java.io.UnsupportedEncodingException;
 import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
 import java.util.Locale;
 
 /**
@@ -267,8 +269,10 @@ public class BitmapUtils {
      *
      * @param name The name
      * @return corresponding RGB color
+     * @throws UnsupportedEncodingException if the charset is not supported
+     * @throws NoSuchAlgorithmException     if the specified algorithm is not available
      */
-    public static int[] calculateHSL(String name) {
+    public static int[] calculateHSL(String name) throws UnsupportedEncodingException, NoSuchAlgorithmException {
         // using adapted algorithm from https://github.com/nextcloud/server/blob/master/core/js/placeholder.js#L126
 
         String[] result = new String[]{"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"};

+ 2 - 0
src/main/res/layout/share_file_layout.xml

@@ -169,6 +169,7 @@
                     android:id="@+id/shareViaLinkEditPermissionSection"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
+                    android:visibility="gone"
                     android:layout_marginBottom="@dimen/standard_half_margin"
                     >
 
@@ -202,6 +203,7 @@
                     android:id="@+id/shareViaLinkHideFileListingPermissionSection"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
+                    android:visibility="gone"
                     android:layout_marginBottom="@dimen/standard_half_margin"
                     >
 

+ 0 - 2
src/main/res/values/dims.xml

@@ -101,8 +101,6 @@
     <dimen name="empty_list_icon_layout_height">72dp</dimen>
     <dimen name="empty_list_progress_layout_width">72dp</dimen>
     <dimen name="empty_list_progress_layout_height">72dp</dimen>
-    <dimen name="shared_list_icon_width">14dp</dimen>
-    <dimen name="shared_list_icon_height">14dp</dimen>
     <dimen name="share_no_users_text_size">14sp</dimen>
     <dimen name="file_details_user_icon_layout_width">32dp</dimen>
     <dimen name="file_details_user_icon_layout_height">32dp</dimen>

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

@@ -132,7 +132,6 @@
     <string name="common_error_unknown">Unknown error</string>
     <string name="common_pending">Pending</string>
     <string name="common_delete">Delete</string>
-    <string name="common_share">Share</string>
     <string name="common_send">Send</string>
     <string name="about_title">About</string>
     <string name="delete_account">Remove account</string>
@@ -480,10 +479,6 @@
     <string name="share_with_user_section_title">Share with users and groups</string>
     <string name="share_no_users">No data shared with users yet</string>
     <string name="share_add_user_or_group">Add user or group</string>
-    <string name="share_via_link_menu_permission_label">Permissions (%1$s)</string>
-    <string name="share_via_link_menu_permissions_label">Permissions (%1$s, %2$s)</string>
-    <string name="share_via_link_menu_permissions_read_only_label">read-only</string>
-    <string name="share_via_link_menu_permissions_upload_only_label">upload-only</string>
     <string name="share_via_link_menu_password_label">Password protect (%1$s)</string>
     <string name="share_expiration_date_label">Set expiration date (%1$s)</string>
     <string name="share_via_link_menu_expiration_date_never">never</string>
@@ -508,9 +503,6 @@
     <string name="share_known_remote_clarification">%1$s ( at %2$s )</string>
 
     <string name="share_sharee_unavailable">Upgrade the server version to allow sharing between users from within their clients.\nPlease contact your admin</string>
-    <string name="filedetails_share_link_enable">Share by link enabled</string>
-    <string name="filedetails_share_link_disable">Not shared by link</string>
-    <string name="filedetails_share_users_with_access">Users and groups with access</string>
     <string name="share_privilege_unshare">Unshare</string>
     <string name="share_privilege_can_share">can share</string>
     <string name="share_privilege_can_edit">can edit</string>