Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions AIMSICD/src/main/java/com/secupwn/aimsicd/utils/Device.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,14 @@ public void refreshDeviceInfo(TelephonyManager tm, Context context) {
dataState = getDataState(tm);
}

private Optional<String> getSimInformation(Supplier<String> simInfoSupplier) {
try {
return Optional.ofNullable(simInfoSupplier.get());
} catch (Exception e) {
// SIM methods can cause Exceptions on some devices
log.error("Failed to get SIM-Information", e);
}
return Optional.empty();
}
private static Optional<String> getSimInformation(Supplier<String> simInfoSupplier) {
try {
return Optional.ofNullable(simInfoSupplier.get());
} catch (Exception e) {
log.error("Failed to get SIM-Information", e);
}
return Optional.empty();
}

/**
* SIM Country
Expand Down