Ejemplo n.º 1
0
 public static long updateTag(Tag tag) {
   int updateId = -1;
   if (BuildConfig.DEBUG) Log.d("CoCoin", "Manager: Update tag: " + tag.toString());
   updateId = db.updateTag(tag);
   if (updateId == -1) {
     if (BuildConfig.DEBUG) Log.d("CoCoin", "Update the above tag FAIL!");
   } else {
     if (BuildConfig.DEBUG)
       Log.d("CoCoin", "Update the above tag SUCCESSFULLY!" + " - " + updateId);
     for (Tag t : TAGS) {
       if (t.getId() == tag.getId()) {
         t.set(tag);
         break;
       }
     }
     sortTAGS();
   }
   return updateId;
 }