Small code improvements.

This commit is contained in:
Felix Ableitner 2013-06-02 17:52:27 +02:00
parent 063159b800
commit c4fcf1a289
2 changed files with 5 additions and 4 deletions

View file

@ -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.

View file

@ -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) {