Commit 7c5f90d7 authored by Yu Han's avatar Yu Han Committed by Commit Bot

Revert "Android: Enable custom lint checks from aars"

This reverts commit a2c6108b.

Reason for revert: Suspect cause of tree closure. https://ci.chromium.org/p/chromium/builders/ci/Cast%20Android%20(dbg)/115938?

Original change's description:
> Android: Enable custom lint checks from aars
>
> Some aar files (e.g. androidx) that chrome depends on contain a lint.jar
> file and/or a annotations.zip file. The lint.jar file includes custom
> android lint checks. The annotations.zip file contains @IntDef and other
> annotations needed for lint checks that are usually available by source
> but are not available in aars.
>
> By using these files, we can make our existing lint checks more
> comprehensive as well as benefit from lint checks by the aar library
> authors.
>
> See newly ignored checks in lint-baseline.xml which is updated in this
> CL as an example. Actually fixing these errors is left for future CLs
> in order to enable them quicker and avoid unnecessary relands.
>
> Bug: 1078229
> Change-Id: I3a8e67a9c41b8e8fbe339632f795b2aaab63456e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2510793
> Commit-Queue: Peter Wen <wnwen@chromium.org>
> Reviewed-by: Mohamed Heikal <mheikal@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#826017}

TBR=wnwen@chromium.org,mheikal@chromium.org

