File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
src/main/java/com/reandroid/dex/model Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -667,14 +667,24 @@ public void close() throws IOException {
667667
668668 @ Deprecated
669669 public void writeSmali (SmaliWriter writer , File root ) throws IOException {
670- writeSmali (writer .getWriterSetting (), root );
671- }
672- public void writeSmali (SmaliWriterSetting writerSetting , File root ) throws IOException {
670+ SmaliWriterSetting writerSetting = writer .getWriterSetting ();
673671 for (DexFile dexFile : this ) {
674672 File dir = new File (root , dexFile .buildSmaliDirectoryName ());
675673 dexFile .writeSmali (writerSetting , dir );
676674 }
677675 }
676+ public void writeSmali (SmaliWriterSetting writerSetting , File root ) throws IOException {
677+ writeSmali (writerSetting , root , null );
678+ }
679+ public void writeSmali (SmaliWriterSetting writerSetting , File root ,
680+ Predicate <? super DexFile > predicate ) throws IOException {
681+ for (DexFile dexFile : this ) {
682+ if (predicate == null || predicate .test (dexFile )) {
683+ File dir = new File (root , dexFile .buildSmaliDirectoryName ());
684+ dexFile .writeSmali (writerSetting , dir );
685+ }
686+ }
687+ }
678688
679689 @ Override
680690 public String toString () {
You can’t perform that action at this time.
0 commit comments