Commit graph

1177 commits

Author SHA1 Message Date
Joris Pelgröm 7b401abddc
Don't complete onboarding on registration error (#2646)
- Add specific error if the app encounters a HTTP 404 response during onboarding registration, because that means the mobile_app integration is missing
 - After an error, clean up the session data to make sure a new registration attempt is made
2022-06-30 21:58:24 -04:00
Joris Pelgröm aa256676c4
Show entity state on chip background (#2634)
* Show entity state on entity chip in Wear OS app

 - Shows the color and position of an entity state on the entity's chip in the Wear OS app by using a custom background class that accepts more than a single Color

* Use horizontal instead of diagonal gradients

 - The default BrushPainter actually isn't the correct one, the ToggleChip class uses its own but that is marked as internal and we cannot override the default BrushPainter so another copied class it is

* RTL entity position support

 - When using an RTL language, the entity chip should fill in the position value from the right side

* Support cover position

 - Show cover position as entity chip's background
 - Adjust background color code to also work when a chip isn't checked for covers that are currently closing

* Cleanup EntityUi

* Cleanup duplicate code in device controls

* Naming conventions

 - Should've used a lowercase letter to start
 - Fix class

* Fix build

 - Updates because ToggleChipColors has changed
 - Add workaround for implementing Compose interface because kotlin-gradle-plugin is linked to stable Compose and we cannot update yet

* Update gradient values to match rc02

 - Wear Compose 1.0.0-rc02 changed the default values for the gradients in ToggleChips, so update the values used when using a custom background to match
2022-06-30 21:56:38 -04:00
dimitri bf5a983be2
TLS Client Authentication Support (#2526)
* Rebasing First TLS Client (MTLS) implemention onto upstream's master

* Removed commented code

* First Client TLS implementation rebased with upstream's masster

* Removed redundant semicolon

* Added try/catch to key import, added import feedback to enduser

* ktlint fixes

* Rely on the device Credential store

* Tweaked and cleaned the strings related to the TLS Client Auth message

* Removed commented code

* Attempt to remember the key alias and load it as soon as the app starts

* Cleaned rebase and tidying up code

* Added handler for HTTP error (when a certificate is not provided)

* When no certificate is availble, do the request to get an HTTP error back (for error handling)

* Pleased the linter

* Pleased the linter

* Switched to constructor injection

* Attempt to load the key in a non-blocking fashion.

* Do not loop around the blocking code

* onReceivedClientCertRequest now runs non blocking and the KCAC callback is used instead of polling.

* Wait until the executor task actually completes.

* Cleaned the code

* Removed unused import

* Wait for the executor to finishes executing its task

* During onboarding, if TLS Client Auth is enabled but no certificate is available, correctly report to the user

* Use a safe call on errorResponse

* Do not block anymore

* Removed unused return types

* Removed unused return types and the executor

* Removed unused imports

* Code cleanup

* Improved synchronization

* Added a string for certificate expiration

* Added a function to clear the alias and removed blocking code

* Added a function to clear the alias

* Display an error message if the user certificate is not valid plus minor refactoring

* Check the validity of the selected certificate

* Added an error message if the client certificate is not valid

* Resolved warnings and linting issues

* Fixed broken branch when testing for error condition

* Removed unused imports

Co-authored-by: Mirco Boschi <mircoboschi@gmail.com>
2022-06-30 21:55:23 -04:00
Daniel Shokouhi 44d4d56486
Breaking Change: Switch notification command parameters (#1759) 2022-06-30 21:53:39 -04:00
dependabot[bot] dc785597bd
Bump sentry-android from 6.1.2 to 6.1.3 (#2644)
Bumps [sentry-android](https://github.com/getsentry/sentry-java) from 6.1.2 to 6.1.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/6.1.2...6.1.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-06-26 19:52:56 +00:00
dependabot[bot] a9de8e3f72
Bump iconics-compose from 5.3.3 to 5.3.4 (#2643)
Bumps [iconics-compose](https://github.com/mikepenz/Android-Iconics) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/mikepenz/Android-Iconics/releases)
- [Changelog](https://github.com/mikepenz/Android-Iconics/blob/develop/gradle-release.gradle)
- [Commits](https://github.com/mikepenz/Android-Iconics/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: com.mikepenz:iconics-compose
  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-06-26 15:41:23 -04:00
dependabot[bot] 1efc605c42
Bump kotlinx-coroutines-android from 1.6.2 to 1.6.3 (#2642)
Bumps [kotlinx-coroutines-android](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.2 to 1.6.3.
- [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.2...1.6.3)

---
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-06-26 15:41:08 -04:00
dependabot[bot] bd6cdb0f64
Bump google-services from 4.3.10 to 4.3.12 (#2641)
Bumps google-services from 4.3.10 to 4.3.12.

---
updated-dependencies:
- dependency-name: com.google.gms:google-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-06-26 15:40:53 -04:00
dependabot[bot] 9c2c2ae4ae
Bump kotlinx-coroutines-guava from 1.6.2 to 1.6.3 (#2639)
Bumps [kotlinx-coroutines-guava](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.2 to 1.6.3.
- [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.2...1.6.3)

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlinx:kotlinx-coroutines-guava
  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-06-26 18:36:44 +00:00
dependabot[bot] f9019a6361
Bump actions/setup-java from 3.3.0 to 3.4.0 (#2632)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v3.3.0...v3.4.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>
Co-authored-by: Justin Bassett <bassett.justint@gmail.com>
2022-06-26 18:36:17 +00:00
dependabot[bot] 1a9a8adfb5
Bump iconics-core from 5.3.3 to 5.3.4 (#2640)
Bumps [iconics-core](https://github.com/mikepenz/Android-Iconics) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/mikepenz/Android-Iconics/releases)
- [Changelog](https://github.com/mikepenz/Android-Iconics/blob/develop/gradle-release.gradle)
- [Commits](https://github.com/mikepenz/Android-Iconics/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: com.mikepenz:iconics-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-06-26 18:33:12 +00:00
dependabot[bot] 641edaf75d
Bump kotlinx-coroutines-core from 1.6.2 to 1.6.3 (#2629)
Bumps [kotlinx-coroutines-core](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.2 to 1.6.3.
- [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.2...1.6.3)

---
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-06-26 14:22:08 -04:00
dependabot[bot] 4e7be45823
Bump kotlinx-coroutines-play-services from 1.6.2 to 1.6.3 (#2628)
Bumps [kotlinx-coroutines-play-services](https://github.com/Kotlin/kotlinx.coroutines) from 1.6.2 to 1.6.3.
- [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.2...1.6.3)

---
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-06-26 14:21:31 -04:00
Márton Maráz d35ce2f16b
Fix Storage sensors to update continuously and display correct size unit (#2638)
* Fix storage sensors to update continuously and do some refactoring in StorageSensorManager

* Fix size unit formatter logic.
So now it can not only output 0GB for smaller values (<1GB) but also 345MB or 640KB for example

* Use String.format(...) for adding thousands separator and replace StringBuilder usage with template
2022-06-26 14:21:10 -04:00
Joris Pelgröm 71b1fe1a00
Speed up device controls/Wear OS loading by doing network async (#2636)
* Speed up loading device controls by running network async

 - Speed up loading the device controls menu and initial controls by launching all requests in an async block, which allows the server to respond out of order
 - For individual controls, only start listening for changes once we have provided initial controls

* Speed up Wear OS cold boot by running network async

 - Speed up a cold boot of the Wear OS app by launching all network requests in an async block, which allows the server to respond out of order
2022-06-26 14:19:24 -04:00
Daniel Shokouhi f91c4691c0
Only apply prioritize internal to WebView when location is disabled on the device (#2635) 2022-06-26 14:17:50 -04:00
leroyboerefijn b261fe1fdf
Bump wear compose to 1.0.0-rc02 (#2633)
* Bump compose, make it build and update loading screen

* Fix toggle icons

* Update refresh interval picker layout

* Remove potential empty item in MainView to improve content alignment in window

* Fix rotary scroll

* Fix toggle icon in DetailsPanelView

* Stop using hardcoded strings...

* Bump to rc02

* Smoother rotary scrolling

* Revert "Smoother rotary scrolling"

This reverts commit e13738983d.

* Only show loading screen in one place to make sure we always see the same ui
2022-06-26 14:16:06 -04:00
Prasad Bankar 12b9e81f9a
Implement a themed app icon (#2371)
* Implement a themed app icon

* Implement a themed app icon
2022-06-26 13:51:04 -04:00
dependabot[bot] 4a59a20d3b
Bump sentry-android from 6.1.0 to 6.1.2 (#2626)
Bumps [sentry-android](https://github.com/getsentry/sentry-java) from 6.1.0 to 6.1.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/6.1.0...6.1.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-06-21 00:37:31 +00:00
leroyboerefijn 50d387a726
Entity state complication (#2574)
* Add entity state complication with hardcoded entity id

* Add config activity and save entity id in DB

* Update complications when entity state changes

* Allow all entity types for complication

* Update config layout

* remove unused file

* Upload database json

* Process review comments!

* Fix little bug

* Icon background and error catching

* Add automatic refresh and fix missed Dao inject

* Add icons for standard domains

91cd584b4b/src/common/const.ts (L66)

* Cleanup and further icon updates
2022-06-20 20:24:37 -04:00
Stephen Eisenhauer fe377fcad8
Render widget button icons at higher resolutions (#2625) 2022-06-20 20:18:40 -04:00
Changwoo Ryu f3f00e3fdc
Fix webview restart on keyboard changes (#2622) (#2624)
* The webview activities now handle keyboard|keyboardHidden|navigation
  configuration changes by keyboard connection changes, to avoid the
  activity restart which leads to frontend reload.
2022-06-20 20:16:46 -04:00
Joris Pelgröm 58b69b89be
Don't crash manage widgets screen on duplicate id (#2620) 2022-06-20 20:15:28 -04:00
Márton Maráz 766e879d7b
Fix removing non-last list items from Last Update Trigger sensor's settings (#2585)
* Refactor variable names and types

* Remove unnecessary DB write operation happening on every update of the Last Update Triggered sensor.
We already know that the Add New Intent toggle's value is not true, so there's no need to write false in the DB over and over again.

* Fix logic for determining the next DB entry's ID: don't generate possibly already existing ID

* Remove empty list element before adding new entry

* Implement logic for determining if the sequence is continuous

* Implement logic for fixing the DB entries to make their IDs a continuous sequence

* Extract "lastupdate_intent_var1:" to String constant

* Fix determining next ordinal based on PR comment
(and also simplify the isSequenceContinuous logic)

* Replace check with if based on PR discussion

* Replace negated .any {...} logic with .none {...}
2022-06-18 15:32:44 -04:00
Daniel Shokouhi 6be2fa3d1b
Update location service dependency (#2611) 2022-06-18 15:29:29 -04:00
dependabot[bot] 74f1609b57
Bump reorderable from 0.9.0 to 0.9.2 (#2617)
Bumps [reorderable](https://github.com/aclassen/ComposeReorderable) from 0.9.0 to 0.9.2.
- [Release notes](https://github.com/aclassen/ComposeReorderable/releases)
- [Commits](https://github.com/aclassen/ComposeReorderable/compare/0.9.0...0.9.2)

---
updated-dependencies:
- dependency-name: org.burnoutcrew.composereorderable:reorderable
  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-06-18 15:00:02 -04:00
dependabot[bot] fc8adb54d2
Bump sentry-android from 6.0.0 to 6.1.0 (#2614)
Bumps [sentry-android](https://github.com/getsentry/sentry-java) from 6.0.0 to 6.1.0.
- [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/6.0.0...6.1.0)

---
updated-dependencies:
- dependency-name: io.sentry:sentry-android
  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-06-18 14:58:15 -04:00
Daniel Shokouhi 7f487a1978
Add attribute to network type sensor if network is metered (#2619) 2022-06-18 14:57:10 -04:00
Daniel Shokouhi f5f2cc66d9
Update changelog 6/14 (#2612) 2022-06-15 10:13:17 -07:00
Joris Pelgröm 38d70e0345
Fix onboarding duplicate fragment on recreation (#2609) 2022-06-14 15:16:42 -04:00
Joris Pelgröm da0903b3c9
Fix settings fragment backstack on recreation (#2610)
Fix settings duplicate fragment on recreation
2022-06-14 15:15:59 -04:00
dependabot[bot] e8fd1760f4
Bump okhttp from 4.9.3 to 4.10.0 (#2608)
Bumps [okhttp](https://github.com/square/okhttp) from 4.9.3 to 4.10.0.
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-4.9.3...parent-4.10.0)

---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp
  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-06-14 13:52:56 +00:00
Joris Pelgröm 1fe299b4a1
Improve service button widget feedback state speed (#2603) 2022-06-14 09:51:20 -04:00
Tiger Oakes c5b021504d
Update delete methods in daos (#2593)
* Update delete methods in daos

* Make widgetDao.getAll a suspend function
2022-06-14 09:44:27 -04:00
dependabot[bot] 4d2d8d4178
Bump logging-interceptor from 4.9.3 to 4.10.0 (#2607)
Bumps [logging-interceptor](https://github.com/square/okhttp) from 4.9.3 to 4.10.0.
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-4.9.3...parent-4.10.0)

---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:logging-interceptor
  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-06-14 09:41:57 -04:00
Daniel Shokouhi 827d20190a
Update changelog for week of 6/9 (#2601) 2022-06-09 15:11:20 +00:00
Daniel Shokouhi 2f588fec2d
Use minimal specific string for home wifi option on persistent connection (#2584)
* Use minimal specific string for home wifi option on persistent connection

* Review comment for consistency
2022-06-09 15:03:13 +00:00
Joris Pelgröm 574623d837
Fix slow service button widgets (#2597)
* Make service button widgets execute calls faster

* Fix service call feedback background border radius
2022-06-09 10:10:01 -04:00
Joris Pelgröm 6d1197bbdb
Fix syncing sensor enabled state if all sensors are disabled on device (#2596) 2022-06-09 10:01:56 -04:00
Joris Pelgröm dba77ee825
Use Bluetooth device address for high accuracy mode BT constraint, fixes settings crash (#2591)
* Don't include devices twice in Bluetooth list

 - Don't include Bluetooth devices twice in the devices list when using it for location-related functions. Do allow duplicates for the BT sensor for backwards compatibility.

* Switch high accuracy mode BT constraint to device address

 - Change the Bluetooth device constraint for high accuracy mode for location updates to use the Bluetooth device address instead of the device name to ensure uniqueness + fix crash in sensor settings screen
 - Set padding in Scaffold because lint doesn't seem to like ignoring it

* Migrate high accuracy mode BT constraint names to addresses

 - When enabling the high accuracy mode, make sure that all data for the Bluetooth device constraint is a Bluetooth device address and if not try to match it to a device.
 - Because the database can contain devices that are not currently paired/connected, without changing to a new setting this check always must be executed, which is why it is placed in the function for enabling the high accuracy mode.

* Also show user-friendly labels in sensor settings detail screen

 - Update the sensor settings detail screen to also show a user-friendly label for list settings on the main screen, before opening a dialog. This will use the same function as when the dialog info is populated, which simplifies code.
 - Merge SensorSettingType.LIST with other list types rows in sensor settings detail screen, remove getSettingTranslatedEntry in viewmodel which is no longer necessary.

* Fix empty Bluetooth list setting value when off
2022-06-09 10:00:05 -04:00
Joris Pelgröm 0f0edcf4a9
Bump reorderable and fix/improve design (#2587)
* Bump reorderable and fix breaking changes

* Only include reorderable with full version

* Improve "Wear Favorite Entities" screen design

 - Fix too small touch targets for dragging
 - Fix no background resulting in overlapping text when dragging
 - Update design to standard Material design
 - Re-use Composable for selected and unselected favorite entities
2022-06-09 09:54:53 -04:00
dependabot[bot] ffaf9fa11a
Bump sentry-android from 5.7.4 to 6.0.0 (#2595)
Bumps [sentry-android](https://github.com/getsentry/sentry-java) from 5.7.4 to 6.0.0.
- [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.4...6.0.0)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-09 09:54:02 -04:00
Daniel Shokouhi 1190e0a302
Register for the shutdown intent to send 1 final sensor update before device restarts or powers down (#2572) 2022-06-08 09:01:32 -07:00
Daniel Shokouhi 206ea4ba5d
Update google play wear OS screenshots to match demo site functionality (#2583) 2022-06-03 16:35:23 +00:00
Joris Pelgröm db5713839d
Fix crash when notification extras cannot be mapped (#2581)
Fix crash when notification extras contain internal class
2022-06-02 22:16:36 -04:00
Justin Bassett dcfc590458
Fix issues with initing view models. (#2575)
Add missing `@AndroidEntryPoint` annotations.
2022-06-01 20:19:11 -04:00
Joris Pelgröm 1b318df578
Improve HA version check when unable to read config (#2573)
Improve HA version check when unable to connect
2022-06-01 17:47:27 -04:00
Joris Pelgröm d95ab887cb
Fix manage tiles screen crash if there are tiles, updating tiles (#2568)
* Fix crash when opening manage tiles screen if there are tiles

* Fix updating existing tiles

* Remove IO thread, not required
2022-06-01 11:34:50 -04:00
Joris Pelgröm f8a3584054
Remove specific jackson-databind dependency (#2567) 2022-06-01 11:34:38 -04:00
Justin Bassett 7e34271e56
Hotfix: Sensor DAO Injection Issues (#2566)
Fix issues with SensorDao.
2022-06-01 11:34:27 -04:00