Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating forked dev #1

Merged
merged 148 commits into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
f88f1cf
Improve NumberPicker usage in numerical habits
hiqua Aug 22, 2021
1d37ce5
Focus fractional part after entering a decimal separator
hiqua Sep 4, 2021
de9ad6d
Deleted some old .png icons
kalina559 Sep 6, 2021
736bb8a
Added new .svg icons
kalina559 Sep 6, 2021
f16f919
Resolved naming issue
kalina559 Sep 6, 2021
5f8187e
Replaced some more .png icons with vector assets
kalina559 Sep 6, 2021
576ad04
Deleted edit icon
kalina559 Sep 8, 2021
27e76c7
New edit icon
kalina559 Sep 8, 2021
5cb2414
Corrected the dark theme icon color
kalina559 Sep 8, 2021
6e7ad32
Added copyright notice
kalina559 Sep 8, 2021
1f763fe
Removed .png icons
kalina559 Sep 8, 2021
3e20fc4
Added new .svg icons
kalina559 Sep 8, 2021
42f6125
Removed last .png icons
kalina559 Sep 8, 2021
056f5f6
Added last .svg icons
kalina559 Sep 8, 2021
f119cbf
Added copyright notice
kalina559 Sep 8, 2021
0e988e7
Merge pull request #1082 from hiqua/improve_number_picker
iSoron Sep 11, 2021
cf682f6
Dialog's positive button has bigger font size now (#1096)
kalina559 Sep 11, 2021
a55f467
Minor changes to ic_colorpicker_swatch_selected
iSoron Sep 11, 2021
2ab6c39
Merge pull request #1100 from kalina559/vector_drawables
iSoron Sep 11, 2021
804edfa
Implement numerical habits with AT_MOST target type
Sep 11, 2021
697fffb
fix tests
Sep 12, 2021
1a56260
add more tests for AT_MOST
Sep 12, 2021
113a502
Simplify the code
Sep 12, 2021
fe1d5c6
fix bug in history card
Sep 12, 2021
65d2372
simplify scoring code
Sep 12, 2021
9d3c63c
Removes JVM dependencies from StringUtils
sgallese Sep 19, 2021
b2951a3
Place MidnightTimer under test
sgallese Sep 19, 2021
1fe3a3d
Merge pull request #1107 from sgallese/feature/string-utils-remove-jvm
iSoron Sep 22, 2021
3e6a918
Code review- keep timer offset to one second
sgallese Sep 22, 2021
a29943e
Simplify midnight timer interface for testing
sgallese Sep 22, 2021
508200a
Format classes with ktlint
sgallese Sep 22, 2021
4355fb4
start score from 1.0 for at most and reflect the same in history
Sep 22, 2021
17ed85f
fix test
Sep 22, 2021
7de94f2
Add border to create habit buttons
Sep 22, 2021
4aebeed
Finish intro when skipped pressed
sgallese Sep 23, 2021
c79d1e8
Update AppIntro to latest version
sgallese Sep 23, 2021
bb0b5e8
Merge pull request #1113 from KristianTashkov/kris/create_habit_border
iSoron Sep 23, 2021
87f071b
Merge pull request #1108 from sgallese/feature/midnight-timer-remove-jvm
iSoron Sep 23, 2021
4ee5dd9
Merge pull request #1116 from sgallese/feature/update-app-intro
iSoron Sep 23, 2021
07e55f1
modify review comments
Sep 26, 2021
d6a7fa3
Add unit tests for numerical habits
Sep 26, 2021
66a2b41
Target type: use dropdown instead of radio button
iSoron Sep 29, 2021
2a0afed
SubtitleCard: Show at-most icon
iSoron Sep 29, 2021
75078ed
Merge pull request #1101 from KristianTashkov/kris/implement_at_most
iSoron Sep 29, 2021
6d98f7a
Bump kotlinx-coroutines-core-jvm from 1.5.1 to 1.5.2
dependabot[bot] Oct 1, 2021
23479c7
Bump opencsv from 5.5.1 to 5.5.2
dependabot[bot] Oct 1, 2021
6ab4a69
Bump kotlin-stdlib from 1.5.30 to 1.5.31
dependabot[bot] Oct 1, 2021
29615b6
Bump kxCoroutinesVersion from 1.5.1 to 1.5.2
dependabot[bot] Oct 1, 2021
c033051
Bump daggerVersion from 2.38.1 to 2.39
dependabot[bot] Oct 1, 2021
4c269c5
Bump kotlin-stdlib-jdk8 from 1.5.30 to 1.5.31
dependabot[bot] Oct 1, 2021
265b65e
Bump guava from 30.1.1-android to 31.0.1-android
dependabot[bot] Oct 1, 2021
fd124f2
Bump ktorVersion from 1.6.3 to 1.6.4
dependabot[bot] Oct 1, 2021
fa3774a
Bump org.jlleitschuh.gradle.ktlint from 10.1.0 to 10.2.0
hiqua Oct 1, 2021
c50c5af
Bump logback-classic from 1.2.5 to 1.2.6
dependabot[bot] Oct 1, 2021
d38f83e
Added a notes field and implemented dialog for numeric habits
vbh Sep 13, 2021
d644170
Implement dialog for Yes/No Habits
vbh Sep 14, 2021
36c1504
Add dialog and notes indicator for HistoryChart
vbh Sep 15, 2021
a9fddf9
Update tests and fix formatting.
vbh Sep 20, 2021
7cc4b66
Update HabitBullCSV test to accept notes
vbh Sep 21, 2021
af7f60f
Address review comments
vbh Sep 29, 2021
79e302f
Change variable name
vbh Sep 30, 2021
71f400f
improve numerical dialog design
vbh Oct 2, 2021
8036b10
improve yes/no dialog design
vbh Oct 3, 2021
7bddfbe
Tests for DateUtils and FileExtensions
sgallese Sep 20, 2021
66c61e2
More DateUtils tests
sgallese Sep 21, 2021
9e24128
DateUtils today offset tests
sgallese Sep 22, 2021
b15c02a
Calendar tests for DateUtils
sgallese Sep 22, 2021
c12a6c6
Complete tests for DateUtils, move internal functions to private
sgallese Sep 23, 2021
aae85c1
Rename variable
sgallese Oct 4, 2021
707b2b4
Add test helper for hour offset
sgallese Oct 4, 2021
4fbf8a8
DRYer offset tests
sgallese Oct 4, 2021
6531445
Add delay after toggling a habit
kalina559 Sep 12, 2021
2615795
Merge branch 'iSoron:dev' into feature/file-extensions-test
sgallese Oct 31, 2021
9ddab6e
Bump com.github.johnrengelman.shadow from 7.0.0 to 7.1.0
dependabot[bot] Nov 1, 2021
e3c53bf
Bump daggerVersion from 2.39 to 2.40
dependabot[bot] Nov 1, 2021
eb041bf
Merge pull request #1111 from sgallese/feature/file-extensions-test
iSoron Nov 4, 2021
b27f3f8
Use the value of the Entry during CSV export
hiqua Nov 5, 2021
7776093
Test CSV export file content
hiqua Nov 5, 2021
d553c2f
Delete unused test resources
hiqua Nov 5, 2021
181290a
Merge pull request #1178 from hiqua/delete_unused_test_resources
iSoron Nov 6, 2021
ba59dc7
Merge pull request #1177 from hiqua/fix_csv_exporter
iSoron Nov 6, 2021
a82d940
Small tweaks to checkmark size
iSoron Sep 29, 2021
bf63b4d
Remove HabitMatcherBuilder
iSoron Nov 6, 2021
b62e436
Fix "hide completed" for numerical habits
iSoron Nov 6, 2021
5f60608
Don't unfocus after select 'every day' frequency
hiqua Nov 7, 2021
8bdfaa2
Don't explicitly change focus while switching between frequencies
hiqua Nov 7, 2021
64337b9
Bump AGP from 7.0.2 to 7.0.3
hiqua Nov 8, 2021
990c85a
CheckmarkDialog: Use theme color instead of CSV
iSoron Nov 11, 2021
43489ae
CheckmarkDialog: Replace setText by append
iSoron Nov 11, 2021
a1aea53
NumberPicker: Fix vertical alignment
iSoron Nov 11, 2021
c331f34
HistoryCard: Swap short/long press
iSoron Nov 11, 2021
c98cb50
CheckmarkDialog: Always set up all buttons
iSoron Nov 11, 2021
4972257
Merge branch 'dev' into feat-1074
iSoron Nov 11, 2021
32ef3c1
Settings: Update short toggle description
iSoron Nov 11, 2021
ecb8ce1
Merge pull request #1103 from vbh/feat-1074
iSoron Nov 11, 2021
a01300e
Update list of developers
iSoron Nov 11, 2021
621534d
Merge pull request #1184 from hiqua/unfocus_every_day
iSoron Nov 11, 2021
e26b643
HabitCardView: Remove flickering due to toggle delay
iSoron Nov 11, 2021
5de0fc8
Bump ktorVersion from 1.6.4 to 1.6.6
dependabot[bot] Dec 1, 2021
4e1d01d
Bump daggerVersion from 2.40 to 2.40.3
dependabot[bot] Dec 1, 2021
e82994c
Bump annotation from 1.2.0 to 1.3.0
dependabot[bot] Dec 1, 2021
779ef5d
Bump com.github.triplet.play from 3.6.0 to 3.7.0
dependabot[bot] Dec 1, 2021
35365bb
Bump logback-classic from 1.2.6 to 1.2.7
dependabot[bot] Dec 1, 2021
fc645a8
Bump kotlin-stdlib from 1.5.31 to 1.6.0
dependabot[bot] Dec 1, 2021
7bf7463
Bump kotlin-stdlib-jdk8 from 1.5.31 to 1.6.0
dependabot[bot] Dec 1, 2021
3dfa376
Remove deprecated bintray repositories
hiqua Dec 11, 2021
5a5ed3d
Bump SDK from 30 to 31
hiqua Dec 2, 2021
0fa0daa
Ask for SCHEDULE_EXACT_ALARM permission
hiqua Dec 11, 2021
072ba63
Add immutable flag to pending intents
hiqua Dec 11, 2021
1c15e77
Disable custom snoozing for recent Android
hiqua Dec 11, 2021
e6167ba
NotificationTray: Use isCompletedToday instead of value != UNKNOWN
iSoron Dec 29, 2021
baee3b9
Merge branch 'sdk_30_31' into dev
iSoron Dec 29, 2021
1ad5c6b
Restore x_times_per_y_days translations
iSoron Dec 29, 2021
feeb4f0
Update translations
iSoron Dec 29, 2021
d875af8
CheckmarkDialog: Format date using current locale
iSoron Jan 1, 2022
56d2307
Habit notes: left align
iSoron Jan 1, 2022
642e45a
NumberPicker: Replace "5" by "50" instead of "05" on decimal picker
iSoron Jan 1, 2022
535bc03
NumberPicker: Clear focus of both pickers
iSoron Jan 1, 2022
9770ce1
NumberPicker: Fix formatting
iSoron Jan 1, 2022
308d558
NumberPicker: Show keyboard more reliably
iSoron Jan 1, 2022
d40a5a8
Notes: Update test screenshots
iSoron Jan 1, 2022
5b8a7c3
HistoryCard: Make colors more consistent for AT_MOST habits
iSoron Jan 2, 2022
7ba9a7e
Update translations
iSoron Jan 2, 2022
18e2670
Bump simpleclient from 0.12.0 to 0.14.1
dependabot[bot] Jan 1, 2022
d5d6e46
Bump logback-classic from 1.2.7 to 1.2.10
dependabot[bot] Jan 1, 2022
3f4780c
Bump ktorVersion from 1.6.6 to 1.6.7
dependabot[bot] Jan 1, 2022
1860abf
Bump kotlinx-coroutines-core-jvm from 1.5.2 to 1.6.0
dependabot[bot] Jan 1, 2022
92fb9db
Bump simpleclient_httpserver from 0.12.0 to 0.14.1
dependabot[bot] Jan 2, 2022
0b5894e
Bump daggerVersion from 2.40.3 to 2.40.5
dependabot[bot] Jan 2, 2022
075542d
Bump org.jlleitschuh.gradle.ktlint from 10.2.0 to 10.2.1
dependabot[bot] Jan 3, 2022
1902b88
Bump kxCoroutinesVersion from 1.5.2 to 1.6.0
dependabot[bot] Jan 3, 2022
79d40d1
Bump simpleclient_hotspot from 0.12.0 to 0.14.1
dependabot[bot] Jan 3, 2022
4ae85f1
Bump kotlin-stdlib from 1.6.0 to 1.6.10
dependabot[bot] Jan 4, 2022
d84abc3
Bump com.github.johnrengelman.shadow from 7.1.0 to 7.1.2
dependabot[bot] Jan 4, 2022
c47bd4c
Bump kotlin-stdlib-jdk8 from 1.6.0 to 1.6.10
dependabot[bot] Jan 4, 2022
743b8d2
gradle.properties: remove deprecated MaxPermSize parameter
hiqua Jan 8, 2022
8ccb9bb
Bumps appcompat from 1.3.1 to 1.4.0.
hiqua Jan 8, 2022
a07a50e
Handle numerical habits from HabitBull
hiqua Jan 20, 2022
1943fac
Bump AppIntro from 6.1.0 to 6.2.0
dependabot[bot] Feb 1, 2022
20ae9d2
Bump material from 1.4.0 to 1.5.0
dependabot[bot] Feb 1, 2022
694446b
Bump appcompat from 1.4.0 to 1.4.1
dependabot[bot] Feb 1, 2022
1d3bd48
Merge pull request #1278 from hiqua/fix_habit_bull_numerical
iSoron Feb 2, 2022
22820f4
Bump simpleclient_hotspot from 0.14.1 to 0.15.0
dependabot[bot] Mar 1, 2022
5d7677b
Bump guava from 31.0.1-android to 31.1-android
dependabot[bot] Mar 1, 2022
6c631b1
Bump opencsv from 5.5.2 to 5.6
dependabot[bot] Mar 1, 2022
24a99d5
Bump simpleclient_httpserver from 0.14.1 to 0.15.0
dependabot[bot] Mar 1, 2022
6d3791d
Bump daggerVersion from 2.40.5 to 2.41
dependabot[bot] Mar 1, 2022
472092d
Bump simpleclient from 0.14.1 to 0.15.0
dependabot[bot] Mar 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
plugins {
val kotlinVersion = "1.5.0"
id("com.android.application") version ("7.0.2") apply (false)
id("com.android.application") version ("7.0.3") apply (false)
id("org.jetbrains.kotlin.android") version kotlinVersion apply (false)
id("org.jetbrains.kotlin.kapt") version kotlinVersion apply (false)
id("org.jetbrains.kotlin.android.extensions") version kotlinVersion apply (false)
id("org.jetbrains.kotlin.multiplatform") version kotlinVersion apply (false)
id("org.jlleitschuh.gradle.ktlint") version "10.1.0"
id("org.jlleitschuh.gradle.ktlint") version "10.2.1"
}