Change-Id: I9b1fc0745465fcdd9b153dbbe2495b3b912b25da
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1078229
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2531179Reviewed-by: default avatarYu Han <yuzhehan@chromium.org>
Commit-Queue: Yu Han <yuzhehan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826034}
parent 6b58a991
...@@ -35,7 +35,6 @@ _DISABLED_ALWAYS = [ ...@@ -35,7 +35,6 @@ _DISABLED_ALWAYS = [
"SwitchIntDef", # Many C++ enums are not used at all in java. "SwitchIntDef", # Many C++ enums are not used at all in java.
"UniqueConstants", # Chromium enums allow aliases. "UniqueConstants", # Chromium enums allow aliases.
"UnusedAttribute", # Chromium apks have various minSdkVersion values. "UnusedAttribute", # Chromium apks have various minSdkVersion values.
"ObsoleteLintCustomCheck", # We have no control over custom lint checks.
] ]
# These checks are not useful for test targets and adds an unnecessary burden # These checks are not useful for test targets and adds an unnecessary burden
...@@ -62,7 +61,6 @@ _DISABLED_FOR_TESTS = [ ...@@ -62,7 +61,6 @@ _DISABLED_FOR_TESTS = [
_RES_ZIP_DIR = 'RESZIPS' _RES_ZIP_DIR = 'RESZIPS'
_SRCJAR_DIR = 'SRCJARS' _SRCJAR_DIR = 'SRCJARS'
_AAR_DIR = 'AARS'
def _SrcRelative(path): def _SrcRelative(path):
...@@ -77,8 +75,6 @@ def _GenerateProjectFile(android_manifest, ...@@ -77,8 +75,6 @@ def _GenerateProjectFile(android_manifest,
classpath=None, classpath=None,
srcjar_sources=None, srcjar_sources=None,
resource_sources=None, resource_sources=None,
custom_lint_jars=None,
custom_annotation_zips=None,
android_sdk_version=None): android_sdk_version=None):
project = ElementTree.Element('project') project = ElementTree.Element('project')
root = ElementTree.SubElement(project, 'root') root = ElementTree.SubElement(project, 'root')
...@@ -113,14 +109,6 @@ def _GenerateProjectFile(android_manifest, ...@@ -113,14 +109,6 @@ def _GenerateProjectFile(android_manifest,
for resource_file in resource_sources: for resource_file in resource_sources:
resource = ElementTree.SubElement(main_module, 'resource') resource = ElementTree.SubElement(main_module, 'resource')
resource.set('file', resource_file) resource.set('file', resource_file)
if custom_lint_jars:
for lint_jar in custom_lint_jars:
lint = ElementTree.SubElement(main_module, 'lint-checks')
lint.set('file', lint_jar)
if custom_annotation_zips:
for annotation_zip in custom_annotation_zips:
annotation = ElementTree.SubElement(main_module, 'annotations')
annotation.set('file', annotation_zip)
return project return project
...@@ -210,7 +198,6 @@ def _RunLint(lint_binary_path, ...@@ -210,7 +198,6 @@ def _RunLint(lint_binary_path,
classpath, classpath,
cache_dir, cache_dir,
android_sdk_version, android_sdk_version,
aars,
srcjars, srcjars,
min_sdk_version, min_sdk_version,
resource_sources, resource_sources,
...@@ -267,22 +254,6 @@ def _RunLint(lint_binary_path, ...@@ -267,22 +254,6 @@ def _RunLint(lint_binary_path,
resource_sources.extend( resource_sources.extend(
build_utils.ExtractAll(resource_zip, path=resource_dir)) build_utils.ExtractAll(resource_zip, path=resource_dir))
logging.info('Extracting aars')
aar_root_dir = os.path.join(lint_gen_dir, _AAR_DIR)
custom_lint_jars = []
custom_annotation_zips = []
if aars:
for aar in aars:
aar_dir = os.path.join(aar_root_dir, os.path.splitext(aar)[0])
shutil.rmtree(aar_dir, True)
os.makedirs(aar_dir)
aar_files = build_utils.ExtractAll(aar, path=aar_dir)
for f in aar_files:
if f.endswith('lint.jar'):
custom_lint_jars.append(f)
elif f.endswith('annotations.zip'):
custom_annotation_zips.append(f)
logging.info('Extracting srcjars') logging.info('Extracting srcjars')
srcjar_root_dir = os.path.join(lint_gen_dir, _SRCJAR_DIR) srcjar_root_dir = os.path.join(lint_gen_dir, _SRCJAR_DIR)
srcjar_sources = [] srcjar_sources = []
...@@ -302,8 +273,7 @@ def _RunLint(lint_binary_path, ...@@ -302,8 +273,7 @@ def _RunLint(lint_binary_path,
project_file_root = _GenerateProjectFile(lint_android_manifest_path, project_file_root = _GenerateProjectFile(lint_android_manifest_path,
android_sdk_root, cache_dir, sources, android_sdk_root, cache_dir, sources,
classpath, srcjar_sources, classpath, srcjar_sources,
resource_sources, custom_lint_jars, resource_sources,
custom_annotation_zips,
android_sdk_version) android_sdk_version)
project_xml_path = os.path.join(lint_gen_dir, 'project.xml') project_xml_path = os.path.join(lint_gen_dir, 'project.xml')
...@@ -357,7 +327,6 @@ def _RunLint(lint_binary_path, ...@@ -357,7 +327,6 @@ def _RunLint(lint_binary_path,
end = time.time() - start end = time.time() - start
logging.info('Lint command took %ss', end) logging.info('Lint command took %ss', end)
if not is_debug: if not is_debug:
shutil.rmtree(aar_root_dir, ignore_errors=True)
shutil.rmtree(resource_root_dir, ignore_errors=True) shutil.rmtree(resource_root_dir, ignore_errors=True)
shutil.rmtree(srcjar_root_dir, ignore_errors=True) shutil.rmtree(srcjar_root_dir, ignore_errors=True)
os.unlink(project_xml_path) os.unlink(project_xml_path)
...@@ -401,7 +370,6 @@ def _ParseArgs(argv): ...@@ -401,7 +370,6 @@ def _ParseArgs(argv):
help='Treat all warnings as errors.') help='Treat all warnings as errors.')
parser.add_argument('--java-sources', parser.add_argument('--java-sources',
help='File containing a list of java sources files.') help='File containing a list of java sources files.')
parser.add_argument('--aars', help='GN list of included aars.')
parser.add_argument('--srcjars', help='GN list of included srcjars.') parser.add_argument('--srcjars', help='GN list of included srcjars.')
parser.add_argument('--manifest-path', parser.add_argument('--manifest-path',
help='Path to original AndroidManifest.xml') help='Path to original AndroidManifest.xml')
...@@ -430,7 +398,6 @@ def _ParseArgs(argv): ...@@ -430,7 +398,6 @@ def _ParseArgs(argv):
args = parser.parse_args(build_utils.ExpandFileArgs(argv)) args = parser.parse_args(build_utils.ExpandFileArgs(argv))
args.java_sources = build_utils.ParseGnList(args.java_sources) args.java_sources = build_utils.ParseGnList(args.java_sources)
args.aars = build_utils.ParseGnList(args.aars)
args.srcjars = build_utils.ParseGnList(args.srcjars) args.srcjars = build_utils.ParseGnList(args.srcjars)
args.resource_sources = build_utils.ParseGnList(args.resource_sources) args.resource_sources = build_utils.ParseGnList(args.resource_sources)
args.extra_manifest_paths = build_utils.ParseGnList(args.extra_manifest_paths) args.extra_manifest_paths = build_utils.ParseGnList(args.extra_manifest_paths)
...@@ -466,7 +433,6 @@ def main(): ...@@ -466,7 +433,6 @@ def main():
args.classpath, args.classpath,
args.cache_dir, args.cache_dir,
args.android_sdk_version, args.android_sdk_version,
args.aars,
args.srcjars, args.srcjars,
args.min_sdk_version, args.min_sdk_version,
resource_sources, resource_sources,
......
...@@ -282,10 +282,6 @@ The list of all `deps_info['java_sources_file']` entries for all library ...@@ -282,10 +282,6 @@ The list of all `deps_info['java_sources_file']` entries for all library
dependencies that are chromium code. Note: this is a list of files, where each dependencies that are chromium code. Note: this is a list of files, where each
file contains a list of Java source files. This is used for lint. file contains a list of Java source files. This is used for lint.
* `deps_info['lint_aars']`:
List of all aars from transitive java dependencies. This allows lint to collect
their custom annotations.zip and run checks like @IntDef on their annotations.
* `deps_info['lint_srcjars']`: * `deps_info['lint_srcjars']`:
List of all bundled srcjars of all transitive java library targets. Excludes List of all bundled srcjars of all transitive java library targets. Excludes
non-chromium java libraries. non-chromium java libraries.
...@@ -946,7 +942,6 @@ def main(argv): ...@@ -946,7 +942,6 @@ def main(argv):
help='Consider the assets as locale paks in BuildConfig.java') help='Consider the assets as locale paks in BuildConfig.java')
# java library options # java library options
parser.add_option('--aar-path', help='Path to containing .aar file.')
parser.add_option('--device-jar-path', help='Path to .jar for dexing.') parser.add_option('--device-jar-path', help='Path to .jar for dexing.')
parser.add_option('--host-jar-path', help='Path to .jar for java_binary.') parser.add_option('--host-jar-path', help='Path to .jar for java_binary.')
parser.add_option('--unprocessed-jar-path', parser.add_option('--unprocessed-jar-path',
...@@ -1352,8 +1347,6 @@ def main(argv): ...@@ -1352,8 +1347,6 @@ def main(argv):
if is_java_target: if is_java_target:
# Classpath values filled in below (after applying tested_apk_config). # Classpath values filled in below (after applying tested_apk_config).
config['javac'] = {} config['javac'] = {}
if options.aar_path:
deps_info['aar_path'] = options.aar_path
if options.unprocessed_jar_path: if options.unprocessed_jar_path:
deps_info['unprocessed_jar_path'] = options.unprocessed_jar_path deps_info['unprocessed_jar_path'] = options.unprocessed_jar_path
deps_info['interface_jar_path'] = options.interface_jar_path deps_info['interface_jar_path'] = options.interface_jar_path
...@@ -1611,7 +1604,6 @@ def main(argv): ...@@ -1611,7 +1604,6 @@ def main(argv):
# de-duplicate these lint artifacts. # de-duplicate these lint artifacts.
if options.type in ('android_app_bundle_module', 'android_apk'): if options.type in ('android_app_bundle_module', 'android_apk'):
# Collect all sources and resources at the apk/bundle_module level. # Collect all sources and resources at the apk/bundle_module level.
lint_aars = set()
lint_srcjars = set() lint_srcjars = set()
lint_java_sources = set() lint_java_sources = set()
lint_resource_sources = set() lint_resource_sources = set()
...@@ -1626,8 +1618,6 @@ def main(argv): ...@@ -1626,8 +1618,6 @@ def main(argv):
if 'java_sources_file' in c: if 'java_sources_file' in c:
lint_java_sources.add(c['java_sources_file']) lint_java_sources.add(c['java_sources_file'])
lint_srcjars.update(c['bundled_srcjars']) lint_srcjars.update(c['bundled_srcjars'])
if 'aar_path' in c:
lint_aars.add(c['aar_path'])
if options.res_sources_path: if options.res_sources_path:
lint_resource_sources.add(options.res_sources_path) lint_resource_sources.add(options.res_sources_path)
...@@ -1642,7 +1632,6 @@ def main(argv): ...@@ -1642,7 +1632,6 @@ def main(argv):
else: else:
lint_resource_zips.add(c['resources_zip']) lint_resource_zips.add(c['resources_zip'])
deps_info['lint_aars'] = sorted(lint_aars)
deps_info['lint_srcjars'] = sorted(lint_srcjars) deps_info['lint_srcjars'] = sorted(lint_srcjars)
deps_info['lint_java_sources'] = sorted(lint_java_sources) deps_info['lint_java_sources'] = sorted(lint_java_sources)
deps_info['lint_resource_sources'] = sorted(lint_resource_sources) deps_info['lint_resource_sources'] = sorted(lint_resource_sources)
...@@ -1659,7 +1648,6 @@ def main(argv): ...@@ -1659,7 +1648,6 @@ def main(argv):
for c in build_utils.ParseGnList(options.module_build_configs) for c in build_utils.ParseGnList(options.module_build_configs)
] ]
jni_all_source = set() jni_all_source = set()
lint_aars = set()
lint_srcjars = set() lint_srcjars = set()
lint_java_sources = set() lint_java_sources = set()
lint_resource_sources = set() lint_resource_sources = set()
...@@ -1675,13 +1663,11 @@ def main(argv): ...@@ -1675,13 +1663,11 @@ def main(argv):
else: else:
lint_extra_android_manifests.add(c['android_manifest']) lint_extra_android_manifests.add(c['android_manifest'])
jni_all_source.update(c['jni']['all_source']) jni_all_source.update(c['jni']['all_source'])
lint_aars.update(c['lint_aars'])
lint_srcjars.update(c['lint_srcjars']) lint_srcjars.update(c['lint_srcjars'])
lint_java_sources.update(c['lint_java_sources']) lint_java_sources.update(c['lint_java_sources'])
lint_resource_sources.update(c['lint_resource_sources']) lint_resource_sources.update(c['lint_resource_sources'])
lint_resource_zips.update(c['lint_resource_zips']) lint_resource_zips.update(c['lint_resource_zips'])
deps_info['jni'] = {'all_source': sorted(jni_all_source)} deps_info['jni'] = {'all_source': sorted(jni_all_source)}
deps_info['lint_aars'] = sorted(lint_aars)
deps_info['lint_srcjars'] = sorted(lint_srcjars) deps_info['lint_srcjars'] = sorted(lint_srcjars)
deps_info['lint_java_sources'] = sorted(lint_java_sources) deps_info['lint_java_sources'] = sorted(lint_java_sources)
deps_info['lint_resource_sources'] = sorted(lint_resource_sources) deps_info['lint_resource_sources'] = sorted(lint_resource_sources)
......
...@@ -227,13 +227,6 @@ template("write_build_config") { ...@@ -227,13 +227,6 @@ template("write_build_config") {
_target_label, _target_label,
] ]
if (defined(invoker.aar_path)) {
args += [
"--aar-path",
rebase_path(invoker.aar_path, root_build_dir),
]
}
if (defined(invoker.chromium_code) && !invoker.chromium_code) { if (defined(invoker.chromium_code) && !invoker.chromium_code) {
# Default to chromium code if invoker did not pass anything. # Default to chromium code if invoker did not pass anything.
args += [ "--non-chromium-code" ] args += [ "--non-chromium-code" ]
...@@ -1131,7 +1124,6 @@ if (enable_java_templates) { ...@@ -1131,7 +1124,6 @@ if (enable_java_templates) {
# Lint requires all source and all resource files to be passed in the # Lint requires all source and all resource files to be passed in the
# same invocation for checks like UnusedResources. # same invocation for checks like UnusedResources.
"--java-sources=@FileArg($_rebased_build_config:deps_info:lint_java_sources)", "--java-sources=@FileArg($_rebased_build_config:deps_info:lint_java_sources)",
"--aars=@FileArg($_rebased_build_config:deps_info:lint_aars)",
"--srcjars=@FileArg($_rebased_build_config:deps_info:lint_srcjars)", "--srcjars=@FileArg($_rebased_build_config:deps_info:lint_srcjars)",
"--resource-sources=@FileArg($_rebased_build_config:deps_info:lint_resource_sources)", "--resource-sources=@FileArg($_rebased_build_config:deps_info:lint_resource_sources)",
"--resource-zips=@FileArg($_rebased_build_config:deps_info:lint_resource_zips)", "--resource-zips=@FileArg($_rebased_build_config:deps_info:lint_resource_zips)",
...@@ -3742,7 +3734,6 @@ if (enable_java_templates) { ...@@ -3742,7 +3734,6 @@ if (enable_java_templates) {
"input_jars_paths", "input_jars_paths",
"main_class", "main_class",
"public_target_label", "public_target_label",
"aar_path",
"proguard_configs", "proguard_configs",
"proguard_enabled", "proguard_enabled",
"proguard_mapping_path", "proguard_mapping_path",
......
...@@ -4419,7 +4419,6 @@ if (enable_java_templates) { ...@@ -4419,7 +4419,6 @@ if (enable_java_templates) {
} }
supports_android = true supports_android = true
jar_path = "$_output_path/classes.jar" jar_path = "$_output_path/classes.jar"
aar_path = invoker.aar_path
output_name = invoker.target_name output_name = invoker.target_name
if (!_ignore_proguard_configs) { if (!_ignore_proguard_configs) {
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<issues format="5" by="lint 4.1.0" client="cli" variant="all" version="4.1.0"> <issues format="5" by="lint 4.0.1" client="cli" variant="all" version="4.0.1">
<issue <issue
id="WrongConstant" id="AppCompatResource"
message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END" message="Should use `android:showAsAction` when not using the appcompat library"
errorLine1=" if (mDrawerLayout.isDrawerOpen(Gravity.START)) {" errorLine1=" app:showAsAction=&quot;ifRoom&quot;/>"
errorLine2=" ~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="../../remoting/android/java/src/org/chromium/chromoting/Chromoting.java" file="../../remoting/android/java/res/menu/chromoting_actionbar.xml"
line="204" line="15"
column="40"/> column="9"/>
</issue> </issue>
<issue <issue
id="WrongConstant" id="AppCompatResource"
message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END" message="Should use `android:showAsAction` when not using the appcompat library"
errorLine1=" mDrawerLayout.closeDrawer(Gravity.START);" errorLine1=" app:showAsAction=&quot;ifRoom&quot;/>"
errorLine2=" ~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="../../remoting/android/java/src/org/chromium/chromoting/Chromoting.java" file="../../remoting/android/java/res/menu/desktop_actionbar.xml"
line="205" line="14"
column="39"/> column="13"/>
</issue> </issue>
<issue <issue
id="WrongConstant" id="AppCompatResource"
message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END" message="Should use `android:showAsAction` when not using the appcompat library"
errorLine1=" if (mDrawerLayout.isDrawerOpen(Gravity.START)) {" errorLine1=" app:showAsAction=&quot;ifRoom&quot;/>"
errorLine2=" ~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="../../remoting/android/java/src/org/chromium/chromoting/Chromoting.java" file="../../remoting/android/java/res/menu/desktop_actionbar.xml"
line="292" line="18"
column="56"/> column="13"/>
</issue> </issue>
<issue <issue
id="WrongConstant" id="AppCompatResource"
message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END" message="Should use `android:showAsAction` when not using the appcompat library"
errorLine1=" mDrawerLayout.closeDrawer(Gravity.START);" errorLine1=" app:showAsAction=&quot;ifRoom&quot;/>"
errorLine2=" ~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="../../remoting/android/java/src/org/chromium/chromoting/Chromoting.java" file="../../remoting/android/java/res/menu/desktop_actionbar.xml"
line="293" line="22"
column="55"/> column="13"/>
</issue> </issue>
<issue <issue
id="WrongConstant" id="AppCompatResource"
message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END" message="Should use `android:showAsAction` when not using the appcompat library"
errorLine1=" mDrawerLayout.openDrawer(Gravity.START);" errorLine1=" app:showAsAction=&quot;ifRoom&quot;/>"
errorLine2=" ~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="../../remoting/android/java/src/org/chromium/chromoting/Chromoting.java" file="../../remoting/android/java/res/menu/desktop_actionbar.xml"
line="295" line="26"
column="54"/> column="13"/>
</issue> </issue>
<issue <issue
id="UseCompatTextViewDrawableXml" id="AppCompatResource"
message="Use `app:drawableStartCompat` instead of `android:drawableStart`" message="Should use `android:showAsAction` when not using the appcompat library"
errorLine1=" android:drawableStart=&quot;@drawable/ic_host_online&quot;" errorLine1=" app:showAsAction=&quot;withText&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="../../remoting/android/java/res/layout/host_online.xml" file="../../remoting/android/java/res/menu/desktop_actionbar.xml"
line="28" line="29"
column="13"/>
</issue>
<issue
id="AppCompatResource"
message="Should use `android:showAsAction` when not using the appcompat library"
errorLine1=" app:showAsAction=&quot;never|withText&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../remoting/android/java/res/menu/desktop_actionbar.xml"
line="33"
column="9"/> column="9"/>
</issue> </issue>
<issue
id="AppCompatResource"
message="Should use `android:showAsAction` when not using the appcompat library"
errorLine1=" app:showAsAction=&quot;withText&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../remoting/android/java/res/menu/desktop_actionbar.xml"
line="36"
column="13"/>
</issue>
<issue
id="AppCompatResource"
message="Should use `android:showAsAction` when not using the appcompat library"
errorLine1=" app:showAsAction=&quot;never&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../remoting/android/java/res/menu/desktop_actionbar.xml"
line="43"
column="13"/>
</issue>
<issue
id="AppCompatResource"
message="Should use `android:showAsAction` when not using the appcompat library"
errorLine1=" app:showAsAction=&quot;ifRoom|withText&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../remoting/android/java/res/menu/help_actionbar.xml"
line="13"
column="9"/>
</issue>
<issue
id="AppCompatResource"
message="Should use `android:showAsAction` when not using the appcompat library"
errorLine1=" app:showAsAction=&quot;never&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../remoting/android/java/res/menu/help_actionbar.xml"
line="17"
column="9"/>
</issue>
<issue
id="AppCompatResource"
message="Should use `android:showAsAction` when not using the appcompat library"
errorLine1=" app:showAsAction=&quot;never&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../remoting/android/java/res/menu/help_actionbar.xml"
line="21"
column="9"/>
</issue>
<issue
id="InflateParams"
message="Avoid passing `null` as the view root (needed to resolve layout parameters on the inflated layout&apos;s root element)"
errorLine1=" (ListView) chromoting.getLayoutInflater().inflate(R.layout.navigation_list, null);"
errorLine2=" ~~~~">
<location
file="../../remoting/android/java/src/org/chromium/chromoting/NavigationMenuAdapter.java"
line="47"
column="93"/>
</issue>
<issue <issue
id="SetJavaScriptEnabled" id="SetJavaScriptEnabled"
message="Using `setJavaScriptEnabled` can introduce XSS vulnerabilities into your application, review carefully" message="Using `setJavaScriptEnabled` can introduce XSS vulnerabilities into your application, review carefully."
errorLine1=" mWebView.getSettings().setJavaScriptEnabled(true);" errorLine1=" mWebView.getSettings().setJavaScriptEnabled(true);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
...@@ -80,7 +157,7 @@ ...@@ -80,7 +157,7 @@
<issue <issue
id="SetJavaScriptEnabled" id="SetJavaScriptEnabled"
message="Using `setJavaScriptEnabled` can introduce XSS vulnerabilities into your application, review carefully" message="Using `setJavaScriptEnabled` can introduce XSS vulnerabilities into your application, review carefully."
errorLine1=" webView.getSettings().setJavaScriptEnabled(true);" errorLine1=" webView.getSettings().setJavaScriptEnabled(true);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
......
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