Commit graph

1194 commits

Author SHA1 Message Date
Joris Pelgröm 3c0145eed3
Add Matter module preferred to manifest, again (#3427) 2023-03-31 22:57:33 -04:00
Joris Pelgröm 300edaa26b
Send device-preferred Thread dataset if different from core (#3426)
- Expand the automatic Thread dataset sync on Matter commissioning to also send the device-preferred Thread dataset if it's different from core (it will either receive something new or update)
2023-03-31 22:57:21 -04:00
googlvalenzuela 8a322c624f
Android Automotive Module (#3423)
* Creation of Automotive Module and Fix OnboardingActivity parent Activity.

* Adding Manifest Dependencies.

* Fixing ktlint

* Remove unused import.

* Copy Google Services to android automotive

Github actions for PR require this to be set up in order for the build to pass.

* Missing two entries to copy the google-services.json file

* Fixing Build Process.

* Version code +2

We add 2 because the app, wear (+1) and automotive versions need to have different version codes.

* Update +3 per recomendation.

* Code to support transition from Full app to Car App Library.

* Fixing linter.

* More ktlin

/home/runner/work/android/android/app/src/main/java/io/homeassistant/companion/android/BaseActivity.kt:19:1 Needless blank line(s)
/home/runner/work/android/android/app/src/main/java/io/homeassistant/companion/android/BaseActivity.kt:31:95 Unnecessary semicolon
/home/runner/work/android/android/app/src/main/java/io/homeassistant/companion/android/BaseActivity.kt:39:1 Unexpected blank line(s) before "}"
/home/runner/work/android/android/app/src/main/java/io/homeassistant/companion/android/BaseActivity.kt:44:1 First line in a method block should not be empty

* Changes to allow navigate back from / native and feedback from PR.

* Indentation fixes.
2023-03-31 17:54:33 -04:00
Joris Pelgröm d96fc78cad
Add background to Wear screenshots (#3437)
* Add background to Wear screenshots

* Wear onboarding background
2023-03-27 13:19:53 -04:00
Joris Pelgröm 8d2c9f1cb4
Get user information and prevent using admin-only calls (#3417)
* Get and cache user information

 - Add function to get information about the current user
 - Cache user information alongside server in database

* Replace/prevent admin only calls
2023-03-16 07:10:27 +00:00
Joris Pelgröm 1a7091a761
Server trust feature (#3410)
* Server trust feature

* Always allow clear_notification, remove_channel and command_stop_tts commands
2023-03-15 19:14:39 -04:00
Daniel Shokouhi 0d9ea48fa7
Update change log week of 3/10 (#3413)
* Update change log week of 3/10

* Wording tweaks
2023-03-10 10:43:49 -08:00
Stefano Semeraro e63d8b33f3
Properly handle multiple permissions requests (#3411)
* Properly handle multiple permissions requests

* Removed empty newline at the beginning of the block
2023-03-10 13:16:23 -05:00
Daniel Shokouhi 52c2f3a8c5
Move away from runBlocking and fix some bugs in geofence updates and clearing notification (#3409) 2023-03-10 13:14:22 -05:00
Daniel Shokouhi b38974b30f
Allow clickAction to be set to noAction to do nothing (#3407) 2023-03-08 16:32:22 -05:00
Daniel Shokouhi aaef25497d
Update change log week of 3/3 (#3391)
* Update change log week of 3/3

* Update with recent merges
2023-03-03 12:12:37 -08:00
Joris Pelgröm b97383ebdf
Google dependency bumps (#3393)
* Google dependency bumps

* kotlinCompilerExtensionVersion
2023-03-03 19:49:18 +00:00
Joris Pelgröm 231622a0ef
Fix (potential) crashes when deleting a server (#3392)
* Prevent crash when pausing if server is deleted

* Handle race when deleting

 - Handle a race condition where we delete and finish the activity at the same time during which it might not yet have been fully removed
 - Handle a race condition where a back-up may be restored and a server is deleted on startup, which causes the authentication repository to become unavailable with a minor delay
2023-03-03 14:39:43 -05:00
dependabot[bot] e704b32c59
Bump io.sentry:sentry-android from 6.14.0 to 6.15.0 (#3390)
Bumps [io.sentry:sentry-android](https://github.com/getsentry/sentry-java) from 6.14.0 to 6.15.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.14.0...6.15.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>
2023-03-03 14:14:30 -05:00
Daniel Shokouhi 4984c9c1a3
Update Play Store listing for upcoming play policy changes for Wear OS (#3387)
* Update play store listing for wear OS

* Update description and add screenshots for tiles

* Update phone screenshots to be consistent and showcase some widgets

* Fix small size

* Use single screenshot to show widgets and meet requirements

* Update home screen images

* Show all widgets

* Update camera widget image, oops

* Fix screenshots
2023-03-03 14:09:05 -05:00
Daniel Shokouhi ac02e8578a
Make background transparent, remove resizing and set minimum size to 1x1 grid for camera widget (#3375)
* Make background transparent, remove resizing and set minimum size to 1x1 grid for camera widget

* Use transparent background with rounded corners

* Remove background

* Change image view scale type

* Restore transparent background

* Set target cell size to maintain 2x2 grid by default

---------

Co-authored-by: Justin Bassett <bassett.justint@gmail.com>
2023-03-01 17:18:58 +00:00
dependabot[bot] a2f85ef475
Bump org.jlleitschuh.gradle.ktlint from 11.1.0 to 11.2.0 (#3334)
* Bump org.jlleitschuh.gradle.ktlint from 11.1.0 to 11.2.0

Bumps org.jlleitschuh.gradle.ktlint from 11.1.0 to 11.2.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>

* gradlew ktlintFormat

* Rename packages with underscores

> Task :app:ktlintMainSourceSetFormat FAILED
home-assistant-android\app\src\main\java\io\homeassistant\companion\android\widgets\media_player_controls\MediaPlayerControlsWidget.kt:1:1 Package name must not contain underscore (cannot be auto-corrected)
home-assistant-android\app\src\main\java\io\homeassistant\companion\android\widgets\media_player_controls\MediaPlayerControlsWidgetConfigureActivity.kt:1:1 Package name must not contain underscore (cannot be auto-corrected)

Rename: media_player_controls to mediaplayer

> Task :wear:ktlintMainSourceSetFormat FAILED
home-assistant-android\wear\src\main\java\io\homeassistant\companion\android\onboarding\manual_setup\ManualSetupActivity.kt:1:1 Package name must not contain underscore (cannot be auto-corrected)
home-assistant-android\wear\src\main\java\io\homeassistant\companion\android\onboarding\manual_setup\ManualSetupModule.kt:1:1 Package name must not contain underscore (cannot be auto-corrected)
home-assistant-android\wear\src\main\java\io\homeassistant\companion\android\onboarding\manual_setup\ManualSetupPresenter.kt:1:1 Package name must not contain underscore (cannot be auto-corrected)
home-assistant-android\wear\src\main\java\io\homeassistant\companion\android\onboarding\manual_setup\ManualSetupPresenterImpl.kt:1:1 Package name must not contain underscore (cannot be auto-corrected)
home-assistant-android\wear\src\main\java\io\homeassistant\companion\android\onboarding\manual_setup\ManualSetupView.kt:1:1 Package name must not contain underscore (cannot be auto-corrected)

Rename: manual_setup to manual

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Joris Pelgröm <joris.pelgrom@gmail.com>
2023-03-01 12:05:54 -05:00
Joris Pelgröm 0c4c32e512
Multiserver app lock (#3376)
* WebView check app lock on server change

* Settings check app lock on server details

 - If the currently active server has a lock, show it
 - If the currently visible server has a lock, also show it
2023-02-27 23:29:15 -05:00
Daniel Shokouhi c066e7c3cf
Disable auto suggest on input fields for URLs (#3377)
* Disable auto suggest on input fields for URLs

* Wear OS too
2023-02-27 22:52:45 -05:00
Daniel Shokouhi 4b22c2b432
Update change log week of 2/25 (#3368) 2023-02-25 21:02:59 -05:00
Joris Pelgröm 8fd226216f
Enable location tracking toggle in additional server onboarding (#3366) 2023-02-25 14:16:40 -05:00
dmiales 9a4d00f05d
Feature/screen orientation (#3362)
* feature/landscape add setting for fix landscape orientation

* feature/landscape add setting for fix screen orientation

* feature/screen_orientation code review

* feature/screen_orientation code review
2023-02-24 14:31:53 -05:00
Joris Pelgröm ebda0a23a5
Enable/disable sensors per-server (#3357)
* Sync sensors with individual servers

 - Update sensors once, and allow syncing enabled/state with individual servers instead of doing the same for every server
 - Default to the default sensor enabled state for new servers instead of copying another server

* Make last update sensor server-specific

* UI

* New servers: enable if enabled on any server

* Handle per-server enabled state in location tracking

* Fix icons in dark mode
2023-02-24 14:10:52 -05:00
dmiales 76ecfbda24
feature/minimumFontSize Proportional font styles are very blurry on l… (#3353)
feature/minimumFontSize Proportional font styles are very blurry on low resolution devices
2023-02-23 14:37:37 -05:00
Joris Pelgröm 4bda27387c
Server gestures and chooser (#3346)
* Server gestures and chooser

 - Add gestures to quickly switch between multiple servers
 - Add a chooser to select a server, and add a gesture for it

* Fix history (new page is added _after_ loading finishes)
2023-02-23 20:04:25 +01:00
Joris Pelgröm 25dd869272
Sync Thread datasets when starting Matter commissioning (#3349)
* Sync Thread datasets when starting Matter commissioning

 - When starting Matter commissioning from the frontend, check if there are Thread datasets on the device or in core but not the other, and if so try to sync them

* Also sync Thread datasets in shared device flow

 - Datasets may not be used by the system but it is useful for future devices
 - Make methods in ThreadManager a bit more general
2023-02-21 13:27:29 -05:00
Daniel Shokouhi 5f164ff5a6
Bump some project dependencies (#3347)
* Bump some project dependencies

* Bump kotlin too

* Use correct kotlin library
2023-02-21 12:55:00 -05:00
Daniel Shokouhi 1ceafa3967
Update change log week of 2/17 (#3342) 2023-02-17 17:44:55 -08:00
dependabot[bot] 4fcd20c72d
Bump com.google.dagger:hilt-android from 2.44.2 to 2.45 (#3335)
Bumps [com.google.dagger:hilt-android](https://github.com/google/dagger) from 2.44.2 to 2.45.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.44.2...dagger-2.45)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-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>
2023-02-17 09:01:08 -05:00
dependabot[bot] 22606bf9df
Bump io.sentry:sentry-android from 6.13.1 to 6.14.0 (#3339)
Bumps [io.sentry:sentry-android](https://github.com/getsentry/sentry-java) from 6.13.1 to 6.14.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.13.1...6.14.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>
2023-02-17 08:47:39 -05:00
Joris Pelgröm 88a7f61643
Allow device credential for app lock setup (#3340) 2023-02-17 08:47:11 -05:00
Joris Pelgröm c8cc70ca84
Multiserver NFC tag fixes (#3336)
- Fix scanning tag not completing due to activity finishing early
 - Fire events to all servers from settings to match normal scanning
2023-02-17 08:46:32 -05:00
Justin Bassett 7d8bfb2bc6
Revert "Add Matter module preferred to manifest" (#3333)
Revert "Add Matter module preferred to manifest (#3319)"

This reverts commit 4ae185d31d.
2023-02-15 02:37:20 +00:00
Daniel Shokouhi fd1ae9e39b
Update sensor enabled by default logic to be more granular (#3315) 2023-02-15 01:56:18 +00:00
dependabot[bot] 55fff2b87f
Bump com.google.dagger:hilt-android-compiler from 2.44.2 to 2.45 (#3330)
Bumps [com.google.dagger:hilt-android-compiler](https://github.com/google/dagger) from 2.44.2 to 2.45.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.44.2...dagger-2.45)

---
updated-dependencies:
- dependency-name: com.google.dagger:hilt-android-compiler
  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>
2023-02-14 20:35:38 -05:00
dependabot[bot] c1552e3f02
Bump io.sentry:sentry-android from 6.13.0 to 6.13.1 (#3318)
Bumps [io.sentry:sentry-android](https://github.com/getsentry/sentry-java) from 6.13.0 to 6.13.1.
- [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.13.0...6.13.1)

---
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>
2023-02-14 20:35:24 -05:00
Joris Pelgröm 4ae185d31d
Add Matter module preferred to manifest (#3319) 2023-02-14 20:32:46 -05:00
Joris Pelgröm f7cec0e5a2
Multiserver (#3332)
* Multiserver foundation

 - A foundation to build multiserver support on. Not ready for general use.

* Update new vehicle support

* Rebase fixes

* Multiserver settings

 - Show settings for the correct server when editing server settings from the settings

* Bind session to device/install

 - Save an install id with the app install to make sure that it isn't re-used on another device causing issues

* Add migration

 - Migrate server info from shared preferences to the database after database migration and clean up
 - Remove unused url shared preferences
 - Read/save server version from/to database

* Fix auth error when session is refreshed

* Show server name instead of URL

 - Read the server name when getting the config, and save it to the database
 - Allow the user to override the server name in the app's settings

* Multiserver notifications

 - Make notifications aware of which server sent the notification
 - Show server name in notification if more than 1 server is added to the app
 - Use the server-specific repositories when calling webhooks/authenticating/etc

* Handle multiserver in websocket worker

 - Copy the settings database row to the new server ID to allow for server-level settings (websocket) while keeping the original for app-level settings (sensor update frequency), and handle this in onboarding
 - Make the websocket worker check in on all servers and open/close connections where required
 - Add the webhook_id to websocket notifications to link them to servers
 - Update ServerManager servers to defaultServers because I'm using the same filter everywhere

* Migrate shared preferences

 - Move server-specific device name to Server and secret key to ServerConnectionInfo
 - Add a server ID key to the remaining shared preferences and migrate existing values

* Add option to delete server from settings

 - Allow deleting servers directly from the app's settings, because you might not be able to do so from the frontend.

* WebView switching and active server management

 - Allow switching which server is considered 'active' and used for the webview when loading
 - On auth errors remove the server instead of removing the URLs (?)
 - When getting external auth consider that the server might just have been removed (possible race condition from frontend which frequently causes 1 unauthorized connection when logging out)
 - Fetch config after adding a new server to fill in name and version before first use

* Sync registrations and blocking load

 - When starting the app, sync all registrations
 - Remove Wear state with server but new registration required
 - When receiving a new push token, update all registrations
 - Do a blocking load for getting the servers because otherwise the app might think it's not registered when running in the background

* Use StateFlow for the server list

 - Don't manually refresh but use a StateFlow to get updates pushed when the list of servers changes
 - Make settings use unique server keys to prevent constant remove/re-add

* Sensor updates and sync with multiple servers

 - Send sensor updates to all servers and sync changes to the app. Sensors are shared across all servers the app is connected to so changing enabled state on one server will update it for all servers.
 - Don't update sensor enabled state for location tracking directly from onboarding, this should be done in the result.
 - Remove unused SensorWithSettings class

* Send NFC tag scans to all servers

* QS tiles server selection

 - Listen to updates for a specific server
 - Allow selecting server if there is more than one

* Shortcuts server selection

 - Allow selecting server if there is more than one
 - Extract OutlinedButton with DropdownMenu for server selection to a standalone Composable
 - Update QS tiles to not automatically reset server ID when server no longer exists, align with shortcuts

* Fix revoked sessions + crashing app

 - When a session is revoked update the session object to reflect it
 - Fix app crashes on revoked sessions because of race conditions with the AlertDialog causing window active/inactive at the same time as finishing it

* Extra server onboarding tweaks

 - Skip welcome and location
 - Save/fix notification preference for minimal version

* Fix sensor state type conversion errors for new servers

 - If the state is removed but the type isn't, this can result in unwanted conversions throwing errors so remove the state type as well when copying a sensor

* Matter multiserver

 - Request specific server ID in Matter functions
 - Add server selection to shared Matter device flow

* Android Auto multiserver

 - Allow switching server in Android Auto. Defaults to active server, note that it doesn't change the default but only changes it in AA.

* Widgets server selection

 - Add server selection to all widgets and update handling to use the selected server

* Clean up TODOs out of scope

* Device controls multiserver

 - Subscribe to updates for each server that controls are added for
 - Allow managing lock screen enabled controls for each server

* Don't try to register sensors when finishing

 - Don't try to do a sensor update when finishing, as this may cause unintended use of resources we're trying to clean up (when deleting a server)

* Server-level zones and location tracking

 - Keep track of which server a zone belongs to for location tracking, and send updates only to that server
 - Add server name to zone selection setting

* Merge fix

* Show 'Activate Server' any time there are multiple servers

 - If the user is looking for the option to go to their server why hide it if it is already used, making them go back twice?

* More consistent strings

* Improve add server feedback in settings

 - Preserve the activate server before adding a new one to prevent unexpected active server changes
 - Show a Snackbar when another server is added indicating success with a button to activate it, or failure

* Remove unused ServerManager

* Fix tag import
2023-02-14 20:30:06 -05:00
Daniel Shokouhi 9d8055f8ce
Update change log week of 2/3 (#3307)
* Update chane log week of 2/3

* Make it clear the change is for android auto
2023-02-04 22:16:56 -05:00
dependabot[bot] 2fe968bd91
Bump sentry-android from 6.12.1 to 6.13.0 (#3277)
Bumps [sentry-android](https://github.com/getsentry/sentry-java) from 6.12.1 to 6.13.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.12.1...6.13.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>
2023-02-01 12:06:36 -05:00
Daniel Shokouhi d18ff2cf4e
Invalidate cache before updating camera widget (#3281) 2023-01-31 14:55:30 -05:00
Daniel Shokouhi 60f76fcd45
Add TTS notifications to Wear OS (#3266) 2023-01-31 14:18:58 -05:00
Daniel Shokouhi 3af6b007e8
Allow navigation to sensors in android auto if they contain proper attributes (#3273) 2023-01-31 14:14:50 -05:00
Joris Pelgröm bd822afaba
Tweak Matter design (#3274)
- Update images to align with Matter branding guidelines
 - Remove "shared" from screens as this flow is also used for fast pair where it makes no sense
2023-01-26 18:01:36 -05:00
Daniel Shokouhi 65692af585
Change log week of 1/25 (#3267) 2023-01-26 08:33:32 -05:00
dependabot[bot] cfc07362e8
Bump jackson-module-kotlin from 2.13.4 to 2.13.5 (#3256)
Bumps [jackson-module-kotlin](https://github.com/FasterXML/jackson-module-kotlin) from 2.13.4 to 2.13.5.
- [Release notes](https://github.com/FasterXML/jackson-module-kotlin/releases)
- [Commits](https://github.com/FasterXML/jackson-module-kotlin/compare/jackson-module-kotlin-2.13.4...jackson-module-kotlin-2.13.5)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.module:jackson-module-kotlin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-25 20:32:51 -05:00
Daniel Shokouhi 6be617e666
Add ble transmitter and beacon monitor notification commands to Wear OS (#3253)
* Add ble transmitter and beacon monitor commands to Wear OS

* Move log to command check failure
2023-01-25 20:32:32 -05:00
Joris Pelgröm 594e6964f4
Improve state for Android Auto: translate, timestamps (#3262)
- Use string resources for common states to allow for translation
 - Format timestamps to a relative time (if recent) to make it easier to read
2023-01-24 22:37:00 -05:00
Daniel Shokouhi 96cf4f82a3
Update change log week of 1/20 (#3247)
* Update change log week of 1/20

* Tweak wording
2023-01-21 10:55:55 -08:00
dependabot[bot] fd8f138c6c
Bump sentry-android from 6.11.0 to 6.12.1 (#3237)
Bumps [sentry-android](https://github.com/getsentry/sentry-java) from 6.11.0 to 6.12.1.
- [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.11.0...6.12.1)

---
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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-20 19:17:48 +00:00