Fix Lint warnings in fragment
Remove the lint-baseline.xml and handle
all Lint warnings in the code itself.
Test: ./gradlew lintDebug
Change-Id: I508732eb5c5b1ec9b8d1c9d70d09c9be0d126dec
diff --git a/fragment/fragment/lint-baseline.xml b/fragment/fragment/lint-baseline.xml
deleted file mode 100644
index 8a8c65d..0000000
--- a/fragment/fragment/lint-baseline.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2019 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.
- -->
-
-<issues format="5" by="lint 3.5.0-beta04" client="gradle" variant="debug" version="3.5.0-beta04">
-
- <issue
- id="KotlinPropertyAccess"
- message="This method should be called `getHasOptionsMenu` such that `hasOptionsMenu` can be accessed as a property from Kotlin; see https://android.github.io/kotlin-guides/interop.html#property-prefixes"
- errorLine1=" final public boolean hasOptionsMenu() {"
- errorLine2=" ~~~~~~~~~~~~~~">
- <location
- file="src/main/java/androidx/fragment/app/Fragment.java"
- line="1018"
- column="26"/>
- </issue>
-
-</issues>
diff --git a/fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java b/fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
index 4dc499c..84058db 100644
--- a/fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
+++ b/fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
@@ -1063,6 +1063,7 @@
/** @hide */
@RestrictTo(LIBRARY_GROUP_PREFIX)
+ @SuppressLint("KotlinPropertyAccess")
final public boolean hasOptionsMenu() {
return mHasMenu;
}