Sync up to v215
This commit is contained in:
parent
80a47a7f4f
commit
d1718561d3
@ -0,0 +1,21 @@
|
|||||||
|
From 68aa9652663f132ec9e36e8963a1fe5de0bb9485 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pierre-Hugues Husson <phh@phh.me>
|
||||||
|
Date: Sun, 22 Mar 2020 18:09:04 +0100
|
||||||
|
Subject: [PATCH 3/3] Skip mounting /oem, because if it exists, it includes
|
||||||
|
framework-level stuff we dont want
|
||||||
|
|
||||||
|
---
|
||||||
|
target/product/gsi/skip_mount.cfg | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/target/product/gsi/skip_mount.cfg b/target/product/gsi/skip_mount.cfg
|
||||||
|
index 549767edf..327676384 100644
|
||||||
|
--- a/target/product/gsi/skip_mount.cfg
|
||||||
|
+++ b/target/product/gsi/skip_mount.cfg
|
||||||
|
@@ -1,2 +1,3 @@
|
||||||
|
/product
|
||||||
|
/product_services
|
||||||
|
+/oem
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,88 @@
|
|||||||
|
From 06972c2ccb195e177bab0184ca7f3abd1747080f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Mon, 30 Mar 2020 10:07:00 +0000
|
||||||
|
Subject: [PATCH 56/57] Support Huawei light HAL
|
||||||
|
|
||||||
|
For https://github.com/phhusson/treble_experimentations/issues/1204
|
||||||
|
|
||||||
|
Change-Id: I719a13eb66a46703b7ff0e00113f9b98b3244996
|
||||||
|
---
|
||||||
|
services/core/jni/Android.bp | 1 +
|
||||||
|
...om_android_server_lights_LightsService.cpp | 30 +++++++++++++++++++
|
||||||
|
2 files changed, 31 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/services/core/jni/Android.bp b/services/core/jni/Android.bp
|
||||||
|
index e417420a135..d1df6337240 100644
|
||||||
|
--- a/services/core/jni/Android.bp
|
||||||
|
+++ b/services/core/jni/Android.bp
|
||||||
|
@@ -138,6 +138,7 @@ cc_defaults {
|
||||||
|
"vendor.samsung.hardware.miscpower@2.0",
|
||||||
|
"vendor.samsung.hardware.light@2.0",
|
||||||
|
"vendor.samsung.hardware.light@3.0",
|
||||||
|
+ "vendor.huawei.hardware.light@2.0",
|
||||||
|
],
|
||||||
|
|
||||||
|
static_libs: [
|
||||||
|
diff --git a/services/core/jni/com_android_server_lights_LightsService.cpp b/services/core/jni/com_android_server_lights_LightsService.cpp
|
||||||
|
index a6a5849caed..f3e456203f1 100644
|
||||||
|
--- a/services/core/jni/com_android_server_lights_LightsService.cpp
|
||||||
|
+++ b/services/core/jni/com_android_server_lights_LightsService.cpp
|
||||||
|
@@ -26,6 +26,7 @@
|
||||||
|
#include <vendor/samsung/hardware/light/2.0/types.h>
|
||||||
|
#include <vendor/samsung/hardware/light/3.0/ISehLight.h>
|
||||||
|
#include <vendor/samsung/hardware/light/3.0/types.h>
|
||||||
|
+#include <vendor/huawei/hardware/light/2.0/ILight.h>
|
||||||
|
#include <android-base/chrono_utils.h>
|
||||||
|
#include <utils/misc.h>
|
||||||
|
#include <utils/Log.h>
|
||||||
|
@@ -48,11 +49,15 @@ using SecType = ::vendor::samsung::hardware::light::V2_0::SecType;
|
||||||
|
using ISehLight = ::vendor::samsung::hardware::light::V3_0::ISehLight;
|
||||||
|
using SehType = ::vendor::samsung::hardware::light::V3_0::SehType;
|
||||||
|
using SehLightState = ::vendor::samsung::hardware::light::V3_0::SehLightState;
|
||||||
|
+using ILightHw = ::vendor::huawei::hardware::light::V2_0::ILight;
|
||||||
|
+using LightStateHw = ::android::hardware::light::V2_0::LightState;
|
||||||
|
static bool sLightSupported = true;
|
||||||
|
|
||||||
|
static sp<ISecLight> sSecHal;
|
||||||
|
static sp<ISehLight> sSehHal;
|
||||||
|
static bool sSecTried = false;
|
||||||
|
+static sp<ILightHw> sHwHal;
|
||||||
|
+static bool sHwTried = false;
|
||||||
|
|
||||||
|
static bool validate(jint light, jint flash, jint brightness) {
|
||||||
|
bool valid = true;
|
||||||
|
@@ -193,6 +198,31 @@ static void setLight_native(
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (!sHwTried) {
|
||||||
|
+ sHwHal = ILightHw::getService();
|
||||||
|
+ //sHwTried = true;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (sHwHal != nullptr && light == 0) {
|
||||||
|
+ ALOGE("sHwHal triggered!");
|
||||||
|
+ int brightness = colorARGB & 0xff;
|
||||||
|
+ int hwBrightness = brightness << 4;
|
||||||
|
+ LightState state = constructState(hwBrightness, flashMode, onMS, offMS, brightnessMode);
|
||||||
|
+ bool got260 = false;
|
||||||
|
+ sHwHal->HWgetSupportedTypes([&](auto types) {
|
||||||
|
+ for (const auto& type: types) {
|
||||||
|
+ if (type == 260) {
|
||||||
|
+ ALOGE("sHwHal reports 260 as a supported type");
|
||||||
|
+ got260 = true;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ });
|
||||||
|
+ if (got260) {
|
||||||
|
+ sHwHal->HWsetLight(260, state);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
Type type = static_cast<Type>(light);
|
||||||
|
LightState state = constructState(
|
||||||
|
colorARGB, flashMode, onMS, offMS, brightnessMode);
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,33 @@
|
|||||||
|
From ba959392b9e59279ec0fd490439c145618b3978b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pierre-Hugues Husson <phh@phh.me>
|
||||||
|
Date: Sun, 5 Apr 2020 16:32:46 +0200
|
||||||
|
Subject: [PATCH 57/57] Always allow overriding the number of work profiles
|
||||||
|
|
||||||
|
---
|
||||||
|
.../java/com/android/server/pm/UserManagerService.java | 10 ++--------
|
||||||
|
1 file changed, 2 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
|
||||||
|
index d7e070981b1..52797ef1821 100644
|
||||||
|
--- a/services/core/java/com/android/server/pm/UserManagerService.java
|
||||||
|
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
|
||||||
|
@@ -4429,14 +4429,8 @@ public class UserManagerService extends IUserManager.Stub {
|
||||||
|
|
||||||
|
@VisibleForTesting
|
||||||
|
static int getMaxManagedProfiles() {
|
||||||
|
- // Allow overriding max managed profiles on debuggable builds for testing
|
||||||
|
- // of multiple profiles.
|
||||||
|
- if (!Build.IS_DEBUGGABLE) {
|
||||||
|
- return MAX_MANAGED_PROFILES;
|
||||||
|
- } else {
|
||||||
|
- return SystemProperties.getInt("persist.sys.max_profiles",
|
||||||
|
- MAX_MANAGED_PROFILES);
|
||||||
|
- }
|
||||||
|
+ return SystemProperties.getInt("persist.sys.max_profiles",
|
||||||
|
+ MAX_MANAGED_PROFILES);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GuardedBy("mUsersLock")
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -1,45 +0,0 @@
|
|||||||
From c6d11821f650bbb8fc73056cf0aa57a254b5837d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pierre-Hugues Husson <phh@phh.me>
|
|
||||||
Date: Mon, 29 Jul 2019 18:09:12 +0200
|
|
||||||
Subject: [PATCH 2/2] Don't fail on FTP conntracking failing
|
|
||||||
|
|
||||||
The issue has been seen on some Samsung devices.
|
|
||||||
See https://github.com/phhusson/treble_experimentations/issues/425
|
|
||||||
|
|
||||||
Thanks @zamrih for pin-pointing the issue and validating fix
|
|
||||||
|
|
||||||
Change-Id: I3d9c865eb5a4b421f9983210c2ceae62b4906234
|
|
||||||
---
|
|
||||||
server/TetherController.cpp | 12 +++++++++---
|
|
||||||
1 file changed, 9 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/server/TetherController.cpp b/server/TetherController.cpp
|
|
||||||
index d9439be6..2fa4a0c9 100644
|
|
||||||
--- a/server/TetherController.cpp
|
|
||||||
+++ b/server/TetherController.cpp
|
|
||||||
@@ -700,13 +700,19 @@ int TetherController::setForwardRules(bool add, const char *intIface, const char
|
|
||||||
return -EREMOTEIO;
|
|
||||||
}
|
|
||||||
|
|
||||||
- std::vector<std::string> v4 = {
|
|
||||||
+ std::vector<std::string> v4Ftp = {
|
|
||||||
"*raw",
|
|
||||||
- StringPrintf("%s %s -p tcp --dport 21 -i %s -j CT --helper ftp", op,
|
|
||||||
- LOCAL_RAW_PREROUTING, intIface),
|
|
||||||
+ StringPrintf("%s %s -p tcp --dport 21 -i %s -j CT --helper ftp",
|
|
||||||
+ op, LOCAL_RAW_PREROUTING, intIface),
|
|
||||||
StringPrintf("%s %s -p tcp --dport 1723 -i %s -j CT --helper pptp", op,
|
|
||||||
LOCAL_RAW_PREROUTING, intIface),
|
|
||||||
"COMMIT",
|
|
||||||
+ };
|
|
||||||
+ if(iptablesRestoreFunction(V4, Join(v4Ftp, '\n'), nullptr) == -1) {
|
|
||||||
+ ALOGE("Failed adding iptables CT target on FTP.");
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ std::vector<std::string> v4 = {
|
|
||||||
"*filter",
|
|
||||||
StringPrintf("%s %s -i %s -o %s -m state --state ESTABLISHED,RELATED -g %s", op,
|
|
||||||
LOCAL_FORWARD, extIface, intIface, LOCAL_TETHER_COUNTERS_CHAIN),
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
|||||||
From 110923dbe0191b030e1ee6f25f3109de78a8f876 Mon Sep 17 00:00:00 2001
|
From c9d44f78250d927f6ff1712a6097c33559500cdd Mon Sep 17 00:00:00 2001
|
||||||
From: Pierre-Hugues Husson <phh@phh.me>
|
From: Pierre-Hugues Husson <phh@phh.me>
|
||||||
Date: Wed, 11 Mar 2020 14:02:35 +0100
|
Date: Wed, 11 Mar 2020 14:02:35 +0100
|
||||||
Subject: [PATCH 9/9] Every voldmanaged storage is adoptable
|
Subject: [PATCH] Every voldmanaged storage is adoptable
|
||||||
|
|
||||||
---
|
---
|
||||||
main.cpp | 2 +-
|
main.cpp | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/main.cpp b/main.cpp
|
diff --git a/main.cpp b/main.cpp
|
||||||
index 27a701b..cd1d6dd 100644
|
index 4d61110..6f6e803 100644
|
||||||
--- a/main.cpp
|
--- a/main.cpp
|
||||||
+++ b/main.cpp
|
+++ b/main.cpp
|
||||||
@@ -249,7 +249,7 @@ static int process_config(VolumeManager* vm, bool* has_adoptable, bool* has_quot
|
@@ -255,7 +255,7 @@ static int process_config(VolumeManager* vm, bool* has_adoptable, bool* has_quot
|
||||||
std::string nickname(entry.label);
|
int partnum = entry.partnum;
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
|
|
||||||
- if (entry.is_encryptable()) {
|
- if (entry.is_encryptable()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user