+
Skip to content

Conversation

loganrosen
Copy link
Contributor

Summary

Fixing all of the UseKtx lint warnings in the wear module and updating the lint baseline accordingly, as part of #5221.

Checklist

  • New or updated tests have been added to cover the changes following the testing guidelines.
  • The code follows the project's code style and best_practices.
  • The changes have been thoroughly tested, and edge cases have been considered.
  • Changes are backward compatible whenever feasible. Any breaking changes are documented in the changelog for users and/or in the code for developers depending on the relevance.

@Copilot Copilot AI review requested due to automatic review settings September 24, 2025 02:04
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses UseKtx lint warnings in the wear module by replacing legacy Android APIs with their modern Kotlin extension (KTX) equivalents. The changes modernize the codebase by adopting more idiomatic Kotlin patterns.

Key changes made:

  • Replaced manual styled attributes handling with KTX extension functions
  • Updated URI parsing and bitmap scaling to use KTX alternatives
  • Updated lint baselines to reflect the resolved warnings

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
LoadingView.kt Replaced obtainStyledAttributes with withStyledAttributes KTX extension
CameraTile.kt Replaced Bitmap.createScaledBitmap with Bitmap.scale KTX extension
PhoneInstallActivity.kt Replaced Uri.parse with String.toUri KTX extension
ManualSetupPresenterImpl.kt Replaced Uri.parse with String.toUri KTX extension
OnboardingPresenterImpl.kt Replaced Uri.parse with String.toUri KTX extension
OnboardingActivity.kt Replaced Uri.parse with String.toUri KTX extension
wear/lint-baseline.xml Removed resolved UseKtx lint warnings
automotive/lint-baseline.xml Updated line numbers for existing issues
app/lint-baseline.xml Updated line numbers for existing issues

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@jpelgrom jpelgrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jpelgrom jpelgrom merged commit a38643a into home-assistant:main Sep 24, 2025
18 checks passed
@loganrosen loganrosen deleted the use-ktx-wear branch September 25, 2025 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载