-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade android SDK to API 32 #33524
Conversation
1b83414
to
d818d7e
Compare
@Nullable BinaryMessenger.BinaryMessageHandler handler, | ||
@Nullable TaskQueue taskQueue) { | ||
messenger.setMessageHandler(channel, handler, taskQueue); | ||
@Nullable TaskQueue taskQueue, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird, what is the linter trying to enforce?
@Nullable BinaryMessageHandler handler, | ||
@Nullable TaskQueue taskQueue) { | ||
@Nullable TaskQueue taskQueue, | ||
@Nullable BinaryMessageHandler handler) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is certainly a breaking change :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I wanted your opinion on this. There is a family of kotlin compatibility checks that enforces lambdas to be at the end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could just ignore this lint as it the only way to resolve it is to follow its suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is pretty severe change. I think we would need to disable this specific linter check, and file an issue for modernizing the embedding, so it's more Kotlin friendly. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm!
This reverts commit ddbddb8.
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
tools/android_lint/baseline.xml
Outdated
message="Field requires API level 21 (current min is 16): `android.view.HapticFeedbackConstants#CLOCK_TICK`" | ||
errorLine1=" view.performHapticFeedback(HapticFeedbackConstants.CLOCK_TICK);" | ||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> | ||
message="Field requires API level 21 (current min is 16): `android.view.WindowManager.LayoutParams#FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be removed if we specify a TargetApi(21)
annotation in ?
private void setSystemChromeSystemUIOverlayStyle( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar comment for the ones below, but using the specified min API
@@ -7,5 +7,13 @@ | |||
compatible all the way back to API 16. See | |||
https://developer.android.com/studio/write/java8-support.html#supported_features --> | |||
<ignore regexp="^Try-with-resources requires API level 19"/> | |||
</issue> | |||
</issue> | |||
<issue id="UnknownNullness" severity="ignore" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is also part of the Kotlin interop, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one in particular causes something on the order of ~500 errors
@@ -135,6 +90,7 @@ | |||
<src file="../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/TextInputChannel.java" /> | |||
<src file="../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/AccessibilityChannel.java" /> | |||
<src file="../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/KeyEventChannel.java" /> | |||
<src file="../../../flutter/shell/platform/android/io/flutter/embedding/engine/systemchannels/SpellCheckChannel.java" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like this file can get out of sync. what about adding some code to ensure that if this file has uncommitted changes in the current git tree then android_lint
fails?
It could go here: https://github.com/flutter/engine/blob/2962099077b36704071802ea5595f4a016a1c214/tools/android_lint/bin/main.dart
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a separate issue, so if you want to do this, feel free to do it in a different PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Engine uses android API 32 as well as updated support tools.
Package: https://chrome-infra-packages.appspot.com/p/flutter/android/sdk/all
Resolves flutter/flutter#103713
This patch contains lint forward fixes as well as ignores to address the new lints added in http://tools.android.com/tips/lint-checks