Remove @SuppressLint("RestrictedApi")#100
Open
ittiam-sham wants to merge 1 commit intoandroid:mainfrom
Open
Conversation
To access APIs of tvprovider library without warnings. Bug: 138150076
pflammertsma
reviewed
Jun 2, 2023
| // Retrieve the corresponding metadata item and return | ||
| return programItem?.let { db.metadata().findById(it.contentId) } | ||
| val watchNextProgramItem = TvLauncherUtils.getWatchNextPrograms(context).find { it.id == programId } | ||
| return watchNextProgramItem?.let { db.metadata().findById(it.contentId) } |
Member
There was a problem hiding this comment.
I don't see how this more verbose code block is an improvement over the inline assignment using an elvis operator with less code repetition.
Member
There was a problem hiding this comment.
@ittiam-sham Is there any benefit to expanding the existing code block?
|
|
||
| /** Collection of static methods used to handle Android TV Home Screen Launcher operations */ | ||
| @RequiresApi(26) | ||
| @SuppressLint("RestrictedApi") |
Member
There was a problem hiding this comment.
Unfortunately the referenced library is restricted, so this lint suppression is needed here.
Member
There was a problem hiding this comment.
This removal can be merged now that bug #138150076 has been resolved.
| * Helper method used to retrieve a metadata item object given its program ID. Restricted API | ||
| * is being used to compared programs based on their ID. | ||
| */ | ||
| @SuppressLint("RestrictedApi") |
Member
There was a problem hiding this comment.
This removal can be merged now that bug #138150076 has been resolved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To access APIs of tvprovider library without warnings.
Bug: 138150076