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

refactor(android): avoid accessing thermal status change for older APIs #1661

Merged
merged 1 commit into from
Dec 24, 2024

Conversation

abhaysood
Copy link
Contributor

Description

PowerManager.OnThermalStatusChangedListener is available only for API 29 and above. This PR makes sure that this class is only accessed for APIs when it's available.

Related issue

Closes #1660

Copy link

vercel bot commented Dec 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
measure-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 24, 2024 10:35am

@abhaysood abhaysood requested a review from detj December 24, 2024 10:30
@abhaysood abhaysood self-assigned this Dec 24, 2024
@abhaysood abhaysood added refactor refactoring tasks android android related labels Dec 24, 2024
PowerManager.OnThermalStatusChangedListener is available only
for API 29 and above. This PR makes sure that this class
is only accessed for APIs when it's available.
@abhaysood abhaysood merged commit 38f7b59 into main Dec 24, 2024
9 checks passed
@abhaysood abhaysood deleted the fix-thermal-status-access-warning branch December 24, 2024 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android android related refactor refactoring tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix warning when accessing thermal status change listener on SDK < 29
2 participants