Skip to content

Commit

Permalink
Required classes from declaring
Browse files Browse the repository at this point in the history
  • Loading branch information
REAndroid committed May 31, 2024
1 parent f41a663 commit a973a1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main/java/com/reandroid/dex/model/DexClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ private void searchRequired(Predicate<TypeKey> exclude, Set<DexClass> results){
Iterator<TypeKey> iterator = usedTypes();
while (iterator.hasNext()){
TypeKey typeKey = iterator.next();
typeKey = typeKey.getDeclaring();
if(exclude != null && !exclude.test(typeKey)){
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private boolean addType(TypeKey typeKey) {
if(typeKey == null) {
return false;
}
return addUsed(getClassRepository().getDexClass(typeKey));
return addUsed(getClassRepository().getDexClass(typeKey.getDeclaring()));
}
private boolean addUsed(DexClass dexClass) {
if(dexClass == null) {
Expand Down

0 comments on commit a973a1d

Please sign in to comment.