diff options
| author | 2022-03-03 08:37:14 +0000 | |
|---|---|---|
| committer | 2022-03-03 08:37:14 +0000 | |
| commit | e86712717440851181710b90d54d6d78a48c0bee (patch) | |
| tree | d5c5d42f56dcaeb758032a9e5d2aaec1ec381759 | |
| parent | 8c5abbc81a2868390e1b549adebc846b7aebe327 (diff) | |
| parent | 9a7444cec53a51bfc374cef430d39d4dfdd2c784 (diff) | |
Merge "Keep custom keep-clear Rects if preferKeepClear is set" into tm-dev
| -rw-r--r-- | core/java/android/view/View.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 8b3a29a7aa6f..b49e075cb710 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -11807,8 +11807,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * <p> * The system will try to respect this preference, but when not possible will ignore it. * <p> - * Note: while this is set to {@code true}, the system will ignore the {@code Rect}s provided - * through {@link #setPreferKeepClearRects} (but not clear them). + * Note: This is independent from {@link #setPreferKeepClearRects}. If both are set, both will + * be taken into account. * <p> * @see #setPreferKeepClearRects * @see #isPreferKeepClear @@ -11842,8 +11842,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * <p> * The system will try to respect this preference, but when not possible will ignore it. * <p> - * Note: While {@link #isPreferKeepClear} is {@code true}, the {@code Rect}s set here are - * ignored. + * Note: This is independent from {@link #setPreferKeepClear}. If both are set, both will be + * taken into account. * <p> * @see #setPreferKeepClear * @see #getPreferKeepClearRects @@ -11939,7 +11939,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, final List<Rect> list = new ArrayList(); if (info.mPreferKeepClear) { list.add(new Rect(0, 0, getWidth(), getHeight())); - } else if (info.mKeepClearRects != null) { + } + if (info.mKeepClearRects != null) { list.addAll(info.mKeepClearRects); } return list; |