Sync up to v213
This commit is contained in:
parent
9fe4d8ccf3
commit
90d7ed3178
@ -0,0 +1,57 @@
|
||||
From 283eb4c984c6e0d878599c9a6fcc4e891cbb24f4 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Thu, 23 Jan 2020 11:13:43 +0800
|
||||
Subject: [PATCH 13/13] audiopolicy: try again with trimmed audio port name if
|
||||
not found
|
||||
|
||||
* In Spreadtrum BSP, some audio routes may contain ports with extra
|
||||
spaces at the beginning and the end, causing audiopolicy to refuse to
|
||||
load and leading to broken audio.
|
||||
|
||||
* Fix this by retrying with trimmed port name when not found. Do not
|
||||
use trimmed name all the time because a white space is a valid
|
||||
character in port name, and we cannot be sure nobody is using it for
|
||||
legitimite purposes.
|
||||
---
|
||||
.../managerdefinitions/src/Serializer.cpp | 18 ++++++++++++++++--
|
||||
1 file changed, 16 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
index 8bfdb5b0a..4bdb082ba 100644
|
||||
--- a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
+++ b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
@@ -550,6 +550,17 @@ Return<DevicePortTraits::Element> DevicePortTraits::deserialize(const xmlNode *c
|
||||
return deviceDesc;
|
||||
}
|
||||
|
||||
+char* trim(char * s) {
|
||||
+ int l = strlen(s);
|
||||
+
|
||||
+ if (l > 0) {
|
||||
+ while (isspace(s[l - 1])) --l;
|
||||
+ while (*s && isspace(*s)) ++s, --l;
|
||||
+ }
|
||||
+
|
||||
+ return strndup(s, l);
|
||||
+}
|
||||
+
|
||||
Return<RouteTraits::Element> RouteTraits::deserialize(const xmlNode *cur, PtrSerializingCtx ctx)
|
||||
{
|
||||
std::string type = getXmlAttribute(cur, Attributes::type);
|
||||
@@ -590,8 +601,11 @@ Return<RouteTraits::Element> RouteTraits::deserialize(const xmlNode *cur, PtrSer
|
||||
if (strlen(devTag) != 0) {
|
||||
sp<AudioPort> source = ctx->findPortByTagName(String8(devTag));
|
||||
if (source == NULL) {
|
||||
- ALOGE("%s: no source found with name=%s", __func__, devTag);
|
||||
- return Status::fromStatusT(BAD_VALUE);
|
||||
+ source = ctx->findPortByTagName(String8(trim(devTag)));
|
||||
+ if (source == NULL) {
|
||||
+ ALOGE("%s: no source found with name=%s", __func__, devTag);
|
||||
+ return Status::fromStatusT(BAD_VALUE);
|
||||
+ }
|
||||
}
|
||||
sources.add(source);
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,49 @@
|
||||
From 29fbc5853ee25d3cd72db8f87aec6addd863e677 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 22 Feb 2020 23:45:54 +0100
|
||||
Subject: [PATCH 50/53] [WIP] report press events to oppo fingerprint sensor
|
||||
|
||||
---
|
||||
.../biometrics/fingerprint/FacolaView.java | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/biometrics/fingerprint/FacolaView.java b/services/core/java/com/android/server/biometrics/fingerprint/FacolaView.java
|
||||
index f77e8282689..0fb4254eb60 100644
|
||||
--- a/services/core/java/com/android/server/biometrics/fingerprint/FacolaView.java
|
||||
+++ b/services/core/java/com/android/server/biometrics/fingerprint/FacolaView.java
|
||||
@@ -114,6 +114,20 @@ public class FacolaView extends ImageView implements OnTouchListener {
|
||||
}
|
||||
}
|
||||
|
||||
+ private final File oppoFod = new File("/sys/kernel/oppo_display/notify_fppress");
|
||||
+ private void oppoPress(boolean pressed) {
|
||||
+ if(!oppoFod.exists()) return;
|
||||
+ try {
|
||||
+ String v = "0";
|
||||
+ if(pressed) v = "1";
|
||||
+ PrintWriter writer = new PrintWriter(oppoFod, "UTF-8");
|
||||
+ writer.println(v);
|
||||
+ writer.close();
|
||||
+ } catch(Exception e) {
|
||||
+ Slog.d("PHH", "Failed to notify oppo fp press", e);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
@@ -131,9 +145,11 @@ public class FacolaView extends ImageView implements OnTouchListener {
|
||||
} catch(Exception e) {
|
||||
Slog.d("PHH-Enroll", "Failed calling xiaomi fp extcmd");
|
||||
}
|
||||
+ oppoPress(true);
|
||||
|
||||
canvas.drawCircle(mW/2, mH/2, (float) (mW/2.0f), this.mPaintFingerprint);
|
||||
} else {
|
||||
+ oppoPress(false);
|
||||
try {
|
||||
if(mXiaomiFingerprint != null) {
|
||||
mXiaomiFingerprint.extCmd(0xa, 0);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,86 @@
|
||||
From bc7c0ed48c84ea421d84049a5fdf509f0bdf8f8c Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 2 Mar 2020 21:13:36 +0100
|
||||
Subject: [PATCH 52/53] Add support for samsung optical under-display
|
||||
fingerprint
|
||||
|
||||
---
|
||||
services/core/Android.bp | 1 +
|
||||
.../biometrics/fingerprint/FacolaView.java | 17 +++++++++++++++--
|
||||
2 files changed, 16 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/services/core/Android.bp b/services/core/Android.bp
|
||||
index 9f83e49c27d..84a5450dc05 100644
|
||||
--- a/services/core/Android.bp
|
||||
+++ b/services/core/Android.bp
|
||||
@@ -55,6 +55,7 @@ java_library_static {
|
||||
"netd_aidl_interface-V2-java",
|
||||
"netd_event_listener_interface-java",
|
||||
"vendor.goodix.extend.service-V2.0-java",
|
||||
+ "vendor.samsung.hardware.biometrics.fingerprint-V2.1-java",
|
||||
"vendor.xiaomi.hardware.fingerprintextension-V1.0-java",
|
||||
],
|
||||
}
|
||||
diff --git a/services/core/java/com/android/server/biometrics/fingerprint/FacolaView.java b/services/core/java/com/android/server/biometrics/fingerprint/FacolaView.java
|
||||
index 0fb4254eb60..edd13988e49 100644
|
||||
--- a/services/core/java/com/android/server/biometrics/fingerprint/FacolaView.java
|
||||
+++ b/services/core/java/com/android/server/biometrics/fingerprint/FacolaView.java
|
||||
@@ -37,6 +37,7 @@ import java.io.PrintWriter;
|
||||
|
||||
import vendor.xiaomi.hardware.fingerprintextension.V1_0.IXiaomiFingerprint;
|
||||
import vendor.goodix.extend.service.V2_0.IGoodixFPExtendService;
|
||||
+import vendor.samsung.hardware.biometrics.fingerprint.V2_1.ISecBiometricsFingerprint;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
@@ -48,6 +49,7 @@ public class FacolaView extends ImageView implements OnTouchListener {
|
||||
private final Paint mPaintShow = new Paint();
|
||||
private IXiaomiFingerprint mXiaomiFingerprint = null;
|
||||
private IGoodixFPExtendService mGoodixFingerprint = null;
|
||||
+ private ISecBiometricsFingerprint mSamsungFingerprint = null;
|
||||
private boolean mInsideCircle = false;
|
||||
private final WindowManager.LayoutParams mParams = new WindowManager.LayoutParams();
|
||||
|
||||
@@ -111,6 +113,11 @@ public class FacolaView extends ImageView implements OnTouchListener {
|
||||
} catch(Exception e) {
|
||||
Slog.d("PHH-Enroll", "Failed getting goodix fingerprint service", e);
|
||||
}
|
||||
+ try {
|
||||
+ mSamsungFingerprint = ISecBiometricsFingerprint.getService();
|
||||
+ } catch(Exception e) {
|
||||
+ Slog.d("PHH-Enroll", "Failed getting samsung fingerprint service", e);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,9 +148,12 @@ public class FacolaView extends ImageView implements OnTouchListener {
|
||||
mXiaomiFingerprint.extCmd(0xa, nitValue);
|
||||
} else if(mGoodixFingerprint != null) {
|
||||
mGoodixFingerprint.goodixExtendCommand(10, 1);
|
||||
+ } else if(mSamsungFingerprint != null) {
|
||||
+ mSamsungFingerprint.request(22 /* SEM_FINGER_STATE */, 0, 2 /* pressed */, new java.util.ArrayList<Byte>(),
|
||||
+ (int retval, java.util.ArrayList<Byte> out) -> {} );
|
||||
}
|
||||
} catch(Exception e) {
|
||||
- Slog.d("PHH-Enroll", "Failed calling xiaomi fp extcmd");
|
||||
+ Slog.d("PHH-Enroll", "Failed calling fp extcmd", e);
|
||||
}
|
||||
oppoPress(true);
|
||||
|
||||
@@ -155,9 +165,12 @@ public class FacolaView extends ImageView implements OnTouchListener {
|
||||
mXiaomiFingerprint.extCmd(0xa, 0);
|
||||
} else if(mGoodixFingerprint != null) {
|
||||
mGoodixFingerprint.goodixExtendCommand(10, 0);
|
||||
+ } else if(mSamsungFingerprint != null) {
|
||||
+ mSamsungFingerprint.request(22 /* SEM_FINGER_STATE */, 0, 1 /* released */, new java.util.ArrayList<Byte>(),
|
||||
+ (int retval, java.util.ArrayList<Byte> out) -> {} );
|
||||
}
|
||||
} catch(Exception e) {
|
||||
- Slog.d("PHH-Enroll", "Failed calling xiaomi fp extcmd");
|
||||
+ Slog.d("PHH-Enroll", "Failed calling fp extcmd", e);
|
||||
}
|
||||
canvas.drawCircle(mW/2, mH/2, (float) (mW/2.0f), this.mPaintShow);
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,29 @@
|
||||
From 3b6fbd406c98211525f37d4d1e341d7750a652f0 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 2 Mar 2020 21:13:47 +0100
|
||||
Subject: [PATCH 53/53] Fix persist.sys.fp.fod override
|
||||
|
||||
---
|
||||
.../com/android/server/biometrics/fingerprint/FacolaView.java | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/biometrics/fingerprint/FacolaView.java b/services/core/java/com/android/server/biometrics/fingerprint/FacolaView.java
|
||||
index edd13988e49..2c1ba76f529 100644
|
||||
--- a/services/core/java/com/android/server/biometrics/fingerprint/FacolaView.java
|
||||
+++ b/services/core/java/com/android/server/biometrics/fingerprint/FacolaView.java
|
||||
@@ -75,10 +75,10 @@ public class FacolaView extends ImageView implements OnTouchListener {
|
||||
|
||||
noDim = android.os.SystemProperties.getBoolean("persist.sys.phh.nodim", false);
|
||||
String[] location = android.os.SystemProperties.get("persist.vendor.sys.fp.fod.location.X_Y", "").split(",");
|
||||
- if(location.length == 0)
|
||||
+ if(location.length != 2)
|
||||
location = android.os.SystemProperties.get("persist.sys.fp.fod.location.X_Y", "").split(",");
|
||||
String[] size = android.os.SystemProperties.get("persist.vendor.sys.fp.fod.size.width_height", "").split(",");
|
||||
- if(size.length == 0)
|
||||
+ if(size.length != 2)
|
||||
size = android.os.SystemProperties.get("persist.sys.fp.fod.size.width_height", "").split(",");
|
||||
Slog.d("PHH-Enroll", "FacolaView hello");
|
||||
if(size.length == 2 && location.length == 2) {
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,91 @@
|
||||
From 723d8f84e0376b97840fa5e287a994823f6f5be4 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre Couillaud <pierre.couillaud@broadcom.com>
|
||||
Date: Tue, 27 Aug 2019 13:43:22 -0700
|
||||
Subject: [PATCH 6/6] SurfaceFlinger: retain the sideband layer information for
|
||||
composition
|
||||
|
||||
when present, the sideband layer stream information is not saved into
|
||||
the BufferQueueLayer::mSidebandStream, during "latchSidebandStream".
|
||||
|
||||
this subsequently leads to such layer being marked as non visible in the
|
||||
composition stack and to be drop from advertisement to hardware composer
|
||||
even though a sideband layer is defined in the rest of the framework.
|
||||
|
||||
this seems to be a regression introduced during android 9 to android 10
|
||||
revamp of the SurfaceFlinger for buffer latching. latching a sideband layer is actually harmless since there is no buffer associated with it that need to be waited on from the gpu side.
|
||||
|
||||
the fix proposed here allows to maintain the knowledge of the sideband
|
||||
layer and make it visible in the composition stack for hardware composer to handle adequately.
|
||||
|
||||
for illustration purposes, the relevant snippet of the layer composition
|
||||
stack are posted here from "dumpsys SurfaceFlinger", highlighting the
|
||||
issue with ">>>".
|
||||
|
||||
[before]:
|
||||
|
||||
* compositionengine::Layer 0xa959b34c (SurfaceView - <truncated>)
|
||||
frontend:
|
||||
isSecure=false geomUsesSourceCrop=false geomBufferUsesDisplayInverseTransform=false
|
||||
geomLayerTransform 0x00000000 (ROT_0 ) 0x00 (IDENTITY )
|
||||
1.0000 0.0000 0.0000
|
||||
0.0000 1.0000 0.0000
|
||||
0.0000 0.0000 1.0000
|
||||
|
||||
geomBufferSize=[0 0 -1 -1] geomContentCrop=[0 0 -1 -1] geomCrop=[0 0 -1 -1] geomBufferTransform=0
|
||||
Region geomActiveTransparentRegion (this=0xa959b3f8, count=1)
|
||||
[ 0, 0, 0, 0]
|
||||
geomLayerBounds=[0.000000 0.000000 0.000000 0.000000]
|
||||
blend=INVALID (0) alpha=1.000000
|
||||
>>> type=0 appId=0 composition type=INVALID (0)
|
||||
buffer: buffer=0x0 slot=-1
|
||||
>>> sideband stream=0x9b509900
|
||||
color=[0 0 0]
|
||||
dataspace=UNKNOWN (0) hdr metadata types=0 colorTransform=<truncated>
|
||||
|
||||
[after]:
|
||||
|
||||
* compositionengine::Layer 0xa9a5034c (SurfaceView - <truncated>)
|
||||
frontend:
|
||||
isSecure=false geomUsesSourceCrop=true geomBufferUsesDisplayInverseTransform=false
|
||||
geomLayerTransform 0x00000000 (ROT_0 ) 0x00 (IDENTITY )
|
||||
1.0000 0.0000 0.0000
|
||||
0.0000 1.0000 0.0000
|
||||
0.0000 0.0000 1.0000
|
||||
|
||||
geomBufferSize=[0 0 -1 -1] geomContentCrop=[0 0 -1 -1] geomCrop=[0 0 1920 1080] geomBufferTransform=0
|
||||
Region geomActiveTransparentRegion (this=0xa9a503f8, count=1)
|
||||
[ 0, 0, 0, 0]
|
||||
geomLayerBounds=[0.000000 0.000000 1920.000000 1080.000000]
|
||||
blend=NONE (1) alpha=1.000000
|
||||
>>> type=1 appId=10064 composition type=SIDEBAND (5)
|
||||
buffer: buffer=0x0 slot=-1
|
||||
>>> sideband stream=0x9a1472b0
|
||||
color=[0 0 0]
|
||||
dataspace=UNKNOWN (0) hdr metadata types=0 colorTransform=<truncated>
|
||||
|
||||
Bug: 140128098
|
||||
refs #SWANDROID-6178
|
||||
|
||||
Signed-off-by: Pierre Couillaud <pierre.couillaud@broadcom.com>
|
||||
---
|
||||
services/surfaceflinger/BufferQueueLayer.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/services/surfaceflinger/BufferQueueLayer.cpp b/services/surfaceflinger/BufferQueueLayer.cpp
|
||||
index f35a4fd49..cbb9d658e 100644
|
||||
--- a/services/surfaceflinger/BufferQueueLayer.cpp
|
||||
+++ b/services/surfaceflinger/BufferQueueLayer.cpp
|
||||
@@ -243,8 +243,9 @@ bool BufferQueueLayer::latchSidebandStream(bool& recomputeVisibleRegions) {
|
||||
bool sidebandStreamChanged = true;
|
||||
if (mSidebandStreamChanged.compare_exchange_strong(sidebandStreamChanged, false)) {
|
||||
// mSidebandStreamChanged was changed to false
|
||||
+ mSidebandStream = mConsumer->getSidebandStream();
|
||||
auto& layerCompositionState = getCompositionLayer()->editState().frontEnd;
|
||||
- layerCompositionState.sidebandStream = mConsumer->getSidebandStream();
|
||||
+ layerCompositionState.sidebandStream = mSidebandStream;
|
||||
if (layerCompositionState.sidebandStream != nullptr) {
|
||||
setTransactionFlags(eTransactionNeeded);
|
||||
mFlinger->setTransactionFlags(eTraversalNeeded);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,26 @@
|
||||
From 064f8936cd6d5e6d9a44a72bbc8600d092135e2c Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 2 Mar 2020 21:11:25 +0100
|
||||
Subject: [PATCH 9/9] [HACK] Never blacklist RILs. It might get blacklisted for
|
||||
bad reasons
|
||||
|
||||
---
|
||||
src/java/com/android/internal/telephony/RIL.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/java/com/android/internal/telephony/RIL.java b/src/java/com/android/internal/telephony/RIL.java
|
||||
index 32ddd4e07..7565798f7 100644
|
||||
--- a/src/java/com/android/internal/telephony/RIL.java
|
||||
+++ b/src/java/com/android/internal/telephony/RIL.java
|
||||
@@ -504,7 +504,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
|
||||
mRadioProxyCookie.incrementAndGet());
|
||||
mRadioProxy.setResponseFunctions(mRadioResponse, mRadioIndication);
|
||||
} else {
|
||||
- mDisabledRadioServices.add(mPhoneId);
|
||||
+ //mDisabledRadioServices.add(mPhoneId);
|
||||
riljLoge("getRadioProxy: mRadioProxy for "
|
||||
+ HIDL_SERVICE_NAME[mPhoneId] + " is disabled");
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user