From c4fcf1a2891d2bd998ae1154222bfc55236fadc7 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Sun, 2 Jun 2013 17:52:27 +0200 Subject: [PATCH] Small code improvements. --- src/com/github/nutomic/controldlna/RendererFragment.java | 2 +- src/com/github/nutomic/controldlna/ServerFragment.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/com/github/nutomic/controldlna/RendererFragment.java b/src/com/github/nutomic/controldlna/RendererFragment.java index 40d1902..7eaff4f 100644 --- a/src/com/github/nutomic/controldlna/RendererFragment.java +++ b/src/com/github/nutomic/controldlna/RendererFragment.java @@ -36,7 +36,7 @@ import com.github.nutomic.controldlna.MainActivity.OnBackPressedListener; */ public class RendererFragment extends ListFragment implements OnBackPressedListener { - private String TAG = "RendererFragment"; + private final String TAG = "RendererFragment"; /** * ListView adapter of media renderers. diff --git a/src/com/github/nutomic/controldlna/ServerFragment.java b/src/com/github/nutomic/controldlna/ServerFragment.java index 5a7b5c3..8a88967 100644 --- a/src/com/github/nutomic/controldlna/ServerFragment.java +++ b/src/com/github/nutomic/controldlna/ServerFragment.java @@ -41,7 +41,9 @@ import com.github.nutomic.controldlna.MainActivity.OnBackPressedListener; */ public class ServerFragment extends ListFragment implements OnBackPressedListener { - private String TAG = "ServerFragment"; + private final String TAG = "ServerFragment"; + + private final String ROOT_DIRECTORY = "0"; /** * ListView adapter for showing a list of DLNA media servers. @@ -202,8 +204,7 @@ public class ServerFragment extends ListFragment implements OnBackPressedListene if (getListAdapter() == mServerAdapter) { setListAdapter(mFileAdapter); mCurrentServer = mServerAdapter.getItem(position); - // Root directory. - getFiles("0"); + getFiles(ROOT_DIRECTORY); } else if (getListAdapter() == mFileAdapter) { if (mFileAdapter.getItem(position) instanceof Container) {