Commit 755ab000 authored by Findit's avatar Findit

Revert "Android: Roll android_tools and fix lint errors"

This reverts commit a9531c4a.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 606631 as the
culprit for failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2E5NTMxYzRhYWU1Y2FhY2RhN2MxNDg1OGRlMzg2MGVmYjQxMjI4YjQM

Sample Failed Build: https://ci.chromium.org/buildbot/chromium/android-rel/4213

Sample Failed Step: compile

Original change's description:
> Android: Roll android_tools and fix lint errors
> 
> Update lint to version 26.4.0-alpha03+.
> 
> This is the first lint update since 2017 September, thus a long list of
> TODOs is expected.
> 
> TBR for mechanical fixes to existing lint errors that are only exposed
> due to update.
> 
> TBR=mheikal@chromium.org
> 
> Bug: 900912
> Change-Id: I3335834ae308a3411ced51bb2c913b76a8f8d8c3
> Reviewed-on: https://chromium-review.googlesource.com/c/1327157
> Reviewed-by: Peter Wen <wnwen@chromium.org>
> Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
> Commit-Queue: Peter Wen <wnwen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#606631}

Change-Id: Ie3a61a6d093d8cd6426ddcd7bf833f98c9b4f78c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 900912
Reviewed-on: https://chromium-review.googlesource.com/c/1327611
Cr-Commit-Position: refs/heads/master@{#606646}
parent 40f90812
......@@ -486,7 +486,7 @@ deps = {
},
'src/third_party/android_tools': {
'url': Var('chromium_git') + '/android_tools.git' + '@' + '6fecaa542f73dd5aeed170d9a4cf340159b42976',
'url': Var('chromium_git') + '/android_tools.git' + '@' + '130499e25286f4d56acafa252fee09f3cc595c49',
'condition': 'checkout_android_native_support',
},
......
......@@ -4,7 +4,6 @@
package org.chromium.android_webview;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
......@@ -167,7 +166,6 @@ public class AwSettings {
EventHandler() {
}
@SuppressLint("HandlerLeak")
void bindUiThread() {
if (mHandler != null) return;
mHandler = new Handler(ThreadUtils.getUiThreadLooper()) {
......
......@@ -179,7 +179,6 @@ class AwWebContentsDelegateAdapter extends AwWebContentsDelegate {
}
@Override
@SuppressLint("HandlerLeak")
public void showRepostFormWarningDialog() {
// TODO(mkosiba) We should be using something akin to the JsResultReceiver as the
// callback parameter (instead of WebContents) and implement a way of converting
......
......@@ -4,7 +4,6 @@
package org.chromium.android_webview;
import android.annotation.SuppressLint;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
......@@ -82,7 +81,6 @@ public class CleanupReference extends WeakReference<Object> {
* This is lazily initialized as ThreadUtils.getUiThreadLooper() may not be
* set yet early in startup.
*/
@SuppressLint("HandlerLeak")
private static class LazyHolder {
static final Handler sHandler = new Handler(ThreadUtils.getUiThreadLooper()) {
@Override
......
......@@ -4,7 +4,6 @@
package org.chromium.support_lib_glue;
import android.annotation.SuppressLint;
import android.webkit.SafeBrowsingResponse;
import android.webkit.ServiceWorkerWebSettings;
import android.webkit.WebMessagePort;
......@@ -49,7 +48,6 @@ class SupportLibWebkitToCompatConverterAdapter implements WebkitToCompatConverte
}
// ServiceWorkerWebSettingsBoundaryInterface
@SuppressLint("NewApi")
@Override
public InvocationHandler convertServiceWorkerSettings(
/* ServiceWorkerWebSettings */ Object serviceWorkerWebSettings) {
......@@ -68,7 +66,6 @@ class SupportLibWebkitToCompatConverterAdapter implements WebkitToCompatConverte
return new ServiceWorkerSettingsAdapter(supportLibWebSettings.getAwServiceWorkerSettings());
}
@SuppressLint("NewApi")
@Override
public /* SupportLibWebResourceError */ InvocationHandler convertWebResourceError(
/* WebResourceError */ Object webResourceError) {
......@@ -86,7 +83,6 @@ class SupportLibWebkitToCompatConverterAdapter implements WebkitToCompatConverte
return new WebResourceErrorAdapter(supportLibError.getAwWebResourceError());
}
@SuppressLint("NewApi")
@Override
public /* SupportLibSafeBrowsingResponse */ InvocationHandler convertSafeBrowsingResponse(
/* SafeBrowsingResponse */ Object safeBrowsingResponse) {
......@@ -106,7 +102,6 @@ class SupportLibWebkitToCompatConverterAdapter implements WebkitToCompatConverte
supportLibResponse.getAwSafeBrowsingResponseCallback());
}
@SuppressLint("NewApi")
@Override
public /* SupportLibWebMessagePort */ InvocationHandler convertWebMessagePort(
/* WebMessagePort */ Object webMessagePort) {
......
......@@ -15,7 +15,6 @@
android:layout_width="match_parent"
android:layout_height="280dp" />
<EditText
tools:ignore="LabelFor"
android:id="@+id/edittext"
android:inputType="text"
android:layout_below="@+id/webview"
......
......@@ -15,9 +15,7 @@
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
<EditText
tools:ignore="Autofill"
android:id="@+id/url_field"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -226,12 +226,22 @@ def _OnStaleMd5(lint_path, config_path, processed_config_path,
print 'File contents:'
with open(result_path) as f:
print f.read()
if can_fail_build:
if not can_fail_build:
return
if can_fail_build and not silent:
traceback.print_exc()
if can_fail_build:
# There are actual lint issues
try:
num_issues = _ParseAndShowResultFile()
except Exception: # pylint: disable=broad-except
if not silent:
print 'Lint created unparseable xml file...'
print 'File contents:'
with open(result_path) as f:
print f.read()
raise
else:
return
_ProcessResultFile()
if num_issues == 0 and include_unexpected:
......
......@@ -32,11 +32,6 @@ Still reading?
<issue id="AuthLeak" severity="Error">
<ignore regexp="chrome/android/javatests"/>
</issue>
<issue id="Autofill">
<!-- Please do not add any additional suppressions here with the exception of the 1 file below -->
<!-- These should be added as tools:ignore="Autofill" in individual files with a bug to fix -->
<ignore regexp="chrome/android/java/res/layout/autofill_card_unmask_prompt.xml"/>
</issue>
<issue id="BadHostnameVerifier" severity="Error">
</issue>
<issue id="ButtonOrder" severity="Error">
......@@ -190,12 +185,6 @@ Still reading?
<issue id="LogConditional" severity="ignore"/>
<issue id="LongLogTag" severity="ignore"/>
<issue id="MissingApplicationIcon" severity="ignore"/>
<issue id="MissingDefaultResource">
<!-- Only used by ToolbarControlContainer guarded by tablet form-factor. -->
<ignore regexp="toolbar_background.9.png"/>
<!-- Only used by FirstRunFlowSequencer guarded by tablet form-factor. -->
<ignore regexp="window_background.xml"/>
</issue>
<issue id="MissingPermission" severity="ignore"/>
<!-- TODO(yolandyan) remove this once all tests are converted to junit4 -->
<issue id="MissingPrefix" severity="ignore"/>
......@@ -265,18 +254,12 @@ Still reading?
<ignore regexp="chrome/android/chrome_strings_grd.resources.zip/values/android_chrome_strings.xml"/>
</issue>
<issue id="PrivateApi" severity="ignore"/>
<!-- Chrome is a system app. -->
<issue id="ProtectedPermissions" severity="ignore"/>
<issue id="Recycle" severity="ignore"/>
<issue id="Registered" severity="ignore"/>
<issue id="ResourceAsColor" severity="ignore"/>
<issue id="ResourceType" severity="Error">
<ignore regexp="/javatests/"/>
</issue>
<issue id="RedundantNamespace">
<!-- Please do not add any additional suppressions here with the exception of the 1 file below -->
<ignore regexp="chrome/android/java/res_autofill_assistant/layout/init_screen.xml"/>
</issue>
<!-- TODO(crbug.com/831774): Play Services starts complaining about RestrictedApi. Needs investigation -->
<issue id="RestrictedApi" severity="ignore"/>
<issue id="RtlCompat" severity="ignore"/>
......
......@@ -840,7 +840,7 @@ if (enable_java_templates) {
lint_suppressions_file = "//build/android/lint/suppressions.xml"
}
_lint_path = "$lint_android_sdk_root/tools-lint/bin/lint"
_lint_path = "$lint_android_sdk_root/tools/bin/lint"
_cache_dir = "$root_build_dir/android_lint_cache"
_result_path = "$target_gen_dir/$target_name/result.xml"
_config_path = "$target_gen_dir/$target_name/config.xml"
......
......@@ -10,7 +10,8 @@
<solid android:color="@color/modern_grey_200" />
</shape>
</item>
<item android:bottom="1dp">
<item xmlns:android="http://schemas.android.com/apk/res/android"
android:bottom="1dp">
<shape android:shape="rectangle">
<solid android:color="@android:color/white" />
</shape>
......
......@@ -5,8 +5,7 @@
<merge
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
xmlns:app="http://schemas.android.com/apk/res-auto">
<!-- Name -->
<org.chromium.chrome.browser.widget.CompatibilityTextInputLayout
......@@ -17,9 +16,7 @@
android:layout_marginTop="@dimen/pref_autofill_field_large_top_margin"
android:layout_marginBottom="@dimen/pref_autofill_field_bottom_margin">
<!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
<EditText
tools:ignore="Autofill"
android:id="@+id/credit_card_name_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -38,9 +35,7 @@
android:layout_marginTop="@dimen/pref_autofill_field_top_margin"
android:layout_marginBottom="@dimen/pref_autofill_field_bottom_margin">
<!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
<EditText
tools:ignore="Autofill"
android:id="@+id/credit_card_number_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
......@@ -29,9 +29,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
<EditText
tools:ignore="Autofill,LabelFor"
android:id="@+id/cc_name_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
......@@ -6,7 +6,6 @@
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
......@@ -27,9 +26,7 @@
style="@style/PreferenceScreenLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
<EditText
tools:ignore="Autofill"
android:id="@+id/homepage_url_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
......@@ -5,7 +5,6 @@
<org.chromium.chrome.browser.ntp.NewTabPageLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/ntp_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......@@ -41,9 +40,7 @@
android:orientation="horizontal"
android:paddingStart="@dimen/location_bar_lateral_padding"
android:paddingEnd="@dimen/location_bar_lateral_padding" >
<!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
<EditText
tools:ignore="Autofill,LabelFor"
style="@style/TextAppearance.NewTabPageSearchBoxText"
android:id="@+id/search_box_text"
android:layout_width="0dp"
......
......@@ -9,6 +9,7 @@
android:layout_height="match_parent" >
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/scroll_view"
......
......@@ -16,9 +16,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
<AutoCompleteTextView
tools:ignore="LabelFor"
android:id="@+id/text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
......@@ -6,16 +6,13 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/search_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:visibility="gone" >
<!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
<EditText
tools:ignore="Autofill,LabelFor"
android:id="@+id/search_text"
android:layout_width="0dp"
android:layout_height="match_parent"
......
......@@ -3,5 +3,5 @@
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<resources>
<string translatable="false" name="manage_space_activity">org.chromium.chrome.browser.preferences.website.ManageSpaceActivity</string>
<string name="manage_space_activity">org.chromium.chrome.browser.preferences.website.ManageSpaceActivity</string>
</resources>
\ No newline at end of file
......@@ -3,7 +3,7 @@
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<resources xmlns:tools="http://schemas.android.com/tools">
<resources>
<!-- Connection info popup dimensions -->
<dimen name="connection_info_padding_wide">24dp</dimen>
<dimen name="connection_info_padding_thin">16dp</dimen>
......@@ -231,12 +231,11 @@
<!-- Find in Page dimensions -->
<dimen name="find_result_bar_touch_width">68dp</dimen>
<dimen name="find_result_bar_draw_width">46dp</dimen>
<!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
<dimen tools:ignore="PxUsage" name="find_result_bar_result_min_height">8px</dimen>
<dimen tools:ignore="PxUsage" name="find_result_bar_active_min_height">16px</dimen>
<dimen tools:ignore="PxUsage" name="find_result_bar_vertical_padding">8px</dimen>
<dimen tools:ignore="PxUsage" name="find_result_bar_min_gap_between_stacks">3px</dimen>
<dimen tools:ignore="PxUsage" name="find_result_bar_stacked_result_height">3px</dimen>
<dimen name="find_result_bar_result_min_height">8px</dimen>
<dimen name="find_result_bar_active_min_height">16px</dimen>
<dimen name="find_result_bar_vertical_padding">8px</dimen>
<dimen name="find_result_bar_min_gap_between_stacks">3px</dimen>
<dimen name="find_result_bar_stacked_result_height">3px</dimen>
<dimen name="find_in_page_separator_width">1dp</dimen>
<dimen name="find_in_page_popup_width">375dp</dimen>
<dimen name="find_in_page_popup_height">60dp</dimen>
......@@ -316,8 +315,7 @@
<dimen name="tile_view_width_condensed">64dp</dimen>
<dimen name="tile_view_icon_size">48dp</dimen>
<dimen name="tile_view_icon_size_modern">24dp</dimen>
<!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
<dimen tools:ignore="PxUsage" name="tile_view_icon_min_size">24px</dimen>
<dimen name="tile_view_icon_min_size">24px</dimen>
<dimen name="tile_view_icon_corner_radius">4dp</dimen>
<dimen name="tile_view_icon_text_size">20dp</dimen>
<dimen name="tile_view_monogram_size_modern">26dp</dimen>
......@@ -411,8 +409,7 @@
<dimen name="default_favicon_size">16dp</dimen>
<dimen name="default_favicon_corner_radius">3dp</dimen>
<dimen name="default_favicon_icon_text_size">10dp</dimen>
<!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
<dimen tools:ignore="PxUsage" name="default_favicon_min_size">16px</dimen>
<dimen name="default_favicon_min_size">16px</dimen>
<dimen name="circular_monogram_size">20dp</dimen>
<dimen name="circular_monogram_text_size">14dp</dimen>
......
......@@ -11,6 +11,7 @@
android:layout_height="wrap_content">
<View
android:id="@+id/divider"
xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/HorizontalDivider" />
<Space
......
......@@ -4,7 +4,6 @@
package org.chromium.chrome.browser.autofill_assistant;
import android.annotation.SuppressLint;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
......@@ -52,11 +51,9 @@ class AutofillAssistantUiDelegate {
"com.android.chrome.USER_INITIATED_FEEDBACK_REPORT_AUTOFILL_ASSISTANT";
private static final int PROGRESS_BAR_INITIAL_PROGRESS = 10;
// TODO(crbug.com/806868): Use correct user locale and remove suppressions.
@SuppressLint("ConstantLocale")
// TODO(crbug.com/806868): Use correct user locale.
private static final SimpleDateFormat sDetailsTimeFormat =
new SimpleDateFormat("H:mma", Locale.getDefault());
@SuppressLint("ConstantLocale")
private static final SimpleDateFormat sDetailsDateFormat =
new SimpleDateFormat("EEE, MMM d", Locale.getDefault());
......
......@@ -202,8 +202,6 @@ public class TranslateTabLayout extends TabLayout {
/**
* Perform the scrolling animation if this tablayout has any scrollable distance.
*/
// TODO(crbug.com/900912): Figure out whether setScrollX is actually available.
@SuppressLint("ObjectAnimatorBinding")
public void startScrollingAnimationIfNeeded() {
int maxScrollDistance = maxScrollDistance();
if (maxScrollDistance == 0) {
......
......@@ -59,8 +59,7 @@ public class ApplicationTestUtils {
// Make sure the screen is on during test runs.
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
sWakeLock = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK
| PowerManager.ACQUIRE_CAUSES_WAKEUP | PowerManager.ON_AFTER_RELEASE,
"Chromium:" + TAG);
| PowerManager.ACQUIRE_CAUSES_WAKEUP | PowerManager.ON_AFTER_RELEASE, TAG);
sWakeLock.acquire();
// Disable Omaha related activities.
......
......@@ -6,14 +6,11 @@
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:padding="24dp">
<!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
<EditText android:id="@+id/pin_dialog_text"
tools:ignore="Autofill,LabelFor"
android:inputType="numberPassword"
android:imeOptions="actionDone"
android:layout_height="wrap_content"
......
......@@ -30,7 +30,7 @@
android:ems="10"
android:id="@+id/url_text" />
<RadioGroup
<RadioGroup xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
......
......@@ -43,6 +43,5 @@
cannot be retrieved by name.
Note: Constants taken directly from Android's core/res/values/config.xml.
-->
<!-- TODO(crbug.com/900912): Fix and remove lint ignore -->
<dimen name="config_min_scaling_span" tools:ignore="InOrMmUsage">12.0mm</dimen>
<dimen name="config_min_scaling_span">12.0mm</dimen>
</resources>
......@@ -219,7 +219,6 @@ public class DisplayAndroidManager {
return ContextUtils.getApplicationContext();
}
@SuppressLint("NewApi")
private static DisplayManager getDisplayManager() {
return (DisplayManager) getContext().getSystemService(Context.DISPLAY_SERVICE);
}
......
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