|
|
@ -143,6 +143,9 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
|
|
|
|
|
|
|
|
private static final int SHORTCUT_ICON_TITLE_MAX_LEN = 10;
|
|
|
|
private static final int SHORTCUT_ICON_TITLE_MAX_LEN = 10;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final int REQUEST_SET_PASSCODE = 0;
|
|
|
|
|
|
|
|
private static final int REQUEST_UNLOCK = 1;
|
|
|
|
|
|
|
|
|
|
|
|
public static final String TAG_CHECKED = String.valueOf('\u221A');
|
|
|
|
public static final String TAG_CHECKED = String.valueOf('\u221A');
|
|
|
|
public static final String TAG_UNCHECKED = String.valueOf('\u25A1');
|
|
|
|
public static final String TAG_UNCHECKED = String.valueOf('\u25A1');
|
|
|
|
|
|
|
|
|
|
|
@ -151,6 +154,8 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
private String mUserQuery;
|
|
|
|
private String mUserQuery;
|
|
|
|
private Pattern mPattern;
|
|
|
|
private Pattern mPattern;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean Locked; /* 用以判断是否已解锁 */
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
@ -261,6 +266,12 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mWorkingNote.setOnSettingStatusChangedListener(this);
|
|
|
|
mWorkingNote.setOnSettingStatusChangedListener(this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Locked = mWorkingNote.hasPasscode();//设置便签解锁状态;
|
|
|
|
|
|
|
|
if (intent.hasExtra("lock")) {
|
|
|
|
|
|
|
|
Locked = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -296,6 +307,14 @@ public class NoteEditActivity extends Activity implements OnClickListener,
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
showAlertHeader();
|
|
|
|
showAlertHeader();
|
|
|
|
showTopHeader();
|
|
|
|
showTopHeader();
|
|
|
|
|
|
|
|
//如果设置了密码,启动输入密码页面
|
|
|
|
|
|
|
|
if (mWorkingNote.hasPasscode() && Locked) {
|
|
|
|
|
|
|
|
saveNote();
|
|
|
|
|
|
|
|
Intent intent = new Intent(this,UnlockActivity.class);
|
|
|
|
|
|
|
|
intent.putExtra(Intent.EXTRA_UID, mWorkingNote.getNoteId());
|
|
|
|
|
|
|
|
startActivityForResult(intent,REQUEST_SET_PASSCODE);
|
|
|
|
|
|
|
|
finish();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void showAlertHeader() {
|
|
|
|
private void showAlertHeader() {
|
|
|
|