diff options
author | Teddy <ted.sybil@gmail.com> | 2013-08-30 22:48:29 +0800 |
---|---|---|
committer | Teddy <ted.sybil@gmail.com> | 2013-08-30 22:48:29 +0800 |
commit | 29b6f83eca288a1bdc2b5cfcbbd1ae2651b97ae6 (patch) | |
tree | 173a519dbb893170aa4856a727205f0d73b8b2fd /client/Piztor/src/com/macaroon/piztor/Login.java | |
parent | 3054e381a1d384dee4206bfe5646f057bf82446e (diff) | |
parent | 1cc2c0f8319df86602da0ae1eed6456d4ff3b172 (diff) |
Merge branch 'master' of github.com:Determinant/piztor
Diffstat (limited to 'client/Piztor/src/com/macaroon/piztor/Login.java')
-rw-r--r-- | client/Piztor/src/com/macaroon/piztor/Login.java | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/client/Piztor/src/com/macaroon/piztor/Login.java b/client/Piztor/src/com/macaroon/piztor/Login.java index a1a6d0d..533eeac 100644 --- a/client/Piztor/src/com/macaroon/piztor/Login.java +++ b/client/Piztor/src/com/macaroon/piztor/Login.java @@ -4,6 +4,7 @@ import android.annotation.SuppressLint; import android.os.Bundle; import android.os.Handler; import android.os.Message; +import android.util.Log; import android.view.KeyEvent; import android.view.Menu; import android.view.View; @@ -30,20 +31,19 @@ public class Login extends PiztorAct { } if (m.what == 0) { ResLogin res = (ResLogin) m.obj; - if (res.status == 1) { - actMgr.trigger(loginFailed); - return; - } + Log.d(LogInfo.login, LogInfo.s); Infomation.token = res.t; - Infomation.myInfo.uid = res.uid; - Infomation.username = edtUser.getText().toString(); - System.out.println(res.status + " :!!! " + res.type); + Infomation.sublist = res.sublist; + Infomation.username = res.uinfo.username; + Infomation.myInfo = new UserInfo(res.uinfo.uid); + Infomation.myInfo.setInfo(res.uinfo.gid.company, + res.uinfo.gid.section, res.uinfo.sex, + res.uinfo.nickname); + System.out.println("login !!!!" + res.sublist.size()); actMgr.trigger(AppMgr.loginSuccess); - System.out.println("............"); } else { - System.out.println("reveive other info ~~~~~~~~~~~~~~" + m.what); -// System.out.println("login de " + m.what); -// actMgr.trigger(loginFailed); + System.out.println("login handler reveive other info : " + + m.what); } } }; @@ -113,7 +113,10 @@ public class Login extends PiztorAct { @Override protected void onResume() { super.onResume(); - AppMgr.transam.setHandler(handler); + if (AppMgr.transam == null) + Log.d(LogInfo.exception, "transam = null"); + AppMgr.transam.setHandler(handler); + } @Override |