diff options
author | Oleg Baskakov <baskakov@google.com> | 2021-11-10 15:18:45 -0800 |
---|---|---|
committer | Oleg Baskakov <baskakov@google.com> | 2021-11-23 20:32:33 +0000 |
commit | a39a211d4614624249d9b5488d0a85de45ea9e12 (patch) | |
tree | 4b25e836c669b50184d3106607ba8e34a963a754 /android-lint/src | |
parent | 9bb930e3da8a98551f828e56a371a34a87c3e67a (diff) | |
download | idea-a39a211d4614624249d9b5488d0a85de45ea9e12.tar.gz |
Register new watch face configuration check as inspection
Test: In lint (this is just machine generated registration code)
Bug: Not filed
Change-Id: Ia1393da9c7249a6e19767b0882449c5df11ef198
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/AndroidLintWearableConfigurationActionInspection.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 c698e00e226..024ea25b37d 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="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="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.inspectionsAndroidLintWearableConfigurationActionInspection"/> <globalInspection hasStaticDescription="true" shortName="AndroidLintWearStandaloneAppFlag" displayName="Invalid or missing Wear standalone app flag" bundle="messages.AndroidLintBundle" enabledByDefault="true" level="WARNING" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintWearStandaloneAppFlagInspection"/> <globalInspection hasStaticDescription="true" shortName="AndroidLintWebpUnsupported" displayName="WebP Unsupported" bundle="messages.AndroidLintBundle" enabledByDefault="true" level="ERROR" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintWebpUnsupportedInspection"/> <globalInspection hasStaticDescription="true" shortName="AndroidLintWebViewApiAvailability" displayName="WebView API Availability" bundle="messages.AndroidLintBundle" enabledByDefault="true" level="WARNING" implementationClass="com.android.tools.idea.lint.inspections.AndroidLintWebViewApiAvailabilityInspection"/> diff --git a/android-lint/src/com/android/tools/idea/lint/inspections/AndroidLintWearableConfigurationActionInspection.kt b/android-lint/src/com/android/tools/idea/lint/inspections/AndroidLintWearableConfigurationActionInspection.kt new file mode 100644 index 00000000000..5a3a0b33575 --- /dev/null +++ b/android-lint/src/com/android/tools/idea/lint/inspections/AndroidLintWearableConfigurationActionInspection.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.WearableConfigurationActionDetector +import com.android.tools.idea.lint.AndroidLintBundle.Companion.message + +class AndroidLintWearableConfigurationActionInspection : AndroidLintInspectionBase( + message("android.lint.inspections.wearable.configuration.action"), WearableConfigurationActionDetector.ISSUE +)
\ No newline at end of file |