mirror of
https://github.com/nextcloud/android.git
synced 2024-11-29 02:38:58 +03:00
Fix codacy issues
This commit is contained in:
parent
b5bf9200a9
commit
7ccac590f0
3 changed files with 36 additions and 47 deletions
|
@ -73,27 +73,27 @@ public class UserInfoActivity extends FileActivity {
|
|||
private static final int KEY_DELETE_CODE = 101;
|
||||
|
||||
@BindView(R.id.generic_rv)
|
||||
RecyclerView genericRecyclerView;
|
||||
public RecyclerView genericRecyclerView;
|
||||
|
||||
@BindView(R.id.multi_view)
|
||||
RelativeLayout multiView;
|
||||
public RelativeLayout multiView;
|
||||
@BindView(R.id.empty_list_view)
|
||||
LinearLayout multiListContainer;
|
||||
public LinearLayout multiListContainer;
|
||||
@BindView(R.id.empty_list_view_text)
|
||||
TextView multiListMessage;
|
||||
public TextView multiListMessage;
|
||||
@BindView(R.id.empty_list_view_headline)
|
||||
TextView multiListHeadline;
|
||||
public TextView multiListHeadline;
|
||||
@BindView(R.id.empty_list_icon)
|
||||
ImageView multiListIcon;
|
||||
public ImageView multiListIcon;
|
||||
@BindView(R.id.empty_list_progress)
|
||||
ProgressBar multiListProgressBar;
|
||||
public ProgressBar multiListProgressBar;
|
||||
|
||||
@BindString(R.string.preview_sorry)
|
||||
String sorryMessage;
|
||||
public String sorryMessage;
|
||||
|
||||
RecyclerView.LayoutManager layoutManager;
|
||||
private RecyclerView.LayoutManager layoutManager;
|
||||
|
||||
RecyclerView.Adapter adapter;
|
||||
private RecyclerView.Adapter adapter;
|
||||
|
||||
private Unbinder unbinder;
|
||||
|
||||
|
@ -174,6 +174,7 @@ public class UserInfoActivity extends FileActivity {
|
|||
break;
|
||||
default:
|
||||
retval = super.onOptionsItemSelected(item);
|
||||
break;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
* @author Mario Danic
|
||||
* Copyright (C) 2017 Mario Danic
|
||||
* Copyright (C) 2017 Nextcloud GmbH.
|
||||
*
|
||||
* <p>
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* at your option) any later version.
|
||||
*
|
||||
* <p>
|
||||
* 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.
|
||||
*
|
||||
* <p>
|
||||
* 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/>.
|
||||
*/
|
||||
|
@ -100,9 +100,9 @@ public class UserInfoAdapter extends RecyclerView.Adapter<UserInfoAdapter.ViewHo
|
|||
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
@BindView(R.id.attribute_headline_tv)
|
||||
TextView attributeHeadlineTextView;
|
||||
public TextView attributeHeadlineTextView;
|
||||
@BindView(R.id.attribute_value_tv)
|
||||
TextView attributeValueTextView;
|
||||
public TextView attributeValueTextView;
|
||||
|
||||
public ViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
|
@ -111,46 +111,34 @@ public class UserInfoAdapter extends RecyclerView.Adapter<UserInfoAdapter.ViewHo
|
|||
}
|
||||
|
||||
private void getRelevantInformation() {
|
||||
if (!TextUtils.isEmpty(userInfo.getDisplayName())) {
|
||||
if (context != null) {
|
||||
stringPairs.add(new StringPair(context.getResources().getString(R.string.user_info_full_name),
|
||||
userInfo.getDisplayName()));
|
||||
}
|
||||
if (!TextUtils.isEmpty(userInfo.getDisplayName()) && context != null) {
|
||||
stringPairs.add(new StringPair(context.getResources().getString(R.string.user_info_full_name),
|
||||
userInfo.getDisplayName()));
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty((userInfo.getEmail()))) {
|
||||
if (context != null) {
|
||||
stringPairs.add(new StringPair(context.getResources().getString(R.string.user_info_email),
|
||||
userInfo.getEmail()));
|
||||
}
|
||||
if (!TextUtils.isEmpty((userInfo.getEmail())) && context != null) {
|
||||
stringPairs.add(new StringPair(context.getResources().getString(R.string.user_info_email),
|
||||
userInfo.getEmail()));
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(userInfo.getPhone())) {
|
||||
if (context != null) {
|
||||
stringPairs.add(new StringPair(context.getResources().getString(R.string.user_info_phone),
|
||||
userInfo.getPhone()));
|
||||
}
|
||||
if (!TextUtils.isEmpty(userInfo.getPhone()) && context != null) {
|
||||
stringPairs.add(new StringPair(context.getResources().getString(R.string.user_info_phone),
|
||||
userInfo.getPhone()));
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(userInfo.getAddress())) {
|
||||
if (context != null) {
|
||||
stringPairs.add(new StringPair(context.getResources().getString(R.string.user_info_address),
|
||||
userInfo.getAddress()));
|
||||
}
|
||||
if (!TextUtils.isEmpty(userInfo.getAddress()) && context != null) {
|
||||
stringPairs.add(new StringPair(context.getResources().getString(R.string.user_info_address),
|
||||
userInfo.getAddress()));
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(userInfo.getWebpage())) {
|
||||
if (context != null) {
|
||||
stringPairs.add(new StringPair(context.getResources().getString(R.string.user_info_website),
|
||||
userInfo.getWebpage()));
|
||||
}
|
||||
if (!TextUtils.isEmpty(userInfo.getWebpage()) && context != null) {
|
||||
stringPairs.add(new StringPair(context.getResources().getString(R.string.user_info_website),
|
||||
userInfo.getWebpage()));
|
||||
}
|
||||
|
||||
if (!TextUtils.isEmpty(userInfo.getTwitter())) {
|
||||
if (context != null) {
|
||||
stringPairs.add(new StringPair(context.getResources().getString(R.string.user_info_twitter),
|
||||
userInfo.getTwitter()));
|
||||
}
|
||||
if (!TextUtils.isEmpty(userInfo.getTwitter()) && context != null) {
|
||||
stringPairs.add(new StringPair(context.getResources().getString(R.string.user_info_twitter),
|
||||
userInfo.getTwitter()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ import android.os.Handler;
|
|||
import android.os.IBinder;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.graphics.drawable.DrawableCompat;
|
||||
import android.util.Log;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
|
@ -56,7 +55,6 @@ import com.owncloud.android.utils.DisplayUtils;
|
|||
|
||||
import org.parceler.Parcels;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -147,6 +145,8 @@ public class ManageAccountsActivity extends FileActivity
|
|||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue