Commit cc79c9c9 authored by John Budorick's avatar John Budorick Committed by Commit Bot

Roll android SDK to O MR1. (RELAND)

TBR=agrieve@chromium.org,yfriedman@chromium.org,mef@chromium.org,pasko@chromium.org

Bug: 782848,789177
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I30cdc80f19ee01619e7ce808423c10ffc752644d
Reviewed-on: https://chromium-review.googlesource.com/794338Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Reviewed-by: default avatarMisha Efimov <mef@chromium.org>
Reviewed-by: default avataragrieve <agrieve@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519833}
parent 90a4cb1c
...@@ -244,7 +244,7 @@ deps = { ...@@ -244,7 +244,7 @@ deps = {
}, },
'src/third_party/android_tools': { 'src/third_party/android_tools': {
'url': Var('chromium_git') + '/android_tools.git' + '@' + '9914c5704717424998c69e837be3631914d787cc', 'url': Var('chromium_git') + '/android_tools.git' + '@' + 'a2e9bc7c1b41d983577907df51d339fb1e0fd02f',
'condition': 'checkout_android', 'condition': 'checkout_android',
}, },
......
...@@ -328,6 +328,16 @@ Still reading? ...@@ -328,6 +328,16 @@ Still reading?
<!-- 2 resources used by android webview glue layer, could be refactored --> <!-- 2 resources used by android webview glue layer, could be refactored -->
<ignore regexp="android_webview/java/res/drawable-hdpi/ic_play_circle_outline_black_48dp.png"/> <ignore regexp="android_webview/java/res/drawable-hdpi/ic_play_circle_outline_black_48dp.png"/>
<ignore regexp="R.string.private_browsing_warning"/> <ignore regexp="R.string.private_browsing_warning"/>
<!-- OMR1 SDK roll mystery. TODO(jbudorick): Remove this after rolling lint. -->
<ignore regexp="chrome/android/chrome_strings_grd.resources.zip/values/android_chrome_strings.xml"/>
<ignore regexp="chrome/android/java/res/layout/location_bar.xml"/>
<ignore regexp="chrome/android/java/res/values/colors.xml"/>
<ignore regexp="chrome/android/java/res/values/dimens.xml"/>
<ignore regexp="chrome/android/java/res/drawable-hdpi/ic_omnibox_magnifier.png"/>
<ignore regexp="chrome/android/java/res/drawable-hdpi/omnibox_https_invalid.png"/>
<ignore regexp="chrome/android/java/res/drawable-hdpi/omnibox_info.png"/>
<ignore regexp="clank/java/clank_strings_grd.resources.zip/values/android_internal_strings.xml"/>
<ignore regexp="tools/android/audio_focus_grabber/java/res/drawable-hdpi/notification_icon.png"/>
</issue> </issue>
<issue id="UseCompoundDrawables"> <issue id="UseCompoundDrawables">
<!-- Upscaling 24dp to 48dp doesn't work as expected with a TextView compound drawable. --> <!-- Upscaling 24dp to 48dp doesn't work as expected with a TextView compound drawable. -->
......
...@@ -95,8 +95,8 @@ DEVICE_PERF_OUTPUT_DIR = ( ...@@ -95,8 +95,8 @@ DEVICE_PERF_OUTPUT_DIR = (
SCREENSHOTS_DIR = os.path.join(DIR_SOURCE_ROOT, 'out_screenshots') SCREENSHOTS_DIR = os.path.join(DIR_SOURCE_ROOT, 'out_screenshots')
ANDROID_SDK_VERSION = version_codes.O ANDROID_SDK_VERSION = version_codes.O_MR1
ANDROID_SDK_BUILD_TOOLS_VERSION = '26.0.2' ANDROID_SDK_BUILD_TOOLS_VERSION = '27.0.1'
ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT,
'third_party', 'android_tools', 'sdk') 'third_party', 'android_tools', 'sdk')
ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT, ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT,
......
...@@ -30,7 +30,7 @@ if (is_android) { ...@@ -30,7 +30,7 @@ if (is_android) {
} else { } else {
import("//build/config/android/sdk.gni") import("//build/config/android/sdk.gni")
declare_args() { declare_args() {
# Android SDK release. Currently, only "o" is publicly supported. # Android SDK release. Currently, only "o_mr1" is publicly supported.
android_sdk_release = default_android_sdk_release android_sdk_release = default_android_sdk_release
} }
} }
...@@ -51,11 +51,11 @@ if (is_android) { ...@@ -51,11 +51,11 @@ if (is_android) {
assert(defined(default_android_ndk_major_version)) assert(defined(default_android_ndk_major_version))
} }
if (android_sdk_release == "o") { if (android_sdk_release == "o_mr1") {
default_android_sdk_root = "//third_party/android_tools/sdk" default_android_sdk_root = "//third_party/android_tools/sdk"
default_android_sdk_version = "26" default_android_sdk_version = "27"
default_android_sdk_build_tools_version = "26.0.2" default_android_sdk_build_tools_version = "27.0.1"
default_android_sdk_tools_version_suffix = "-25.3.2" default_android_sdk_tools_version_suffix = "-26.0.0-dev"
public_android_sdk = true public_android_sdk = true
} }
......
...@@ -770,14 +770,13 @@ if (enable_java_templates) { ...@@ -770,14 +770,13 @@ if (enable_java_templates) {
lint_suppressions_file = "//build/android/lint/suppressions.xml" lint_suppressions_file = "//build/android/lint/suppressions.xml"
} }
_lint_path = "$lint_android_sdk_root/tools-lint/bin/lint"
_cache_dir = "$root_build_dir/android_lint_cache" _cache_dir = "$root_build_dir/android_lint_cache"
_result_path = "$target_gen_dir/$target_name/result.xml" _result_path = "$target_gen_dir/$target_name/result.xml"
_config_path = "$target_gen_dir/$target_name/config.xml" _config_path = "$target_gen_dir/$target_name/config.xml"
_suppressions_file = lint_suppressions_file _suppressions_file = lint_suppressions_file
_platform_xml_path = _platform_xml_path =
"${android_sdk_root}/platform-tools/api/api-versions.xml" "${android_sdk_root}/platform-tools/api/api-versions.xml"
_rebased_lint_android_sdk_root =
rebase_path(lint_android_sdk_root, root_build_dir)
script = "//build/android/gyp/lint.py" script = "//build/android/gyp/lint.py"
depfile = "$target_gen_dir/$target_name.d" depfile = "$target_gen_dir/$target_name.d"
...@@ -793,7 +792,8 @@ if (enable_java_templates) { ...@@ -793,7 +792,8 @@ if (enable_java_templates) {
] ]
args = [ args = [
"--lint-path=$_rebased_lint_android_sdk_root/tools-lint/bin/lint", "--lint-path",
rebase_path(_lint_path, root_build_dir),
"--cache-dir", "--cache-dir",
rebase_path(_cache_dir, root_build_dir), rebase_path(_cache_dir, root_build_dir),
"--platform-xml-path", "--platform-xml-path",
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# The default SDK release used by public builds. Value may differ in # The default SDK release used by public builds. Value may differ in
# internal builds. # internal builds.
default_android_sdk_release = "o" default_android_sdk_release = "o_mr1"
# SDK releases against which public builds are supported. # SDK releases against which public builds are supported.
public_sdk_releases = [ "o" ] public_sdk_releases = [ "o_mr1" ]
...@@ -50,7 +50,6 @@ class BookmarkItemsAdapter ...@@ -50,7 +50,6 @@ class BookmarkItemsAdapter
private final List<List<? extends Object>> mSections; private final List<List<? extends Object>> mSections;
// The promo header section will always contain 0 or 1 elements. // The promo header section will always contain 0 or 1 elements.
@ViewType
private final List<Integer> mPromoHeaderSection = new ArrayList<>(); private final List<Integer> mPromoHeaderSection = new ArrayList<>();
private final List<BookmarkId> mFolderSection = new ArrayList<>(); private final List<BookmarkId> mFolderSection = new ArrayList<>();
private final List<BookmarkId> mBookmarkSection = new ArrayList<>(); private final List<BookmarkId> mBookmarkSection = new ArrayList<>();
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
package org.chromium.chrome.browser.ntp.snippets; package org.chromium.chrome.browser.ntp.snippets;
import android.annotation.SuppressLint;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.support.annotation.ColorInt; import android.support.annotation.ColorInt;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
...@@ -88,6 +89,7 @@ public class SnippetArticle implements OfflinableSuggestion { ...@@ -88,6 +89,7 @@ public class SnippetArticle implements OfflinableSuggestion {
/** /**
* Creates a SnippetArticleListItem object that will hold the data. * Creates a SnippetArticleListItem object that will hold the data.
*/ */
@SuppressLint("SupportAnnotationUsage") // for ColorInt on an Integer rather than int or long
public SnippetArticle(int category, String idWithinCategory, String title, String publisher, public SnippetArticle(int category, String idWithinCategory, String title, String publisher,
String url, long publishTimestamp, float score, long fetchTimestamp, String url, long publishTimestamp, float score, long fetchTimestamp,
boolean isVideoSuggestion, @ColorInt Integer thumbnailDominantColor) { boolean isVideoSuggestion, @ColorInt Integer thumbnailDominantColor) {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
package org.chromium.chrome.browser.printing; package org.chromium.chrome.browser.printing;
import android.annotation.SuppressLint;
import android.annotation.TargetApi; import android.annotation.TargetApi;
import android.os.Build; import android.os.Build;
import android.os.CancellationSignal; import android.os.CancellationSignal;
...@@ -26,6 +27,7 @@ import org.chromium.base.ThreadUtils; ...@@ -26,6 +27,7 @@ import org.chromium.base.ThreadUtils;
import org.chromium.base.test.util.CallbackHelper; import org.chromium.base.test.util.CallbackHelper;
import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.MinAndroidSdkLevel;
import org.chromium.base.test.util.RetryOnFailure; import org.chromium.base.test.util.RetryOnFailure;
import org.chromium.base.test.util.TestFileUtil; import org.chromium.base.test.util.TestFileUtil;
import org.chromium.base.test.util.UrlUtils; import org.chromium.base.test.util.UrlUtils;
...@@ -54,6 +56,8 @@ import java.util.concurrent.TimeoutException; ...@@ -54,6 +56,8 @@ import java.util.concurrent.TimeoutException;
*/ */
@RunWith(ChromeJUnit4ClassRunner.class) @RunWith(ChromeJUnit4ClassRunner.class)
@RetryOnFailure @RetryOnFailure
@SuppressLint("NewApi")
@MinAndroidSdkLevel(Build.VERSION_CODES.KITKAT)
@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE, @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG}) ChromeActivityTestRule.DISABLE_NETWORK_PREDICTION_FLAG})
public class PrintingControllerTest { public class PrintingControllerTest {
......
...@@ -1195,6 +1195,9 @@ action("generate_javadoc") { ...@@ -1195,6 +1195,9 @@ action("generate_javadoc") {
"--stamp", "--stamp",
rebase_path(_stamp_file, root_build_dir), rebase_path(_stamp_file, root_build_dir),
"--android-sdk-jar",
rebase_path(android_sdk_jar, root_build_dir),
# JavaDoc is generated from Cronet's API source jar. # JavaDoc is generated from Cronet's API source jar.
"--input-src-jar", "--input-src-jar",
rebase_path("$_package_dir/cronet_api-src.jar", root_build_dir), rebase_path("$_package_dir/cronet_api-src.jar", root_build_dir),
......
...@@ -38,6 +38,11 @@ def GenerateJavadoc(options, src_dir): ...@@ -38,6 +38,11 @@ def GenerateJavadoc(options, src_dir):
working_dir = os.path.join(options.input_dir, 'android', 'api') working_dir = os.path.join(options.input_dir, 'android', 'api')
overview_file = os.path.abspath(options.overview_file) overview_file = os.path.abspath(options.overview_file)
android_sdk_jar = os.path.abspath(options.android_sdk_jar)
if not android_sdk_jar:
android_sdk_jar = os.path.join(
SDK_DIR, 'platforms', 'android-27', 'android.jar')
build_utils.DeleteDirectory(output_dir) build_utils.DeleteDirectory(output_dir)
build_utils.MakeDirectory(output_dir) build_utils.MakeDirectory(output_dir)
javadoc_cmd = [ javadoc_cmd = [
...@@ -52,7 +57,7 @@ def GenerateJavadoc(options, src_dir): ...@@ -52,7 +57,7 @@ def GenerateJavadoc(options, src_dir):
'-federate', 'Android', 'https://developer.android.com/', '-federate', 'Android', 'https://developer.android.com/',
'-federationapi', 'Android', os.path.join(DOCLAVA_DIR, 'current.txt'), '-federationapi', 'Android', os.path.join(DOCLAVA_DIR, 'current.txt'),
'-bootclasspath', '-bootclasspath',
'%s:%s' % (os.path.join(SDK_DIR, 'platforms', 'android-26', 'android.jar'), '%s:%s' % (android_sdk_jar,
os.path.join(SDK_DIR, 'extras', 'android', 'support', os.path.join(SDK_DIR, 'extras', 'android', 'support',
'annotations', 'android-support-annotations.jar')), 'annotations', 'android-support-annotations.jar')),
] ]
...@@ -77,6 +82,7 @@ def main(): ...@@ -77,6 +82,7 @@ def main():
parser.add_option('--overview-file', help='Path of the overview page') parser.add_option('--overview-file', help='Path of the overview page')
parser.add_option('--readme-file', help='Path of the README.md') parser.add_option('--readme-file', help='Path of the README.md')
parser.add_option('--stamp', help='Path to touch on success.') parser.add_option('--stamp', help='Path to touch on success.')
parser.add_option('--android-sdk-jar', help='Path to android.jar')
options, _ = parser.parse_args() options, _ = parser.parse_args()
# A temporary directory to put the output of cronet api source jar files. # A temporary directory to put the output of cronet api source jar files.
......
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