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

Remove @SuppressLint("RestrictedApi") #99

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ittiam-sham
Copy link

To access APIs of tvprovider library without warnings.

Bug: 138150076

To access APIs of tvprovider library without warnings.

Bug: 138150076
@google-cla
Copy link

google-cla bot commented Mar 29, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@@ -143,8 +143,6 @@ object WatchNextHelper {
/**
* Retrieve all programs in Watch Next row.
*/
@SuppressLint("RestrictedApi")
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately the referenced library is restricted, so this lint suppression is needed here.

Copy link
Member

Choose a reason for hiding this comment

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

This removal can be merged now that bug #138150076 has been resolved.

Copy link
Member

@pflammertsma pflammertsma left a comment

Choose a reason for hiding this comment

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

@ittiam-sham Removal of RestrictedApi looks good, but please comment on the other changes or revert them.

)
)
val programBuilder =
values?.getAsString(TvContractCompat.WatchNextPrograms.COLUMN_TITLE)?.let {
Copy link
Member

Choose a reason for hiding this comment

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

What is the purpose of this refactoring? Reading the value first and providing it as a lambda is more difficult to understand, in my opinion.

values?.getAsString(
TvContractCompat
.WatchNextPrograms.COLUMN_INTERNAL_PROVIDER_ID
val program = values?.getAsString(
Copy link
Member

Choose a reason for hiding this comment

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

Same comment here as above.

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