* Copyright (C) 2012-2013 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
+ * it under the terms of the GNU General Public License version 2,
+ * as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
-import android.util.Log;
import android.util.SparseBooleanArray;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.ListView;
+import com.owncloud.android.Log_OC;
import com.owncloud.android.R;
/**
*/
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
- Log.i(TAG, "onCreateView() start");
+ Log_OC.i(TAG, "onCreateView() start");
View v = super.onCreateView(inflater, container, savedInstanceState);
getListView().setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
- Log.i(TAG, "onCreateView() end");
+ Log_OC.i(TAG, "onCreateView() end");
return v;
}
*/
@Override
public void onActivityCreated(Bundle savedInstanceState) {
- Log.i(TAG, "onActivityCreated() start");
+ Log_OC.i(TAG, "onActivityCreated() start");
super.onCreate(savedInstanceState);
mAdapter = new LocalFileListAdapter(mContainerActivity.getInitialDirectory(), getActivity());
setListAdapter(mAdapter);
if (savedInstanceState != null) {
- Log.i(TAG, "savedInstanceState is not null");
+ Log_OC.i(TAG, "savedInstanceState is not null");
int position = savedInstanceState.getInt(SAVED_LIST_POSITION);
setReferencePosition(position);
}
- Log.i(TAG, "onActivityCreated() stop");
+ Log_OC.i(TAG, "onActivityCreated() stop");
}
@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
- Log.i(TAG, "onSaveInstanceState() start");
+ Log_OC.i(TAG, "onSaveInstanceState() start");
savedInstanceState.putInt(SAVED_LIST_POSITION, getReferencePosition());
- Log.i(TAG, "onSaveInstanceState() stop");
+ Log_OC.i(TAG, "onSaveInstanceState() stop");
}
}
} else {
- Log.w(TAG, "Null object in ListAdapter!!");
+ Log_OC.w(TAG, "Null object in ListAdapter!!");
}
}
/**
* Lists the given directory on the view. When the input parameter is null,
- * it will either refresh the last known directory, or list the root
+ * it will either refresh the last known directory. list the root
* if there never was a directory.
*
* @param directory Directory to be listed
// if that's not a directory -> List its parent
if(!directory.isDirectory()){
- Log.w(TAG, "You see, that is not a directory -> " + directory.toString());
+ Log_OC.w(TAG, "You see, that is not a directory -> " + directory.toString());
directory = directory.getParentFile();
}
String [] result = null;
SparseBooleanArray positions = mList.getCheckedItemPositions();
if (positions.size() > 0) {
- Log.d(TAG, "Returning " + positions.size() + " selected files");
+ Log_OC.d(TAG, "Returning " + positions.size() + " selected files");
result = new String[positions.size()];
for (int i=0; i<positions.size(); i++) {
result[i] = ((File) mList.getItemAtPosition(positions.keyAt(i))).getAbsolutePath();