-
-
Notifications
You must be signed in to change notification settings - Fork 459
Avoid StrictMode warnings (followup) #4809
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
base: main
Are you sure you want to change the base?
Conversation
* AndroidEnvelopeCache * Installation.id calls * DeviceInfoUtil updated tests
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
3d205d0 | 352.15 ms | 432.53 ms | 80.38 ms |
bdbe1f4 | 380.66 ms | 464.44 ms | 83.78 ms |
9fbb112 | 359.71 ms | 421.85 ms | 62.14 ms |
ee747ae | 386.94 ms | 431.43 ms | 44.49 ms |
3998a95 | 415.94 ms | 478.54 ms | 62.60 ms |
14ff5ee | 419.75 ms | 495.73 ms | 75.98 ms |
ee747ae | 554.98 ms | 611.50 ms | 56.52 ms |
b750b96 | 408.98 ms | 480.32 ms | 71.34 ms |
c8125f3 | 397.65 ms | 485.14 ms | 87.49 ms |
b750b96 | 421.25 ms | 444.09 ms | 22.84 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
3d205d0 | 1.58 MiB | 2.10 MiB | 532.97 KiB |
bdbe1f4 | 1.58 MiB | 2.11 MiB | 538.88 KiB |
9fbb112 | 1.58 MiB | 2.11 MiB | 539.18 KiB |
ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
3998a95 | 1.58 MiB | 2.10 MiB | 532.96 KiB |
14ff5ee | 1.58 MiB | 2.10 MiB | 535.08 KiB |
ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
b750b96 | 1.58 MiB | 2.10 MiB | 533.19 KiB |
c8125f3 | 1.58 MiB | 2.10 MiB | 532.32 KiB |
b750b96 | 1.58 MiB | 2.10 MiB | 533.20 KiB |
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I'd add tests to verify exceptions are thrown correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test to ensure if an exception is thrown it's properly propagated and not silently swallowed?
|
||
### Fixes | ||
|
||
- Avoid StrictMode warnings (followup) ([#4809](https://github.com/getsentry/sentry-java/pull/4809)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it's worth mentioning that as a separate item, maybe combine it with the line below? Not sure if the danger check likes that though 😅
called = true | ||
throw Exception("Test exception") | ||
} | ||
} catch (_: Exception) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe extend the test to assert that the exception is thrown, something like this:
} catch (_: Exception) {} | |
} catch (_: Exception) { | |
exceptionThrown = true | |
} |
device.setExternalStorageSize(getTotalExternalStorage(externalStorageStat)); | ||
device.setExternalFreeStorage(getUnusedExternalStorage(externalStorageStat)); | ||
} | ||
options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do this to have a base of 0 strictmode warnings, right? I'm just wondering if we should keep this as-is, as the collection of these attributes can be turned off via settings anyway.
📜 Description
added AndroidRuntimeManager.runWithRelaxedPolicy to
💡 Motivation and Context
Follwup of #4724
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps