mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-04-29 22:04:25 +02:00
link only string types #36
This commit is contained in:
parent
b6bbac2dcf
commit
3e31bb8bff
@ -742,9 +742,15 @@ import java.util.*;
|
|||||||
writer.write("<public id=\"");
|
writer.write("<public id=\"");
|
||||||
writer.write(getHexId());
|
writer.write(getHexId());
|
||||||
writer.write("\" type=\"");
|
writer.write("\" type=\"");
|
||||||
writer.write(getTypeName());
|
String str = getTypeName();
|
||||||
|
if(str != null){
|
||||||
|
writer.write(str);
|
||||||
|
}
|
||||||
writer.write("\" name=\"");
|
writer.write("\" name=\"");
|
||||||
writer.write(getName());
|
str = getName();
|
||||||
|
if(str != null){
|
||||||
|
writer.write(str);
|
||||||
|
}
|
||||||
writer.write("\"/>");
|
writer.write("\"/>");
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
@ -241,7 +241,7 @@ public class PackageBlock extends Chunk<PackageHeader>
|
|||||||
private void createEntryGroupMap(Map<Integer, EntryGroup> map){
|
private void createEntryGroupMap(Map<Integer, EntryGroup> map){
|
||||||
map.clear();
|
map.clear();
|
||||||
for(SpecTypePair specTypePair:listAllSpecTypePair()){
|
for(SpecTypePair specTypePair:listAllSpecTypePair()){
|
||||||
map.putAll(specTypePair.createEntryGroups());
|
map.putAll(specTypePair.createEntryGroups(true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public Map<Integer, EntryGroup> getEntriesGroupMap(){
|
public Map<Integer, EntryGroup> getEntriesGroupMap(){
|
||||||
|
@ -68,10 +68,13 @@ public class SpecTypePair extends BlockContainer<Block>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public Map<Integer, EntryGroup> createEntryGroups(){
|
public Map<Integer, EntryGroup> createEntryGroups(){
|
||||||
|
return createEntryGroups(false);
|
||||||
|
}
|
||||||
|
public Map<Integer, EntryGroup> createEntryGroups(boolean skipNullEntries){
|
||||||
Map<Integer, EntryGroup> map = new HashMap<>();
|
Map<Integer, EntryGroup> map = new HashMap<>();
|
||||||
for(TypeBlock typeBlock:listTypeBlocks()){
|
for(TypeBlock typeBlock:listTypeBlocks()){
|
||||||
EntryArray entryArray = typeBlock.getEntryArray();
|
EntryArray entryArray = typeBlock.getEntryArray();
|
||||||
for(Entry entry:entryArray.listItems()){
|
for(Entry entry:entryArray.listItems(skipNullEntries)){
|
||||||
if(entry==null){
|
if(entry==null){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -42,8 +42,10 @@ import java.util.Objects;
|
|||||||
}
|
}
|
||||||
|
|
||||||
void linkTableStrings(TableStringPool tableStringPool){
|
void linkTableStrings(TableStringPool tableStringPool){
|
||||||
|
if(getValueType() == ValueType.STRING){
|
||||||
linkStringReference(tableStringPool);
|
linkStringReference(tableStringPool);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public void onRemoved(){
|
public void onRemoved(){
|
||||||
unLinkStringReference();
|
unLinkStringReference();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user