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

Add datalayer to README. Move Tile name to constant.Add exception if version format is not correct. #2130

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

kul3r4
Copy link
Collaborator

@kul3r4 kul3r4 commented Mar 17, 2024

WHAT

Add datalayer to README. Move Tile name to constant.Add exception if version format is not correct.

WHY

#2114

HOW

Checklist 📋

  • Add explicit visibility modifier and explicit return types for public declarations
  • Run spotless check
  • Run tests
  • Update metalava's signature text files

@kul3r4 kul3r4 requested review from luizgrp and yschimke and removed request for luizgrp March 17, 2024 21:58
README.md Outdated Show resolved Hide resolved
@@ -33,8 +33,7 @@ public class InstallTilePrompt(private val phoneDataLayerAppHelper: PhoneDataLay
* Returns a [AppHelperNodeStatus] that meets the criteria to show this prompt, otherwise
* returns null.
*/
private val tileName = "com.example.MediaPlayerTile"
public suspend fun shouldDisplayPrompt(): AppHelperNodeStatus? {
public suspend fun shouldDisplayPrompt(tileName: String): AppHelperNodeStatus? {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ooops, good catch.

return AppHelperResultCode.APP_HELPER_RESULT_NO_COMPANION_FOUND
} catch (ex: Exception) {
when (ex) {
is PackageManager.NameNotFoundException, is IllegalArgumentException -> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about changing Version(version) to Version.parse(version) returning Version??

Copy link
Collaborator

Choose a reason for hiding this comment

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

For follow up

@yschimke yschimke merged commit b9e9860 into google:main Mar 18, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants