mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-09-16 06:22:26 +00:00
d98f33a337
TODO: - f/w/b - settings Signed-off-by: Tavi <tavi@divested.dev>
32 lines
1.5 KiB
Diff
32 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dmitry Muhomor <muhomor.dmitry@gmail.com>
|
|
Date: Mon, 30 Jan 2023 19:04:30 +0200
|
|
Subject: [PATCH] disable package parser cache
|
|
|
|
This is needed for properly verifying updates of system packages.
|
|
---
|
|
.../java/com/android/server/pm/PackageManagerServiceUtils.java | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
|
|
index 40591fcf4c98..6c71f54d6d74 100644
|
|
--- a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
|
|
+++ b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
|
|
@@ -200,7 +200,7 @@ public class PackageManagerServiceUtils {
|
|
/**
|
|
* The initial enabled state of the cache before other checks are done.
|
|
*/
|
|
- private static final boolean DEFAULT_PACKAGE_PARSER_CACHE_ENABLED = true;
|
|
+ private static final boolean DEFAULT_PACKAGE_PARSER_CACHE_ENABLED = false;
|
|
|
|
/**
|
|
* Whether to skip all other checks and force the cache to be enabled.
|
|
@@ -1440,6 +1440,7 @@ public class PackageManagerServiceUtils {
|
|
boolean isUserDebugBuild, String incrementalVersion) {
|
|
if (!FORCE_PACKAGE_PARSED_CACHE_ENABLED) {
|
|
if (!DEFAULT_PACKAGE_PARSER_CACHE_ENABLED) {
|
|
+ FileUtils.deleteContentsAndDir(Environment.getPackageCacheDirectory());
|
|
return null;
|
|
}
|
|
|