Skip to content
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

RUMM-2038 Use safe context for directBootAware host apps #1209

Merged
merged 3 commits into from
Jan 2, 2023

Conversation

xgouchet
Copy link
Member

Fixes #854
Fixes #1116

What does this PR do?

Uses the createDeviceProtectedStorageContext to ensure Kronos works in all edge cases.
Note that the safe context should only be used for Kronos.

@xgouchet xgouchet requested a review from a team as a code owner December 30, 2022 09:57
@xgouchet xgouchet force-pushed the xgouchet/RUMM-2038/direct_boot_mode branch from d6747f1 to 3875e69 Compare December 30, 2022 10:01
@xgouchet xgouchet requested a review from a team as a code owner December 30, 2022 10:01
@codecov-commenter
Copy link

codecov-commenter commented Dec 30, 2022

Codecov Report

Merging #1209 (17673d2) into develop (120224b) will decrease coverage by 0.02%.
The diff coverage is 80.00%.

@@             Coverage Diff             @@
##           develop    #1209      +/-   ##
===========================================
- Coverage    82.31%   82.29%   -0.02%     
===========================================
  Files          353      353              
  Lines        11795    11799       +4     
  Branches      2007     2009       +2     
===========================================
+ Hits          9708     9709       +1     
- Misses        1475     1476       +1     
- Partials       612      614       +2     
Impacted Files Coverage Δ
...n/com/datadog/android/core/internal/CoreFeature.kt 90.98% <80.00%> (-0.25%) ⬇️
...n/com/datadog/android/v2/core/SdkInternalLogger.kt 73.08% <0.00%> (-7.69%) ⬇️
...ndroid/telemetry/internal/TelemetryEventHandler.kt 69.75% <0.00%> (-2.52%) ⬇️
...d/v2/core/internal/storage/FileEventBatchWriter.kt 95.24% <0.00%> (-2.38%) ⬇️
...rsistence/file/batch/PlainBatchFileReaderWriter.kt 88.24% <0.00%> (-0.98%) ⬇️
.../kotlin/com/datadog/android/v2/core/DatadogCore.kt 89.40% <0.00%> (-0.92%) ⬇️
...android/rum/internal/ndk/DatadogNdkCrashHandler.kt 86.70% <0.00%> (-0.49%) ⬇️
...android/log/internal/domain/DatadogLogGenerator.kt 95.97% <0.00%> (ø)
...droid/rum/tracking/FragmentViewTrackingStrategy.kt 75.00% <0.00%> (ø)
.../android/rum/internal/domain/scope/RumViewScope.kt 95.42% <0.00%> (+0.18%) ⬆️
... and 5 more

Copy link
Contributor

@apigirl apigirl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some small nits, otherwise looks good for docs

docs/mobile_data_collected.md Outdated Show resolved Hide resolved
docs/mobile_data_collected.md Outdated Show resolved Hide resolved
Co-authored-by: Kaylyn <kaylyn.sigler@datadoghq.com>
Comment on lines +285 to +289
// When the host app uses the `directBootAware` flag on a file encrypted device,
// the app can wake up during the boot sequence before the device is unlocked
// This mean any file I/O or access to shared preferences will throw an exception
// This safe context creates a device-protected storage which can be used for non sensitive
// data. It should not be used to store the data captured by the SDK.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// When the host app uses the `directBootAware` flag on a file encrypted device,
// the app can wake up during the boot sequence before the device is unlocked
// This mean any file I/O or access to shared preferences will throw an exception
// This safe context creates a device-protected storage which can be used for non sensitive
// data. It should not be used to store the data captured by the SDK.
// When the host app uses the `directBootAware` flag on a file encrypted device,
// the app can wake up during the boot sequence before the device is unlocked
// This mean any file I/O or access to shared preferences will throw an exception
// This safe context creates a device-protected storage which can be used for non-sensitive
// data. It should not be used to store the data captured by the SDK.

@xgouchet xgouchet merged commit 640dc96 into develop Jan 2, 2023
@xgouchet xgouchet deleted the xgouchet/RUMM-2038/direct_boot_mode branch January 2, 2023 09:47
@xgouchet xgouchet added this to the 1.17.0 milestone Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataDog crashing with directBootAware-"true" attribute Cannot use in direct boot mode
4 participants