@Override
  public List<Index> getAllIndexes() throws DAOException {
    try {
      //            DbxDatastoreStatus status = getDatastore().getSyncStatus();
      //            if (status.hasIncoming || status.isDownloading) {
      //                getDatastore().sync();
      //            }
      List<Index> listIndexes = new ArrayList<Index>();
      List<DbxRecord> tunnelList = mIndexesTable.findAll();
      for (DbxRecord currentIndexRecord : tunnelList) {
        String codigo = currentIndexRecord.getString("ParameterId");
        String key = currentIndexRecord.getString("ParameterFriendlyName");
        String nombre = currentIndexRecord.getString("ParameterName");
        Index newIndex = new Index(codigo, key, nombre);
        listIndexes.add(newIndex);
      }
      Collections.sort(
          listIndexes,
          new Comparator<Index>() {
            @Override
            public int compare(Index lhs, Index rhs) {
              return lhs.getKey().compareTo(rhs.getKey());
            }
          });
      return listIndexes;

      //        } catch (DbxException e) {
    } catch (Exception e) {
      BugSenseHandler.sendException(e);
      Log.e(SkavaConstants.LOG, e.getMessage());
      throw new DAOException(e);
    }
  }
 void updateLevel() {
   // The box should start at 256x256 pixels and shrink by half (in each dimension) at each
   // subsequent level.
   DbxRecord record = getRecord();
   int level = (int) record.getDouble("level");
   float prevD = (float) Math.pow(2, currentLevel);
   float nextD = (float) Math.pow(2, level);
   for (String prop : new String[] {"scaleX", "scaleY"}) {
     ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(box, prop, 1.0f / prevD, 1.0f / nextD);
     objectAnimator.setDuration(100);
     objectAnimator.setInterpolator(new DecelerateInterpolator());
     objectAnimator.start();
   }
   currentLevel = level;
   ((HasHeader) getActivity()).setHeaderText("CTB: LEVEL " + (currentLevel + 1));
 }