{ "changes": [ { "host": "android", "project": "platform/tools/metalava", "branch": "metalava-main", "changeNumber": "3065005", "patchset": 1, "status": "merged", "creationTime": "1714391237000", "lastModificationTime": "1714403233000", "latestRevision": "ecb97854173d1215bd66c18baee117027e64609a", "revisions": [ { "gitRevision": "ecb97854173d1215bd66c18baee117027e64609a", "patchSet": 1, "fetchs": [ { "method": "repo", "url": "platform/tools/metalava", "ref": "refs/changes/05/3065005/1" }, { "method": "http", "url": "https://android.googlesource.com/platform/tools/metalava", "ref": "refs/changes/05/3065005/1" } ], "commit": { "parents": [ { "commitId": "da5ecac6c5444afd800f8eb43ee96121e1e459da", "subject": "Avoid `Extract System Api` test depending on deprecated behavior" } ], "author": { "name": "Paul Duffin", "email": "paulduffin@google.com" }, "committer": { "name": "Paul Duffin", "email": "paulduffin@google.com" }, "subject": "Add tests for when API is included in later SDK than dessert release", "commitMessage": "Add tests for when API is included in later SDK than dessert release\n\nIf an API is listed as being in an SDK extension of a dessert release\n`X` where `X` is greater the dessert release in which the API was\nincluded then Android lint seems to ignore that it was included in\na dessert release and complains even when it is used in an App that\nsets `min_sdk_version` to the dessert release in which the API was\nreleased.\n\ne.g. The `ConnectivityManager.registerQosCallback(...)` method is\ncurrently defined in the `api-versions.xml` file as:\n```\n\n```\n\nAndroid Lint handles that correctly.\n\nHowever, change https://r.android.com/3061686 (which fixes an error\nwhere system API sdk extension jars were not being passed to Metalava)\ncauses the definition to change to:\n```\n\n```\n\nThat causes Android lint to report the following problem:\n```\npackages/services/Telephony/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/protocol/msrp/MsrpSession.java:118: Error: Call requires version 1 of the U Extensions SDK (current min is 0): android.net.ConnectivityManager#registerQosCallback [NewApi]\n connectivityManager.registerQosCallback(new QosSocketInfo(network, socket),\n```\n\nThis change adds tests to highlight that issue and a follow-up change\nwill fix them. That will prevent the `sdks` attribute being added in\nthis case and so it will have the same behavior as without change\nhttps://r.android.com/3061686.\n\nBug: 336993217\nTest: ./gradlew\nChange-Id: Ic93d9224eb79011047e38654890256704b1fe5af\n", "bugIds": [ "336993217" ] }, "creationTime": "1714391237000", "ref": "refs/changes/05/3065005/1", "uploader": { "name": "Paul Duffin", "email": "paulduffin@google.com", "accountId": "1039338" } } ], "owner": { "name": "Paul Duffin", "email": "paulduffin@google.com" }, "changeId": "Ic93d9224eb79011047e38654890256704b1fe5af", "submittedTime": "1714403233000", "projectPath": "tools/metalava" } ] }