Fixed
Status Update
Comments
er...@google.com <er...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit c60f33e229e31ab328ef6b59dab63b264954831c
Author: Alexandre Elias <aelias@google.com>
Date: Fri Jul 10 16:23:09 2020
Semantics no-op cleanups
Partly in response to lmr's broad code review, I did a pass of
superficial API/implementation cleanup. The main changes are:
- I changed each Boolean SemanticsProperty where false is equivalent to
not being present to take "Unit" instead. This is conceptually
clearer: it avoids questions like "can I cancel out a semantics from a
merged child by setting it to false?" Because "property = Unit" looks
weird, I also changed the style of these to "property()".
- I moved the Semantics id generator closer to where it's used, in
SemanticsModifierCore. I made it internal and an AtomicInt.
(Note that integer ids are heavily used in the Android
AccessibilityNodeInfo APIs so I can't simply remove them entirely.)
- I deleted dead code. Some examples include SemanticsHintOverrides,
a public API not connected to anything, and SemanticsPropertyKey
merge() open method which is never called. (In both cases I have
a different plan in mind for accessibility.)
Fixes: 145951226
Fixes: 145955412
Test: existing tests
Relnote: "Single-value semantics properties now use a calling style.
For example, 'semantics { hidden = true }' is now written as:
'semantics { hidden() }'."
Change-Id: Ic1afd12ea22c926babc9662f1804d80b33aa0cfc
M ui/integration-tests/benchmark/src/androidTest/java/androidx/ui/benchmark/test/LayoutNodeModifierBenchmark.kt
M ui/ui-core/api/0.1.0-dev15.txt
M ui/ui-core/api/current.txt
M ui/ui-core/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-core/api/public_plus_experimental_current.txt
M ui/ui-core/api/restricted_0.1.0-dev15.txt
M ui/ui-core/api/restricted_current.txt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/graphics/vector/VectorTest.kt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/semantics/SemanticsTests.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidActuals.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeView.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeViewAccessibilityDelegateCompat.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidPopup.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/Expect.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsConfiguration.kt
D ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsHintOverrides.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsModifier.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsNode.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsOwner.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsWrapper.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/semantics/SemanticsProperties.kt
M ui/ui-foundation/api/0.1.0-dev15.txt
M ui/ui-foundation/api/current.txt
M ui/ui-foundation/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-foundation/api/public_plus_experimental_current.txt
M ui/ui-foundation/api/restricted_0.1.0-dev15.txt
M ui/ui-foundation/api/restricted_current.txt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Clickable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Dialog.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Scroller.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Selectable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Toggleable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/semantics/FoundationSemanticsProperties.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CardTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CheckboxScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/RadioButtonScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ScaffoldTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ripple/RippleIndicationTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/TextFieldScreenshotTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/AppBar.kt
M ui/ui-material/src/main/java/androidx/ui/material/TextFieldImpl.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/AssertsTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/CallSemanticsActionTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ErrorMessagesTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/FindersTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/PrintToStringTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ScrollToTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/TextActionsTest.kt
M ui/ui-test/src/main/java/androidx/ui/test/Actions.kt
M ui/ui-test/src/main/java/androidx/ui/test/Filters.kt
M ui/ui-text/api/0.1.0-dev15.txt
M ui/ui-text/api/current.txt
M ui/ui-text/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-text/api/public_plus_experimental_current.txt
M ui/ui-text/api/restricted_0.1.0-dev15.txt
M ui/ui-text/api/restricted_current.txt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/CoreTextField.kt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/TextSemanticsProperties.kt
https://android-review.googlesource.com/1360099
Branch: androidx-master-dev
commit c60f33e229e31ab328ef6b59dab63b264954831c
Author: Alexandre Elias <aelias@google.com>
Date: Fri Jul 10 16:23:09 2020
Semantics no-op cleanups
Partly in response to lmr's broad code review, I did a pass of
superficial API/implementation cleanup. The main changes are:
- I changed each Boolean SemanticsProperty where false is equivalent to
not being present to take "Unit" instead. This is conceptually
clearer: it avoids questions like "can I cancel out a semantics from a
merged child by setting it to false?" Because "property = Unit" looks
weird, I also changed the style of these to "property()".
- I moved the Semantics id generator closer to where it's used, in
SemanticsModifierCore. I made it internal and an AtomicInt.
(Note that integer ids are heavily used in the Android
AccessibilityNodeInfo APIs so I can't simply remove them entirely.)
- I deleted dead code. Some examples include SemanticsHintOverrides,
a public API not connected to anything, and SemanticsPropertyKey
merge() open method which is never called. (In both cases I have
a different plan in mind for accessibility.)
Fixes: 145951226
Fixes: 145955412
Test: existing tests
Relnote: "Single-value semantics properties now use a calling style.
For example, 'semantics { hidden = true }' is now written as:
'semantics { hidden() }'."
Change-Id: Ic1afd12ea22c926babc9662f1804d80b33aa0cfc
M ui/integration-tests/benchmark/src/androidTest/java/androidx/ui/benchmark/test/LayoutNodeModifierBenchmark.kt
M ui/ui-core/api/0.1.0-dev15.txt
M ui/ui-core/api/current.txt
M ui/ui-core/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-core/api/public_plus_experimental_current.txt
M ui/ui-core/api/restricted_0.1.0-dev15.txt
M ui/ui-core/api/restricted_current.txt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/graphics/vector/VectorTest.kt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/semantics/SemanticsTests.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidActuals.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeView.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeViewAccessibilityDelegateCompat.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidPopup.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/Expect.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsConfiguration.kt
D ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsHintOverrides.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsModifier.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsNode.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsOwner.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsWrapper.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/semantics/SemanticsProperties.kt
M ui/ui-foundation/api/0.1.0-dev15.txt
M ui/ui-foundation/api/current.txt
M ui/ui-foundation/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-foundation/api/public_plus_experimental_current.txt
M ui/ui-foundation/api/restricted_0.1.0-dev15.txt
M ui/ui-foundation/api/restricted_current.txt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Clickable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Dialog.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Scroller.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Selectable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Toggleable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/semantics/FoundationSemanticsProperties.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CardTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CheckboxScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/RadioButtonScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ScaffoldTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ripple/RippleIndicationTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/TextFieldScreenshotTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/AppBar.kt
M ui/ui-material/src/main/java/androidx/ui/material/TextFieldImpl.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/AssertsTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/CallSemanticsActionTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ErrorMessagesTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/FindersTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/PrintToStringTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ScrollToTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/TextActionsTest.kt
M ui/ui-test/src/main/java/androidx/ui/test/Actions.kt
M ui/ui-test/src/main/java/androidx/ui/test/Filters.kt
M ui/ui-text/api/0.1.0-dev15.txt
M ui/ui-text/api/current.txt
M ui/ui-text/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-text/api/public_plus_experimental_current.txt
M ui/ui-text/api/restricted_0.1.0-dev15.txt
M ui/ui-text/api/restricted_current.txt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/CoreTextField.kt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/TextSemanticsProperties.kt
xi...@google.com <xi...@google.com> #3
Are you saving to an Uri? Otherwise, OutputFileResults#getSavedUri() is expected to be null. Javadoc:
/**
* Returns the {@link Uri} of the saved file.
*
* <p> This field is only returned if the {@link OutputFileOptions} is backed by
* {@link MediaStore} constructed with
*
* {@link androidx.camera.core.ImageCapture.OutputFileOptions.Builder
* #Builder(ContentResolver, Uri, ContentValues)}.
*/
/**
* Returns the {@link Uri} of the saved file.
*
* <p> This field is only returned if the {@link OutputFileOptions} is backed by
* {@link MediaStore} constructed with
*
* {@link androidx.camera.core.ImageCapture.OutputFileOptions.Builder
* #Builder(ContentResolver, Uri, ContentValues)}.
*/
er...@google.com <er...@google.com>
sa...@withpersona.com <sa...@withpersona.com> #4
No, I was using the OutputFileOptions.Builder#Builder(java.io.File) from
yourhttps://github.com/android/camera-samples example.
I stopped reading here.
public interface OnImageSavedCallback {
/** Called when an image has been successfully saved. */
void onImageSaved(@NonNull OutputFileResults outputFileResults);
// ...
}
Are you planning on changing the behavior of
OnImageSavedCallback#onImageSaved so that all of the builders are treated
the same way? I was surprised that only one of the three OutputFileOptions
make OutputFileResults useable.
On Mon, Feb 10, 2020 at 5:23 PM <buganizer-system@google.com> wrote:
your
I stopped reading here.
public interface OnImageSavedCallback {
/** Called when an image has been successfully saved. */
void onImageSaved(@NonNull OutputFileResults outputFileResults);
// ...
}
Are you planning on changing the behavior of
OnImageSavedCallback#onImageSaved so that all of the builders are treated
the same way? I was surprised that only one of the three OutputFileOptions
make OutputFileResults useable.
On Mon, Feb 10, 2020 at 5:23 PM <buganizer-system@google.com> wrote:
xi...@google.com <xi...@google.com> #5
The API works that way because the only saved location generated by CameraX is the URI one. For File, you should already have the save location. Is there a reason you also want it in the callback?
sa...@withpersona.com <sa...@withpersona.com> #6
The API works that way because the only saved location generated by CameraX
is the URI one.
My personal opinion is that I don't like having to know the underlying
implementation in order to use the API properly.
For File, you should already have the save location. Is there a reason you
also want it in the callback?
From an API usability perspective, if you always return the file in the
OnImageSavedCallback, you can build the OutputFileOptions three different
ways and use the same OnImageSavedCallback for each of them.
Additionally, if the OnImageSavedCallback can give me a reference to the
file (or URI), it's one less thing for me to have to keep track of and one
less place where I have to worry about messing up. If I don't get the file
in the callback, I need to add logic to combine the OnImageSavedCallback
with the file, and that's super easy to get wrong.
On Tue, Feb 11, 2020 at 11:09 AM <buganizer-system@google.com> wrote:
is the URI one.
My personal opinion is that I don't like having to know the underlying
implementation in order to use the API properly.
For File, you should already have the save location. Is there a reason you
also want it in the callback?
From an API usability perspective, if you always return the file in the
OnImageSavedCallback, you can build the OutputFileOptions three different
ways and use the same OnImageSavedCallback for each of them.
Additionally, if the OnImageSavedCallback can give me a reference to the
file (or URI), it's one less thing for me to have to keep track of and one
less place where I have to worry about messing up. If I don't get the file
in the callback, I need to add logic to combine the OnImageSavedCallback
with the file, and that's super easy to get wrong.
On Tue, Feb 11, 2020 at 11:09 AM <buganizer-system@google.com> wrote:
sa...@withpersona.com <sa...@withpersona.com> #7
It looks like all of my text styling is getting stripped out from the bug
tracker.
On Tue, Feb 11, 2020 at 3:02 PM Salvatore Testa <sal@withpersona.com> wrote:
tracker.
On Tue, Feb 11, 2020 at 3:02 PM Salvatore Testa <sal@withpersona.com> wrote:
er...@google.com <er...@google.com> #8
Hi Sal,
Thanks for the feedback - we'll keep this in mind for the future - but short term this behavior will remain as Xi describes. We'll consider this when updating to a future version of the API. Thanks
fu...@google.com <fu...@google.com>
ap...@google.com <ap...@google.com> #9
Project: platform/frameworks/support
Branch: androidx-main
commit c070c851c5d1c343fb701d90ffb94ffb22afd5d1
Author: Xi Zhang <xizh@google.com>
Date: Tue Jul 13 10:31:20 2021
Behavior change: fill the uri field when saving to File
Relnote: In ImageCapture, return the URI of the saved image if the saving location is File.
Bug: 149241379
Test: manual test and ./gradlew bOS
Change-Id: Ib5b49b6b3555503b12f7461f6eca8f4407cab636
M camera/camera-core/src/androidTest/java/androidx/camera/core/ImageSaverTest.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageSaver.java
https://android-review.googlesource.com/1764791
Branch: androidx-main
commit c070c851c5d1c343fb701d90ffb94ffb22afd5d1
Author: Xi Zhang <xizh@google.com>
Date: Tue Jul 13 10:31:20 2021
Behavior change: fill the uri field when saving to File
Relnote: In ImageCapture, return the URI of the saved image if the saving location is File.
Bug: 149241379
Test: manual test and ./gradlew bOS
Change-Id: Ib5b49b6b3555503b12f7461f6eca8f4407cab636
M camera/camera-core/src/androidTest/java/androidx/camera/core/ImageSaverTest.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageSaver.java
Description
CAMERAX VERSION 1.0.0-alpha10
CAMERA APPLICATION NAME AND VERSION: (Settings > Apps > (app name) > version)
ANDROID OS BUILD NUMBER: sdk_google_phone_x86-eng 5.0.2 LSY66K 5523115 test-keys
DEVICE NAME: sdk_google_phone_x86 (I also had the issue on my Pixel 4XL)
DESCRIPTION:
STEPS TO REPRODUCE:
1. Clone my modified version of `camera-samples`
```
git clone git@github.com:SalvatoreT/camera-samples.git
```
2. Run the app in Android Studio.
3. Take a photo.
OBSERVED RESULTS:
You'll see the following in logcat.
```
FATAL EXCEPTION: main
Process: com.android.example.cameraxbasic, PID: 6623
kotlin.KotlinNullPointerException
at com.android.example.cameraxbasic.fragments.CameraFragment$imageSavedListener$1.onImageSaved(CameraFragment.kt:196)
at androidx.camera.core.ImageCapture$2.onImageSaved(ImageCapture.java:642)
at androidx.camera.core.ImageSaver$1.run(ImageSaver.java:242)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
```
EXPECTED RESULTS: Not a crash.
REPRODUCIBILITY: every time
CODE FRAGMENTS: Here are the changes I made.