From 337191ff1a8743051a243a4a045a9bdacc8b40b9 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Sat, 19 Dec 2015 09:29:39 +0100 Subject: [PATCH] minor code optimizations --- src/com/owncloud/android/datamodel/OCFile.java | 1 - src/com/owncloud/android/files/FileMenuFilter.java | 1 + .../android/ui/activity/FileDisplayActivity.java | 1 + .../android/ui/fragment/OCFileListFragment.java | 2 -- src/com/owncloud/android/utils/DisplayUtils.java | 13 ------------- 5 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/com/owncloud/android/datamodel/OCFile.java b/src/com/owncloud/android/datamodel/OCFile.java index d2b365119e..2b9bd5e725 100644 --- a/src/com/owncloud/android/datamodel/OCFile.java +++ b/src/com/owncloud/android/datamodel/OCFile.java @@ -31,7 +31,6 @@ import android.webkit.MimeTypeMap; import com.owncloud.android.lib.common.utils.Log_OC; import java.io.File; -import java.util.Enumeration; import third_parties.daveKoeller.AlphanumComparator; public class OCFile implements Parcelable, Comparable { diff --git a/src/com/owncloud/android/files/FileMenuFilter.java b/src/com/owncloud/android/files/FileMenuFilter.java index 9bc7936b8c..e562af0f9a 100644 --- a/src/com/owncloud/android/files/FileMenuFilter.java +++ b/src/com/owncloud/android/files/FileMenuFilter.java @@ -226,6 +226,7 @@ public class FileMenuFilter { } else { toShow.add(R.id.action_unfavorite_file); } + } } diff --git a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java index caa879ebf1..1f08771956 100644 --- a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java +++ b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java @@ -706,6 +706,7 @@ public class FileDisplayActivity extends HookActivity Toast t = Toast.makeText(this, getString(R.string.filedisplay_no_file_selected), Toast.LENGTH_LONG); t.show(); + return; } } diff --git a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java index 8099c7783b..35f085e7b3 100644 --- a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java +++ b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java @@ -27,7 +27,6 @@ import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; -import android.support.v4.content.ContextCompat; import android.support.v4.widget.SwipeRefreshLayout; import android.view.ContextMenu; import android.view.Menu; @@ -58,7 +57,6 @@ import com.owncloud.android.ui.dialog.RenameFileDialogFragment; import com.owncloud.android.ui.preview.PreviewImageFragment; import com.owncloud.android.ui.preview.PreviewMediaFragment; import com.owncloud.android.ui.preview.PreviewTextFragment; -import com.owncloud.android.utils.DisplayUtils; import com.owncloud.android.utils.FileStorageUtils; import java.io.File; diff --git a/src/com/owncloud/android/utils/DisplayUtils.java b/src/com/owncloud/android/utils/DisplayUtils.java index eadeeea2aa..1255400154 100644 --- a/src/com/owncloud/android/utils/DisplayUtils.java +++ b/src/com/owncloud/android/utils/DisplayUtils.java @@ -22,21 +22,9 @@ package com.owncloud.android.utils; -import java.io.File; -import java.net.IDN; -import java.text.DateFormat; -import java.util.Arrays; -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Set; -import java.util.Vector; - import android.annotation.TargetApi; import android.app.Activity; import android.content.Context; -import android.content.SharedPreferences; import android.graphics.Point; import android.graphics.PorterDuff; import android.os.Build; @@ -47,7 +35,6 @@ import android.widget.SeekBar; import com.owncloud.android.MainApp; import com.owncloud.android.R; -import com.owncloud.android.datamodel.FileDataStorageManager; import com.owncloud.android.datamodel.OCFile; import java.math.BigDecimal;