forked from PeterGSI/patches
fwb: Add patch for new package parsing
This commit is contained in:
parent
22cda1eb90
commit
c6b56cf04d
|
@ -1,7 +1,7 @@
|
|||
From 0f7b66cc9930141f645569f354e901bef5ae384b Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Tue, 12 Oct 2021 21:37:22 -0400
|
||||
Subject: [PATCH 1/4] PackageParser: support glob matching for properties
|
||||
Subject: [PATCH 1/5] PackageParser: support glob matching for properties
|
||||
|
||||
Needed to make phh's vendor overlays work
|
||||
---
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From 381aa92ab038fc6c0157c5b9396218e80ed3ae65 Mon Sep 17 00:00:00 2001
|
||||
From: dhacker29 <dhackerdvm@gmail.com>
|
||||
Date: Tue, 24 Nov 2015 01:53:47 -0500
|
||||
Subject: [PATCH 2/4] fw/b: Use ro.build.version.incremental to signal OTA
|
||||
Subject: [PATCH 2/5] fw/b: Use ro.build.version.incremental to signal OTA
|
||||
upgrades
|
||||
|
||||
[PeterCxy]: On T, there is a new class PackagePartitions that is
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From effc76211ce9b665c4f9418d86d2b1a8aa67d42b Mon Sep 17 00:00:00 2001
|
||||
From: Danny Lin <danny@kdrag0n.dev>
|
||||
Date: Sat, 16 Oct 2021 05:27:57 -0700
|
||||
Subject: [PATCH 3/4] Add support for app signature spoofing
|
||||
Subject: [PATCH 3/5] Add support for app signature spoofing
|
||||
|
||||
This is needed by microG GmsCore to pretend to be the official Google
|
||||
Play Services package, because client apps check the package signature
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From bd9fc170c2125e142f19805cceaaabe354ba6da8 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Wed, 1 Jun 2022 16:56:20 -0400
|
||||
Subject: [PATCH 4/4] Implement a persistent property to override the default
|
||||
Subject: [PATCH 4/5] Implement a persistent property to override the default
|
||||
primary camera (0)
|
||||
|
||||
Change-Id: I49b45d00bf71d7932591b3516d49a680e1b6568b
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
From f95505e81e0c4064eb5c78a62ed6257530734b37 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Fri, 2 Sep 2022 21:36:06 -0400
|
||||
Subject: [PATCH 5/5] FrameworkParsingPackageUtils: Add glob matching support
|
||||
for properties
|
||||
|
||||
This is now required in addition to the one in PackageParser in order
|
||||
for overlays to work.
|
||||
|
||||
Change-Id: Ie8679c0ffe03cead4a68bd2d0eb429f05af2d417
|
||||
---
|
||||
.../pm/parsing/FrameworkParsingPackageUtils.java | 12 ++++++++++--
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java b/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java
|
||||
index 3e1c5bb3d7ec..f15978c57574 100644
|
||||
--- a/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java
|
||||
+++ b/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java
|
||||
@@ -215,8 +215,16 @@ public class FrameworkParsingPackageUtils {
|
||||
for (int i = 0; i < propNames.length; i++) {
|
||||
// Check property value: make sure it is both set and equal to expected value
|
||||
final String currValue = SystemProperties.get(propNames[i]);
|
||||
- if (!TextUtils.equals(currValue, propValues[i])) {
|
||||
- return false;
|
||||
+ if (propValues[i].startsWith("+") && propValues[i].endsWith("*")) {
|
||||
+ // Glob matching
|
||||
+ int idx = TextUtils.indexOf(currValue, propValues[i].substring(1, propValues[i].length() - 1));
|
||||
+ if (idx < 0) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ } else {
|
||||
+ if (!TextUtils.equals(currValue, propValues[i])) {
|
||||
+ return false;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
return true;
|
||||
--
|
||||
2.37.2
|
||||
|
Loading…
Reference in a new issue