apply {
Expand All @@ -18,7 +18,6 @@ allprojects {
mavenCentral()
maven(url = "https://plugins.gradle.org/m2/")
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
maven(url = "https://kotlin.bintray.com/ktor")
maven(url = "https://kotlin.bintray.com/kotlin-js-wrappers")
maven(url = "https://jitpack.io")
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
org.gradle.parallel=false
org.gradle.daemon=true
org.gradle.jvmargs=-Xms2048m -Xmx2048m -XX:MaxPermSize=2048m
org.gradle.jvmargs=-Xms2048m -Xmx2048m
android.useAndroidX=true
android.enableJetifier=true
26 changes: 13 additions & 13 deletions uhabits-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

plugins {
id("com.github.triplet.play") version "3.6.0"
id("com.github.triplet.play") version "3.7.0"
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.kapt")
Expand All @@ -32,13 +32,13 @@ tasks.compileLint {

android {

compileSdk = 30
compileSdk = 31

defaultConfig {
versionCode = 20003
versionName = "2.0.3"
minSdk = 23
targetSdk = 30
targetSdk = 31
applicationId = "org.isoron.uhabits"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -86,10 +86,10 @@ android {
}

dependencies {
val daggerVersion = "2.38.1"
val kotlinVersion = "1.5.30"
val kxCoroutinesVersion = "1.5.1"
val ktorVersion = "1.6.3"
val daggerVersion = "2.41"
val kotlinVersion = "1.6.10"
val kxCoroutinesVersion = "1.6.0"
val ktorVersion = "1.6.7"
val espressoVersion = "3.4.0"

androidTestImplementation("androidx.test.espresso:espresso-contrib:$espressoVersion")
Expand All @@ -98,29 +98,29 @@ dependencies {
androidTestImplementation("com.linkedin.dexmaker:dexmaker-mockito:2.28.1")
androidTestImplementation("io.ktor:ktor-client-mock:$ktorVersion")
androidTestImplementation("io.ktor:ktor-jackson:$ktorVersion")
androidTestImplementation("androidx.annotation:annotation:1.2.0")
androidTestImplementation("androidx.annotation:annotation:1.3.0")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("androidx.test.uiautomator:uiautomator:2.2.0")
androidTestImplementation("androidx.test:rules:1.4.0")
androidTestImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0")
compileOnly("javax.annotation:jsr250-api:1.0")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")
implementation("com.github.paolorotolo:appintro:4.1.0")
implementation("com.github.AppIntro:AppIntro:6.2.0")
implementation("com.google.code.findbugs:jsr305:3.0.2")
implementation("com.google.dagger:dagger:$daggerVersion")
implementation("com.google.guava:guava:30.1.1-android")
implementation("com.google.guava:guava:31.1-android")
implementation("io.ktor:ktor-client-android:$ktorVersion")
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("io.ktor:ktor-client-jackson:$ktorVersion")
implementation("io.ktor:ktor-client-json:$ktorVersion")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:$kxCoroutinesVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kxCoroutinesVersion")
implementation("androidx.appcompat:appcompat:1.3.1")
implementation("androidx.appcompat:appcompat:1.4.1")
implementation("androidx.legacy:legacy-preference-v14:1.0.0")
implementation("androidx.legacy:legacy-support-v4:1.0.0")
implementation("com.google.android.material:material:1.4.0")
implementation("com.opencsv:opencsv:5.5.1")
implementation("com.google.android.material:material:1.5.0")
implementation("com.opencsv:opencsv:5.6")
implementation(project(":uhabits-core"))
kapt("com.google.dagger:dagger-compiler:$daggerVersion")
kaptAndroidTest("com.google.dagger:dagger-compiler:$daggerVersion")
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
@LargeTest
class HabitsTest : BaseUserInterfaceTest() {

@Test
@Throws(Exception::class)
fun shouldCreateHabit() {
Expand Down Expand Up @@ -180,6 +181,8 @@ class HabitsTest : BaseUserInterfaceTest() {
longPressCheckmarks("Wake up early", count = 2)
clickText("Wake up early")
verifyShowsScreen(SHOW_HABIT)
// TODO: find a better way than sleeping in tests
Thread.sleep(2001L)
verifyDisplaysText("10%")
}

Expand All @@ -194,6 +197,8 @@ class HabitsTest : BaseUserInterfaceTest() {
verifyDoesNotDisplayText("Track time")
verifyDisplaysText("Wake up early")
longPressCheckmarks("Wake up early", count = 1)
// TODO: find a better way than sleeping in tests
Thread.sleep(2001L)
verifyDoesNotDisplayText("Wake up early")
clickMenu(TOGGLE_COMPLETED)
verifyDisplaysText("Track time")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import androidx.test.filters.MediumTest
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.MatcherAssert.assertThat
import org.isoron.uhabits.BaseViewTest
import org.isoron.uhabits.core.models.NumericalHabitType
import org.isoron.uhabits.utils.PaletteUtils
import org.junit.Before
import org.junit.Test
Expand All @@ -42,6 +43,7 @@ class NumberButtonViewTest : BaseViewTest() {
super.setUp()
view = component.getNumberButtonViewFactory().create().apply {
units = "steps"
targetType = NumericalHabitType.AT_LEAST
threshold = 100.0
color = PaletteUtils.getAndroidTestColor(8)
onEdit = { edited = true }
Expand Down Expand Up @@ -74,10 +76,10 @@ class NumberButtonViewTest : BaseViewTest() {
}

@Test
fun testRender_emptyUnits() {
fun testRender_atMostAboveThreshold() {
view.value = 500.0
view.units = ""
assertRenders(view, "$PATH/render_unitless.png")
view.targetType = NumericalHabitType.AT_MOST
assertRenders(view, "$PATH/render_at_most_above.png")
}

@Test
Expand All @@ -86,22 +88,35 @@ class NumberButtonViewTest : BaseViewTest() {
assertRenders(view, "$PATH/render_below.png")
}

@Test
fun testRender_atMostBetweenThresholds() {
view.value = 110.0
view.targetType = NumericalHabitType.AT_MOST
assertRenders(view, "$PATH/render_at_most_between.png")
}

@Test
fun testRender_zero() {
view.value = 0.0
assertRenders(view, "$PATH/render_zero.png")
}

@Test
fun testClick_shortToggleDisabled() {
prefs.isShortToggleEnabled = false
view.performClick()
assertFalse(edited)
fun testRender_atMostBelowThreshold() {
view.value = 0.0
view.targetType = NumericalHabitType.AT_MOST
assertRenders(view, "$PATH/render_at_most_below.png")
}

@Test
fun testRender_emptyUnits() {
view.value = 500.0
view.units = ""
assertRenders(view, "$PATH/render_unitless.png")
}

@Test
fun testClick_shortToggleEnabled() {
prefs.isShortToggleEnabled = true
fun testClick() {
view.performClick()
assertTrue(edited)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import androidx.test.filters.MediumTest
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.MatcherAssert.assertThat
import org.isoron.uhabits.BaseViewTest
import org.isoron.uhabits.core.models.NumericalHabitType
import org.isoron.uhabits.core.models.Timestamp
import org.isoron.uhabits.utils.PaletteUtils
import org.junit.After
Expand Down Expand Up @@ -55,6 +56,7 @@ class NumberPanelViewTest : BaseViewTest() {
buttonCount = 4
color = PaletteUtils.getAndroidTestColor(7)
units = "steps"
targetType = NumericalHabitType.AT_LEAST
threshold = 5000.0
}
view.onAttachedToWindow()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ class SubtitleCardViewTest : BaseViewTest() {
isNumerical = false,
question = "Did you meditate this morning?",
reminder = Reminder(8, 30, EVERY_DAY),
unit = "",
targetValue = 0.0,
theme = LightTheme(),
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class PerformanceTest : BaseAndroidTest() {
val habit = fixtures.createEmptyHabit()
for (i in 0..4999) {
val timestamp: Timestamp = Timestamp(i * DAY_LENGTH)
CreateRepetitionCommand(habitList, habit, timestamp, 1).run()
CreateRepetitionCommand(habitList, habit, timestamp, 1, "").run()
}
db.setTransactionSuccessful()
db.endTransaction()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import android.widget.FrameLayout
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import org.hamcrest.CoreMatchers
import org.hamcrest.CoreMatchers.`is`
import org.hamcrest.CoreMatchers.equalTo
import org.hamcrest.CoreMatchers.`is`
import org.hamcrest.MatcherAssert.assertThat
import org.isoron.uhabits.BaseViewTest
import org.isoron.uhabits.R
Expand Down
31 changes: 23 additions & 8 deletions uhabits-android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
~ with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.isoron.uhabits">

<uses-permission android:name="android.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

Expand Down Expand Up @@ -48,11 +49,11 @@
android:name=".activities.habits.list.ListHabitsActivity"
android:exported="true"
android:label="@string/main_activity_title"
android:launchMode="singleTop">
</activity>
android:launchMode="singleTop" />

<activity-alias
android:name=".MainActivity"
android:exported="true"
android:label="@string/main_activity_title"
android:launchMode="singleTop"
android:targetActivity=".activities.habits.list.ListHabitsActivity">
Expand Down Expand Up @@ -85,6 +86,7 @@

<activity
android:name=".widgets.activities.HabitPickerDialog"
android:exported="true"
android:theme="@style/Theme.AppCompat.Light.Dialog">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
Expand All @@ -93,6 +95,7 @@

<activity
android:name=".widgets.activities.BooleanHabitPickerDialog"
android:exported="true"
android:theme="@style/Theme.AppCompat.Light.Dialog">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
Expand All @@ -101,6 +104,7 @@

<activity
android:name=".widgets.activities.NumericalHabitPickerDialog"
android:exported="true"
android:theme="@style/Theme.AppCompat.Light.Dialog">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
Expand All @@ -117,9 +121,10 @@

<activity
android:name=".widgets.activities.NumericalCheckmarkWidgetActivity"
android:excludeFromRecents="true"
android:exported="true"
android:label="NumericalCheckmarkWidget"
android:noHistory="true"
android:excludeFromRecents="true"
android:theme="@style/Theme.AppCompat.Light.Dialog">
<intent-filter>
<action android:name="org.isoron.uhabits.ACTION_SHOW_NUMERICAL_VALUE_ACTIVITY" />
Expand All @@ -128,13 +133,14 @@

<activity
android:name=".notifications.SnoozeDelayPickerActivity"
android:taskAffinity=""
android:excludeFromRecents="true"
android:launchMode="singleInstance"
android:taskAffinity=""
android:theme="@android:style/Theme.Translucent.NoTitleBar" />

<receiver
android:name=".widgets.CheckmarkWidgetProvider"
android:exported="true"
android:label="@string/checkmark">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
Expand All @@ -152,6 +158,7 @@

<receiver
android:name=".widgets.HistoryWidgetProvider"
android:exported="true"
android:label="@string/history">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
Expand All @@ -164,6 +171,7 @@

<receiver
android:name=".widgets.ScoreWidgetProvider"
android:exported="true"
android:label="@string/score">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
Expand All @@ -176,6 +184,7 @@

<receiver
android:name=".widgets.StreakWidgetProvider"
android:exported="true"
android:label="@string/streaks">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
Expand All @@ -188,6 +197,7 @@

<receiver
android:name=".widgets.FrequencyWidgetProvider"
android:exported="true"
android:label="@string/frequency">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
Expand All @@ -200,6 +210,7 @@

<receiver
android:name=".widgets.TargetWidgetProvider"
android:exported="true"
android:label="@string/target">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
Expand All @@ -210,13 +221,17 @@
android:resource="@xml/widget_target_info" />
</receiver>

<receiver android:name=".receivers.ReminderReceiver">
<receiver
android:name=".receivers.ReminderReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>

<receiver android:name=".receivers.WidgetReceiver">
<receiver android:name=".receivers.WidgetReceiver"
android:exported="true"
android:permission="false">
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<action android:name="org.isoron.uhabits.ACTION_SET_NUMERICAL_VALUE" />
Expand Down Expand Up @@ -267,7 +282,7 @@
<!-- Locale/Tasker -->
<receiver
android:name=".automation.FireSettingReceiver"
android:exported="true">
android:exported="false">
<intent-filter>
<action android:name="com.twofortyfouram.locale.intent.action.FIRE_SETTING" />
</intent-filter>
Expand Down
Loading