diff --git a/tools/lint/checks/src/main/java/com/android/lint/CallingIdentityTokenDetector.kt b/tools/lint/checks/src/main/java/com/google/android/lint/CallingIdentityTokenDetector.kt similarity index 90% rename from tools/lint/checks/src/main/java/com/android/lint/CallingIdentityTokenDetector.kt rename to tools/lint/checks/src/main/java/com/google/android/lint/CallingIdentityTokenDetector.kt index a41d65d7ea3ae..b5cab99b4e527 100644 --- a/tools/lint/checks/src/main/java/com/android/lint/CallingIdentityTokenDetector.kt +++ b/tools/lint/checks/src/main/java/com/google/android/lint/CallingIdentityTokenDetector.kt @@ -14,21 +14,21 @@ * limitations under the License. */ -package com.android.lint +package com.google.android.lint -import com.android.lint.CallingIdentityTokenIssueRegistry.Companion.ISSUE_CLEAR_IDENTITY_CALL_NOT_FOLLOWED_BY_TRY_FINALLY -import com.android.lint.CallingIdentityTokenIssueRegistry.Companion.ISSUE_NESTED_CLEAR_IDENTITY_CALLS -import com.android.lint.CallingIdentityTokenIssueRegistry.Companion.ISSUE_NON_FINAL_TOKEN -import com.android.lint.CallingIdentityTokenIssueRegistry.Companion.ISSUE_RESTORE_IDENTITY_CALL_NOT_IN_FINALLY_BLOCK -import com.android.lint.CallingIdentityTokenIssueRegistry.Companion.ISSUE_UNUSED_TOKEN -import com.android.lint.CallingIdentityTokenIssueRegistry.Companion.ISSUE_USE_OF_CALLER_AWARE_METHODS_WITH_CLEARED_IDENTITY -import com.android.lint.CallingIdentityTokenIssueRegistry.Companion.getIncidentMessageClearIdentityCallNotFollowedByTryFinally -import com.android.lint.CallingIdentityTokenIssueRegistry.Companion.getIncidentMessageNestedClearIdentityCallsPrimary -import com.android.lint.CallingIdentityTokenIssueRegistry.Companion.getIncidentMessageNestedClearIdentityCallsSecondary -import com.android.lint.CallingIdentityTokenIssueRegistry.Companion.getIncidentMessageNonFinalToken -import com.android.lint.CallingIdentityTokenIssueRegistry.Companion.getIncidentMessageRestoreIdentityCallNotInFinallyBlock -import com.android.lint.CallingIdentityTokenIssueRegistry.Companion.getIncidentMessageUnusedToken -import com.android.lint.CallingIdentityTokenIssueRegistry.Companion.getIncidentMessageUseOfCallerAwareMethodsWithClearedIdentity +import com.google.android.lint.CallingIdentityTokenIssueRegistry.Companion.ISSUE_CLEAR_IDENTITY_CALL_NOT_FOLLOWED_BY_TRY_FINALLY +import com.google.android.lint.CallingIdentityTokenIssueRegistry.Companion.ISSUE_NESTED_CLEAR_IDENTITY_CALLS +import com.google.android.lint.CallingIdentityTokenIssueRegistry.Companion.ISSUE_NON_FINAL_TOKEN +import com.google.android.lint.CallingIdentityTokenIssueRegistry.Companion.ISSUE_RESTORE_IDENTITY_CALL_NOT_IN_FINALLY_BLOCK +import com.google.android.lint.CallingIdentityTokenIssueRegistry.Companion.ISSUE_UNUSED_TOKEN +import com.google.android.lint.CallingIdentityTokenIssueRegistry.Companion.ISSUE_USE_OF_CALLER_AWARE_METHODS_WITH_CLEARED_IDENTITY +import com.google.android.lint.CallingIdentityTokenIssueRegistry.Companion.getIncidentMessageClearIdentityCallNotFollowedByTryFinally +import com.google.android.lint.CallingIdentityTokenIssueRegistry.Companion.getIncidentMessageNestedClearIdentityCallsPrimary +import com.google.android.lint.CallingIdentityTokenIssueRegistry.Companion.getIncidentMessageNestedClearIdentityCallsSecondary +import com.google.android.lint.CallingIdentityTokenIssueRegistry.Companion.getIncidentMessageNonFinalToken +import com.google.android.lint.CallingIdentityTokenIssueRegistry.Companion.getIncidentMessageRestoreIdentityCallNotInFinallyBlock +import com.google.android.lint.CallingIdentityTokenIssueRegistry.Companion.getIncidentMessageUnusedToken +import com.google.android.lint.CallingIdentityTokenIssueRegistry.Companion.getIncidentMessageUseOfCallerAwareMethodsWithClearedIdentity import com.android.tools.lint.client.api.UElementHandler import com.android.tools.lint.detector.api.Context import com.android.tools.lint.detector.api.Detector diff --git a/tools/lint/checks/src/main/java/com/android/lint/CallingIdentityTokenIssueRegistry.kt b/tools/lint/checks/src/main/java/com/google/android/lint/CallingIdentityTokenIssueRegistry.kt similarity index 96% rename from tools/lint/checks/src/main/java/com/android/lint/CallingIdentityTokenIssueRegistry.kt rename to tools/lint/checks/src/main/java/com/google/android/lint/CallingIdentityTokenIssueRegistry.kt index 1bd63ea17374f..8a747b64c3a4f 100644 --- a/tools/lint/checks/src/main/java/com/android/lint/CallingIdentityTokenIssueRegistry.kt +++ b/tools/lint/checks/src/main/java/com/google/android/lint/CallingIdentityTokenIssueRegistry.kt @@ -14,11 +14,10 @@ * limitations under the License. */ -package com.android.lint +package com.google.android.lint import com.android.tools.lint.client.api.IssueRegistry -// TODO: uncomment when lint API in Soong becomes 30.0+ -// import com.android.tools.lint.client.api.Vendor +import com.android.tools.lint.client.api.Vendor import com.android.tools.lint.detector.api.CURRENT_API import com.android.tools.lint.detector.api.Category import com.android.tools.lint.detector.api.Implementation @@ -45,12 +44,11 @@ class CallingIdentityTokenIssueRegistry : IssueRegistry() { override val minApi: Int get() = 8 -// TODO: uncomment when lint API in Soong becomes 30.0+ -// override val vendor: Vendor = Vendor( -// vendorName = "Android Open Source Project", -// feedbackUrl = "http://b/issues/new?component=315013", -// contact = "brufino@google.com" -// ) + override val vendor: Vendor = Vendor( + vendorName = "Android", + feedbackUrl = "http://b/issues/new?component=315013", + contact = "brufino@google.com" + ) companion object { /** Issue: unused token from Binder.clearCallingIdentity() */ diff --git a/tools/lint/checks/src/test/java/com/android/lint/CallingIdentityTokenDetectorTest.kt b/tools/lint/checks/src/test/java/com/google/android/lint/CallingIdentityTokenDetectorTest.kt similarity index 99% rename from tools/lint/checks/src/test/java/com/android/lint/CallingIdentityTokenDetectorTest.kt rename to tools/lint/checks/src/test/java/com/google/android/lint/CallingIdentityTokenDetectorTest.kt index 0fd1a7621238f..8d12050cae1a4 100644 --- a/tools/lint/checks/src/test/java/com/android/lint/CallingIdentityTokenDetectorTest.kt +++ b/tools/lint/checks/src/test/java/com/google/android/lint/CallingIdentityTokenDetectorTest.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.lint +package com.google.android.lint import com.android.tools.lint.checks.infrastructure.LintDetectorTest import com.android.tools.lint.checks.infrastructure.TestFile