Commit 92199fe2 authored by Peter Wen's avatar Peter Wen Committed by Commit Bot

Android: Update cmdline-tools to 3.0

From v2.1 to v3.0, this is required to use new custom lint checks in
aars' lint.jar files.

Updated baseline accordingly.

Bug: 1142927
Change-Id: Id078b9a7a56c37ed6e40483adbffdeaed63b718a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2490990Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarLambros Lambrou <lambroslambrou@chromium.org>
Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Reviewed-by: default avatarPeter Kotwicz <pkotwicz@chromium.org>
Auto-Submit: Peter Wen <wnwen@chromium.org>
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#822271}
parent 12e31c82
...@@ -784,7 +784,7 @@ deps = { ...@@ -784,7 +784,7 @@ deps = {
}, },
{ {
'package': 'chromium/third_party/android_sdk/public/cmdline-tools', 'package': 'chromium/third_party/android_sdk/public/cmdline-tools',
'version': 'ijpIFSitwBfaEdO9VXBGPqDHUVzPimXy_whw3aHTN9oC', 'version': 'V__2Ycej-H2-6AcXX5A3gi7sIk74SuN44PBm2uC_N1sC',
}, },
], ],
'condition': 'checkout_android_native_support', 'condition': 'checkout_android_native_support',
......
...@@ -135,6 +135,8 @@ Still reading? ...@@ -135,6 +135,8 @@ Still reading?
<issue id="PrivateApi" severity="ignore"/> <issue id="PrivateApi" severity="ignore"/>
<!-- Chrome is a system app. --> <!-- Chrome is a system app. -->
<issue id="ProtectedPermissions" severity="ignore"/> <issue id="ProtectedPermissions" severity="ignore"/>
<!-- Android 11+ package visibility: g.co/dev/packagevisibility -->
<issue id="QueryAllPackagesPermission" severity="ignore"/>
<issue id="RestrictedApi"> <issue id="RestrictedApi">
<!-- Chrome uses these GMS core APIs. --> <!-- Chrome uses these GMS core APIs. -->
<ignore regexp="is marked as internal and should not be accessed from apps"/> <ignore regexp="is marked as internal and should not be accessed from apps"/>
...@@ -145,6 +147,8 @@ Still reading? ...@@ -145,6 +147,8 @@ Still reading?
<issue id="RtlCompat" severity="ignore"/> <issue id="RtlCompat" severity="ignore"/>
<issue id="RtlEnabled" severity="ignore"/> <issue id="RtlEnabled" severity="ignore"/>
<issue id="RtlSymmetry" severity="ignore"/> <issue id="RtlSymmetry" severity="ignore"/>
<!-- Android 10+ WRITE_EXTERNAL_STORAGE changed meaning. -->
<issue id="ScopedStorage" severity="ignore"/>
<issue id="SetJavaScriptEnabled" severity="ignore"/> <issue id="SetJavaScriptEnabled" severity="ignore"/>
<issue id="SignatureOrSystemPermissions" severity="ignore"/> <issue id="SignatureOrSystemPermissions" severity="ignore"/>
<issue id="StaticFieldLeak"> <issue id="StaticFieldLeak">
......
...@@ -84,6 +84,7 @@ public class EnterpriseInfo { ...@@ -84,6 +84,7 @@ public class EnterpriseInfo {
/** /**
* Returns, via callback, whether the device has a device owner or a profile owner. * Returns, via callback, whether the device has a device owner or a profile owner.
*/ */
@SuppressWarnings("QueryPermissionsNeeded")
public void getDeviceEnterpriseInfo(Callback<OwnedState> callback) { public void getDeviceEnterpriseInfo(Callback<OwnedState> callback) {
// AsyncTask requires being called from UI thread. // AsyncTask requires being called from UI thread.
ThreadUtils.assertOnUiThread(); ThreadUtils.assertOnUiThread();
......
...@@ -56,6 +56,7 @@ public class WebApkHandlerDelegate { ...@@ -56,6 +56,7 @@ public class WebApkHandlerDelegate {
* Calls the native WebApkHandlerDelegate with information for each installed WebAPK. * Calls the native WebApkHandlerDelegate with information for each installed WebAPK.
*/ */
@CalledByNative @CalledByNative
@SuppressWarnings("QueryPermissionsNeeded")
public void retrieveWebApks() { public void retrieveWebApks() {
if (mNativePointer == 0) { if (mNativePointer == 0) {
return; return;
......
...@@ -1015,6 +1015,7 @@ if (!is_component_build) { ...@@ -1015,6 +1015,7 @@ if (!is_component_build) {
# it depends on basically all source files. # it depends on basically all source files.
enable_lint = true enable_lint = true
lint_suppressions_file = "lint-suppressions.xml" lint_suppressions_file = "lint-suppressions.xml"
lint_baseline_file = "lint-baseline.xml"
# Still needs to support Jelly Bean. See crbug.com/922656. # Still needs to support Jelly Bean. See crbug.com/922656.
lint_min_sdk_version = 16 lint_min_sdk_version = 16
......
<?xml version="1.0" encoding="UTF-8"?>
<issues format="5" by="lint 4.1.0" client="cli" variant="all" version="4.1.0">
<issue
id="ScopedStorage"
message="WRITE_EXTERNAL_STORAGE no longer provides write access when targeting Android 10+"
errorLine1=" &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="gen/components/cronet/android/cronet_test_instrumentation_apk__test_apk__lint/../../components/cronet/android/test/javatests/AndroidManifest.xml"
line="12"
column="34"/>
</issue>
<issue
id="QueryPermissionsNeeded"
message="As of Android 11, this method no longer returns information about all apps; \&#xA;see https://g.co/dev/packagevisibility for details"
errorLine1=" return mWrapped.getInstalledPackages(flags);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
<location
file="../../third_party/android_sdk/public/extras/chromium/support/src/org/chromium/android/support/PackageManagerWrapper.java"
line="115"
column="25"/>
</issue>
<issue
id="QueryPermissionsNeeded"
message="As of Android 11, this method no longer returns information about all apps; \&#xA;see https://g.co/dev/packagevisibility for details"
errorLine1=" return mWrapped.getInstalledApplications(flags);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../third_party/android_sdk/public/extras/chromium/support/src/org/chromium/android/support/PackageManagerWrapper.java"
line="210"
column="25"/>
</issue>
<issue
id="QueryPermissionsNeeded"
message="Consider adding a `&lt;queries>` declaration to your manifest when calling this \&#xA;method; see https://g.co/dev/packagevisibility for details"
errorLine1=" return mWrapped.queryIntentActivities(intent, flags);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../third_party/android_sdk/public/extras/chromium/support/src/org/chromium/android/support/PackageManagerWrapper.java"
line="240"
column="25"/>
</issue>
<issue
id="QueryPermissionsNeeded"
message="Consider adding a `&lt;queries>` declaration to your manifest when calling this \&#xA;method; see https://g.co/dev/packagevisibility for details"
errorLine1=" return mWrapped.queryBroadcastReceivers(intent, flags);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../third_party/android_sdk/public/extras/chromium/support/src/org/chromium/android/support/PackageManagerWrapper.java"
line="251"
column="25"/>
</issue>
<issue
id="QueryPermissionsNeeded"
message="Consider adding a `&lt;queries>` declaration to your manifest when calling this \&#xA;method; see https://g.co/dev/packagevisibility for details"
errorLine1=" return mWrapped.queryIntentServices(intent, flags);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="../../third_party/android_sdk/public/extras/chromium/support/src/org/chromium/android/support/PackageManagerWrapper.java"
line="261"
column="25"/>
</issue>
<issue
id="QueryPermissionsNeeded"
message="Consider adding a `&lt;queries>` declaration to your manifest when calling this \&#xA;method; see https://g.co/dev/packagevisibility for details"
errorLine1=" return mWrapped.queryContentProviders(processName, uid, flags);"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="../../third_party/android_sdk/public/extras/chromium/support/src/org/chromium/android/support/PackageManagerWrapper.java"
line="276"
column="25"/>
</issue>
</issues>
...@@ -364,6 +364,7 @@ public class WebApkValidator { ...@@ -364,6 +364,7 @@ public class WebApkValidator {
* @param manifestUrl The URL of the manifest that was used to generate the WebAPK. * @param manifestUrl The URL of the manifest that was used to generate the WebAPK.
* @return The WebAPK's package name if installed, or null otherwise. * @return The WebAPK's package name if installed, or null otherwise.
*/ */
@SuppressWarnings("QueryPermissionsNeeded")
public static @Nullable String queryBoundWebApkForManifestUrl( public static @Nullable String queryBoundWebApkForManifestUrl(
Context context, String manifestUrl) { Context context, String manifestUrl) {
assert manifestUrl != null; assert manifestUrl != null;
......
...@@ -82,6 +82,7 @@ public abstract class ChromotingUtil { ...@@ -82,6 +82,7 @@ public abstract class ChromotingUtil {
* @param intent The (implicit) intent to launch. * @param intent The (implicit) intent to launch.
* @return True if the intent was resolved. * @return True if the intent was resolved.
*/ */
@SuppressWarnings("QueryPermissionsNeeded")
public static boolean startActivitySafely(Context context, Intent intent) { public static boolean startActivitySafely(Context context, Intent intent) {
if (intent.resolveActivity(context.getPackageManager()) == null) { if (intent.resolveActivity(context.getPackageManager()) == null) {
Log.w(TAG, "Unable to resolve activity for: %s", intent); Log.w(TAG, "Unable to resolve activity for: %s", intent);
......
...@@ -2,7 +2,7 @@ Name: Android SDK ...@@ -2,7 +2,7 @@ Name: Android SDK
URL: http://developer.android.com/sdk/index.html URL: http://developer.android.com/sdk/index.html
Version: 30 Version: 30
Android SDK Build-tools 30.0.1 Android SDK Build-tools 30.0.1
Android SDK Command-line Tools 2.1 Android SDK Command-line Tools 3.0
Android SDK Emulator 30.0.12 Android SDK Emulator 30.0.12
Android SDK Platform-tools 30.0.3 Android SDK Platform-tools 30.0.3
Android SDK Platform API 30 Android SDK Platform API 30
......
...@@ -424,6 +424,7 @@ public class Clipboard implements ClipboardManager.OnPrimaryClipChangedListener ...@@ -424,6 +424,7 @@ public class Clipboard implements ClipboardManager.OnPrimaryClipChangedListener
* system. But on Android O, sharing images/files needs to grant permission to each app/packages * system. But on Android O, sharing images/files needs to grant permission to each app/packages
* individually. Note: Don't forget to revoke the permission once the clipboard is updated. * individually. Note: Don't forget to revoke the permission once the clipboard is updated.
*/ */
@SuppressWarnings("QueryPermissionsNeeded")
private void grantUriPermission(@NonNull Uri uri) { private void grantUriPermission(@NonNull Uri uri) {
if ((Build.VERSION.SDK_INT != Build.VERSION_CODES.O if ((Build.VERSION.SDK_INT != Build.VERSION_CODES.O
&& Build.VERSION.SDK_INT != Build.VERSION_CODES.O_MR1) && Build.VERSION.SDK_INT != Build.VERSION_CODES.O_MR1)
......
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