Loading core/java/android/content/pm/ApplicationInfo.java +14 −0 Original line number Diff line number Diff line Loading @@ -910,6 +910,20 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { return (privateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) != 0; } /** * @hide */ public boolean isSystemApp() { return (flags & ApplicationInfo.FLAG_SYSTEM) != 0; } /** * @hide */ public boolean isUpdatedSystemApp() { return (flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0; } /** * @hide */ Loading core/java/android/content/pm/PackageParser.java +14 −0 Original line number Diff line number Diff line Loading @@ -4411,6 +4411,20 @@ public class PackageParser { return applicationInfo.isForwardLocked(); } /** * @hide */ public boolean isSystemApp() { return applicationInfo.isSystemApp(); } /** * @hide */ public boolean isUpdatedSystemApp() { return applicationInfo.isUpdatedSystemApp(); } public String toString() { return "Package{" + Integer.toHexString(System.identityHashCode(this)) Loading core/java/com/android/internal/os/InstallerConnection.java +4 −2 Original line number Diff line number Diff line Loading @@ -91,11 +91,11 @@ public class InstallerConnection { } public int dexopt(String apkPath, int uid, boolean isPublic, String instructionSet) { return dexopt(apkPath, uid, isPublic, "*", instructionSet, false, false); return dexopt(apkPath, uid, isPublic, "*", instructionSet, false, false, null); } public int dexopt(String apkPath, int uid, boolean isPublic, String pkgName, String instructionSet, boolean vmSafeMode, boolean debuggable) { String instructionSet, boolean vmSafeMode, boolean debuggable, String outputPath) { StringBuilder builder = new StringBuilder("dexopt"); builder.append(' '); builder.append(apkPath); Loading @@ -108,6 +108,8 @@ public class InstallerConnection { builder.append(instructionSet); builder.append(vmSafeMode ? " 1" : " 0"); builder.append(debuggable ? " 1" : " 0"); builder.append(' '); builder.append(outputPath != null ? outputPath : "!"); return execute(builder.toString()); } Loading services/core/java/com/android/server/pm/Installer.java +23 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.pm; import android.annotation.Nullable; import android.content.Context; import android.content.pm.PackageStats; import android.os.Build; Loading Loading @@ -83,14 +84,15 @@ public final class Installer extends SystemService { } public int dexopt(String apkPath, int uid, boolean isPublic, String pkgName, String instructionSet, boolean vmSafeMode, boolean debuggable) { String instructionSet, boolean vmSafeMode, boolean debuggable, @Nullable String outputPath) { if (!isValidInstructionSet(instructionSet)) { Slog.e(TAG, "Invalid instruction set: " + instructionSet); return -1; } return mInstaller.dexopt(apkPath, uid, isPublic, pkgName, instructionSet, vmSafeMode, debuggable); debuggable, outputPath); } public int idmap(String targetApkPath, String overlayApkPath, int uid) { Loading Loading @@ -134,6 +136,16 @@ public final class Installer extends SystemService { return mInstaller.execute(builder.toString()); } /** * Removes packageDir or its subdirectory */ public int rmPackageDir(String packageDir) { StringBuilder builder = new StringBuilder("rmpackagedir"); builder.append(' '); builder.append(packageDir); return mInstaller.execute(builder.toString()); } public int remove(String name, int userId) { StringBuilder builder = new StringBuilder("remove"); builder.append(' '); Loading Loading @@ -331,6 +343,15 @@ public final class Installer extends SystemService { return (mInstaller.execute(builder.toString()) == 0); } public int createOatDir(String oatDir, String dexInstructionSet) { StringBuilder builder = new StringBuilder("createoatdir"); builder.append(' '); builder.append(oatDir); builder.append(' '); builder.append(dexInstructionSet); return mInstaller.execute(builder.toString()); } /** * Returns true iff. {@code instructionSet} is a valid instruction set. */ Loading services/core/java/com/android/server/pm/InstructionSets.java +10 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ public class InstructionSets { * a native bridge this might be different than the one shared libraries use. */ public static String getDexCodeInstructionSet(String sharedLibraryIsa) { // TODO b/19550105 Build mapping once instead of querying each time String dexCodeIsa = SystemProperties.get("ro.dalvik.vm.isa." + sharedLibraryIsa); return TextUtils.isEmpty(dexCodeIsa) ? sharedLibraryIsa : dexCodeIsa; } Loading Loading @@ -111,4 +112,13 @@ public class InstructionSets { return allInstructionSets; } public static String getPrimaryInstructionSet(ApplicationInfo info) { if (info.primaryCpuAbi == null) { return getPreferredInstructionSet(); } return VMRuntime.getInstructionSet(info.primaryCpuAbi); } } Loading
core/java/android/content/pm/ApplicationInfo.java +14 −0 Original line number Diff line number Diff line Loading @@ -910,6 +910,20 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { return (privateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) != 0; } /** * @hide */ public boolean isSystemApp() { return (flags & ApplicationInfo.FLAG_SYSTEM) != 0; } /** * @hide */ public boolean isUpdatedSystemApp() { return (flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0; } /** * @hide */ Loading
core/java/android/content/pm/PackageParser.java +14 −0 Original line number Diff line number Diff line Loading @@ -4411,6 +4411,20 @@ public class PackageParser { return applicationInfo.isForwardLocked(); } /** * @hide */ public boolean isSystemApp() { return applicationInfo.isSystemApp(); } /** * @hide */ public boolean isUpdatedSystemApp() { return applicationInfo.isUpdatedSystemApp(); } public String toString() { return "Package{" + Integer.toHexString(System.identityHashCode(this)) Loading
core/java/com/android/internal/os/InstallerConnection.java +4 −2 Original line number Diff line number Diff line Loading @@ -91,11 +91,11 @@ public class InstallerConnection { } public int dexopt(String apkPath, int uid, boolean isPublic, String instructionSet) { return dexopt(apkPath, uid, isPublic, "*", instructionSet, false, false); return dexopt(apkPath, uid, isPublic, "*", instructionSet, false, false, null); } public int dexopt(String apkPath, int uid, boolean isPublic, String pkgName, String instructionSet, boolean vmSafeMode, boolean debuggable) { String instructionSet, boolean vmSafeMode, boolean debuggable, String outputPath) { StringBuilder builder = new StringBuilder("dexopt"); builder.append(' '); builder.append(apkPath); Loading @@ -108,6 +108,8 @@ public class InstallerConnection { builder.append(instructionSet); builder.append(vmSafeMode ? " 1" : " 0"); builder.append(debuggable ? " 1" : " 0"); builder.append(' '); builder.append(outputPath != null ? outputPath : "!"); return execute(builder.toString()); } Loading
services/core/java/com/android/server/pm/Installer.java +23 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.pm; import android.annotation.Nullable; import android.content.Context; import android.content.pm.PackageStats; import android.os.Build; Loading Loading @@ -83,14 +84,15 @@ public final class Installer extends SystemService { } public int dexopt(String apkPath, int uid, boolean isPublic, String pkgName, String instructionSet, boolean vmSafeMode, boolean debuggable) { String instructionSet, boolean vmSafeMode, boolean debuggable, @Nullable String outputPath) { if (!isValidInstructionSet(instructionSet)) { Slog.e(TAG, "Invalid instruction set: " + instructionSet); return -1; } return mInstaller.dexopt(apkPath, uid, isPublic, pkgName, instructionSet, vmSafeMode, debuggable); debuggable, outputPath); } public int idmap(String targetApkPath, String overlayApkPath, int uid) { Loading Loading @@ -134,6 +136,16 @@ public final class Installer extends SystemService { return mInstaller.execute(builder.toString()); } /** * Removes packageDir or its subdirectory */ public int rmPackageDir(String packageDir) { StringBuilder builder = new StringBuilder("rmpackagedir"); builder.append(' '); builder.append(packageDir); return mInstaller.execute(builder.toString()); } public int remove(String name, int userId) { StringBuilder builder = new StringBuilder("remove"); builder.append(' '); Loading Loading @@ -331,6 +343,15 @@ public final class Installer extends SystemService { return (mInstaller.execute(builder.toString()) == 0); } public int createOatDir(String oatDir, String dexInstructionSet) { StringBuilder builder = new StringBuilder("createoatdir"); builder.append(' '); builder.append(oatDir); builder.append(' '); builder.append(dexInstructionSet); return mInstaller.execute(builder.toString()); } /** * Returns true iff. {@code instructionSet} is a valid instruction set. */ Loading
services/core/java/com/android/server/pm/InstructionSets.java +10 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ public class InstructionSets { * a native bridge this might be different than the one shared libraries use. */ public static String getDexCodeInstructionSet(String sharedLibraryIsa) { // TODO b/19550105 Build mapping once instead of querying each time String dexCodeIsa = SystemProperties.get("ro.dalvik.vm.isa." + sharedLibraryIsa); return TextUtils.isEmpty(dexCodeIsa) ? sharedLibraryIsa : dexCodeIsa; } Loading Loading @@ -111,4 +112,13 @@ public class InstructionSets { return allInstructionSets; } public static String getPrimaryInstructionSet(ApplicationInfo info) { if (info.primaryCpuAbi == null) { return getPreferredInstructionSet(); } return VMRuntime.getInstructionSet(info.primaryCpuAbi); } }