Commit 172503b9 authored by Peter Wen's avatar Peter Wen Committed by Commit Bot

Android: Remove seven lint suppressions

Removing lint suppressions allows our new code to benefit from these
lint checks.

Regenerate lint-baseline.xml to account for UseCompoundDrawables moving
from lint-suppressions.xml to lint-baseline.xml.

Removed from lint-suppressions.xml:
- UseCompoundDrawables
- UselessParent
- UseMinSdkAttributes
- ValidFragment
- VisibleForTests
- WebViewApiAvailability
- WrongCall

Bug: 1116130
Change-Id: I89623b3f2c448b2332c39147892dff9d0d2b6001
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2422466
Auto-Submit: Peter Wen <wnwen@chromium.org>
Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Reviewed-by: default avatarDonn Denman <donnd@chromium.org>
Reviewed-by: default avatarMohamed Heikal <mheikal@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809950}
parent 9fc1c0c9
...@@ -36,6 +36,7 @@ public final class WebViewPackageHelper { ...@@ -36,6 +36,7 @@ public final class WebViewPackageHelper {
*/ */
// This method is copied from androidx.webkit.WebViewCompat. // This method is copied from androidx.webkit.WebViewCompat.
// TODO(crbug.com/1020024) use androidx.webkit.WebViewCompat#getCurrentWebViewPackage instead. // TODO(crbug.com/1020024) use androidx.webkit.WebViewCompat#getCurrentWebViewPackage instead.
@SuppressWarnings("WebViewApiAvailability")
public static PackageInfo getCurrentWebViewPackage(Context context) { public static PackageInfo getCurrentWebViewPackage(Context context) {
if (sWebViewCurrentPackage != null) { if (sWebViewCurrentPackage != null) {
return sWebViewCurrentPackage; return sWebViewCurrentPackage;
......
...@@ -364,37 +364,9 @@ Still reading? ...@@ -364,37 +364,9 @@ Still reading?
<ignore regexp="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java"/> <ignore regexp="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java"/>
<ignore regexp="chrome/android/java/src/org/chromium/chrome/browser/download/home/storage/StorageSummaryProvider.java"/> <ignore regexp="chrome/android/java/src/org/chromium/chrome/browser/download/home/storage/StorageSummaryProvider.java"/>
</issue> </issue>
<issue id="UseCompoundDrawables">
<!-- Upscaling 24dp to 48dp doesn't work as expected with a TextView compound drawable. -->
<ignore regexp="components/browser_ui/photo_picker/android/java/res/layout/photo_picker_bitmap_view.xml"/>
<!-- Cannot add image to textview as the image is supplied through @style/TabBarShadow. -->
<ignore regexp="chrome/browser/share/android/java/res/layout/qrcode_camera_error_layout.xml"/>
</issue>
<issue id="UselessParent">
<ignore regexp="android_webview/tools/system_webview_shell/apk/res/layout/activity_webview_browser.xml"/>
<ignore regexp="chrome/android/java/res/layout/data_usage_breakdown.xml"/>
<ignore regexp="tools/android/kerberos/SpnegoAuthenticator/res/layout/activity_account_authenticator.xml"/>
</issue>
<issue id="UsesMinSdkAttributes" severity="ignore"/>
<issue id="ValidFragment">
<ignore regexp="chrome/android/java/src/org/chromium/chrome/browser/media/router/BaseMediaRouteDialogManager.java"/>
<ignore regexp="chrome/android/java/src/org/chromium/chrome/browser/media/router/MediaRouteChooserDialogManager.java"/>
<ignore regexp="chrome/android/java/src/org/chromium/chrome/browser/media/router/MediaRouteControllerDialogManager.java"/>
<ignore regexp="chrome/android/java/src/org/chromium/chrome/browser/settings/privacy/OtherFormsOfHistoryDialogFragment.java"/>
<ignore regexp="media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java"/>
</issue>
<issue id="VectorPath" severity="ignore"/> <issue id="VectorPath" severity="ignore"/>
<!-- These constructors are useful for layout editors which we currently do not support. -->
<issue id="ViewConstructor" severity="ignore"/> <issue id="ViewConstructor" severity="ignore"/>
<issue id="VisibleForTests">
<!-- TODO(crbug.com/757124): Remove all these specific Feedback files after underlying issue is resolved -->
<!-- Underlying issue is that Android FeedbackOptions.Builder using @VisibleForTesting without 'otherwise='. -->
<ignore regexp="clank/java/src/com/google/android/apps/chrome/feedback/FeedbackUtil.java"/>
<ignore regexp="clank/java/src/com/google/android/apps/chrome/feedback/PlayServicesFeedbackReporter.java"/>
<ignore regexp="clank/java/src/com/google/android/apps/chrome/help/FeedbackCategoryChooserActivity.java"/>
<ignore regexp="clank/java/src/com/google/android/apps/chrome/help/HelpAndFeedbackInternal.java"/>
</issue>
<issue id="WebViewApiAvailability" severity="ignore"/>
<issue id="WrongCall" severity="ignore"/>
<issue id="WrongConstant"> <issue id="WrongConstant">
<!-- Discussed in crbug.com/1069204, ignoring this class of errors since these are Q+ constants. --> <!-- Discussed in crbug.com/1069204, ignoring this class of errors since these are Q+ constants. -->
<ignore regexp="Must be one of: LineBreaker.BREAK_STRATEGY_SIMPLE, LineBreaker.BREAK_STRATEGY_HIGH_QUALITY, LineBreaker.BREAK_STRATEGY_BALANCED"/> <ignore regexp="Must be one of: LineBreaker.BREAK_STRATEGY_SIMPLE, LineBreaker.BREAK_STRATEGY_HIGH_QUALITY, LineBreaker.BREAK_STRATEGY_BALANCED"/>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<org.chromium.chrome.browser.datareduction.settings.DataReductionSiteBreakdownView <org.chromium.chrome.browser.datareduction.settings.DataReductionSiteBreakdownView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/breakdown" android:id="@+id/breakdown"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -33,7 +34,8 @@ ...@@ -33,7 +34,8 @@
<TableRow <TableRow
android:id="@+id/data_reduction_proxy_breakdown_table_labels" android:id="@+id/data_reduction_proxy_breakdown_table_labels"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="match_parent"> android:layout_width="match_parent"
tools:ignore="UselessParent">
<TextView <TextView
android:id="@+id/data_reduction_breakdown_site_title" android:id="@+id/data_reduction_breakdown_site_title"
......
...@@ -52,7 +52,7 @@ public class TextViewEllipsizerSafe extends TextView { ...@@ -52,7 +52,7 @@ public class TextViewEllipsizerSafe extends TextView {
try { try {
// Attempt to set and measure the altered text. In rare cases this may crash. // Attempt to set and measure the altered text. In rare cases this may crash.
setText(result); setText(result);
onMeasure(measureSpec, measureSpec); measure(measureSpec, measureSpec);
return; return;
} catch (Exception e) { } catch (Exception e) {
......
...@@ -43,6 +43,7 @@ import java.nio.ByteBuffer; ...@@ -43,6 +43,7 @@ import java.nio.ByteBuffer;
* download takes place in another thread used by ImageReader. * download takes place in another thread used by ImageReader.
**/ **/
@JNINamespace("media") @JNINamespace("media")
@SuppressWarnings("ValidFragment") // This fragment is created by native.
public class ScreenCapture extends Fragment { public class ScreenCapture extends Fragment {
private static final String TAG = "ScreenCapture"; private static final String TAG = "ScreenCapture";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment