mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-11 16:26:22 +00:00
update Sentry, update oshi, update android-all, npe prevention
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.sentry</groupId>
|
<groupId>io.sentry</groupId>
|
||||||
<artifactId>sentry-logback</artifactId>
|
<artifactId>sentry-logback</artifactId>
|
||||||
<version>8.19.1</version>
|
<version>8.21.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jgrapht</groupId>
|
<groupId>org.jgrapht</groupId>
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
<groupId>org.robolectric</groupId>
|
<groupId>org.robolectric</groupId>
|
||||||
<artifactId>android-all</artifactId>
|
<artifactId>android-all</artifactId>
|
||||||
<!-- update version: 16-robolectric-13921718 but needs to fix Android 16 Edge to edge enforcement -->
|
<!-- update version: 16-robolectric-13921718 but needs to fix Android 16 Edge to edge enforcement -->
|
||||||
<version>15-robolectric-12650502</version>
|
<version>15-robolectric-13954326</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.sentry</groupId>
|
<groupId>io.sentry</groupId>
|
||||||
<artifactId>sentry-android</artifactId>
|
<artifactId>sentry-android</artifactId>
|
||||||
<version>8.19.1</version>
|
<version>8.21.1</version>
|
||||||
<type>aar</type>
|
<type>aar</type>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.sentry</groupId>
|
<groupId>io.sentry</groupId>
|
||||||
<artifactId>sentry-android-core</artifactId>
|
<artifactId>sentry-android-core</artifactId>
|
||||||
<version>8.19.1</version>
|
<version>8.21.1</version>
|
||||||
<type>aar</type>
|
<type>aar</type>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
@@ -201,7 +201,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.sentry</groupId>
|
<groupId>io.sentry</groupId>
|
||||||
<artifactId>sentry-android-ndk</artifactId>
|
<artifactId>sentry-android-ndk</artifactId>
|
||||||
<version>8.19.1</version>
|
<version>8.21.1</version>
|
||||||
<type>aar</type>
|
<type>aar</type>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
|
|||||||
@@ -242,7 +242,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.oshi</groupId>
|
<groupId>com.github.oshi</groupId>
|
||||||
<artifactId>oshi-core</artifactId>
|
<artifactId>oshi-core</artifactId>
|
||||||
<version>6.8.3</version>
|
<version>6.9.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -92,7 +92,12 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
|||||||
|
|
||||||
private T get(int index) {
|
private T get(int index) {
|
||||||
synchronized (lock) {
|
synchronized (lock) {
|
||||||
return internalList.get(index);
|
try {
|
||||||
|
// TODO: Find cause why index is invalid on some cases...
|
||||||
|
return internalList.get(index);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -579,6 +584,8 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
|||||||
maxPileHeight = 0;
|
maxPileHeight = 0;
|
||||||
for (int j = 0; j < group.piles.size(); j++) {
|
for (int j = 0; j < group.piles.size(); j++) {
|
||||||
Pile pile = group.piles.get(j);
|
Pile pile = group.piles.get(j);
|
||||||
|
if (pile == null)
|
||||||
|
continue;
|
||||||
y = pileY;
|
y = pileY;
|
||||||
for (int k = 0; k < pile.items.size(); k++) {
|
for (int k = 0; k < pile.items.size(); k++) {
|
||||||
ItemInfo itemInfo = pile.items.get(k);
|
ItemInfo itemInfo = pile.items.get(k);
|
||||||
@@ -588,7 +595,10 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
|||||||
itemInfo.setBounds(x, y, itemWidth, itemHeight);
|
itemInfo.setBounds(x, y, itemWidth, itemHeight);
|
||||||
y += dy;
|
y += dy;
|
||||||
}
|
}
|
||||||
pile.items.get(pile.items.size() - 1).pos = CardStackPosition.Top;
|
ItemInfo itemInfo = pile.items.get(pile.items.size() - 1);
|
||||||
|
if (itemInfo == null)
|
||||||
|
continue;
|
||||||
|
itemInfo.pos = CardStackPosition.Top;
|
||||||
pileHeight = y + itemHeight - dy - pileY;
|
pileHeight = y + itemHeight - dy - pileY;
|
||||||
if (pileHeight > maxPileHeight) {
|
if (pileHeight > maxPileHeight) {
|
||||||
maxPileHeight = pileHeight;
|
maxPileHeight = pileHeight;
|
||||||
@@ -705,9 +715,13 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
|
|||||||
float relX = x + group.getScrollLeft() - group.getLeft();
|
float relX = x + group.getScrollLeft() - group.getLeft();
|
||||||
float relY = y + getScrollValue();
|
float relY = y + getScrollValue();
|
||||||
Pile pile = group.piles.get(j);
|
Pile pile = group.piles.get(j);
|
||||||
|
if (pile == null)
|
||||||
|
continue;
|
||||||
if (pile.contains(relX, relY)) {
|
if (pile.contains(relX, relY)) {
|
||||||
for (int k = pile.items.size() - 1; k >= 0; k--) {
|
for (int k = pile.items.size() - 1; k >= 0; k--) {
|
||||||
ItemInfo item = pile.items.get(k);
|
ItemInfo item = pile.items.get(k);
|
||||||
|
if (item == null)
|
||||||
|
continue;
|
||||||
if (item.contains(relX, relY)) {
|
if (item.contains(relX, relY)) {
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user