Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7bfe4c65 authored by Abhisek Devkota's avatar Abhisek Devkota Committed by Gerrit Code Review
Browse files

Merge "CM11 Themes: Remove type matching restriction" into cm-11.0

parents a3f84d9a 057e98bf
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -835,7 +835,7 @@ public class PackageParser {
                            }
                            // check that the resource types match and exist before adding it to the
                            // redirections map.
                            if (typesMatch(target, overlay) && resourceExists(overlay, themePkgName, themeResources)) {
                            if (resourceExists(overlay, themePkgName, themeResources)) {
                                redirections.put(target, overlay);
                            }
                        }
@@ -866,17 +866,6 @@ public class PackageParser {
        return false;
    }

    private boolean typesMatch(String target, String overlay) {
        int targetIndex = target.indexOf('/');
        int overlayIndex = overlay.indexOf('/');
        if (targetIndex >= 0 && overlayIndex >=0) {
            final String targetType = target.substring(0, targetIndex);
            final String overlayType = overlay.substring(0, overlayIndex);
            return targetType.equals(overlayType);
        }
        return false;
    }

    private List<String> getRedirectionFiles(File originalFile) {
        List<String> redirectionsList = new ArrayList<String>();
        final ZipFile zip;