Small code improvements.
This commit is contained in:
parent
063159b800
commit
c4fcf1a289
2 changed files with 5 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -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) {
|
||||
|
|
Reference in a new issue