// Path: app/src/main/java/com/pddstudio/otgsubs/events/AssetTypeAddedEvent.java
// public class AssetTypeAddedEvent {
// 
// 	private final AssetsType    assetsType;
// 	private final AssetFileInfo assetFileInfo;
// 	private boolean fragmentIgnore = true;
// 
// 	public AssetTypeAddedEvent(AssetsType assetsType, AssetFileInfo assetFileInfo) {
// 		this.assetsType = assetsType;
// 		this.assetFileInfo = assetFileInfo;
// 	}
// 
// 	public AssetsType getAssetsType() {
// 		return assetsType;
// 	}
// 
// 	public AssetFileInfo getAssetFileInfo() {
// 		return assetFileInfo;
// 	}
// 
// 	public boolean isIgnore() {
// 		return fragmentIgnore;
// 	}
// 
// 	public void setFragmentIgnore(boolean fragmentIgnore) {
// 		this.fragmentIgnore = fragmentIgnore;
// 	}
// }
// 
// Path: app/src/main/java/com/pddstudio/otgsubs/events/ExistingAssetsItemEvent.java
// public class ExistingAssetsItemEvent {
// 
// 	private AssetFileInfo assetFileInfo;
// 	private AssetsModificationType modificationType;
// 	private String newName;
// 
// 	public ExistingAssetsItemEvent(AssetFileInfo assetFileInfo, AssetsModificationType modificationType) {
// 		this.assetFileInfo = assetFileInfo;
// 		this.modificationType = modificationType;
// 	}
// 
// 	public void setNewName(String newName) {
// 		this.newName = newName;
// 	}
// 
// 	public AssetFileInfo getAssetFileInfo() {
// 		return assetFileInfo;
// 	}
// 
// 	public AssetsModificationType getModificationType() {
// 		return modificationType;
// 	}
// 
// 	public String getNewName() {
// 		return newName;
// 	}
// }
// 
// Path: app/src/main/java/com/pddstudio/otgsubs/events/ImportAssetsFromApkEvent.java
// public class ImportAssetsFromApkEvent {
// 
// 	private final List<AssetFileInfo> assets;
// 
// 	public ImportAssetsFromApkEvent() {
// 		assets = new ArrayList<>();
// 	}
// 
// 	public ImportAssetsFromApkEvent withList(List<AssetFileInfo> files) {
// 		this.assets.addAll(files);
// 		return this;
// 	}
// 
// 	public List<AssetFileInfo> getAssets() {
// 		return assets;
// 	}
// 
// }
// 
// Path: app/src/main/java/com/pddstudio/otgsubs/events/RefreshItemListEvent.java
// public class RefreshItemListEvent {}
// 
// Path: substratum-packager/src/main/java/com/pddstudio/substratum/packager/models/AssetFileInfo.java
// public class AssetFileInfo implements Serializable {
// 
// 	private AssetsType type;
// 	private String     fileLocation;
// 	private String     fileName;
// 	private String relativeAssetsDestinationLocation;
// 
// 	public AssetFileInfo(AssetsType type, String fileLocation, String fileName) {
// 		this.type = type;
// 		this.fileLocation = fileLocation;
// 		this.fileName = fileName;
// 	}
// 
// 	public AssetsType getType() {
// 		return type;
// 	}
// 
// 	public String getFileLocation() {
// 		return fileLocation;
// 	}
// 
// 	public String getFileName() {
// 		return fileName;
// 	}
// 
// 	public String getRelativeAssetsDestinationLocation() {
// 		return relativeAssetsDestinationLocation;
// 	}
// 
// 	public void setRelativeAssetsDestinationLocation(String relativeAssetsDestinationLocation) {
// 		this.relativeAssetsDestinationLocation = relativeAssetsDestinationLocation;
// 	}
// 
// 	public void setFileName(String fileName) {
// 		this.fileName = fileName;
// 	}
// }
// 
// Path: substratum-packager/src/main/java/com/pddstudio/substratum/packager/models/AssetsType.java
// public enum AssetsType implements Serializable {
// 	FONTS(R.string.fragment_title_fonts),
// 	OVERLAYS(R.string.fragment_title_overlays),
// 	AUDIO(R.string.fragment_title_audio),
// 	BOOT_ANIMATIONS(R.string.fragment_title_boot_animations);
// 
// 	private final int titleName;
// 
// 	AssetsType(int title) {
// 		this.titleName = title;
// 	}
// 
// 	public int getTitleRes() {
// 		return titleName;
// 	}
// 
// }


