From 7f09ce1a238ad5a647da913e275fd637ac75ab49 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Thu, 8 Jun 2017 13:20:08 -0700 Subject: Fixed a bug where systemui could crash while cloning Because cloning wasn't synchronized, the notification could become a non-root temporarily which in turn could lead to a crash. 1. We're now properly synchronizing the cloning, such that this can't happen anymore 2. We're now only cloning the old statusbar notification lightly instead of heavily to avoid this altogether Test: manual, update decoratedcustomview notifications really fast Change-Id: Ia6525eec64ad9a26956ca2198e20198f55b2173c Fixes: 62181033 --- core/java/android/widget/RemoteViews.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/java/android/widget/RemoteViews.java') diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java index e534233432d2..7117137ce2f8 100644 --- a/core/java/android/widget/RemoteViews.java +++ b/core/java/android/widget/RemoteViews.java @@ -2342,7 +2342,7 @@ public class RemoteViews implements Parcelable, Filter { } - public RemoteViews clone() { + public synchronized RemoteViews clone() { Preconditions.checkState(mIsRoot, "RemoteView has been attached to another RemoteView. " + "May only clone the root of a RemoteView hierarchy."); -- cgit v1.2.3