Loading config/hiddenapi-light-greylist.txt +2 −0 Original line number Diff line number Diff line Loading @@ -2434,6 +2434,7 @@ Landroid/hardware/camera2/CaptureRequest;->JPEG_GPS_COORDINATES:Landroid/hardwar Landroid/hardware/camera2/CaptureRequest;->JPEG_GPS_PROCESSING_METHOD:Landroid/hardware/camera2/CaptureRequest$Key; Landroid/hardware/camera2/CaptureRequest;->JPEG_GPS_TIMESTAMP:Landroid/hardware/camera2/CaptureRequest$Key; Landroid/hardware/camera2/CaptureRequest;->LED_TRANSMIT:Landroid/hardware/camera2/CaptureRequest$Key; Landroid/hardware/camera2/CaptureRequest;->mLogicalCameraSettings:Landroid/hardware/camera2/impl/CameraMetadataNative; Landroid/hardware/camera2/CaptureRequest;->REQUEST_ID:Landroid/hardware/camera2/CaptureRequest$Key; Landroid/hardware/camera2/CaptureRequest;->TONEMAP_CURVE_BLUE:Landroid/hardware/camera2/CaptureRequest$Key; Landroid/hardware/camera2/CaptureRequest;->TONEMAP_CURVE_GREEN:Landroid/hardware/camera2/CaptureRequest$Key; Loading @@ -2446,6 +2447,7 @@ Landroid/hardware/camera2/CaptureResult;->JPEG_GPS_COORDINATES:Landroid/hardware Landroid/hardware/camera2/CaptureResult;->JPEG_GPS_PROCESSING_METHOD:Landroid/hardware/camera2/CaptureResult$Key; Landroid/hardware/camera2/CaptureResult;->JPEG_GPS_TIMESTAMP:Landroid/hardware/camera2/CaptureResult$Key; Landroid/hardware/camera2/CaptureResult;->LED_TRANSMIT:Landroid/hardware/camera2/CaptureResult$Key; Landroid/hardware/camera2/CaptureResult;->mResults:Landroid/hardware/camera2/impl/CameraMetadataNative; Landroid/hardware/camera2/CaptureResult;->QUIRKS_PARTIAL_RESULT:Landroid/hardware/camera2/CaptureResult$Key; Landroid/hardware/camera2/CaptureResult;->REQUEST_FRAME_COUNT:Landroid/hardware/camera2/CaptureResult$Key; Landroid/hardware/camera2/CaptureResult;->REQUEST_ID:Landroid/hardware/camera2/CaptureResult$Key; Loading core/java/android/app/LoadedApk.java +38 −0 Original line number Diff line number Diff line Loading @@ -745,6 +745,44 @@ public final class LoadedApk { } } // /vendor/lib, /odm/lib and /product/lib are added to the native lib search // paths of the classloader. Note that this is done AFTER the classloader is // created by ApplicationLoaders.getDefault().getClassLoader(...). The // reason is because if we have added the paths when creating the classloader // above, the paths are also added to the search path of the linker namespace // 'classloader-namespace', which will allow ALL libs in the paths to apps. // Since only the libs listed in <partition>/etc/public.libraries.txt can be // available to apps, we shouldn't add the paths then. // // However, we need to add the paths to the classloader (Java) though. This // is because when a native lib is requested via System.loadLibrary(), the // classloader first tries to find the requested lib in its own native libs // search paths. If a lib is not found in one of the paths, dlopen() is not // called at all. This can cause a problem that a vendor public native lib // is accessible when directly opened via dlopen(), but inaccesible via // System.loadLibrary(). In order to prevent the problem, we explicitly // add the paths only to the classloader, and not to the native loader // (linker namespace). List<String> extraLibPaths = new ArrayList<>(3); String abiSuffix = VMRuntime.getRuntime().is64Bit() ? "64" : ""; if (!defaultSearchPaths.contains("/vendor/lib")) { extraLibPaths.add("/vendor/lib" + abiSuffix); } if (!defaultSearchPaths.contains("/odm/lib")) { extraLibPaths.add("/odm/lib" + abiSuffix); } if (!defaultSearchPaths.contains("/product/lib")) { extraLibPaths.add("/product/lib" + abiSuffix); } if (!extraLibPaths.isEmpty()) { StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads(); try { ApplicationLoaders.getDefault().addNative(mClassLoader, extraLibPaths); } finally { StrictMode.setThreadPolicy(oldPolicy); } } if (addedPaths != null && addedPaths.size() > 0) { final String add = TextUtils.join(File.pathSeparator, addedPaths); ApplicationLoaders.getDefault().addPath(mClassLoader, add); Loading core/java/android/content/pm/ApplicationInfo.java +0 −6 Original line number Diff line number Diff line Loading @@ -1120,9 +1120,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { /** @hide */ public String[] splitClassLoaderNames; /** @hide */ public boolean hiddenUntilInstalled; /** * Represents the default policy. The actual policy used will depend on other properties of * the application, e.g. the target SDK version. Loading Loading @@ -1463,7 +1460,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { compileSdkVersion = orig.compileSdkVersion; compileSdkVersionCodename = orig.compileSdkVersionCodename; mHiddenApiPolicy = orig.mHiddenApiPolicy; hiddenUntilInstalled = orig.hiddenUntilInstalled; } public String toString() { Loading Loading @@ -1538,7 +1534,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { dest.writeString(compileSdkVersionCodename); dest.writeString(appComponentFactory); dest.writeInt(mHiddenApiPolicy); dest.writeInt(hiddenUntilInstalled ? 1 : 0); } public static final Parcelable.Creator<ApplicationInfo> CREATOR Loading Loading @@ -1610,7 +1605,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { compileSdkVersionCodename = source.readString(); appComponentFactory = source.readString(); mHiddenApiPolicy = source.readInt(); hiddenUntilInstalled = source.readInt() != 0; } /** Loading core/java/android/content/pm/IPackageManager.aidl +0 −1 Original line number Diff line number Diff line Loading @@ -598,7 +598,6 @@ interface IPackageManager { boolean setApplicationHiddenSettingAsUser(String packageName, boolean hidden, int userId); boolean getApplicationHiddenSettingAsUser(String packageName, int userId); void setSystemAppHiddenUntilInstalled(String packageName, boolean hidden); boolean setSystemAppInstallState(String packageName, boolean installed, int userId); IPackageInstaller getPackageInstaller(); Loading core/java/android/content/pm/PackageParser.java +1 −1 Original line number Diff line number Diff line Loading @@ -642,7 +642,7 @@ public class PackageParser { // Returns false if the package is hidden system app until installed. if ((flags & PackageManager.MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS) == 0 && !state.installed && appInfo != null && appInfo.hiddenUntilInstalled) { && appInfo != null && appInfo.isSystemApp()) { return false; } Loading Loading
config/hiddenapi-light-greylist.txt +2 −0 Original line number Diff line number Diff line Loading @@ -2434,6 +2434,7 @@ Landroid/hardware/camera2/CaptureRequest;->JPEG_GPS_COORDINATES:Landroid/hardwar Landroid/hardware/camera2/CaptureRequest;->JPEG_GPS_PROCESSING_METHOD:Landroid/hardware/camera2/CaptureRequest$Key; Landroid/hardware/camera2/CaptureRequest;->JPEG_GPS_TIMESTAMP:Landroid/hardware/camera2/CaptureRequest$Key; Landroid/hardware/camera2/CaptureRequest;->LED_TRANSMIT:Landroid/hardware/camera2/CaptureRequest$Key; Landroid/hardware/camera2/CaptureRequest;->mLogicalCameraSettings:Landroid/hardware/camera2/impl/CameraMetadataNative; Landroid/hardware/camera2/CaptureRequest;->REQUEST_ID:Landroid/hardware/camera2/CaptureRequest$Key; Landroid/hardware/camera2/CaptureRequest;->TONEMAP_CURVE_BLUE:Landroid/hardware/camera2/CaptureRequest$Key; Landroid/hardware/camera2/CaptureRequest;->TONEMAP_CURVE_GREEN:Landroid/hardware/camera2/CaptureRequest$Key; Loading @@ -2446,6 +2447,7 @@ Landroid/hardware/camera2/CaptureResult;->JPEG_GPS_COORDINATES:Landroid/hardware Landroid/hardware/camera2/CaptureResult;->JPEG_GPS_PROCESSING_METHOD:Landroid/hardware/camera2/CaptureResult$Key; Landroid/hardware/camera2/CaptureResult;->JPEG_GPS_TIMESTAMP:Landroid/hardware/camera2/CaptureResult$Key; Landroid/hardware/camera2/CaptureResult;->LED_TRANSMIT:Landroid/hardware/camera2/CaptureResult$Key; Landroid/hardware/camera2/CaptureResult;->mResults:Landroid/hardware/camera2/impl/CameraMetadataNative; Landroid/hardware/camera2/CaptureResult;->QUIRKS_PARTIAL_RESULT:Landroid/hardware/camera2/CaptureResult$Key; Landroid/hardware/camera2/CaptureResult;->REQUEST_FRAME_COUNT:Landroid/hardware/camera2/CaptureResult$Key; Landroid/hardware/camera2/CaptureResult;->REQUEST_ID:Landroid/hardware/camera2/CaptureResult$Key; Loading
core/java/android/app/LoadedApk.java +38 −0 Original line number Diff line number Diff line Loading @@ -745,6 +745,44 @@ public final class LoadedApk { } } // /vendor/lib, /odm/lib and /product/lib are added to the native lib search // paths of the classloader. Note that this is done AFTER the classloader is // created by ApplicationLoaders.getDefault().getClassLoader(...). The // reason is because if we have added the paths when creating the classloader // above, the paths are also added to the search path of the linker namespace // 'classloader-namespace', which will allow ALL libs in the paths to apps. // Since only the libs listed in <partition>/etc/public.libraries.txt can be // available to apps, we shouldn't add the paths then. // // However, we need to add the paths to the classloader (Java) though. This // is because when a native lib is requested via System.loadLibrary(), the // classloader first tries to find the requested lib in its own native libs // search paths. If a lib is not found in one of the paths, dlopen() is not // called at all. This can cause a problem that a vendor public native lib // is accessible when directly opened via dlopen(), but inaccesible via // System.loadLibrary(). In order to prevent the problem, we explicitly // add the paths only to the classloader, and not to the native loader // (linker namespace). List<String> extraLibPaths = new ArrayList<>(3); String abiSuffix = VMRuntime.getRuntime().is64Bit() ? "64" : ""; if (!defaultSearchPaths.contains("/vendor/lib")) { extraLibPaths.add("/vendor/lib" + abiSuffix); } if (!defaultSearchPaths.contains("/odm/lib")) { extraLibPaths.add("/odm/lib" + abiSuffix); } if (!defaultSearchPaths.contains("/product/lib")) { extraLibPaths.add("/product/lib" + abiSuffix); } if (!extraLibPaths.isEmpty()) { StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads(); try { ApplicationLoaders.getDefault().addNative(mClassLoader, extraLibPaths); } finally { StrictMode.setThreadPolicy(oldPolicy); } } if (addedPaths != null && addedPaths.size() > 0) { final String add = TextUtils.join(File.pathSeparator, addedPaths); ApplicationLoaders.getDefault().addPath(mClassLoader, add); Loading
core/java/android/content/pm/ApplicationInfo.java +0 −6 Original line number Diff line number Diff line Loading @@ -1120,9 +1120,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { /** @hide */ public String[] splitClassLoaderNames; /** @hide */ public boolean hiddenUntilInstalled; /** * Represents the default policy. The actual policy used will depend on other properties of * the application, e.g. the target SDK version. Loading Loading @@ -1463,7 +1460,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { compileSdkVersion = orig.compileSdkVersion; compileSdkVersionCodename = orig.compileSdkVersionCodename; mHiddenApiPolicy = orig.mHiddenApiPolicy; hiddenUntilInstalled = orig.hiddenUntilInstalled; } public String toString() { Loading Loading @@ -1538,7 +1534,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { dest.writeString(compileSdkVersionCodename); dest.writeString(appComponentFactory); dest.writeInt(mHiddenApiPolicy); dest.writeInt(hiddenUntilInstalled ? 1 : 0); } public static final Parcelable.Creator<ApplicationInfo> CREATOR Loading Loading @@ -1610,7 +1605,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { compileSdkVersionCodename = source.readString(); appComponentFactory = source.readString(); mHiddenApiPolicy = source.readInt(); hiddenUntilInstalled = source.readInt() != 0; } /** Loading
core/java/android/content/pm/IPackageManager.aidl +0 −1 Original line number Diff line number Diff line Loading @@ -598,7 +598,6 @@ interface IPackageManager { boolean setApplicationHiddenSettingAsUser(String packageName, boolean hidden, int userId); boolean getApplicationHiddenSettingAsUser(String packageName, int userId); void setSystemAppHiddenUntilInstalled(String packageName, boolean hidden); boolean setSystemAppInstallState(String packageName, boolean installed, int userId); IPackageInstaller getPackageInstaller(); Loading
core/java/android/content/pm/PackageParser.java +1 −1 Original line number Diff line number Diff line Loading @@ -642,7 +642,7 @@ public class PackageParser { // Returns false if the package is hidden system app until installed. if ((flags & PackageManager.MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS) == 0 && !state.installed && appInfo != null && appInfo.hiddenUntilInstalled) { && appInfo != null && appInfo.isSystemApp()) { return false; } Loading