summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2017-06-08 13:20:08 -0700
committerSelim Cinek <cinek@google.com>2017-06-08 13:31:26 -0700
commit7f09ce1a238ad5a647da913e275fd637ac75ab49 (patch)
tree9870650aa8623c901ed15a858fef4d3e27115c12 /core/java
parentbeba1bf936e62da9a0add95e29e0e146adc03f52 (diff)
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
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/widget/RemoteViews.java2
1 files changed, 1 insertions, 1 deletions
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.");