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

Commit 057e98bf authored by Clark Scheff's avatar Clark Scheff
Browse files

CM11 Themes: Remove type matching restriction

Change-Id: I5a8ac8ff1794350ff9dc03b378c704bfb97d0a9e
parent 4c8a2c47
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;