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