diff options
author | Oleg Baskakov <baskakov@google.com> | 2021-11-12 12:23:03 -0800 |
---|---|---|
committer | Oleg Baskakov <baskakov@google.com> | 2021-12-16 18:23:50 +0000 |
commit | 53c743839609f69716c63757466907462975e714 (patch) | |
tree | 75da53037dd0174b45f3cfc11fd0e7c7d8c837e8 /android-lint/src | |
parent | b0b5a8cf3111ea967e80a9fd951fe32e56da7bbc (diff) | |
download | idea-53c743839609f69716c63757466907462975e714.tar.gz |
178373617: Register a lint check for incorrect wearableConfigurationAction values
Bug: not filed
Test: checked automatically by lint
Change-Id: Ice0e4dfa25e05df2f9b539aeee16a75861b886fa
Diffstat (limited to 'android-lint/src')
-rw-r--r-- | android-lint/src/META-INF/android-lint-plugin.xml | 1 | ||||
-rw-r--r-- | android-lint/src/com/android/tools/idea/lint/inspections/AndroidLintWatchFaceForAndroidXInspection.kt | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/android-lint/src/META-INF/android-lint-plugin.xml b/android-lint/src/META-INF/android-lint-plugin.xml index 890ded75d7b..31a3b9eb4d0 100644 --- a/android-lint/src/META-INF/android-lint-plugin.xml +++ b/android-lint/src/META-INF/android-lint-plugin.xml @@ -341,6 +341,7 @@ <globalInspection hasStaticDescription="true" shortName="AndroidLintViewHolder" displayName="View Holder Candidates" bundle="messages.AndroidLintBundle" enabledByDefault="true" level="WARNING" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintViewHolderInspection"/> <globalInspection hasStaticDescription="true" shortName="AndroidLintWakelockTimeout" displayName="Using wakeLock without timeout" bundle="messages.AndroidLintBundle" enabledByDefault="true" level="WARNING" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintWakelockTimeoutInspection"/> <globalInspection hasStaticDescription="true" shortName="AndroidLintWatchFaceEditor" displayName="Watch face editor with incorrect launchMode" bundle="messages.AndroidLintBundle" enabledByDefault="true" level="WARNING" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintWatchFaceEditorInspection"/> + <globalInspection hasStaticDescription="true" shortName="AndroidLintWatchFaceForAndroidX" displayName="AndroidX watch faces must use action WATCH_FACE_EDITOR" bundle="messages.AndroidLintBundle" enabledByDefault="true" level="WARNING" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintWatchFaceForAndroidXInspection"/> <globalInspection hasStaticDescription="true" shortName="AndroidLintWearableActionDuplicate" displayName="Duplicate watch face configuration activities found" bundle="messages.AndroidLintBundle" enabledByDefault="true" level="WARNING" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintWearableActionDuplicateInspection"/> <globalInspection hasStaticDescription="true" shortName="AndroidLintWearableBindListener" displayName="Usage of Android Wear BIND_LISTENER is deprecated" bundle="messages.AndroidLintBundle" enabledByDefault="true" level="ERROR" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintWearableBindListenerInspection"/> <globalInspection hasStaticDescription="true" shortName="AndroidLintWearableConfigurationAction" displayName="Wear configuration action metadata must match an activity" bundle="messages.AndroidLintBundle" enabledByDefault="true" level="WARNING" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintWearableConfigurationActionInspection"/> diff --git a/android-lint/src/com/android/tools/idea/lint/inspections/AndroidLintWatchFaceForAndroidXInspection.kt b/android-lint/src/com/android/tools/idea/lint/inspections/AndroidLintWatchFaceForAndroidXInspection.kt new file mode 100644 index 00000000000..6051f165fcc --- /dev/null +++ b/android-lint/src/com/android/tools/idea/lint/inspections/AndroidLintWatchFaceForAndroidXInspection.kt @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.tools.idea.lint.inspections + +import com.android.tools.idea.lint.common.AndroidLintInspectionBase +import com.android.tools.lint.checks.WatchFaceForAndroidXDetector +import com.android.tools.idea.lint.AndroidLintBundle.Companion.message + +class AndroidLintWatchFaceForAndroidXInspection : AndroidLintInspectionBase( + message("android.lint.inspections.watch.face.for.android.x"), WatchFaceForAndroidXDetector.ISSUE +)
\ No newline at end of file |