Skip to content

Commit

Permalink
guh
Browse files Browse the repository at this point in the history
  • Loading branch information
rushiiMachine committed Sep 10, 2024
1 parent 320eb1b commit e1cf358
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions core/src/main/java/de/robv/android/xposed/XposedBridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public synchronized void add(E e) {

public synchronized boolean remove(E e) {
Object[] snapshot = elements;
int index = indexOf(e);
int index = indexOf(snapshot, e);
if (index == -1)
return false;

Expand All @@ -336,10 +336,9 @@ public synchronized boolean remove(E e) {
return true;
}

private int indexOf(Object o) {
Object[] snapshot = elements;
for (int i = 0; i < snapshot.length; i++) {
if (o.equals(snapshot[i]))
private static int indexOf(Object[] arr, Object o) {
for (int i = 0; i < arr.length; i++) {
if (o.equals(arr[i]))
return i;
}
return -1;
Expand Down

0 comments on commit e1cf358

Please sign in to comment.