Merge branch 'dev' into pull/austil

pull/87/merge
Alinson S. Xavier 8 years ago
commit cf25229fbc

@ -205,6 +205,7 @@ run_local_tests() {
build_instrumentation_apk
install_test_butler
install_apk
uninstall_test_apk
install_test_apk
run_instrumented_tests
parse_instrumentation_results

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 21 KiB

@ -121,7 +121,7 @@ public class BaseAndroidTest extends TestCase
protected void awaitLatch() throws InterruptedException
{
assertTrue(latch.await(60, TimeUnit.SECONDS));
assertTrue(latch.await(5, TimeUnit.SECONDS));
}
protected void setLocale(@NonNull String language, @NonNull String country)

@ -17,7 +17,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.pebble;
package org.isoron.uhabits.receivers;
import android.content.*;
import android.support.annotation.*;
@ -29,12 +29,13 @@ import com.getpebble.android.kit.util.*;
import org.isoron.uhabits.*;
import org.isoron.uhabits.core.models.*;
import org.isoron.uhabits.receivers.*;
import org.json.*;
import org.junit.*;
import org.junit.runner.*;
import static com.getpebble.android.kit.Constants.*;
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Build.VERSION_CODES.KITKAT;
import static com.getpebble.android.kit.Constants.MSG_DATA;
import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.core.IsEqual.*;
@ -63,6 +64,8 @@ public class PebbleReceiverTest extends BaseAndroidTest
@Test
public void testCount() throws Exception
{
if(SDK_INT <= KITKAT) return;
onPebbleReceived((dict) -> {
assertThat(dict.getString(0), equalTo("COUNT"));
assertThat(dict.getInteger(1), equalTo(2L));
@ -76,6 +79,8 @@ public class PebbleReceiverTest extends BaseAndroidTest
@Test
public void testFetch() throws Exception
{
if(SDK_INT <= KITKAT) return;
onPebbleReceived((dict) -> {
assertThat(dict.getString(0), equalTo("HABIT"));
assertThat(dict.getInteger(1), equalTo(habit2.getId()));

@ -30,6 +30,7 @@ import java.util.*;
import javax.annotation.concurrent.*;
import static java.lang.Math.min;
import static org.isoron.uhabits.core.models.Checkmark.CHECKED_EXPLICITLY;
import static org.isoron.uhabits.core.models.Checkmark.CHECKED_IMPLICITLY;
import static org.isoron.uhabits.core.models.Checkmark.UNCHECKED;
@ -60,8 +61,7 @@ public abstract class CheckmarkList
long today = DateUtils.getStartOfToday();
long begin = reps[0].getTimestamp();
if (intervals.size() > 0)
begin = Long.min(begin, intervals.get(0).begin);
if (intervals.size() > 0) begin = min(begin, intervals.get(0).begin);
int nDays = (int) ((today - begin) / day) + 1;
@ -295,7 +295,7 @@ public abstract class CheckmarkList
final long today = DateUtils.getStartOfToday();
Checkmark newest = getNewestComputed();
if(newest != null && newest.getTimestamp() == today) return;
if (newest != null && newest.getTimestamp() == today) return;
invalidateNewerThan(0);
Repetition oldestRep = habit.getRepetitions().getOldest();

Loading…
Cancel
Save