Open matan-h opened 6 months ago
I am not 100% sure I understand the context on this code, so let me explain what I think:
object()
call to guarantee uniqueness within the Python application. I believe the other callers are not coming from Python, so this technique isn't guaranteed.uuid
would be another standard approach to avoid clashes. I am not clear whether there is a hardware limit that makes this impossible.My comments:
Thank you, @Julian-O. I've added an explanation to the code and edited the description of this pull request to make it cleaner.
I've also removed the other minor change as that would probably require a design change. Here is the android code which creating this error in the new API:
Thanks. I understand now.
[Just to be clear, I am not an official reviewer with merge rights. We'll need to wait for one of them.]
This PR makes the
Android file chooser
use a reasonable and valid number in the intent code. As this Stack Overflow post explains, the maximum value for the requestCode is2^16
(65536
).Previously, the code used arbitrary numbers (
123456
and654321
), which is making some phones encounter a Java Exception:java.lang.IllegalArgumentException: Can only use lower 16 bits for requestCode
.