Commit graph

1171 commits

Author SHA1 Message Date
dependabot[bot] 82191172c4
Bump kotlinx-coroutines-core from 1.6.1 to 1.6.2 (#2557)
Bumps [kotlinx-coroutines-core](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.1 to 1.6.2.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.1...1.6.2)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-30 15:56:05 -04:00
Justin Bassett 11868c185c
Dependency bumps. (#2556) 2022-05-30 15:40:54 -04:00
Daniel Shokouhi 400edbd57f
Update change log for week of 5/29 (#2553) 2022-05-30 11:24:52 -07:00
Tiger Oakes f4375e4b72
Add dagger module for daos (#2541)
* Add dagger module for daos

* Update classes in common to inject daos

* Update app view models to use inject

* Use inject with widgets

* Update app activities and fragments to use inject

* Clean up imports

* Make TileExtensions use coroutines
2022-05-30 14:04:26 -04:00
Joris Pelgröm 0094f9163a
Show snackbar if sensor can't be enabled due to permissions (#2549)
- Instead of silently failing, inform the user that a sensor cannot be enabled due to missing permissions and provide a link to change the setting. If possible, name the specific permission that is required.
2022-05-29 11:27:11 -04:00
Joris Pelgröm ea55fdee35
Don't show changelog immediately on new app installs (#2548) 2022-05-29 11:23:21 -04:00
Joris Pelgröm c98b291d30
Sync sensor enabled state with core 2022.6+ (#2547)
* Sync sensor enabled state from app to core

 - Change sensor 'registered' to indicate not registered, registered as disabled or registered as enabled
 - When a sensor is disabled, set it's status as such on core 2022.6 servers
 - In the sensor registration, use the basic sensor details in case there is no info in the database that can be used

* Clean up version check

 - Now that there is a standard function to get the version, re-use it

* Improve which sensors are synced to core

 - Update database migration to reset registration state on db upgrade to make sure the information is correct for all sensors
 - Only sync sensors that are actually available on the device
 - Fix registering all sensors on core <2022.6 on app/core version change
 - Fix unnecessary sensor updates due to location sensors which are never registered always triggering update on core >=2022.6

* Sync sensor enabled state from core to app

  - After pushing app enabled changes to core, if on core 2022.6 check if the enabled state for any of the sensors is different from what is registered in the app and try to update the sensors. This is done by reading the entire config, because otherwise we wouldn't know about sensors that have been enabled and the app already updates all sensors at the same time so no need for tracking individual updates in the sensor update response.
  - Restore getting config using webhooks, because only the webhook config contains information about entity enabled state
  - Add support for opening a specific sensor's settings page, used for the notification when trying to enable a sensor that requires granting (additional) permissions
2022-05-29 11:22:52 -04:00
Tiger Oakes c532b74a94
Update compose items loops to use keys (#2544) 2022-05-29 10:32:20 -04:00
Tiger Oakes 977d367c8b
Update ManageTilesView for performance (#2540)
* Update ManageTilesView for performance

Removes blocking calls and reduces recompositions

* Don't need to double-sort

getEntities is already sorted

* Revert tile entity change

* Fix crash
2022-05-29 10:18:44 -04:00
Jannis Göing b9c1092302
Multiple media players per widget (#2534)
* Update Media Player Widget Preview

* Add support for multiple media players. optionally show media source label

* fix crop of media player widget preview image. avoid unnecessary api call's when finding active media player. add db migrations. add text color to media source label. set default value of showsource to false.

* remove placeholder source for source icon to fix widget preview
2022-05-29 08:57:52 -04:00
Justin Bassett 7b9fb83f1e
Fix build from bad merge. (#2552) 2022-05-29 08:22:46 -04:00
Thomas Sigmund 10f2e0f6b0
Add additional location setting to combine connected BT devices and entering a zone to enable high accuracy mode (#2491) 2022-05-29 07:30:36 -04:00
Tiger Oakes 7b8720963e
Create a WidgetConfigureActivity base class (#2488) 2022-05-29 07:29:12 -04:00
dependabot[bot] b7428d454b
Bump actions/setup-java from 3.2.0 to 3.3.0 (#2504)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-23 17:40:45 -04:00
dependabot[bot] b98bfbe59b
Bump org.jlleitschuh.gradle.ktlint from 10.2.1 to 10.3.0 (#2502)
Bumps org.jlleitschuh.gradle.ktlint from 10.2.1 to 10.3.0.

---
updated-dependencies:
- dependency-name: org.jlleitschuh.gradle.ktlint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-23 17:40:15 -04:00
Joris Pelgröm def3b3081f
Better SSL error handling in WebViewActivity (#2535)
- Use unique tags to allow identifying which function receives an error
 - Actually use the onReceivedSslError callback error
 - Also show SSL errors in the external auth callback
2022-05-23 17:39:26 -04:00
Joris Pelgröm a06f96fd4d
Provide Compose preview for Play Store listing screens (#2542)
* Provide Compose preview for Play Store listing screens

* Update previews for onboarding

 - Set theme correctly and show system UI
 - Add variant for dark mode

* Update Wear OS listing image

* Remove specific icon, we can use domain default
2022-05-23 17:13:31 -04:00
Joris Pelgröm cb3471ad6a
Improve time zone sensor state (#2536)
* Improve time zone sensor string

 - Update string to reflect if the time zone is using summer/daylight savings time or not
 - Use the user's language settings instead of always using English

* Keep using English for sensor state
2022-05-23 16:02:41 -04:00
Joris Pelgröm 22ee199bcd
Catch exceptions during app registration (#2533)
- Catch any exceptions thrown during app registration (after webview login) instead of crashing. There should only be a few errors possible here that are not encountered in the webview.
 - Set dialog theme to fix background on API <31
2022-05-23 16:02:12 -04:00
Joris Pelgröm f2ccd8657b
Fix widget settings scrolling with narrow buttons (#2528)
- Set the width of the LazyColumn, which provides the scrollable container for this screen, to the full width of the screen to also allow scrolling the screen when touching on the right of narrow buttons
2022-05-14 14:24:23 -04:00
Joris Pelgröm 954801b73e
Save + show crash stacktrace in app settings logs (#2527) 2022-05-14 14:23:43 -04:00
Joris Pelgröm 658f3638e0
Fix device controls crashing System UI on long press (#2513) 2022-05-14 14:15:09 -04:00
Joris Pelgröm f81989f78e
Hide hidden entities on Wear home screen (#2509) 2022-05-08 13:15:26 -04:00
Joris Pelgröm 1f95e6af87
Allow refreshing Wear template tile by tapping anywhere (#2508)
- The touch target for the refresh button is really small and there aren't any other conflicting actions, so allow tapping anywhere to refresh the content
2022-05-08 13:13:28 -04:00
Joris Pelgröm b1e48d5900
Allow setting push notification visibility/sensitivity (#2505) 2022-05-08 13:12:51 -04:00
Daniel Shokouhi b504492f40
BLE Transmit fix blank state and check device supports advertising (#2500)
* Check if device supports BLE transmitter

* Always send a state instead of blank string

* Add attribute if transmitter is supported instead of sensor availability
2022-05-08 13:11:48 -04:00
Joris Pelgröm 66c57d5768
Add theming to widgets: Dynamic color (Material You) and Transparent (#2496)
* Add transparent widgets

 - Add options to the service, entity and template widgets to have a transparent background
 - Register configuration change intent filter for widgets in order to be able to respond to day/night changes (no longer fully automatic due to setting color with int)

* Support Material You dynamic color in widgets

 - In widgets that support theming (day/night or transparent), add an option to use Material You dynamic colors
 - Dynamic colors is now the default widget style for new widgets on devices that support them

* Tweak dynamic color theming

 - Update dynamic color values to better match other themed widgets such as those from Google
 - Remove configuration changed intent receiver for widgets because it is no longer required to get colors

* Add dynamic color theming to media player widget

 - Make the media player widget themeable and add an option to use dynamic colors (transparent doesn't make sense for this layout)

* Fix camera widget background if data cannot be loaded

* Add text size option to template widgets

 - Added an option to set the text size to template widgets to better align with other widget options

* Additional Android 12 widget updates

 - When using the dynamic color theme, also use the new Android 12 widget corner radius
 - Update placeholder values in widgets to match images, and refer to dynamic color XML to provide a better preview on Android 12. Reset values when providing template to match existing behaviour when no widget is found in the database.
 - Update entity state and template widget target size to 2x1 to match preview image
 - Make sure media player album art doesn't extend past corner radius if possible

* Change theme selection to dropdown, text color alignment

 - Change theme selection to use a dropdown menu (Spinner) instead of right-aligned radio buttons on multiple lines
 - Change text color selection to left-align radio buttons
2022-05-08 13:10:58 -04:00
Joris Pelgröm f33743dc14
Fix crash on start app on SDK <26 (#2497)
- Manually specify databind version to fix https://github.com/FasterXML/jackson-databind/issues/3412, as the Kotlin module still depends on the unfixed version and hasn't had a new release yet
2022-05-01 14:32:00 -04:00
Daniel Shokouhi f398d1bb37
Update changelog for week of 4/30 (#2495) 2022-04-30 20:13:14 -07:00
Joris Pelgröm b78d83e8be
Merge pull request #2494
* Fix sensor setting type converter
2022-04-30 15:41:25 -04:00
dependabot[bot] 883b949282
Bump actions/setup-java from 3.1.1 to 3.2.0 (#2479)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3.1.1...v3.2.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-30 07:59:41 -04:00
Joris Pelgröm 13a747fdb9
Notification sensors: make arrays and bundles within main bundle readable (#2482)
* Notification sensors: convert extra bundle arrays to lists

 - If the notification extras contain any arrays, convert them to lists because when stringified, this will create a human readable text like "[Message 1, Message 2]" instead of something like "[Ljava.lang.String;@5d099f62"

* Convert BaseBundle arrays to lists as well

 - Include array types that are in the superclass BaseBundle as well when converting values to a list
 - Moved to another function to limit duplicated code

* Map bundles within a notification's bundle as well

 - Also map any bundles we find inside a bundle, or if there is an array of bundles, to make this information readable as well
2022-04-30 07:53:30 -04:00
Joris Pelgröm b418491667
Breaking change: send sensor list attributes as list to server (#2478)
* Breaking change: send sensor list attributes as list to server

 - Send a sensor attribute that is managed by the app as a list, to the server as a list as well instead of a stringified version of a list.

* Fallback to string for lists that include separator

 - To prevent issues where we can't distinguish the list items separator from a value that includes the separator, don't try to convert a value to a list if that is the case but instead use string

* Improve string fallback for lists that include separator

 - Instead of only falling back when a list includes a String with the separator, just use toString() to also support other objects which might include ", " when stringified, such as nested lists

* Store list data as JSON

 - To remove any confusion when sending individual list items, store data as JSON to escape characters if necessary
 - Map Any data in a list that is not any of the specific types to string, for consistency with the same types when not in a list and to prevent JSON serialization issues
2022-04-30 07:47:44 -04:00
Joris Pelgröm d6add75168
Show media player artist/album more often (#2493)
- Also show media player artist if there is only an album artist
 - Also show media player album if there is no artist known
2022-04-30 07:41:17 -04:00
Daniel Shokouhi a4fc7b0a3f
Add a sensor for high accuracy update interval (#2490) 2022-04-30 07:37:54 -04:00
Joris Pelgröm bbaea010bd
Handle individual exceptions while creating device controls better (#2484)
* Ensure current mode is also supported for climate entities

* Don't crash when creating control fails

 - Handle failures while creating a control gracefully: skip controls when showing all available controls, and show an error tile similar to network errors for existing controls
2022-04-30 07:36:38 -04:00
Joris Pelgröm fe0fcf8c54
Fix Wear endlessly loading on no connected devices (#2476)
- Fix the Wear OS settings activity (seemingly) endlessly loading if there are no connected devices, by showing a proper error message for this situation
 - Set title for Toolbar
2022-04-30 07:30:51 -04:00
Tiger Oakes 2384f0f84d
Use enum for sensor setting type (#2469)
* Use enum for sensor setting type

* Clean up type conversions

* Full variant
2022-04-30 07:29:26 -04:00
dependabot[bot] ec6ae4345c
Bump kotlin-stdlib-jdk8 from 1.6.20 to 1.6.21 (#2467)
Bumps [kotlin-stdlib-jdk8](https://github.com/JetBrains/kotlin) from 1.6.20 to 1.6.21.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-23 07:34:05 -04:00
dependabot[bot] 129906915a
Bump kotlin-reflect from 1.6.20 to 1.6.21 (#2466)
Bumps [kotlin-reflect](https://github.com/JetBrains/kotlin) from 1.6.20 to 1.6.21.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-reflect
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-23 07:22:53 -04:00
Joris Pelgröm fc8e961ef1
Add haptic + toast feedback to Wear OS details screen (#2455) 2022-04-23 07:16:21 -04:00
Tiger Oakes 3309c59bfd
Move SensorDao operations to Transactions (#2447)
* Add setSensorsEnabled helper

* Update SensorDetailViewModel

* Update sensormanager
2022-04-23 07:10:51 -04:00
Joris Pelgröm f4c4d72518
Suggest or highlight current SSID in home SSID dialog (#2457)
- Show a chip suggesting the user to add the SSID of the currently connected network, if not already added to the list of home SSIDs, in the home SSID dialog
  - Change icon for listed SSIDs in home SSID dialog to DKGRAY by default, and only show currently connected SSID icon in accent color
  - Add missing contentDescription for ImageButtons
  - Use correct tint namespace
  - Update deprecated code
2022-04-17 08:48:40 -04:00
Daniel Shokouhi 90b8d03002
Update change log for week of 4/16 (#2461) 2022-04-16 15:01:55 -07:00
dependabot[bot] d3014ba074
Bump sentry-android from 5.7.2 to 5.7.3 (#2459)
Bumps [sentry-android](https://github.com/getsentry/sentry-java) from 5.7.2 to 5.7.3.
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-java/compare/5.7.2...5.7.3)

---
updated-dependencies:
- dependency-name: io.sentry:sentry-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-14 08:41:32 -04:00
dependabot[bot] 48e0792cf2
Bump kotlinx-coroutines-play-services from 1.6.0 to 1.6.1 (#2454)
Bumps [kotlinx-coroutines-play-services](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.0...1.6.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-play-services
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 19:49:39 -04:00
dependabot[bot] 04d8980ad0
Bump sentry-android from 5.7.1 to 5.7.2 (#2453)
Bumps [sentry-android](https://github.com/getsentry/sentry-java) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-java/compare/5.7.1...5.7.2)

---
updated-dependencies:
- dependency-name: io.sentry:sentry-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 19:37:18 -04:00
dependabot[bot] 502ef764a3
Bump gradle from 7.1.2 to 7.1.3 (#2452)
Bumps gradle from 7.1.2 to 7.1.3.

---
updated-dependencies:
- dependency-name: com.android.tools.build:gradle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 19:18:35 -04:00
dependabot[bot] 9ed331f9e7
Bump kotlinx-coroutines-android from 1.6.0 to 1.6.1 (#2451)
Bumps [kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.0...1.6.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 19:18:05 -04:00
dependabot[bot] 484e3127c1
Bump kotlinx-coroutines-core from 1.6.0 to 1.6.1 (#2432)
Bumps [kotlinx-coroutines-core](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/Kotlin/kotlinx.coroutines/releases)
- [Changelog](https://github.com/Kotlin/kotlinx.coroutines/blob/master/CHANGES.md)
- [Commits](https://github.com/Kotlin/kotlinx.coroutines/compare/1.6.0...1.6.1)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 19:16:56 -04:00