import android.support.annotation.NonNull;
import com.pddstudio.otgsubs.events.AssetTypeAddedEvent;
import com.pddstudio.otgsubs.events.ExistingAssetsItemEvent;
import com.pddstudio.otgsubs.events.ImportAssetsFromApkEvent;
import com.pddstudio.otgsubs.events.RefreshItemListEvent;
import com.pddstudio.substratum.packager.models.AssetFileInfo;
import com.pddstudio.substratum.packager.models.AssetsType;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EBean;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java8.util.stream.StreamSupport;
	}

	@Subscribe
	public void onDialogResultReceived(AssetTypeAddedEvent event) {
		if(event != null && event.isIgnore()) {
			AssetFileInfo info = event.getAssetFileInfo();
			storeAssetFileInfo(info);
			redirectEvent(event);
		}
	}

	@Subscribe(threadMode = ThreadMode.ASYNC)
	public void onImportEventReceived(ImportAssetsFromApkEvent event) {
		if(event != null) {
			StreamSupport.stream(event.getAssets()).forEach(this::storeAssetFileInfo);
			eventBusBean.post(new RefreshItemListEvent());
		}
	}

	@Subscribe
	public void onExistingAssetsModifiedEventReceived(ExistingAssetsItemEvent event) {
		if(event != null) {
			switch (event.getModificationType()) {
				case DELETE:
					removeItemIfPresent(event.getAssetFileInfo());
					break;
				case RENAME:
					renameItemIfPresent(event.getAssetFileInfo(), event.getNewName());
					break;
			}
// Path: app/src/main/java/com/pddstudio/otgsubs/events/AssetTypeAddedEvent.java
// public class AssetTypeAddedEvent {
// 
// 	private final AssetsType    assetsType;
// 	private final AssetFileInfo assetFileInfo;
// 	private boolean fragmentIgnore = true;
// 
// 	public AssetTypeAddedEvent(AssetsType assetsType, AssetFileInfo assetFileInfo) {
// 		this.assetsType = assetsType;
// 		this.assetFileInfo = assetFileInfo;
// 	}
// 
// 	public AssetsType getAssetsType() {
// 		return assetsType;
// 	}
// 
// 	public AssetFileInfo getAssetFileInfo() {
// 		return assetFileInfo;
// 	}
// 
// 	public boolean isIgnore() {
// 		return fragmentIgnore;
// 	}
// 
// 	public void setFragmentIgnore(boolean fragmentIgnore) {
// 		this.fragmentIgnore = fragmentIgnore;
// 	}
// }
// 
// Path: app/src/main/java/com/pddstudio/otgsubs/events/ExistingAssetsItemEvent.java
// public class ExistingAssetsItemEvent {
// 
// 	private AssetFileInfo assetFileInfo;
// 	private AssetsModificationType modificationType;
// 	private String newName;
// 
// 	public ExistingAssetsItemEvent(AssetFileInfo assetFileInfo, AssetsModificationType modificationType) {
// 		this.assetFileInfo = assetFileInfo;
// 		this.modificationType = modificationType;
// 	}
// 
// 	public void setNewName(String newName) {
// 		this.newName = newName;
// 	}
// 
// 	public AssetFileInfo getAssetFileInfo() {
// 		return assetFileInfo;
// 	}
// 
// 	public AssetsModificationType getModificationType() {
// 		return modificationType;
// 	}
// 
// 	public String getNewName() {
// 		return newName;
// 	}
// }
// 
// Path: app/src/main/java/com/pddstudio/otgsubs/events/ImportAssetsFromApkEvent.java
// public class ImportAssetsFromApkEvent {
// 
// 	private final List<AssetFileInfo> assets;
// 
// 	public ImportAssetsFromApkEvent() {
// 		assets = new ArrayList<>();
// 	}
// 
// 	public ImportAssetsFromApkEvent withList(List<AssetFileInfo> files) {
// 		this.assets.addAll(files);
// 		return this;
// 	}
// 
// 	public List<AssetFileInfo> getAssets() {
// 		return assets;
// 	}
// 
// }
// 
// Path: app/src/main/java/com/pddstudio/otgsubs/events/RefreshItemListEvent.java
// public class RefreshItemListEvent {}
// 
// Path: substratum-packager/src/main/java/com/pddstudio/substratum/packager/models/AssetFileInfo.java
// public class AssetFileInfo implements Serializable {
// 
// 	private AssetsType type;
// 	private String     fileLocation;
// 	private String     fileName;
// 	private String relativeAssetsDestinationLocation;
// 
// 	public AssetFileInfo(AssetsType type, String fileLocation, String fileName) {
// 		this.type = type;
// 		this.fileLocation = fileLocation;
// 		this.fileName = fileName;
// 	}
// 
// 	public AssetsType getType() {
// 		return type;
// 	}
// 
// 	public String getFileLocation() {
// 		return fileLocation;
// 	}
// 
// 	public String getFileName() {
// 		return fileName;
// 	}
// 
// 	public String getRelativeAssetsDestinationLocation() {
// 		return relativeAssetsDestinationLocation;
// 	}
// 
// 	public void setRelativeAssetsDestinationLocation(String relativeAssetsDestinationLocation) {
// 		this.relativeAssetsDestinationLocation = relativeAssetsDestinationLocation;
// 	}
// 
// 	public void setFileName(String fileName) {
// 		this.fileName = fileName;
// 	}
// }
// 
// Path: substratum-packager/src/main/java/com/pddstudio/substratum/packager/models/AssetsType.java
// public enum AssetsType implements Serializable {
// 	FONTS(R.string.fragment_title_fonts),
// 	OVERLAYS(R.string.fragment_title_overlays),
// 	AUDIO(R.string.fragment_title_audio),
// 	BOOT_ANIMATIONS(R.string.fragment_title_boot_animations);
// 
// 	private final int titleName;
// 
// 	AssetsType(int title) {
// 		this.titleName = title;
// 	}
// 
// 	public int getTitleRes() {
// 		return titleName;
// 	}
// 
// }


// Path: app/src/main/java/com/pddstudio/otgsubs/beans/PackageInfoBean.java
import android.support.annotation.NonNull;
import com.pddstudio.otgsubs.events.AssetTypeAddedEvent;
import com.pddstudio.otgsubs.events.ExistingAssetsItemEvent;
import com.pddstudio.otgsubs.events.ImportAssetsFromApkEvent;
import com.pddstudio.otgsubs.events.RefreshItemListEvent;
import com.pddstudio.substratum.packager.models.AssetFileInfo;
import com.pddstudio.substratum.packager.models.AssetsType;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EBean;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java8.util.stream.StreamSupport;

	}

	@Subscribe
	public void onDialogResultReceived(AssetTypeAddedEvent event) {
		if(event != null && event.isIgnore()) {
			AssetFileInfo info = event.getAssetFileInfo();
			storeAssetFileInfo(info);
			redirectEvent(event);
		}
	}

	@Subscribe(threadMode = ThreadMode.ASYNC)
	public void onImportEventReceived(ImportAssetsFromApkEvent event) {
		if(event != null) {
			StreamSupport.stream(event.getAssets()).forEach(this::storeAssetFileInfo);
			eventBusBean.post(new RefreshItemListEvent());
		}
	}

	@Subscribe
	public void onExistingAssetsModifiedEventReceived(ExistingAssetsItemEvent event) {
		if(event != null) {
			switch (event.getModificationType()) {
				case DELETE:
					removeItemIfPresent(event.getAssetFileInfo());
					break;
				case RENAME:
					renameItemIfPresent(event.getAssetFileInfo(), event.getNewName());
					break;
			}
			eventBusBean.post(new RefreshItemListEvent());