use of com.android.gallery3d.filtershow.filters.FilterDualCamFusionRepresentation in project android_packages_apps_Gallery2 by LineageOS.
the class ImagePreset method removeFilter.
public void removeFilter(FilterRepresentation filterRepresentation) {
if (filterRepresentation.getFilterType() == FilterRepresentation.TYPE_BORDER || filterRepresentation.getFilterType() == FilterRepresentation.TYPE_DUALCAM || filterRepresentation.getFilterType() == FilterRepresentation.TYPE_TRUEPORTRAIT) {
for (int i = 0; i < mFilters.size(); i++) {
FilterRepresentation filter = mFilters.elementAt(i);
if (filter.getFilterType() == filterRepresentation.getFilterType()) {
mFilters.remove(i);
// reset fusion underlay image.
if (filter instanceof FilterDualCamFusionRepresentation || filter instanceof FilterTruePortraitFusionRepresentation) {
MasterImage.getImage().setFusionUnderlay(null);
MasterImage.getImage().setScaleFactor(1);
MasterImage.getImage().resetTranslation();
}
break;
}
}
} else {
for (int i = 0; i < mFilters.size(); i++) {
if (sameSerializationName(mFilters.elementAt(i), filterRepresentation)) {
mFilters.remove(i);
break;
}
}
}
}
Aggregations