@@ -492,6 +492,11 @@ private Cursor rawQuery(String sql, String[] args, CancellationSignal cancellati
492492 * <p>
493493 * While updating, the database can still be queried for data, after the update completes calls to the database
494494 * return the updated data.
495+ *
496+ * Note that database updates are usually very cheap and do not transmit data that is already on your device.
497+ *
498+ * If the database is not present or schematic changes are done that can not be resolved via a delta update
499+ * a full update is needed.
495500 */
496501 public void update () {
497502 update (null );
@@ -506,6 +511,11 @@ public void update() {
506511 * While updating, the database can still be queried for data, after the update completes calls to the database
507512 * return the updated data.
508513 *
514+ * Note that database updates are usually very cheap and do not transmit data that is already on your device.
515+ *
516+ * If the database is not present or schematic changes are done that can not be resolved via a delta update
517+ * a full update is needed.
518+ *
509519 * @param callback A {@link UpdateCallback} that returns success when the operation is successfully completed.
510520 * Or error() in case a network error occurred.
511521 */
@@ -522,6 +532,11 @@ public void update(final UpdateCallback callback) {
522532 * While updating, the database can still be queried for data, after the update completes calls to the database
523533 * return the updated data.
524534 *
535+ * Note that database updates are usually very cheap and do not transmit data that is already on your device.
536+ *
537+ * If the database is not present or schematic changes are done that can not be resolved via a delta update
538+ * a full update is needed.
539+ *
525540 * @param callback A {@link UpdateCallback} that returns success when the operation is successfully completed.
526541 * Or error() in case a network error occurred. Can be null.
527542 * @param deltaUpdateOnly set to true if you want to only update when the update would be an delta update
@@ -869,7 +884,7 @@ public boolean isUpToDate() {
869884 if (lastUpdateDate != null ) {
870885 long time = lastUpdateDate .getTime ();
871886 long currentTime = new Date ().getTime ();
872- long t = time + TimeUnit . HOURS . toMillis ( 1 ) ;
887+ long t = time + Snabble . getInstance (). getConfig (). productDbValidityTimeMs ;
873888 return t > currentTime ;
874889 }
875890
0 commit comments