|
|
@ -155,14 +155,14 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
private Pattern mPattern;
|
|
|
|
private Pattern mPattern;
|
|
|
|
|
|
|
|
|
|
|
|
private boolean Locked; /* 用以判断是否已解锁 */
|
|
|
|
private boolean Locked; /* 用以判断是否已解锁 */
|
|
|
|
private boolean verified = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static Activity NoteEditActivity;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
this.setContentView(R.layout.note_edit);
|
|
|
|
this.setContentView(R.layout.note_edit);
|
|
|
|
|
|
|
|
NoteEditActivity = this;
|
|
|
|
if (savedInstanceState == null && !initActivityState(getIntent())) {
|
|
|
|
if (savedInstanceState == null && !initActivityState(getIntent())) {
|
|
|
|
finish();
|
|
|
|
finish();
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -273,10 +273,6 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
if (intent.hasExtra("lock")) {
|
|
|
|
if (intent.hasExtra("lock")) {
|
|
|
|
Locked = false;
|
|
|
|
Locked = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (intent.hasExtra("verified")){
|
|
|
|
|
|
|
|
verified = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -575,6 +571,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case R.id.menu_set_star:
|
|
|
|
case R.id.menu_set_star:
|
|
|
|
mWorkingNote.setStar(mWorkingNote.getStarId()==1? "0" : "1");
|
|
|
|
mWorkingNote.setStar(mWorkingNote.getStarId()==1? "0" : "1");
|
|
|
|
|
|
|
|
System.out.println(mWorkingNote.hasPasscode());
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
//设置密码
|
|
|
|
//设置密码
|
|
|
|
case R.id.menu_set_passcode:
|
|
|
|
case R.id.menu_set_passcode:
|
|
|
@ -582,6 +579,7 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
//删除密码
|
|
|
|
//删除密码
|
|
|
|
case R.id.menu_delete_passcode:
|
|
|
|
case R.id.menu_delete_passcode:
|
|
|
|
|
|
|
|
System.out.println(mWorkingNote.hasPasscode());
|
|
|
|
deletePasscode();
|
|
|
|
deletePasscode();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case R.id.menu_delete:
|
|
|
|
case R.id.menu_delete:
|
|
|
@ -953,7 +951,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
Intent intent = new Intent(this,DeletePasscodeActivity.class);
|
|
|
|
Intent intent = new Intent(this,DeletePasscodeActivity.class);
|
|
|
|
intent.putExtra(Intent.EXTRA_UID, mWorkingNote.getNoteId());
|
|
|
|
intent.putExtra(Intent.EXTRA_UID, mWorkingNote.getNoteId());
|
|
|
|
startActivity(intent);
|
|
|
|
startActivity(intent);
|
|
|
|
finish();
|
|
|
|
//finish();
|
|
|
|
|
|
|
|
saveNote();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
saveNote();
|
|
|
|
saveNote();
|
|
|
|
}
|
|
|
|
}
|
|
|
|