添加了tool中多处注释

lhn
Marcus 2 years ago
parent b6330b512e
commit 6fa32305a6

@ -40,9 +40,13 @@ public class BackupUtils {
private static final String TAG = "BackupUtils";
// Singleton stuff
private static BackupUtils sInstance;
/*
* synchronized
* 线线
*/
public static synchronized BackupUtils getInstance(Context context) {
if (sInstance == null) {
//如果当前备份缺失,则重新定义一个
sInstance = new BackupUtils(context);
}
return sInstance;
@ -67,12 +71,16 @@ public class BackupUtils {
private BackupUtils(Context context) {
mTextExport = new TextExport(context);
}
}//构造函数
/*
*
*/
private static boolean externalStorageAvailable() {
return Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState());
}
/*
*
*/
public int exportToText() {
return mTextExport.exportToText();
}
@ -322,7 +330,9 @@ public class BackupUtils {
DateFormat.format(context.getString(R.string.format_date_ymd),
System.currentTimeMillis())));
File file = new File(sb.toString());
/*
*
*/
try {
if (!filedir.exists()) {
filedir.mkdir();

@ -34,10 +34,16 @@ import net.micode.notes.ui.NotesListAdapter.AppWidgetAttribute;
import java.util.ArrayList;
import java.util.HashSet;
/**
*
* 便
*/
public class DataUtils {
public static final String TAG = "DataUtils";
/*
* 便
*/
public static boolean batchDeleteNotes(ContentResolver resolver, HashSet<Long> ids) {
if (ids == null) {
Log.d(TAG, "the ids is null");
@ -50,6 +56,7 @@ public class DataUtils {
ArrayList<ContentProviderOperation> operationList = new ArrayList<ContentProviderOperation>();
for (long id : ids) {
//若发现是根文件则跳过此执行语句
if (id == Notes.ID_ROOT_FOLDER) {
Log.e(TAG, "Don't delete system folder root");
continue;

@ -16,6 +16,9 @@
package net.micode.notes.tool;
/**
* jsonObject
*/
public class GTaskStringUtils {
public final static String GTASK_JSON_ACTION_ID = "action_id";

@ -22,6 +22,10 @@ import android.preference.PreferenceManager;
import net.micode.notes.R;
import net.micode.notes.ui.activities.NotesPreferenceActivity;
/**
*
*
*/
public class ResourceParser {
public static final int YELLOW = 0;

Loading…
Cancel
Save