summaryrefslogtreecommitdiff
path: root/lint/src
diff options
context:
space:
mode:
authorSam Wang <samofcorinth@google.com>2020-10-30 08:16:08 +0000
committerSam Wang <samofcorinth@google.com>2020-11-12 06:13:29 +0000
commit05458fd377e203a6ba998b9e9d013b98b34c213b (patch)
tree7c39da7a438bb49549226b54b32d6f32b3fbbc1c /lint/src
parent7749eddc8fca97533d3c0546f20ce78bb9538e1d (diff)
downloadidea-05458fd377e203a6ba998b9e9d013b98b34c213b.tar.gz
Add generated files for UnspecifiedImmutableFlag
Bug: 159727792 Test: N/A Change-Id: I7443446bf8ca35b2b967cb98ccfddeb5637a8bd1
Diffstat (limited to 'lint/src')
-rw-r--r--lint/src/META-INF/lint-plugin.xml1
-rw-r--r--lint/src/com/android/tools/idea/lint/common/AndroidLintUnspecifiedImmutableFlagInspection.kt23
2 files changed, 24 insertions, 0 deletions
diff --git a/lint/src/META-INF/lint-plugin.xml b/lint/src/META-INF/lint-plugin.xml
index 9f125804ed4..679a5952260 100644
--- a/lint/src/META-INF/lint-plugin.xml
+++ b/lint/src/META-INF/lint-plugin.xml
@@ -70,6 +70,7 @@
<globalInspection hasStaticDescription="true" shortName="AndroidLintStopShip" displayName="Code contains STOPSHIP marker" bundle="messages.LintBundle" enabledByDefault="false" level="ERROR" implementationClass="com.android.tools.idea.lint.common.AndroidLintStopShipInspection"/>
<globalInspection hasStaticDescription="true" shortName="AndroidLintSupportAnnotationUsage" displayName="Incorrect support annotation usage" bundle="messages.LintBundle" enabledByDefault="true" level="ERROR" implementationClass="com.android.tools.idea.lint.common.AndroidLintSupportAnnotationUsageInspection"/>
<globalInspection hasStaticDescription="true" shortName="AndroidLintUnknownNullness" displayName="Unknown nullness" bundle="messages.LintBundle" enabledByDefault="false" level="WARNING" implementationClass="com.android.tools.idea.lint.common.AndroidLintUnknownNullnessInspection"/>
+ <globalInspection hasStaticDescription="true" shortName="AndroidLintUnspecifiedImmutableFlag" displayName="Missing PendingIntent mutability flag" bundle="messages.LintBundle" enabledByDefault="true" level="WARNING" implementationClass="com.android.tools.idea.lint.common.AndroidLintUnspecifiedImmutableFlagInspection"/>
<globalInspection hasStaticDescription="true" shortName="AndroidLintUseValueOf" displayName="Should use valueOf instead of new" bundle="messages.LintBundle" enabledByDefault="true" level="WARNING" implementationClass="com.android.tools.idea.lint.common.AndroidLintUseValueOfInspection"/>
<globalInspection hasStaticDescription="true" shortName="AndroidLintUsingHttp" displayName="Using HTTP instead of HTTPS" bundle="messages.LintBundle" enabledByDefault="true" level="WARNING" implementationClass="com.android.tools.idea.lint.common.AndroidLintUsingHttpInspection"/>
<globalInspection hasStaticDescription="true" shortName="AndroidLintVisibleForTests" displayName="Visible Only For Tests" bundle="messages.LintBundle" enabledByDefault="true" level="WARNING" implementationClass="com.android.tools.idea.lint.common.AndroidLintVisibleForTestsInspection"/>
diff --git a/lint/src/com/android/tools/idea/lint/common/AndroidLintUnspecifiedImmutableFlagInspection.kt b/lint/src/com/android/tools/idea/lint/common/AndroidLintUnspecifiedImmutableFlagInspection.kt
new file mode 100644
index 00000000000..bf1b1066d9d
--- /dev/null
+++ b/lint/src/com/android/tools/idea/lint/common/AndroidLintUnspecifiedImmutableFlagInspection.kt
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2020 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.common
+
+import com.android.tools.idea.lint.common.LintBundle.Companion.message
+import com.android.tools.lint.checks.PendingIntentMutableFlagDetector
+
+class AndroidLintUnspecifiedImmutableFlagInspection : AndroidLintInspectionBase(
+ message("android.lint.inspections.unspecified.immutable.flag"), PendingIntentMutableFlagDetector.ISSUE
+) \ No newline at end of file