Commit 33026f0b authored by Peter Wen's avatar Peter Wen Committed by Commit Bot

Android: Enable custom lint checks from aars (reland)

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.

Original CL: https://crrev.com/c/2510793

Fixed:
- Avoid ../../ prefix in temporary extraction of aar files.

Tbr: Reland with trivial fix.
Bug: 1078229
Change-Id: I0236043cf949e94bf0dee5714a620a9e96239616
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2532664Reviewed-by: default avatarPeter Wen <wnwen@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826429}
parent 9c5f3931
...@@ -35,6 +35,7 @@ _DISABLED_ALWAYS = [ ...@@ -35,6 +35,7 @@ _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
...@@ -61,6 +62,7 @@ _DISABLED_FOR_TESTS = [ ...@@ -61,6 +62,7 @@ _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):
...@@ -75,6 +77,8 @@ def _GenerateProjectFile(android_manifest, ...@@ -75,6 +77,8 @@ 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')
...@@ -109,6 +113,14 @@ def _GenerateProjectFile(android_manifest, ...@@ -109,6 +113,14 @@ 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
...@@ -198,6 +210,7 @@ def _RunLint(lint_binary_path, ...@@ -198,6 +210,7 @@ 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,
...@@ -254,6 +267,24 @@ def _RunLint(lint_binary_path, ...@@ -254,6 +267,24 @@ 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:
# Use relative source for aar files since they are not generated.
aar_dir = os.path.join(aar_root_dir,
os.path.splitext(_SrcRelative(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 = []
...@@ -273,7 +304,8 @@ def _RunLint(lint_binary_path, ...@@ -273,7 +304,8 @@ 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, resource_sources, custom_lint_jars,
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')
...@@ -327,6 +359,7 @@ def _RunLint(lint_binary_path, ...@@ -327,6 +359,7 @@ 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)
...@@ -370,6 +403,7 @@ def _ParseArgs(argv): ...@@ -370,6 +403,7 @@ 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')
...@@ -398,6 +432,7 @@ def _ParseArgs(argv): ...@@ -398,6 +432,7 @@ 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)
...@@ -433,6 +468,7 @@ def main(): ...@@ -433,6 +468,7 @@ 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,6 +282,10 @@ The list of all `deps_info['java_sources_file']` entries for all library ...@@ -282,6 +282,10 @@ 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.
...@@ -942,6 +946,7 @@ def main(argv): ...@@ -942,6 +946,7 @@ 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',
...@@ -1347,6 +1352,8 @@ def main(argv): ...@@ -1347,6 +1352,8 @@ 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
...@@ -1604,6 +1611,7 @@ def main(argv): ...@@ -1604,6 +1611,7 @@ 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()
...@@ -1618,6 +1626,8 @@ def main(argv): ...@@ -1618,6 +1626,8 @@ 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)
...@@ -1632,6 +1642,7 @@ def main(argv): ...@@ -1632,6 +1642,7 @@ 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)
...@@ -1648,6 +1659,7 @@ def main(argv): ...@@ -1648,6 +1659,7 @@ 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()
...@@ -1663,11 +1675,13 @@ def main(argv): ...@@ -1663,11 +1675,13 @@ 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,6 +227,13 @@ template("write_build_config") { ...@@ -227,6 +227,13 @@ 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" ]
...@@ -1124,6 +1131,7 @@ if (enable_java_templates) { ...@@ -1124,6 +1131,7 @@ 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)",
...@@ -3734,6 +3742,7 @@ if (enable_java_templates) { ...@@ -3734,6 +3742,7 @@ 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,6 +4419,7 @@ if (enable_java_templates) { ...@@ -4419,6 +4419,7 @@ 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.0.1" client="cli" variant="all" version="4.0.1"> <issues format="5" by="lint 4.1.0" client="cli" variant="all" version="4.1.0">
<issue <issue
id="AppCompatResource" id="WrongConstant"
message="Should use `android:showAsAction` when not using the appcompat library" message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END"
errorLine1=" app:showAsAction=&quot;ifRoom&quot;/>" errorLine1=" if (mDrawerLayout.isDrawerOpen(Gravity.START)) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~">
<location <location
file="../../remoting/android/java/res/menu/chromoting_actionbar.xml" file="../../remoting/android/java/src/org/chromium/chromoting/Chromoting.java"
line="15" line="204"
column="9"/> column="40"/>
</issue>
<issue
id="AppCompatResource"
message="Should use `android:showAsAction` when not using the appcompat library"
errorLine1=" app:showAsAction=&quot;ifRoom&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../remoting/android/java/res/menu/desktop_actionbar.xml"
line="14"
column="13"/>
</issue>
<issue
id="AppCompatResource"
message="Should use `android:showAsAction` when not using the appcompat library"
errorLine1=" app:showAsAction=&quot;ifRoom&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../remoting/android/java/res/menu/desktop_actionbar.xml"
line="18"
column="13"/>
</issue>
<issue
id="AppCompatResource"
message="Should use `android:showAsAction` when not using the appcompat library"
errorLine1=" app:showAsAction=&quot;ifRoom&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../remoting/android/java/res/menu/desktop_actionbar.xml"
line="22"
column="13"/>
</issue>
<issue
id="AppCompatResource"
message="Should use `android:showAsAction` when not using the appcompat library"
errorLine1=" app:showAsAction=&quot;ifRoom&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../remoting/android/java/res/menu/desktop_actionbar.xml"
line="26"
column="13"/>
</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="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"/>
</issue> </issue>
<issue <issue
id="AppCompatResource" id="WrongConstant"
message="Should use `android:showAsAction` when not using the appcompat library" message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END"
errorLine1=" app:showAsAction=&quot;withText&quot;/>" errorLine1=" mDrawerLayout.closeDrawer(Gravity.START);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~">
<location <location
file="../../remoting/android/java/res/menu/desktop_actionbar.xml" file="../../remoting/android/java/src/org/chromium/chromoting/Chromoting.java"
line="36" line="205"
column="13"/> column="39"/>
</issue> </issue>
<issue <issue
id="AppCompatResource" id="WrongConstant"
message="Should use `android:showAsAction` when not using the appcompat library" message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END"
errorLine1=" app:showAsAction=&quot;never&quot;/>" errorLine1=" if (mDrawerLayout.isDrawerOpen(Gravity.START)) {"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~">
<location <location
file="../../remoting/android/java/res/menu/desktop_actionbar.xml" file="../../remoting/android/java/src/org/chromium/chromoting/Chromoting.java"
line="43" line="292"
column="13"/> column="56"/>
</issue> </issue>
<issue <issue
id="AppCompatResource" id="WrongConstant"
message="Should use `android:showAsAction` when not using the appcompat library" message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END"
errorLine1=" app:showAsAction=&quot;ifRoom|withText&quot;/>" errorLine1=" mDrawerLayout.closeDrawer(Gravity.START);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~">
<location <location
file="../../remoting/android/java/res/menu/help_actionbar.xml" file="../../remoting/android/java/src/org/chromium/chromoting/Chromoting.java"
line="13" line="293"
column="9"/> column="55"/>
</issue> </issue>
<issue <issue
id="AppCompatResource" id="WrongConstant"
message="Should use `android:showAsAction` when not using the appcompat library" message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END"
errorLine1=" app:showAsAction=&quot;never&quot;/>" errorLine1=" mDrawerLayout.openDrawer(Gravity.START);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~">
<location <location
file="../../remoting/android/java/res/menu/help_actionbar.xml" file="../../remoting/android/java/src/org/chromium/chromoting/Chromoting.java"
line="17" line="295"
column="9"/> column="54"/>
</issue> </issue>
<issue <issue
id="AppCompatResource" id="UseCompatTextViewDrawableXml"
message="Should use `android:showAsAction` when not using the appcompat library" message="Use `app:drawableStartCompat` instead of `android:drawableStart`"
errorLine1=" app:showAsAction=&quot;never&quot;/>" errorLine1=" android:drawableStart=&quot;@drawable/ic_host_online&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="../../remoting/android/java/res/menu/help_actionbar.xml" file="../../remoting/android/java/res/layout/host_online.xml"
line="21" line="28"
column="9"/> column="9"/>
</issue> </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
...@@ -157,7 +80,7 @@ ...@@ -157,7 +80,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