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

Commit c662c154 authored by Richard Uhler's avatar Richard Uhler Committed by android-build-merger
Browse files

Merge "Cleanup code given PATCHOAT_FOR_RELOCATION has been removed." am: 8582826f am: 5c5637e1

am: 4911e517

Change-Id: I5fd04eb1e91d4ff590a195598566a85bbc00999f
parents 1559d51f 4911e517
Loading
Loading
Loading
Loading
+4 −19
Original line number Diff line number Diff line
@@ -217,26 +217,11 @@ class PackageDexOptimizer {
                            dexoptNeeded);
                }

                final String dexoptType;
                String oatDir = null;
                boolean isOdexLocation = (dexoptNeeded < 0);
                switch (Math.abs(dexoptNeeded)) {
                    case DexFile.NO_DEXOPT_NEEDED:
                if (dexoptNeeded == DexFile.NO_DEXOPT_NEEDED) {
                    continue;
                    case DexFile.DEX2OAT_FROM_SCRATCH:
                    case DexFile.DEX2OAT_FOR_BOOT_IMAGE:
                    case DexFile.DEX2OAT_FOR_FILTER:
                    case DexFile.DEX2OAT_FOR_RELOCATION:
                        dexoptType = "dex2oat";
                        oatDir = createOatDirIfSupported(pkg, dexCodeInstructionSet);
                        break;
                    case DexFile.PATCHOAT_FOR_RELOCATION:
                        dexoptType = "patchoat";
                        break;
                    default:
                        throw new IllegalStateException("Invalid dexopt:" + dexoptNeeded);
                }

                String oatDir = createOatDirIfSupported(pkg, dexCodeInstructionSet);
                String sharedLibrariesPath = null;
                if (sharedLibraries != null && sharedLibraries.length != 0) {
                    StringBuilder sb = new StringBuilder();
@@ -248,7 +233,7 @@ class PackageDexOptimizer {
                    }
                    sharedLibrariesPath = sb.toString();
                }
                Log.i(TAG, "Running dexopt (" + dexoptType + ") on: " + path + " pkg="
                Log.i(TAG, "Running dexopt on: " + path + " pkg="
                        + pkg.applicationInfo.packageName + " isa=" + dexCodeInstructionSet
                        + " vmSafeMode=" + vmSafeMode + " debuggable=" + debuggable
                        + " target-filter=" + targetCompilerFilter + " oatDir = " + oatDir