添加了在私密文件夹把文件移除需要验证密码

master
CYZ 2 years ago
parent 96154bddda
commit 9ef5c8b42e

@ -1,58 +0,0 @@
t
java:S2293b"YReplace the type specification in this constructor call with the diamond operator ("<>").(ÑÓ<C391>¥üÿÿÿÿ
t
java:S2293m"YReplace the type specification in this constructor call with the diamond operator ("<>").(®ú÷õþÿÿÿÿ
t
java:S2293v"YReplace the type specification in this constructor call with the diamond operator ("<>").(êÝýÂþÿÿÿÿ
o
java:S2293~"YReplace the type specification in this constructor call with the diamond operator ("<>").(À—’¢
u
java:S2293Å"YReplace the type specification in this constructor call with the diamond operator ("<>").(˜Áê¸ùÿÿÿÿ
p
java:S2293Í"YReplace the type specification in this constructor call with the diamond operator ("<>").(艥ð
l java:S117Â"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ñ¶¸“øÿÿÿÿ
g java:S117Ä"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(›Ûñ¨
g java:S117Ó"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ä›áí
l java:S117á"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ÀÇϯüÿÿÿÿ
l java:S117â"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(¦°²¥øÿÿÿÿ
D
java:S1604Œ"(Make this anonymous inner class a lambda(×îðóÿÿÿÿÿ
D
java:S1604Ö"(Make this anonymous inner class a lambda(ˆÐï<C390>øÿÿÿÿ
?
java:S1604Ý"(Make this anonymous inner class a lambda(øÄì‡
?
java:S1604"(Make this anonymous inner class a lambda(ά¯”
?
java:S1604Ü"(Make this anonymous inner class a lambda(××ß’
q
java:S1104Y"VMake tvModified a static final constant or non-public and provide accessors if needed.(ƒëÔ£ÿÿÿÿÿ
r
java:S1104["WMake ivAlertIcon a static final constant or non-public and provide accessors if needed.(ªà¶±ûÿÿÿÿ
r
java:S1104]"WMake tvAlertDate a static final constant or non-public and provide accessors if needed.(“²<E2809C>Öúÿÿÿÿ
s
java:S1104_"XMake ibSetBgColor a static final constant or non-public and provide accessors if needed.(ýãä¬üÿÿÿÿ
O
java:S3516<18>"9Refactor this method to not always return the same value.(™Æl
n
java:S1450£"WRemove the "mPattern" field and declare it as a local variable in the relevant methods.(©´ÖÛ
n
java:S3776Ã"RRefactor this method to reduce its Cognitive Complexity from 26 to the 15 allowed.(ݨÁ±øÿÿÿÿ
K
java:S2864¥"4Iterate over the "entrySet" instead of the "keySet".(­Ô‡ï
N
java:S1135±"2Complete the task associated to this TODO comment.(Ùü§“ýÿÿÿÿ
8
java:S1116Å"Remove this empty statement.(ôŸŽìúÿÿÿÿ
X
java:S1126ò"AReplace this if-then-else statement by a single return statement.(®ÎÚÉ
8
java:S1116ž"Remove this empty statement.(ôŸŽìúÿÿÿÿ
F
java:S2093©"*Change this "try" to a try-with-resources.(¡»¢üùÿÿÿÿ
I
java:S1874ñ"-Remove this use of "speak"; it is deprecated.(ÈÙ߉ÿÿÿÿÿ
d
java:S3252Ð"MUse static access with "android.text.Spanned" for "SPAN_INCLUSIVE_EXCLUSIVE".(ŸÍÃó

