-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Prevent concurrent modifications of audit log #5975
Conversation
In audit logs the "location providers enabled" event is missing after turning it on in the middle of filling a form (not missing in the store version). Steps to reproduce:
Expected behavior |
EDIT: I realise that "location providers enabled" implies the former. |
@dbemke I'm not able to reproduce on an Android 13 device. Are you seeing this sporadically or only on a specific OS/device? |
I think I know what might have happened. It also appeared on Android 13. I just checked Android 14 and it didn't occur. |
@seadowg We finished testing audit logs and haven't found any other issues so if you decide that the issue mentioned above is ok, could you remove the "needs testing" label? |
Yeah that'd be great! It feels to me like this probably hasn't actually changed between versions and we got unlucky testing it. |
Today I tested it again and now the event is present. I'll test the event separately so that the PR can be closed. |
Tested with Success! Verified on Android 10 Verified cases:
|
Tested with Success! |
Fixes this crash.
This makes sure that
logEvent
andflush
are never executed concurrently which could cause problems.Why is this the best possible solution? Were any other approaches considered?
We should also remove all uses of
logEvent
andflush
on the UI thread, but that's part of ongoing ANR work (#5867).How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
It'll be hard to reproduce the linked crash (or we probably would have caught it ourselves). I think the best thing to test here is general audit log behaviour - I've made some changes here to how events are logged and that could be risky.
Do we need any specific form for testing your changes? If so, please attach one.
Any forms with audit enabled.
Before submitting this PR, please make sure you have:
./gradlew connectedAndroidTest
(or./gradlew testLab
) and confirmed all checks still pass