Status Update
Comments
sg...@google.com <sg...@google.com> #2
We're seeing a similar error in our code. Appears to be a combination of AGP 8.6.0 and Kotlin 2 needed to hit it.
private fun Intent.stripUnwantedFlags() {
// Explicitly remove the new task and clear task flags (Our browser activity is a single
// task activity and we never want to start a second task here).
flags = flags and Intent.FLAG_ACTIVITY_NEW_TASK.inv()
flags = flags and Intent.FLAG_ACTIVITY_CLEAR_TASK.inv()
// IntentReceiverActivity is started with the "excludeFromRecents" flag (set in manifest). We
// do not want to propagate this flag from the intent receiver activity to the browser.
flags = flags and Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS.inv()
}
All 3 lines then hit:
Must be one or more of: Intent.FLAG_GRANT_READ_URI_PERMISSION, Intent.FLAG_GRANT_WRITE_URI_PERMISSION, Intent.FLAG_FROM_BACKGROUND, Intent.FLAG_DEBUG_LOG_RESOLUTION, Intent.FLAG_EXCLUDE_STOPPED_PACKAGES, Intent.FLAG_INCLUDE_STOPPED_PACKAGES, Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION, Intent.FLAG_GRANT_PREFIX_URI_PERMISSION, Intent.FLAG_ACTIVITY_MATCH_EXTERNAL, Intent.FLAG_ACTIVITY_NO_HISTORY, Intent.FLAG_ACTIVITY_SINGLE_TOP, Intent.FLAG_ACTIVITY_NEW_TASK, Intent.FLAG_ACTIVITY_MULTIPLE_TASK, Intent.FLAG_ACTIVITY_CLEAR_TOP, Intent.FLAG_ACTIVITY_FORWARD_RESULT, Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP, Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS, Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT, Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED, Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY, Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, Intent.FLAG_ACTIVITY_NEW_DOCUMENT, Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, Intent.FLAG_ACTIVITY_NO_USER_ACTION, Intent.FLAG_ACTIVITY_REORDER_TO_FRONT, Intent.FLAG_ACTIVITY_NO_ANIMATION, Intent.FLAG_ACTIVITY_CLEAR_TASK, Intent.FLAG_ACTIVITY_TASK_ON_HOME, Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS, Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT, Intent.FLAG_ACTIVITY_REQUIRE_NON_BROWSER, Intent.FLAG_ACTIVITY_REQUIRE_DEFAULT, Intent.FLAG_RECEIVER_REGISTERED_ONLY, Intent.FLAG_RECEIVER_REPLACE_PENDING, Intent.FLAG_RECEIVER_FOREGROUND, Intent.FLAG_RECEIVER_NO_ABORT, Intent.FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS
ap...@google.com <ap...@google.com> #3
The initial report (
However,
ap...@google.com <ap...@google.com> #4
Thanks for fixing! What release should we be able to verify the fix in? And is there any chance of a backport for 8.6.1?
sg...@google.com <sg...@google.com>
ap...@google.com <ap...@google.com> #8
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Ladybug Feature Drop | 2024.2.2 Canary 2
- Android Gradle Plugin 8.8.0-alpha02
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
ap...@google.com <ap...@google.com> #9
The fixes for this issue are now also available in:
- Android Studio Ladybug | 2024.2.1 RC 1
- Android Gradle Plugin 8.7.0-rc01
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
ap...@google.com <ap...@google.com> #10
Branch: 3.2
commit 9b8e2ecb73d882af622f4ab214922579f2c14110
Author: Søren Gjesse <sgjesse@google.com>
Date: Fri Apr 29 09:58:43 2022
Rewrite code from javac code with for JDK-8272564
Some Dalvik and Art MVs does not support interface invokes to Object
members not explicitly defined on the symbolic reference of the
interface invoke. In these cases rewrite to a virtual invoke with
the symbolic reference java.lang.Object.
Conflicts:
Removed tests during cherry-pick. They used JDK-18 which is not
in third_party on the 3.2 branch.
Bug: 218298666
Change-Id: I38abdea8d9bbf4d004be1877373b58de161a55a7
M src/main/java/com/android/tools/r8/graph/DexItemFactory.java
M src/main/java/com/android/tools/r8/ir/optimize/CodeRewriter.java
M src/main/java/com/android/tools/r8/utils/InternalOptions.java
M src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
ap...@google.com <ap...@google.com> #11
Branch: 3.3
commit f807a15c6b3df1f3f7f7e728e3998b988060f2b1
Author: Søren Gjesse <sgjesse@google.com>
Date: Fri Apr 29 11:07:47 2022
Version 3.3.35
Bug:
Change-Id: Idcfd34d11baa7318ed5bd44c9e7e6a0eb9197f07
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #12
Branch: 3.3
commit 4fbd93fbe54fd98cb36dd195e11c3a8343dc9d58
Author: Søren Gjesse <sgjesse@google.com>
Date: Fri Apr 29 11:07:28 2022
Strenghten the check for the Art JDK-8272564 workaround
Also add a test of invalid invokes not changing.
Bug:
Change-Id: I9ab27dad52a04808b54ddaa37eccf7c4aaa9deaa
A src/test/java/com/android/tools/r8/desugar/jdk8272564/Jdk8272564InvalidCode.java
M src/main/java/com/android/tools/r8/ir/optimize/CodeRewriter.java
M src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
ap...@google.com <ap...@google.com> #13
Branch: 3.1
commit fe489dbb2e2df8bb500745fdbbff1e1a3751064c
Author: Søren Gjesse <sgjesse@google.com>
Date: Fri Apr 29 11:28:37 2022
Version 3.1.74
Bug:
Change-Id: I35911f7fd661385fc90d74adb449831eb104ce5d
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #14
Branch: 3.1
commit 72532b2fe5a8623eaa016f9fb14522c3ad853b32
Author: Søren Gjesse <sgjesse@google.com>
Date: Fri Apr 29 11:28:11 2022
Strenghten the check for the Art JDK-8272564 workaround
Also add a test of invalid invokes not changing.
Bug:
Change-Id: I9ab27dad52a04808b54ddaa37eccf7c4aaa9deaa
A src/test/java/com/android/tools/r8/desugar/jdk8272564/Jdk8272564InvalidCode.java
M src/main/java/com/android/tools/r8/ir/optimize/CodeRewriter.java
M src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
ap...@google.com <ap...@google.com> #15
Branch: 3.1
commit b49442885c0b272ad1ccd2d821d4f7b781775489
Author: Søren Gjesse <sgjesse@google.com>
Date: Fri Apr 29 11:21:35 2022
Rewrite code from javac code with for JDK-8272564
Some Dalvik and Art MVs does not support interface invokes to Object
members not explicitly defined on the symbolic reference of the
interface invoke. In these cases rewrite to a virtual invoke with
the symbolic reference java.lang.Object.
Conflicts:
Removed tests during cherry-pick. They used JDK-18 which is not
in third_party on the 3.1 branch.
Merge issue:
Added new method from
Added code from
Bug: 218298666
Change-Id: I38abdea8d9bbf4d004be1877373b58de161a55a7
M src/main/java/com/android/tools/r8/graph/DexItemFactory.java
M src/main/java/com/android/tools/r8/ir/optimize/CodeRewriter.java
M src/main/java/com/android/tools/r8/utils/InternalOptions.java
M src/main/java/com/android/tools/r8/graph/DexDefinitionSupplier.java
M src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
ap...@google.com <ap...@google.com> #16
Branch: 3.3
commit 4fbd93fbe54fd98cb36dd195e11c3a8343dc9d58
Author: Søren Gjesse <sgjesse@google.com>
Date: Fri Apr 29 11:07:28 2022
Strenghten the check for the Art JDK-8272564 workaround
Also add a test of invalid invokes not changing.
Bug:
Change-Id: I9ab27dad52a04808b54ddaa37eccf7c4aaa9deaa
A src/test/java/com/android/tools/r8/desugar/jdk8272564/Jdk8272564InvalidCode.java
M src/main/java/com/android/tools/r8/ir/optimize/CodeRewriter.java
M src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
ap...@google.com <ap...@google.com> #17
Branch: 3.2
commit 666fcef6b74bc1e527fa06a6c6903feff9eadc36
Author: Søren Gjesse <sgjesse@google.com>
Date: Fri May 06 10:58:50 2022
Negate condition to correctly match name
Bug: 218298666
Change-Id: Id8bf2048af36c8c07ce07b5bfd35ed766f555a52
M src/main/java/com/android/tools/r8/utils/InternalOptions.java
M src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
ap...@google.com <ap...@google.com> #18
Branch: 3.1
commit 3c7b6516575c3eb979ff640abcc60ea70f1fa8e2
Author: Søren Gjesse <sgjesse@google.com>
Date: Fri May 06 11:03:26 2022
Negate condition to correctly match name
Bug: 218298666
Change-Id: Id8bf2048af36c8c07ce07b5bfd35ed766f555a52
M src/main/java/com/android/tools/r8/utils/InternalOptions.java
M src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
ap...@google.com <ap...@google.com> #19
Branch: 3.2
commit 666fcef6b74bc1e527fa06a6c6903feff9eadc36
Author: Søren Gjesse <sgjesse@google.com>
Date: Fri May 06 10:58:50 2022
Negate condition to correctly match name
Bug: 218298666
Change-Id: Id8bf2048af36c8c07ce07b5bfd35ed766f555a52
M src/main/java/com/android/tools/r8/utils/InternalOptions.java
M src/main/java/com/android/tools/r8/ir/conversion/IRConverter.java
de...@google.com <de...@google.com> #20
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Dolphin Beta 1 (2021.3.1.10)
- Android Gradle Plugin 7.3.0-beta01
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
jk...@gmail.com <jk...@gmail.com> #21
Good level it back
Description
D8 and R8 rewritings will be required to undo the fix for JDK-8272564.