| | |
| | | import android.widget.ImageView; |
| | | |
| | | import com.basic.security.base.BaseApplication; |
| | | import com.basic.security.fragment.AccountSettingFragment; |
| | | import com.basic.security.manager.AccountManager; |
| | | import com.basic.security.fragment.UserFragment; |
| | | import com.basic.security.manager.BaseSettingManager; |
| | | import com.basic.security.manager.DetectResultManager; |
| | | import com.basic.security.manager.FaceTitleAndTipsManager; |
| | | import com.basic.security.manager.HintDoorAccessManager; |
| | | import com.basic.security.manager.PersonIdentityManager; |
| | | import com.basic.security.manager.UserManager; |
| | | import com.basic.security.model.ModelAdapter; |
| | | import com.basic.security.model.Person; |
| | | import com.basic.security.utils.Constants; |
| | |
| | | |
| | | public class CurrentBasePersonList extends CurrentBaseSignUp { |
| | | protected boolean adminLogin1(ModelAdapter person) { |
| | | AccountManager.loginPerson = person; |
| | | UserManager.loginPerson = person; |
| | | // SystemInitManager.showSecondDisplay(mainActivity()); |
| | | ToastUtil.show("管理员登入成功!"); |
| | | activity.runOnUiThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | AccountManager.setAdminId(currentCompareFeatureResult.personId); |
| | | UserManager.setAdminId(currentCompareFeatureResult.personId); |
| | | try { |
| | | ImageView login_photo = BaseApplication.getApplication().activity.fragment_toolbar.login_photo; |
| | | login_photo.setImageResource(com.basic.security.utils.RUtils.R_drawable_yuyin); |
| | | AccountManager.setIsBasic(false); |
| | | UserManager.setIsBasic(false); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | if (Constants.indoorOutdoorInOne) { |
| | | // doorAccessS(); |
| | | String denyMessage = HintDoorAccessManager.getNoRegisterHint(); |
| | | // System.out.println("CurrentBasePersonList.doShowFragment denyMessage="+denyMessage); |
| | | // System1.out.println("CurrentBasePersonList.doShowFragment denyMessage="+denyMessage); |
| | | currentFaceTitleAndTipsS.faceTitle(denyMessage); |
| | | currentFaceTitleAndTipsS.faceTitle2(denyMessage, true); |
| | | setDoorAccessMessageS1(denyMessage); |
| | |
| | | setDoorAccessMessage1(denyMessage); |
| | | } |
| | | if (currentFacePosition.detectScoreCanSignUp()) { |
| | | // System.out.println("CurrentBasePersonList.doShowFragment currentFacePosition.detectScoreCanSignUp()=true"); |
| | | // System1.out.println("CurrentBasePersonList.doShowFragment currentFacePosition.detectScoreCanSignUp()=true"); |
| | | addToNeedSignUpPersonList(); |
| | | } else { |
| | | if (activity.currentFragment == activity.fragment_su_auto_wait_face || |
| | |
| | | currentFaceTitleAndTips.tipsTxt = ""; |
| | | currentFaceTitleAndTipsS.tipsTxt = ""; |
| | | } |
| | | if (activity.currentFragment == activity.fragment_account_setting) { |
| | | if (AccountSettingFragment.isChangePhoto) { |
| | | if (activity.currentFragment == activity.fragment_user) { |
| | | if (UserFragment.isChangePhoto) { |
| | | ToastUtil.show("此人已被注册,不能设置为系统管理员头像"); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | printFacePositionList(); |
| | | if (AccountManager.adminLoggedIn()) { |
| | | if (UserManager.adminLoggedIn()) { |
| | | if (needSignUpPersonList.size() > 0) { |
| | | if (!BaseSettingManager.isDoorAccessOnlyMode()) { |
| | | signUpPerson(); |
| | | } |
| | | } |
| | | } |
| | | if (!AccountManager.adminLoggedIn()) { |
| | | if (!UserManager.adminLoggedIn()) { |
| | | if (Constants.indoorOutdoorInOne) { |
| | | if (currentPerson != null && activity.currentFragment == activity.fragment_admin_password_login) { |
| | | List<String> identityNameByPersonId = PersonIdentityManager.findIdentityNameByPersonId(currentPerson.getId()); |