Status Update
Comments
ap...@google.com <ap...@google.com> #2
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
ap...@google.com <ap...@google.com> #3
Stacktrace:
Caused by: java.lang.IllegalArgumentException: Can not get supported output size under supported maximum for the format: 34
at androidx.camera.camera2.internal.SupportedSurfaceCombination.getSupportedOutputSizes(SupportedSurfaceCombination.java:355)
at androidx.camera.camera2.internal.SupportedSurfaceCombination.getSuggestedResolutions(SupportedSurfaceCombination.java:197)
at androidx.camera.camera2.internal.Camera2DeviceSurfaceManager.getSuggestedResolutions(Camera2DeviceSurfaceManager.java:198)
at androidx.camera.core.CameraX.calculateSuggestedResolutions(CameraX.java:943)
at androidx.camera.core.CameraX.bindToLifecycle(CameraX.java:293)
at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:227)
Below are some findings based on our debugging
When Dex is connected
previewConfig.getMaxResolution() is returning "731x411" as maxSize.
Inside Preview.Builder.build() -> Default_MAX_resolution is set to "CameraX.getSurfaceManager().getPreviewSize()" which is 731x411
this is being picked as maxSize.
While rendering maxSize is 731x411 and minSize is 640x480 and below are available outputSizes
0 = {Size@11860} "4032x3024"
1 = {Size@11861} "3984x2988"
2 = {Size@11862} "4032x2268"
3 = {Size@11863} "3024x3024"
4 = {Size@11864} "2976x2976"
5 = {Size@11865} "3840x2160"
6 = {Size@11866} "3264x2448"
7 = {Size@11867} "4032x1960"
8 = {Size@11868} "2880x2160"
9 = {Size@11869} "3264x1836"
10 = {Size@11870} "2160x2160"
11 = {Size@11871} "2560x1440"
12 = {Size@11872} "2224x1080"
13 = {Size@11873} "2048x1152"
14 = {Size@11874} "1920x1080"
15 = {Size@11875} "1440x1080"
16 = {Size@11876} "1088x1088"
17 = {Size@11877} "1280x720"
18 = {Size@11878} "1024x768"
19 = {Size@11879} "1056x704"
20 = {Size@11880} "960x720"
21 = {Size@11881} "960x540"
22 = {Size@11882} "720x720"
23 = {Size@11883} "800x450"
24 = {Size@11884} "720x480"
25 = {Size@11885} "640x480"
26 = {Size@11886} "352x288"
27 = {Size@11887} "320x240"
28 = {Size@11888} "256x144"
29 = {Size@11889} "176x144"
and couldn't find any size in this range.
When Dex not connected
minsize = 640x480
maxsize = 1920x1080
0 = {Size@11836} "4032x3024"
1 = {Size@11837} "3984x2988"
2 = {Size@11838} "4032x2268"
3 = {Size@11839} "3024x3024"
4 = {Size@11840} "2976x2976"
5 = {Size@11841} "3840x2160"
6 = {Size@11842} "3264x2448"
7 = {Size@11843} "4032x1960"
8 = {Size@11844} "2880x2160"
9 = {Size@11845} "3264x1836"
10 = {Size@11846} "2160x2160"
11 = {Size@11847} "2560x1440"
12 = {Size@11848} "2224x1080"
13 = {Size@11849} "2048x1152"
14 = {Size@11850} "1920x1080"
15 = {Size@11851} "1440x1080"
16 = {Size@11852} "1088x1088"
17 = {Size@11853} "1280x720"
18 = {Size@11854} "1024x768"
19 = {Size@11855} "1056x704"
20 = {Size@11856} "960x720"
21 = {Size@11857} "960x540"
22 = {Size@11858} "720x720"
23 = {Size@11859} "800x450"
24 = {Size@11860} "720x480"
25 = {Size@11861} "640x480"
26 = {Size@11862} "352x288"
27 = {Size@11863} "320x240"
28 = {Size@11864} "256x144"
29 = {Size@11865} "176x144"
and we have 12 available sizes in this range
Camera2DeviceSurfaceManager.java:: getPreviewSize()
mCameraSupportedSurfaceCombinationMap.get(cameraId).getSurfaceDefinition().getPreviewSize() = "1920x1080"
cameraId=0
ap...@google.com <ap...@google.com> #4
The issue root cause is that CameraX will default filter out sizes smaller than 640x480. For Preview, the max size will be limited to under display size. I checked the HW spec info for the issue related devices. Display size of FUJITSU F-04J/F-05J is 360x640. That will result int that no size exists in the conditions that is larger or equal to 640x480 and smaller or equal to 360x640.
A temporary workaround for this situation is to use Preview.Builder#setTargetResolution() to set a size smaller than 640x480 to bypass the problem.
For device FUJITSU arrowsM04, I checked its HW spec info and its display size I found is 1280x720. It seems that the problem should not exist in the device.
Could you confirm that the problem exist on arrowsM04 device? What will be the returned value when using Display#getRealSize to obtain the display size?
ap...@google.com <ap...@google.com> #5
> A temporary workaround for this situation is to use Preview.Builder#setTargetResolution() to set a size smaller than 640x480 to bypass the problem.
OK. I will try it.
> Could you confirm that the problem exist on arrowsM04 device?
We receive the crash report (Crashlytics) that this crash has occurred on arrowsM04.
We don't have this device so we can't confirm that the problem really exist on arrowsM04.
> What will be the returned value when using Display#getRealSize to obtain the display size?
We can't investigate it for the same reason.
Thank you.
ap...@google.com <ap...@google.com> #6
This issue happened on devices that the display size is smaller than 640x480. In original auto-resolution mechanism, supported sizes smaller than 640x480 will be default filter out.
The auto-resolution mechanism encodes the guaranteed configurations tables in CameraDevice#createCaptureSession(SessionConfiguration). It defines that the PREVIEW size is the small one of the device display size and 1080p. The PREVIEW size will be the maximal size limitation for Preview use case. The reason it limits the size to display size and 1080p is the stream output in display size or 1080p has been able to provide good enough preview quality. Therefore, auto-resolution mechanism will limit the selected size to be smaller than the small one of the device display size and 1080p.
With above two conditions, in this issue, all sizes smaller than 640x480 have been filter out, therefore, there is no size smaller than the display size 320x240 can be selected to use. And cause the exception.
Solution:
When the display size is smaller than 640x480, auto-resolution mechanism won't filter out those small sizes smaller than 640x480. This makes those small size be left and can be selected for the Preview use case on small display devices.
The solution has been merged and will be included in next CameraX release.
ap...@google.com <ap...@google.com> #7
Hello.
This crash still occurs.
- CAMERAX VERSION: 1.0.0-beta4
- ANDROID OS BUILD NUMBER: Android 7.1.1
- DEVICE NAME: FUJITSU F-02H
We receive following crash report from FUJITSU F-02H. So far We have received this crash report only from F-02H.
java.lang.IllegalArgumentException
Can not get supported output size under supported maximum for the format: 34
androidx.camera.camera2.internal.SupportedSurfaceCombination.getSupportedOutputSizes (SupportedSurfaceCombination.java:349)
androidx.camera.camera2.internal.SupportedSurfaceCombination.getSuggestedResolutions (SupportedSurfaceCombination.java:197)
androidx.camera.camera2.internal.Camera2DeviceSurfaceManager.getSuggestedResolutions (Camera2DeviceSurfaceManager.java:198)
androidx.camera.core.CameraX.calculateSuggestedResolutions (CameraX.java:949)
androidx.camera.core.CameraX.bindToLifecycle (CameraX.java:351)
androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle (ProcessCameraProvider.java:230)
(our application's package name).CameraFragment.bindCameraUseCases (CameraFragment.java:174)
cl...@google.com <cl...@google.com>
ap...@google.com <ap...@google.com> #8
Could you help to provide the following information to clarify the issue?
1. Is the full name of the device Fujitsu Arrows NX F-02H that has a 1440x2560 display?
2. Please help to provide the supported output sizes of ImageFormat.PRIVATE that is obtained by StreamConfigurationMap#getOutputSizes(int).
ap...@google.com <ap...@google.com> #9
- Is the full name of the device Fujitsu Arrows NX F-02H that has a 1440x2560 display?
Yes
- Please help to provide the supported output sizes of ImageFormat.PRIVATE that is obtained by StreamConfigurationMap#getOutputSizes(int).
Since we don't have this device, we'll try to collect this information in the next version of our app. The next version will be released later this month.
ap...@google.com <ap...@google.com> #10
Hello.
- Please help to provide the supported output sizes of ImageFormat.PRIVATE that is obtained by StreamConfigurationMap#getOutputSizes(int).
We have collected the output of the device where the crash occurs.
Device1
- Model : arrows Be F-05J
- Android Version : 7.1.1
- Supported output sizes of ImageFormat.PRIVATE
CameraId 0: 480x480
CameraId 1: 2048x1536 ,1920x1080 ,1280x720 ,960x720 ,640x480 ,320x240 ,176x144
Device2
- Model : Fujitsu arrows M04
- Android Version : 7.1.1
- Supported output sizes of ImageFormat.PRIVATE
CameraId 0: 480x480
CameraId 1: 2048x1536 ,1920x1080 ,1280x720 ,960x720 ,640x480 ,320x240 ,176x144
Additional Information
CameraX version : 1.0.0-beta04
We collect the supported output sizes by following code.
val errorString = buildString {
append("The supported output sizes of ImageFormat.PRIVATE: ")
(requireContext().getSystemService(Context.CAMERA_SERVICE) as CameraManager).apply {
cameraIdList.forEachIndexed { index, cameraId ->
val msg = if (VERSION.SDK_INT >= VERSION_CODES.M) {
val configurationMap =
getCameraCharacteristics(cameraId).get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP)
val sizes = configurationMap?.getOutputSizes(ImageFormat.PRIVATE)
"CameraId $index: ${sizes?.joinToString(" ,")}"
} else {
"CameraId $index: This device version is under M."
}
append(msg)
}
}
}
ap...@google.com <ap...@google.com> #11
ap...@google.com <ap...@google.com> #12
I tried to find the device specs and both 720x1280
size display. For the camera id 0 device, it is a different case that the display size is larger than 640x480
but the device only supports a 480x480
size. The case also caused the same IllegalArgumentException and was also fixed by 1.0.0-beta04
release. Before 480x480
size would be filtered out and then caused the IllegalArgumentException. After it was merged, the 640x480
size threshold was removed and then the 480x480
size would be kept and selected to use.
It looks like 1.0.0-beta04
release had been used to collect the supported sizes information. But the issue should have been fixed by 1.0.0-beta04
release. Did you only check the device model name to collect the supported sizes information or collect the information when the IllegalArgumentException issue happens again?
CameraX's 1.0.0-beta04
version. Maybe you can also consider to upgrade to the latest 1.0.0-rc01
version for your application. Thanks.
ap...@google.com <ap...@google.com> #13
Did you only check the device model name to collect the supported sizes information or collect the information when the IllegalArgumentException issue happens again?
We collect informations only from the device on which IllegalArgumentException happened.
Our latest app uses CameraX version 1.0.0-beta10
and this issue still occurres.
However we don't receive crash report from Fujitsu arrows Be F-05J
or Fujitsu arrows M04
so far. (This doesn't mean this issue is fixed on these devices because our app is heavily rely on camera so these device's user wouldn't use our app anymore.)
Instead, we receive crash report from
- Model : Fujitsu F-03K
- Android Version : 7.1.2
- Supported output sizes of ImageFormat.PRIVATE
CameraId 0 : 480x480
CameraId 1 : 2048x1536 ,1920x1080 ,1280x720 ,960x720 ,640x480 ,320x240 ,176x144
ap...@google.com <ap...@google.com> #14
I missed some settings when I simulated the issue by robolectric test so that I was not able to reproduce it. Now, I can reproduce the issue if the device only supports one 480x480 resolution. I'm working on the solution and target to make it included in next release.
ap...@google.com <ap...@google.com> #15
Branch: androidx-main
commit 69d15dff7bb857ee33a0f643ff42a0f8bc475ab2
Author: charcoalchen <charcoalchen@google.com>
Date: Fri Jan 08 18:30:03 2021
Fixed IllegalArgumentException issue happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480.
Do not filter out sizes smaller than 640x480 when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480.
Relnote:"Fixed IllegalArgumentException issue happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480."
Bug: 150506192
Test: SupportedSurfaceCombinationTest
Change-Id: I2a63ce8e2ad42a9cc060c8635ac3603bf440b1ec
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/SupportedSurfaceCombination.java
M camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/SupportedSurfaceCombinationTest.java
ap...@google.com <ap...@google.com> #16
ap...@google.com <ap...@google.com> #17
Branch: androidx-main
commit c83511c81d5fd0c87577180301ca1b1231d24c13
Author: Ian Lake <ilake@google.com>
Date: Mon Jan 30 18:44:32 2023
Update compose module with ActivityResultRegistryOwner
With the move of ActivityResultRegistryOwner to Kotlin,
implementations must now override a property rather
than implement a getter.
Test: ./gradlew bOS
BUG: 257291701
Change-Id: I490b9b69d5bd4d9c608ca8d3c9a196d3e70fe801
M compose/ui/ui-tooling/src/androidMain/kotlin/androidx/compose/ui/tooling/ComposeViewAdapter.kt
ap...@google.com <ap...@google.com> #18
Branch: androidx-main
commit 74e5a4b559f319808f1addeb4d1bc46d4267ccdb
Author: Ian Lake <ilake@google.com>
Date: Mon Jan 30 18:38:17 2023
Convert ActivityResultRegistryOwner to Kotlin
Relnote: "`ActivityResultRegistryOwner` is now written
in Kotlin. This is a **source incompatible change**
for those classes written in Kotlin - you must now
override the `activityResultRegistry` property rather
than implementing the previous
`getActivityResultRegistry()` function."
Test: ./gradlew checkApi
BUG: 257291701
Change-Id: I0b00efc873c16e5b6d26e9ebad889f00a8ddb6b3
M activity/activity-compose/src/androidTest/java/androidx/activity/compose/ActivityResultRegistryTest.kt
M activity/activity/api/current.txt
M activity/activity/api/public_plus_experimental_current.txt
M activity/activity/api/restricted_current.txt
M activity/activity/src/main/java/androidx/activity/result/ActivityResultRegistryOwner.kt
ap...@google.com <ap...@google.com> #19
Branch: androidx-main
commit 7f1a7dcb8a6eb73cc3a54ab161a2c8bfebea48ca
Author: Ian Lake <ilake@google.com>
Date: Mon Jan 30 18:34:24 2023
Rename ActivityResultRegistryOwner.java to .kt
Part of the Kotlin conversion process
Test: n/a
BUG: 257291701
Change-Id: I2e786c6192e2747bf91105f4a1c18703baa0dda7
M activity/activity/src/main/java/androidx/activity/result/ActivityResultRegistryOwner.kt
ap...@google.com <ap...@google.com> #20
Branch: androidx-main
commit c2189c5497529ac8cb8d7e01ac1605c72e029ef2
Author: Ian Lake <ilake@google.com>
Date: Tue Jan 31 00:21:00 2023
Convert IntentSenderRequest to Kotlin
Relnote: "`IntentSenderRequest` is now written in Kotlin."
Test: ./gradlew checkApi
BUG: 257291701
Change-Id: Ib7e74b794dc11ca4ad53bb6145c79f0f63d9c69d
A activity/activity/api/current.ignore
M activity/activity/api/current.txt
M activity/activity/api/public_plus_experimental_current.txt
A activity/activity/api/restricted_current.ignore
M activity/activity/api/restricted_current.txt
M activity/activity/src/main/java/androidx/activity/result/IntentSenderRequest.kt
ap...@google.com <ap...@google.com> #21
Branch: androidx-main
commit 8acdae64bc8e603c57a9d50422592b48a063d6d0
Author: Ian Lake <ilake@google.com>
Date: Mon Jan 30 23:55:36 2023
Rename IntentSenderRequest.java to .kt
Part of the Kotlin conversion process
Test: n/a
BUG: 257291701
Change-Id: I296f10e0a69e68e618a72aa447d08ab7f6daf518
M activity/activity/src/main/java/androidx/activity/result/IntentSenderRequest.kt
ap...@google.com <ap...@google.com> #22
Branch: androidx-main
commit e4a7c287c679487bb576d4865be865b4364dc0c6
Author: Ian Lake <ilake@google.com>
Date: Mon Jan 30 23:37:12 2023
Move ContextAware Kotlin extension to activity artifact
Migrate the ContextAware.withContextAvailable extension
to the main activity artifact to ensure there is only one
ContextAware.kt class.
Relnote: "The `ContextAware.withContextAvailable` Kotlin
extension has been moved from `activity-ktx` to `activity`."
Test: moved tests still work
BUG: 257291701
Change-Id: Iada9260aa0d006aeea976d08713e171285848d7f
M activity/activity-ktx/api/current.ignore
M activity/activity-ktx/api/current.txt
M activity/activity-ktx/api/public_plus_experimental_current.txt
M activity/activity-ktx/api/restricted_current.ignore
M activity/activity-ktx/api/restricted_current.txt
D activity/activity-ktx/src/androidTest/java/androidx/activity/contextaware/ContextAwareTest.kt
D activity/activity-ktx/src/main/java/androidx/activity/contextaware/ContextAware.kt
M activity/activity/api/current.txt
M activity/activity/api/public_plus_experimental_current.txt
M activity/activity/api/restricted_current.txt
M activity/activity/src/androidTest/java/androidx/activity/contextaware/ContextAwareHelperTest.kt
M activity/activity/src/main/java/androidx/activity/contextaware/ContextAware.kt
ap...@google.com <ap...@google.com> #23
Branch: androidx-main
commit 221a1adae23c6ead5b14d5764770a6770deabe14
Author: Ian Lake <ilake@google.com>
Date: Mon Jan 30 23:22:14 2023
Convert androidx.activity.contextaware to Kotlin
Relnote: "The `ContextAware`, `OnContextAvailableListener`, and
`ContextAwareHelper` are now written in Kotlin."
Test: ./gradlew checkApi
BUG: 257291701
Change-Id: I1a73e84b3742edf18db69c18722f61b8bc49548b
M activity/activity/api/current.txt
M activity/activity/api/public_plus_experimental_current.txt
M activity/activity/api/restricted_current.txt
M activity/activity/src/main/java/androidx/activity/contextaware/ContextAware.kt
M activity/activity/src/main/java/androidx/activity/contextaware/ContextAwareHelper.kt
M activity/activity/src/main/java/androidx/activity/contextaware/OnContextAvailableListener.kt
ap...@google.com <ap...@google.com> #24
Branch: androidx-main
commit e1b5ac1d24a726aec0e8a76f6dd2bd604a91cc83
Author: Ian Lake <ilake@google.com>
Date: Mon Jan 30 23:14:43 2023
Rename androidx.activity.contextaware classes to .kt
Part of the Kotlin conversion process
Test: n/a
BUG: 257291701
Change-Id: I3876d8a04ba08e8ee13eb18966ef2a858ace69f3
M activity/activity/src/main/java/androidx/activity/contextaware/ContextAware.kt
M activity/activity/src/main/java/androidx/activity/contextaware/ContextAwareHelper.kt
M activity/activity/src/main/java/androidx/activity/contextaware/OnContextAvailableListener.kt
pa...@gmail.com <pa...@gmail.com> #25
cl...@google.com <cl...@google.com> #26
Yes we do accept external contributions through our github repo. Please checkout out our contribution guide for how to set up your env and submit PRs.
Looking forward your PR!
pa...@gmail.com <pa...@gmail.com> #27
Thanks! But I'm having trouble on setting up the activity project. I'm getting the following error:
Could not compile build file '...\playground-build.gradle': 17: unable to resolve class androidx.build.AndroidXPlaygroundRootPlugin
I know this isn't the right place to ask but I don't know where else to ask for solution. So could you please help me fix this?
ve...@gmail.com <ve...@gmail.com> #29
il...@google.com <il...@google.com>
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #30
Branch: androidx-main
commit 0c09a4261521a13ec74c8bc3f018aa71bd1aeecc
Author: Ian Lake <ilake@google.com>
Date: Wed Oct 11 21:23:39 2023
Convert *Info classes passed to Providers to Kotlin
Along with the actual On*Provider interfaces, the
*Info classes that those Providers sent to their
respective Consumers should also be converted to Kotlin.
Relnote: "The `MultiWindowModeChangedInfo` and
`PictureInPictureModeChangedInfo` classes that are sent
to the `Consumer` added to their respective Provider
interfaces are now written in Kotlin."
Test: ./gradlew checkApi
BUG: 257291701
Change-Id: Ie08e292c77dc66634a0b474a63df0ac31f34f87e
M core/core/api/current.txt
M core/core/api/restricted_current.txt
M core/core/src/main/java/androidx/core/app/MultiWindowModeChangedInfo.kt
M core/core/src/main/java/androidx/core/app/PictureInPictureModeChangedInfo.kt
ap...@google.com <ap...@google.com> #31
Branch: androidx-main
commit cf02af882cbb41d0e39b0068fed7945d19792241
Author: Ian Lake <ilake@google.com>
Date: Wed Oct 11 21:04:44 2023
Rename *Info classes passed to Provider to .kt
In preparation for their conversion to Kotlin,
the Info classes that are passed to the On*Provider
Consumers should be renamed to .kt.
Test: ./gradlew bOS
BUG: 257291701
Change-Id: Ibc3e77d18ec6e29f39d3632852e100a78674aa04
M core/core/src/main/java/androidx/core/app/MultiWindowModeChangedInfo.kt
M core/core/src/main/java/androidx/core/app/PictureInPictureModeChangedInfo.kt
ap...@google.com <ap...@google.com> #32
Branch: androidx-main
commit cfb6baf849d42492bf39aaa521aded8000258ef6
Author: Ian Lake <ilake@google.com>
Date: Wed Oct 11 20:44:39 2023
Rename On*Provider interfaces from .java to .kt
In preparation for their conversion to Kotlin.
Test: ./gradlew bOS
BUG: 257291701
Change-Id: I22f7206360e68208a872b49d696abf30fff214cd
M core/core/src/main/java/androidx/core/app/OnMultiWindowModeChangedProvider.kt
M core/core/src/main/java/androidx/core/app/OnNewIntentProvider.kt
M core/core/src/main/java/androidx/core/app/OnPictureInPictureModeChangedProvider.kt
M core/core/src/main/java/androidx/core/content/OnConfigurationChangedProvider.kt
M core/core/src/main/java/androidx/core/content/OnTrimMemoryProvider.kt
ap...@google.com <ap...@google.com> #33
Branch: androidx-main
commit 8b143a2d354ea97ac6457d9654357b891db90ba1
Author: Ian Lake <ilake@google.com>
Date: Wed Oct 11 20:53:22 2023
Convert On*Provider interfaces to Kotlin
Ensure that the Consumer passed to each
Provider's add*Listener and remove*Listener
has the appropriate nullability.
Relnote: "The `OnMultiWindowModeChangedProvider`,
`OnNewIntentProvider`,
`OnPictureInPictureModeChangedProvider`,
`OnConfigurationChangedProvider`,
and `OnTrimMemoryProvider` interfaces have been
converted to Kotlin to ensure that the generic
parameters on the `Consumer` that their listener
methods take have the correct nullability (they
are all non-null)."
Test: ./gradlew checkApi
BUG: 257291701
Change-Id: Ib62377a0f6002806074a05126cf6a9ca8c78dcbf
M core/core/api/current.txt
M core/core/api/restricted_current.txt
M core/core/src/main/java/androidx/core/app/OnMultiWindowModeChangedProvider.kt
M core/core/src/main/java/androidx/core/app/OnNewIntentProvider.kt
M core/core/src/main/java/androidx/core/app/OnPictureInPictureModeChangedProvider.kt
M core/core/src/main/java/androidx/core/content/OnConfigurationChangedProvider.kt
M core/core/src/main/java/androidx/core/content/OnTrimMemoryProvider.kt
ap...@google.com <ap...@google.com> #34
Branch: androidx-main
commit e4b914d4f0ce94d49d6a1fa1d19ba8864c415750
Author: Ian Lake <ilake@google.com>
Date: Tue Oct 17 20:09:07 2023
Upgrade Core to use Lifecycle 2.6.2
As Lifecycle 2.6 has source breaking changes
for classes written in Kotlin, moving classes
(such as Core's ComponentActivity) to Kotlin
causes issues when run with maxDepVersions.
By updating Core to depend on Lifecycle 2.6.2,
we ensure that maxDepVersions won't cause
issues in subsequent upgrades.
Relnote: "Core now depends on
[Lifecycle `2.6.2`](/jetpack/androidx/releases/lifecycle#2.6.2)."
Test: ./gradlew core:core:build
BUG: 257291701
Change-Id: I2d94c8b7fc3fb3bb59547d56a5d2f06584f1b5a4
M core/core/build.gradle
ap...@google.com <ap...@google.com> #35
Branch: androidx-main
commit 6a74b4839f791578491d0007f440e395274e89ae
Author: Ian Lake <ilake@google.com>
Date: Tue Oct 17 21:22:13 2023
Convert Core ComponentActivity to Kotlin
Switch to the new lifecycle property from
Lifecycle 2.6 as part of the Kotlin conversion
of Core's ComponentActivity.
As Kotlin warns if parameter names are different
from their super class names, we update other
classes to use savedInstanceState as the parameter
to onCreate().
Relnote: n/a
Test: ./gradlew core:core:checkApi
BUG: 257291701
Change-Id: Ib395e5da26427aa0d2831da2b7a5d1bdcb8ad22e
M core/core/api/restricted_current.txt
M core/core/src/main/java/androidx/core/app/ComponentActivity.kt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentFinishEarlyTest.kt
M glance/glance-wear-tiles/integration-tests/demos/src/main/java/androidx/glance/wear/tiles/demos/TilePreviewActivity.kt
M glance/glance-wear-tiles/integration-tests/template-demos/src/main/java/androidx/glance/wear/tiles/template/demos/TilePreviewActivity.kt
ap...@google.com <ap...@google.com> #36
Branch: androidx-main
commit 9ab92ca29baf2fab19bc2468e77a965890d1188a
Author: Ian Lake <ilake@google.com>
Date: Tue Oct 17 20:41:42 2023
Rename Core ComponentActivity.java to .kt
In preparation for its conversion to Kotlin.
Test: ./gradlew core:core:build
BUG: 257291701
Change-Id: I273bb3d972cb1020b2a1c187a51770be33919d0d
M core/core/src/main/java/androidx/core/app/ComponentActivity.kt
ap...@google.com <ap...@google.com> #37
Branch: androidx-main
commit 4e57779ea244552e66b28f29a24b4a7604e80fe1
Author: Ian Lake <ilake@google.com>
Date: Tue Oct 10 23:26:58 2023
Convert ComponentActivity to Kotlin
Rewrite ComponentActivity in Kotlin.
Test: ./gradlew activity:activity:checkApi
BUG: 257291701
Relnote: "`ComponentActivity` has been rewritten in
Kotlin."
Relnote: "Activity now depends on
[Core `1.13.0-alpha01`](/jetpack/androidx/releases/core#1.13.0-alpha01)."
Change-Id: I14f312d6879ce6c91496112fb6b171f81cdbddf2
M activity/activity/api/api_lint.ignore
M activity/activity/api/current.ignore
M activity/activity/api/current.txt
M activity/activity/api/restricted_current.ignore
M activity/activity/api/restricted_current.txt
M activity/activity/build.gradle
M activity/activity/src/main/java/androidx/activity/ComponentActivity.kt
M camera/integration-tests/extensionstestapp/src/main/java/androidx/camera/integration/extensions/validation/CameraValidationResultActivity.kt
M camera/integration-tests/extensionstestapp/src/main/java/androidx/camera/integration/extensions/validation/ExtensionValidationResultActivity.kt
M camera/integration-tests/extensionstestapp/src/main/java/androidx/camera/integration/extensions/validation/ImageValidationActivity.kt
M camera/integration-tests/uiwidgetstestapp/src/main/java/androidx/camera/integration/uiwidgets/viewpager/ViewPager2Activity.kt
M camera/integration-tests/uiwidgetstestapp/src/main/java/androidx/camera/integration/uiwidgets/viewpager/ViewPagerActivity.kt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/test/FragmentTestActivity.kt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/test/NewIntentActivity.kt
M navigation/integration-tests/testapp/src/main/java/androidx/navigation/testapp/HelpActivity.kt
ap...@google.com <ap...@google.com> #38
Branch: androidx-main
commit fff2ee271b53d0ca453696ba4025ba0f4fffc9b5
Author: Ian Lake <ilake@google.com>
Date: Tue Oct 10 21:15:08 2023
Rename ComponentActivity.java to ComponentActivity.kt
As part of the Kotlin conversion process.
Test: n/a
BUG: 257291701
Change-Id: I72433e8a00676fa5173b6a7ee273afe7db187b4f
M activity/activity/src/main/java/androidx/activity/ComponentActivity.kt
ap...@google.com <ap...@google.com> #39
Branch: androidx-main
commit 86cc08969d868fd7508c15db6f518cce9bcc28ef
Author: Ian Lake <ilake@google.com>
Date: Wed Oct 25 20:08:59 2023
Convert ActivityResultLauncher to Kotlin
Rewrite ActivityResultLauncher in Kotlin.
The getContract() method is now an abtract Kotlin
property.
This also moves the `ActivityResultLauncher` Kotlin
extensions from `activity-ktx` back to `activity` since
we can't have two Kotlin files with the same name.
Relnote: "`ActivityResultLauncher` has been rewritten in
Kotlin. As part of that conversion, the `getContract` method
is now an abstract Kotlin property. This is a binary compatible
change, but source breaking if your implementation of
`ActivityResultLauncher` is written in Kotlin."
Test: ./gradlew activity:activity:checkApi
BUG: 257291701
Change-Id: Id4615d19b383b2438be6a8f68da7584394d13515
M activity/activity-compose/api/current.ignore
M activity/activity-compose/api/current.txt
M activity/activity-compose/api/restricted_current.ignore
M activity/activity-compose/api/restricted_current.txt
M activity/activity-compose/src/androidTest/java/androidx/activity/compose/ActivityResultRegistryTest.kt
M activity/activity-compose/src/main/java/androidx/activity/compose/ActivityResultRegistry.kt
M activity/activity-ktx/api/current.ignore
M activity/activity-ktx/api/current.txt
M activity/activity-ktx/api/restricted_current.ignore
M activity/activity-ktx/api/restricted_current.txt
D activity/activity-ktx/src/androidTest/java/androidx/activity/result/ActivityResultLauncherTest.kt
M activity/activity-ktx/src/main/java/androidx/activity/result/ActivityResultCaller.kt
D activity/activity-ktx/src/main/java/androidx/activity/result/ActivityResultLauncher.kt
M activity/activity/api/current.ignore
M activity/activity/api/current.txt
M activity/activity/api/restricted_current.ignore
M activity/activity/api/restricted_current.txt
M activity/activity/src/androidTest/java/androidx/activity/ComponentActivityResultTest.kt
M activity/activity/src/androidTest/java/androidx/activity/result/ActivityResultLauncherTest.kt
M activity/activity/src/main/java/androidx/activity/result/ActivityResultLauncher.kt
ap...@google.com <ap...@google.com> #40
Branch: androidx-main
commit e91ba67bdd4ef797487b8d757a2ac771a1cfc60a
Author: Ian Lake <ilake@google.com>
Date: Wed Oct 25 20:00:49 2023
Rename ActivityResultLauncher.java to .kt
As part of the Kotlin conversion process.
Test: n/a
BUG: 257291701
Change-Id: I19348e67afb8fe2f1ca9f5483e31fe8edfa29e8a
M activity/activity/src/main/java/androidx/activity/result/ActivityResultLauncher.kt
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #41
Branch: androidx-main
commit d949529d18ac83c6775c7824138b52eb544cdf1c
Author: Ian Lake <ilake@google.com>
Date: Fri Oct 27 17:34:57 2023
Make ComponentActivity.onNewIntent take a non-null Intent
This Intent is always non-null so we should mark
it as such until the framework is updated to also
make it non-null.
Test: ./gradlew activity:activity:checkApi
BUG: 257291701
Change-Id: Ia694837203011f1c6aa611aea6c20f1b7473af1b
M activity/activity/src/androidTest/java/androidx/activity/ComponentActivityCallbacksTest.kt
M activity/activity/src/main/java/androidx/activity/ComponentActivity.kt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/test/NewIntentActivity.kt
M window/window-demos/demo/src/main/java/androidx/window/demo/embedding/SplitActivityDetail.kt
ap...@google.com <ap...@google.com> #42
Branch: androidx-main
commit dc886d9a2f535799cbf4bc6ae4ed5f98b3a8c2fb
Author: Ian Lake <ilake@google.com>
Date: Thu Oct 26 22:47:00 2023
Rename ActivityResultCaller.java to .kt
As part of the Kotlin conversion process.
Test: n/a
BUG: 257291701
Change-Id: I39957d5e2e01d634d6f2ff2f4b440dc8af19bb37
M activity/activity/src/main/java/androidx/activity/result/ActivityResultCaller.kt
ap...@google.com <ap...@google.com> #43
Branch: androidx-main
commit 1ac2124d0e27761bc7f09d122d99254c69411631
Author: Ian Lake <ilake@google.com>
Date: Thu Oct 26 23:03:00 2023
Convert ActivityResultCaller to Kotlin
Rewrite ActivityResultCaller to Kotlin.
This also moves the `ActivityResultCaller` Kotlin
extensions from `activity-ktx` back to `activity` since
we can't have two Kotlin files with the same name+package.
Relnote: "`ActivityResultCaller` has been rewritten in
Kotlin."
Test: ./gradlew activity:activity:checkApi
BUG: 257291701
Change-Id: Ib02e49c49dbed2ce0d25ac71c8caf0325ffb8142
M activity/activity-ktx/api/current.ignore
M activity/activity-ktx/api/current.txt
M activity/activity-ktx/api/restricted_current.ignore
M activity/activity-ktx/api/restricted_current.txt
M activity/activity-ktx/src/androidTest/AndroidManifest.xml
D activity/activity-ktx/src/main/java/androidx/activity/result/ActivityResultCaller.kt
M activity/activity/api/current.ignore
M activity/activity/api/current.txt
M activity/activity/api/restricted_current.ignore
M activity/activity/api/restricted_current.txt
M activity/activity/src/androidTest/AndroidManifest.xml
M activity/activity/src/androidTest/java/androidx/activity/result/ActivityResultCallerTest.kt
M activity/activity/src/main/java/androidx/activity/result/ActivityResultCaller.kt
ap...@google.com <ap...@google.com> #44
Branch: androidx-main
commit 2b9627fa602319fc8f0da026da1d6a2eb69c8fb5
Author: Ian Lake <ilake@google.com>
Date: Thu Dec 14 00:51:20 2023
Convert ActivityResult to Kotlin
Rewrite ActivityResult in Kotlin.
This makes the resultCode and data getters into
public properties.
This also moves the ActivityResult Kotlin extensions
from activity-ktx back to activity since we can't
have two Kotlin files with the same name.
Relnote: "`ActivityResult` has been rewritten in Kotlin. The
`ActivityResult` Kotlin extensions that support destructuring
into the `resultCode` and `data` fields have been moved from
`activity-ktx` to `activity`."
Test: ./gradlew activity:activity:checkApi
BUG: 257291701
Change-Id: I0565a95aa4470a4cd23dcddf75df3f9dd8dca19e
M activity/activity-ktx/api/current.ignore
M activity/activity-ktx/api/current.txt
M activity/activity-ktx/api/restricted_current.ignore
M activity/activity-ktx/api/restricted_current.txt
D activity/activity-ktx/src/main/java/androidx/activity/result/ActivityResult.kt
M activity/activity/api/current.ignore
M activity/activity/api/current.txt
M activity/activity/api/restricted_current.ignore
M activity/activity/api/restricted_current.txt
M activity/activity/src/androidTest/java/androidx/activity/result/ActivityResultTest.kt
M activity/activity/src/main/java/androidx/activity/result/ActivityResult.kt
ap...@google.com <ap...@google.com> #45
Branch: androidx-main
commit d0bd6c7654cc46122489507c366c307a74857c53
Author: Ian Lake <ilake@google.com>
Date: Thu Dec 14 00:25:44 2023
Rename ActivityResult.java to .kt
As part of the Kotlin conversion process.
Test: n/a
BUG: 257291701
Change-Id: I2c8016d67a7d7a0ad8e1f271953cee447f876554
M activity/activity/src/main/java/androidx/activity/result/ActivityResult.kt
ap...@google.com <ap...@google.com> #46
Branch: androidx-main
commit 199afbbaf3a522f7f320de61b81856ae0df31150
Author: Ian Lake <ilake@google.com>
Date: Mon Dec 18 23:41:34 2023
Convert ActivityResultRegistry to Kotlin.
Rewrite ActivityResultRegistry in Kotlin.
This ensures that the nullability in the
contract passed to register is correctly passed
through to the resulting nullability on the
ActivityResultLauncher returned.
Relnote: "`ActivityResultRegistry` has been rewritten
in Kotlin. This ensures that the nullability of the
generics on the contract passed to `register` will
correctly be passed through to the
`ActivityResultLauncher` returned to you."
Test: ./gradlew activity:activity:checkApi
BUG: 257291701
Change-Id: I121f0ca842066fb73ab0e51b89720029e991407a
M activity/activity/api/current.ignore
M activity/activity/api/current.txt
M activity/activity/api/restricted_current.ignore
M activity/activity/api/restricted_current.txt
M activity/activity/src/androidTest/java/androidx/activity/result/ActivityResultRegistryTest.kt
M activity/activity/src/main/java/androidx/activity/result/ActivityResultRegistry.kt
ap...@google.com <ap...@google.com> #47
Branch: androidx-main
commit f80d369c2b28b170a3ff00f86ae4c0d632e181d0
Author: Ian Lake <ilake@google.com>
Date: Mon Dec 18 21:42:11 2023
Rename ActivityResultRegistry.java to .kt
As part of the Kotlin conversion process.
Test: n/a
BUG: 257291701
Change-Id: I1b00a8c5e948352c25c5c8907b51e78bee94adb9
M activity/activity/src/main/java/androidx/activity/result/ActivityResultRegistry.kt
ap...@google.com <ap...@google.com> #48
Branch: androidx-main
commit 320df280c1f53c234e520601a1b9cb2245b8244b
Author: Ian Lake <ilake@google.com>
Date: Tue Dec 19 19:43:15 2023
Convert ImmLeaksCleaner to Kotlin
Rewrite ImmLeaksCleaner to Kotlin.
Extract the logic of working with fields
via reflection from the actual business
logic of what fields need to be cleaned by
using a sealed class hierarchy.
Test: LeakInputMethodManagerTest still passes
BUG: 257291701
Change-Id: If281ab7e27229fbd5a0d0a488caccce59c184501
M activity/activity/src/main/java/androidx/activity/ImmLeaksCleaner.kt
ap...@google.com <ap...@google.com> #49
Branch: androidx-main
commit 226e08ae45ace12cd22f0b97750cd176315c3727
Author: Ian Lake <ilake@google.com>
Date: Tue Dec 19 18:55:08 2023
Rename ImmLeaksCleaner.java to .kt
As part of the Kotlin conversion process.
Test: n/a
BUG: 257291701
Change-Id: Ic1c131743fea46f9c759ae6d2730f7cf3c26a60a
M activity/activity/src/main/java/androidx/activity/ImmLeaksCleaner.kt
ap...@google.com <ap...@google.com> #50
Branch: androidx-main
commit 150e6253b7f6943858dfddef0c4b135b373a883d
Author: Ian Lake <ilake@google.com>
Date: Tue Dec 19 21:25:16 2023
Move Kotlin extensions from activity-ktx to activity
Move all remaining Kotlin extensions from activity-ktx
back into activity now that activity is fully written
in Kotlin.
Relnote: "The Kotlin extensions of `by viewModels()` for
`ComponentActivity` and `trackPipAnimationHintView` have
been moved from `activity-ktx` to `activity`. The
`activity-ktx` artifact is now completely empty."
Test: ./gradlew checkApi
BUG: 257291701
Change-Id: I0a444140b10671bbfbb5aeab66f1a3a7e9d28061
M activity/activity-ktx/api/current.ignore
M activity/activity-ktx/api/current.txt
M activity/activity-ktx/api/restricted_current.ignore
M activity/activity-ktx/api/restricted_current.txt
D activity/activity-ktx/lint-baseline.xml
D activity/activity-ktx/src/androidTest/AndroidManifest.xml
M activity/activity/api/current.txt
M activity/activity/api/restricted_current.txt
M activity/activity/src/androidTest/AndroidManifest.xml
M activity/activity/src/androidTest/java/androidx/activity/ActivityViewModelLazyTest.kt
M activity/activity/src/main/java/androidx/activity/ActivityViewModelLazy.kt
M activity/activity/src/main/java/androidx/activity/PipHintTracker.kt
il...@google.com <il...@google.com> #51
All of AndroidX Activity has now been converted to Kotlin and all of activity-ktx
has now been merged into activity
.
The last of these changes will be available in Activity 1.9.0-alpha02.
ma...@gmail.com <ma...@gmail.com> #52
Does this mean that there won't be any releases of activity-ktx
going forward? is it safe to remove activity-ktx
and just use activity
?
jb...@google.com <jb...@google.com> #53
Yes, activity-ktx
is now empty and you can depend directly on activity
.
Description
Component used: Activity
It would be beneficial to have all of the AndroidX Activity classes rewritten in Kotlin. Besides providing better nullability guarantees, this would also help remove some of the friction in maintaining this library and evolving it over time.