summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/gui/ISurfaceComposer.cpp4
-rw-r--r--libs/gui/LayerState.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index 6c9d81ab57..9590df7c8f 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -88,7 +88,7 @@ public:
data.writeStrongBinder(applyToken);
commands.write(data);
data.writeInt64(desiredPresentTime);
- data.writeWeakBinder(uncacheBuffer.token);
+ data.writeStrongBinder(uncacheBuffer.token.promote());
data.writeUint64(uncacheBuffer.id);
if (data.writeVectorSize(listenerCallbacks) == NO_ERROR) {
@@ -1035,7 +1035,7 @@ status_t BnSurfaceComposer::onTransact(
int64_t desiredPresentTime = data.readInt64();
client_cache_t uncachedBuffer;
- uncachedBuffer.token = data.readWeakBinder();
+ uncachedBuffer.token = data.readStrongBinder();
uncachedBuffer.id = data.readUint64();
std::vector<ListenerCallbacks> listenerCallbacks;
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 6066421faf..42eb9213d6 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -87,7 +87,7 @@ status_t layer_state_t::write(Parcel& output) const
colorTransform.asArray(), 16 * sizeof(float));
output.writeFloat(cornerRadius);
output.writeBool(hasListenerCallbacks);
- output.writeWeakBinder(cachedBuffer.token);
+ output.writeStrongBinder(cachedBuffer.token.promote());
output.writeUint64(cachedBuffer.id);
output.writeParcelable(metadata);
@@ -157,7 +157,7 @@ status_t layer_state_t::read(const Parcel& input)
colorTransform = mat4(static_cast<const float*>(input.readInplace(16 * sizeof(float))));
cornerRadius = input.readFloat();
hasListenerCallbacks = input.readBool();
- cachedBuffer.token = input.readWeakBinder();
+ cachedBuffer.token = input.readStrongBinder();
cachedBuffer.id = input.readUint64();
input.readParcelable(&metadata);