@ -1,102 +0,0 @@
\ java:S112ž"FDefine and throw a dedicated exception instead of using a generic one.(ˆ¥ÉÎ
p
java:S2293Œ"YReplace the type specification in this constructor call with the diamond operator ("<>").(艥ð
d
java:S1192Ò"NDefine a constant instead of duplicating this literal "if_create.txt" 3 times.(̬²
l java:S117§"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(”…ë<E280A6>ÿÿÿÿÿ
g java:S117â"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ä›áí
l java:S117ç"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ŽßÎþûÿÿÿÿ
l java:S117é"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ÀÇϯüÿÿÿÿ
l java:S117ô"QRename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(¦°²¥øÿÿÿÿ
>
java:S1604Œ"(Make this anonymous inner class a lambda(—̺V
?
java:S1604Ñ"(Make this anonymous inner class a lambda(ά¯”
?
java:S1604È"(Make this anonymous inner class a lambda(¿Ü´ã
D
java:S1604ä"(Make this anonymous inner class a lambda(ˆÐï<C390>øÿÿÿÿ
?
java:S1604ì"(Make this anonymous inner class a lambda(øÄì‡
?
java:S1604Ù"(Make this anonymous inner class a lambda(Û±¼ 
?
java:S1604þ"(Make this anonymous inner class a lambda(ά¯”
D
java:S1604Ü"(Make this anonymous inner class a lambda(ˆÐï<C390>øÿÿÿÿ
?
java:S1604ä"(Make this anonymous inner class a lambda(øÄì‡
g
java:S1301¼"KReplace this "switch" statement by "if" statements to increase readability.(ד¾ñùÿÿÿÿ
e
java:S2095Ÿ"NUse try-with-resources or close this "FileOutputStream" in a "finally" clause.(á©Úî
N
java:S2589¡"7Remove this expression which always evaluates to "true"(åÄ…©
o java:S116w"ZRename this field "if_first_create" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(ݥ÷
t
java:S1450w"^Remove the "if_first_create" field and declare it as a local variable in the relevant methods.(ݥ÷
7
java:S1116e"Remove this empty statement.(ôŸŽìúÿÿÿÿ
a
java:S1124Ž"EReorder the modifiers to comply with the Java Language Specification.(¹úæµûÿÿÿÿ
[
java:S1124<18>"EReorder the modifiers to comply with the Java Language Specification.(ìѾk
n
java:S3776§"RRefactor this method to reduce its Cognitive Complexity from 17 to the 15 allowed.(áé–Þÿÿÿÿÿ
2
java:S3626¸"Remove this redundant jump.(ûÁÝ…
2
java:S3626¼"Remove this redundant jump.(ûÁÝ…
2
java:S3626Ð"Remove this redundant jump.(ûÁÝ…
N
java:S1135Â"2Complete the task associated to this TODO comment.(ÕÌ<C395>®þÿÿÿÿ
F
java:S2093¬"*Change this "try" to a try-with-resources.(¡»¢üùÿÿÿÿ
o
java:S1450ô"XRemove the "mMoveMenu" field and declare it as a local variable in the relevant methods.(ž¢—ò
n
java:S3252ñ"RUse static access with "android.widget.AbsListView" for "MultiChoiceModeListener".(¦Ûî„úÿÿÿÿ
N
java:S1135©"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
N
java:S1135®"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
M
java:S1874ê"1Remove this use of "getHeight"; it is deprecated.(·¡ªÃýÿÿÿÿ
8
java:S1116 "Remove this empty statement.(ôŸŽìúÿÿÿÿ
i
java:S3776á"RRefactor this method to reduce its Cognitive Complexity from 20 to the 15 allowed.(ãìîí
? java:S108è")Either remove or fill this block of code.(žûÊ¥
h
java:S3776Ñ"RRefactor this method to reduce its Cognitive Complexity from 17 to the 15 allowed.(ÅôÉ#
N
java:S1135"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
^
java:S1126š"BReplace this if-then-else statement by a single method invocation.(玒¦ýÿÿÿÿ
N
java:S1135¢"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
e
java:S1871»"IThis case's code block is the same as the block for the case on line 683.(øì´÷ûÿÿÿÿ
i java:S100¦"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(µñü‚øÿÿÿÿ
F
java:S2093ª"*Change this "try" to a try-with-resources.(¡»¢üùÿÿÿÿ
d java:S100Â"NRename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.(©¸˜Á
W java:S125Ô"<This block of commented-out lines of code should be removed.(Óä§Çúÿÿÿÿ
W java:S125ƒ"<This block of commented-out lines of code should be removed.(Ó”©Öøÿÿÿÿ
R java:S125"<This block of commented-out lines of code should be removed.(¾è–á
N
java:S1135"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
N
java:S1135"2Complete the task associated to this TODO comment.(» æžÿÿÿÿÿ
h
java:S3776Ÿ"RRefactor this method to reduce its Cognitive Complexity from 28 to the 15 allowed.(ôŒùb
G
java:S3398¡"0Move this method into "OnListItemClickListener".(‘ðð¡
K
java:S3398Ã"/Move this method into "BackgroundQueryHandler".(—÷õŽüÿÿÿÿ
A
java:S3398×"%Move this method into "ModeCallback".(“ðÉçýÿÿÿÿ
<
java:S3398á"%Move this method into "ModeCallback".(ãìîí

@ -1,4 +1,4 @@
#Wed Oct 19 16:06:13 CST 2022
#Wed Oct 19 20:18:10 CST 2022
base.0=D\:\\MiNote_maintain\\new_MiCode\\src\\Notes1\\app\\build\\intermediates\\dex\\debug\\mergeDexDebug\\classes.dex
renamed.0=classes.dex
path.0=classes.dex

@ -658,7 +658,6 @@ public class NoteEditActivity extends Activity implements OnClickListener,
//显示软件盘
showSoftInput();
builder.setTitle("enter the password");
final Dialog enter_password_dialog = builder.setView(view).show();
builder.setPositiveButton(android.R.string.ok, null);
//设置取消按钮监听
builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
@ -666,6 +665,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
hideSoftInput(etpassword);
}
});
final Dialog enter_password_dialog = builder.setView(view).show();
//显示输入框控件
final Button positive = (Button)enter_password_dialog.findViewById(android.R.id.button1);
positive.setOnClickListener(new OnClickListener() {
@ -757,7 +757,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
/**
* Share note to apps that support {@link Intent#ACTION_SEND} action
* and {@text/plain} type
* and type
*/
private void sendTo(Context context, String info) {
Intent intent = new Intent(Intent.ACTION_SEND);
@ -780,7 +780,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
private void deleteCurrentNote() {
if (mWorkingNote.existInDatabase()) {
HashSet<Long> ids = new HashSet<Long>();
HashSet<Long> ids = new HashSet<>();
long id = mWorkingNote.getNoteId();
if (id != Notes.ID_ROOT_FOLDER) {
ids.add(id);

@ -457,15 +457,29 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
public void onClick(DialogInterface dialog, int which) {
//执行移动操作
DataUtils.batchMoveToFolder(mContentResolver,
mNotesListAdapter.getSelectedItemIds(), adapter.getItemId(which));
Toast.makeText(
NotesListActivity.this,
getString(R.string.format_move_notes_to_folder,
mNotesListAdapter.getSelectedCount(),
adapter.getFolderName(NotesListActivity.this, which)),
Toast.LENGTH_SHORT).show();
mModeCallBack.finishActionMode();
if (mCurrentFolderId != 12) {
DataUtils.batchMoveToFolder(mContentResolver,
mNotesListAdapter.getSelectedItemIds(), adapter.getItemId(which));
Toast.makeText(
NotesListActivity.this,
getString(R.string.format_move_notes_to_folder,
mNotesListAdapter.getSelectedCount(),
adapter.getFolderName(NotesListActivity.this, which)),
Toast.LENGTH_SHORT).show();
mModeCallBack.finishActionMode();
}else{
if (varifyPassword()){
DataUtils.batchMoveToFolder(mContentResolver,
mNotesListAdapter.getSelectedItemIds(), adapter.getItemId(which));
Toast.makeText(
NotesListActivity.this,
getString(R.string.format_move_notes_to_folder,
mNotesListAdapter.getSelectedCount(),
adapter.getFolderName(NotesListActivity.this, which)),
Toast.LENGTH_SHORT).show();
mModeCallBack.finishActionMode();
}
}
}
});
builder.show();
@ -967,6 +981,40 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
mTitleBar.setVisibility(View.VISIBLE);
}
private static boolean if_correct = false;
private boolean varifyPassword(){
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
//输入框控件实例化
View view = LayoutInflater.from(this).inflate(R.layout.password, null);
final EditText etpassword = (EditText) view.findViewById(R.id.et_PF_password);
//显示软件盘
showSoftInput();
builder.setTitle("set the password for the Private Folder");
builder.setPositiveButton(android.R.string.ok, null);
//设置取消按钮监听
builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
hideSoftInput(etpassword);
}
});
//显示输入框控件
final Dialog enter_password_dialog = builder.setView(view).show();
final Button positive = (Button)enter_password_dialog.findViewById(android.R.id.button1);
positive.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
hideSoftInput(etpassword);
//提取出输入的文本
String entered_password = etpassword.getText().toString();
String saved_password=load("data.txt");
if(entered_password.equals(saved_password))
if_correct = true;
enter_password_dialog.dismiss();
}
});
return if_correct;
}
private void enterPrivateFolder(String create){
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
@ -1018,36 +1066,9 @@ public class NotesListActivity extends Activity implements OnClickListener, OnIt
Toast.makeText(NotesListActivity.this, "Wrong Password", Toast.LENGTH_LONG).show();
}
}
enter_password_dialog.dismiss();
}
});
//如果文本内是空的禁止按下positive键
/*if (TextUtils.isEmpty(etpassword.getText())) {
positive.setEnabled(false);
}*/
/*etpassword.addTextChangedListener(new TextWatcher() {
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
// TODO Auto-generated method stub
}
public void onTextChanged(CharSequence s, int start, int before, int count) {
if (TextUtils.isEmpty(etName.getText())) {
positive.setEnabled(false);
} else {
positive.setEnabled(true);
}
}
public void afterTextChanged(Editable s) {
// TODO Auto-generated method stub
}
});*/
}
private class OnListItemClickListener implements OnItemClickListener {

Loading…
Cancel
Save