private void logoff() {
    ServiceContainer.getInstance().getSessionService().setLoginUser(null);
    ServiceContainer.getInstance().getSessionService().setSessionID(null);
    ServiceContainer.getInstance()
        .getSessionService()
        .setSessionValue(Constants.SessionKey.THRESHOLD_BREACH, null);
    ServiceContainer.getInstance()
        .getSessionService()
        .setSessionValue(Constants.SessionKey.THRESHOLD_WARNING, null);

    Intent loginIntent = new Intent(Constants.Action.HSINCHUIOT_LOGIN);
    startActivity(loginIntent);
    getActivity().finish();
  }
  private List<Alarm> getSiteAlarms() {
    List<Alarm> result = new ArrayList<Alarm>();
    try {
      String alarmListString =
          ServiceContainer.getInstance()
              .getPerferenceService()
              .getValue(Constants.PreferenceKey.ALARM_LIST);
      StringTokenizer st = new StringTokenizer(alarmListString, "|");
      while (st.hasMoreElements()) {
        String alarmString = st.nextToken();

        Alarm alarm = new Alarm(alarmString);
        result.add(alarm);
      }
    } catch (Exception exp) {
      IOTLog.e("V2AlarmActivity", "Retrieve alarm list failed", exp);
    }

    return result;
  }