import com.yuji.em.utility.BaseActivity;
import com.yuji.em.utility.Debug;
import com.yuji.em.utility.EditPrefUtil;
+import com.yuji.em.utility.Encryption;
public class EverMemoActivity extends BaseActivity {
private EditPrefUtil pref = new EditPrefUtil(this);
private boolean isEmpty = true;
private static boolean isInit = true;
-
+
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
updateList();
setStatus();
+
+ // Encryption en = new Encryption();
+ // String str = "abcdefg";
+ //
+ // String s = en.getEncrypted(this, str);
+ // System.out.println(s);
+ // String ss = en.getDecrypted(this, s);
+ // System.out.println(ss);
}
@Override
- protected void onStart(){
+ protected void onStart() {
super.onStart();
- if (isInit && isEmpty){
- Intent intent = new Intent(this, (Class<?>) SettingActivity.class);
- startActivityForResult(intent, 0);
+ if (isEmpty) {
+ if (isInit) {
+ Intent intent = new Intent(this,
+ (Class<?>) SettingActivity.class);
+ startActivityForResult(intent, 0);
+
+ isInit = false;
+ }
+ else {
+ finish();
+ isInit = true;
+ }
}
- isInit = false;
}
-
+
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
updateList();
updateText();
editText.setEnabled(!isEmpty);
}
-
- public static void init(boolean flag){
- isInit = flag;
+
+ public static void init(boolean flag) {
+ isInit = flag;
}
-
+
}
\ No newline at end of file