summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-05-21 08:47:45 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-05-21 08:47:45 +0000
commitd3e714dc6f8f11362158f6e7d8ad77c60ccd25ac (patch)
tree13ae8fad648430d4f549cf8329d214621733c08e
parentc36bde949e42c28f2bd040f8c2912db96689481f (diff)
parentf7a3eb3ada8ff6c6f1f59a76f748467918f0458d (diff)
downloadnative-d3e714dc6f8f11362158f6e7d8ad77c60ccd25ac.tar.gz
Merge cherrypicks of [11569582, 11569838, 11569699, 11569700, 11569701, 11569703, 11569839, 11569840, 11569841, 11569842, 11569759, 11569760, 11569843, 11569938, 11569522, 11569642, 11569643, 11569644, 11569958, 11569959, 11569584, 11569585, 11569586, 11569587, 11569645, 11569646, 11570018] into qt-d4-releaseandroid-10.0.0_r45android-10.0.0_r44android10-d4-release
Change-Id: I3edf69898315c750a7a94a9692b7470193c9dafc
-rw-r--r--services/surfaceflinger/Client.cpp5
-rw-r--r--services/surfaceflinger/RegionSamplingThread.cpp7
2 files changed, 4 insertions, 8 deletions
diff --git a/services/surfaceflinger/Client.cpp b/services/surfaceflinger/Client.cpp
index 6bfd302b5c..c526f7f18f 100644
--- a/services/surfaceflinger/Client.cpp
+++ b/services/surfaceflinger/Client.cpp
@@ -88,11 +88,6 @@ status_t Client::createWithSurfaceParent(const String8& name, uint32_t w, uint32
sp<IGraphicBufferProducer>* gbp) {
if (mFlinger->authenticateSurfaceTexture(parent) == false) {
ALOGE("failed to authenticate surface texture");
- // The extra parent layer check below before returning is to help with debugging
- // b/134888387. Once the bug is fixed the check can be deleted.
- if ((static_cast<MonitoredProducer*>(parent.get()))->getLayer() == nullptr) {
- ALOGE("failed to find parent layer");
- }
return BAD_VALUE;
}
diff --git a/services/surfaceflinger/RegionSamplingThread.cpp b/services/surfaceflinger/RegionSamplingThread.cpp
index 07fdead310..80da154278 100644
--- a/services/surfaceflinger/RegionSamplingThread.cpp
+++ b/services/surfaceflinger/RegionSamplingThread.cpp
@@ -200,9 +200,10 @@ RegionSamplingThread::~RegionSamplingThread() {
void RegionSamplingThread::addListener(const Rect& samplingArea, const sp<IBinder>& stopLayerHandle,
const sp<IRegionSamplingListener>& listener) {
- wp<Layer> stopLayer = stopLayerHandle != nullptr
- ? static_cast<Layer::Handle*>(stopLayerHandle.get())->owner
- : nullptr;
+ wp<Layer> stopLayer;
+ if (stopLayerHandle != nullptr && stopLayerHandle->localBinder() != nullptr) {
+ stopLayer = static_cast<Layer::Handle*>(stopLayerHandle.get())->owner;
+ }
sp<IBinder> asBinder = IInterface::asBinder(listener);
asBinder->linkToDeath(this);