Skip to content

Commit 642001e

Browse files
authored
fix: don't sent device name if DefaultPII is disabled (#2354)
1 parent 38e4f11 commit 642001e

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Fixes
66

77
- Fix `Gpu.vendorId` should be a String ([#2343](https://github.com/getsentry/sentry-java/pull/2343))
8+
- Don't set device name on Android if `sendDefaultPii` is disabled ([#2354](https://github.com/getsentry/sentry-java/pull/2354))
89

910
### Features
1011

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ We suggest opening an issue to discuss bigger changes before investing on a big
55

66
# Requirements
77

8-
The project currently requires you run JDK 11.
8+
The project currently requires you run JDK 17.
99

1010
## Android
1111

sentry-android-core/src/main/java/io/sentry/android/core/DefaultAndroidEventProcessor.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public DefaultAndroidEventProcessor(
9494

9595
ExecutorService executorService = Executors.newSingleThreadExecutor();
9696
// dont ref. to method reference, theres a bug on it
97+
//noinspection Convert2MethodRef
9798
contextData = executorService.submit(() -> loadContextData());
9899

99100
executorService.shutdown();
@@ -282,7 +283,9 @@ private void setArchitectures(final @NotNull Device device) {
282283
// TODO: missing usable memory
283284

284285
Device device = new Device();
285-
device.setName(getDeviceName());
286+
if (options.isSendDefaultPii()) {
287+
device.setName(getDeviceName());
288+
}
286289
device.setManufacturer(Build.MANUFACTURER);
287290
device.setBrand(Build.BRAND);
288291
device.setFamily(getFamily());

0 commit comments

Comments
 (0)