Skip to content

Commit

Permalink
fix: don't sent device name if DefaultPII is disabled
Browse files Browse the repository at this point in the history
closes #2063
  • Loading branch information
vaind committed Nov 14, 2022
1 parent 38e4f11 commit ddd3cf8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Fixes

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

### Features

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ We suggest opening an issue to discuss bigger changes before investing on a big

# Requirements

The project currently requires you run JDK 11.
The project currently requires you run JDK 17.

## Android

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public DefaultAndroidEventProcessor(

ExecutorService executorService = Executors.newSingleThreadExecutor();
// dont ref. to method reference, theres a bug on it
contextData = executorService.submit(() -> loadContextData());
contextData = executorService.submit(this::loadContextData);

executorService.shutdown();
}
Expand Down Expand Up @@ -282,7 +282,9 @@ private void setArchitectures(final @NotNull Device device) {
// TODO: missing usable memory

Device device = new Device();
device.setName(getDeviceName());
if (options.isSendDefaultPii()) {
device.setName(getDeviceName());
}
device.setManufacturer(Build.MANUFACTURER);
device.setBrand(Build.BRAND);
device.setFamily(getFamily());
Expand Down

0 comments on commit ddd3cf8

Please sign in to comment.