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

Commit e2d2ed49 authored by Narayan Kamath's avatar Narayan Kamath
Browse files

Conditionally include org.apache.http.legacy in app classpaths.

bug: 18027885

Change-Id: Id330ffde9d2a6e516fd60edc33f5529df719c634
parent 323d888b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2760,9 +2760,17 @@ public class PackageParser {
            }
        }

        addSharedLibrariesForBackwardCompatibility(owner);

        return true;
    }

    private static void addSharedLibrariesForBackwardCompatibility(Package owner) {
        if (owner.applicationInfo.targetSdkVersion <= Build.VERSION_CODES.LOLLIPOP_MR1) {
            owner.usesLibraries = ArrayUtils.add(owner.usesLibraries, "org.apache.http.legacy");
        }
    }

    /**
     * Parse the {@code application} XML tree at the current parse location in a
     * <em>split APK</em> manifest.