Merge "Make sure mParent is not null before using it" into sc-v2-dev am: 92b3fbcdb7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16182631 Change-Id: I1c3ffbd9a96a23314be35ec773893d847dfe2856
This commit is contained in:
@@ -20270,7 +20270,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
|||||||
*/
|
*/
|
||||||
@CallSuper
|
@CallSuper
|
||||||
protected void onAttachedToWindow() {
|
protected void onAttachedToWindow() {
|
||||||
if ((mPrivateFlags & PFLAG_REQUEST_TRANSPARENT_REGIONS) != 0) {
|
if (mParent != null && (mPrivateFlags & PFLAG_REQUEST_TRANSPARENT_REGIONS) != 0) {
|
||||||
mParent.requestTransparentRegion(this);
|
mParent.requestTransparentRegion(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25044,7 +25044,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
|||||||
|
|
||||||
View parent = this;
|
View parent = this;
|
||||||
|
|
||||||
while (parent.mParent != null && parent.mParent instanceof View) {
|
while (parent.mParent instanceof View) {
|
||||||
parent = (View) parent.mParent;
|
parent = (View) parent.mParent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user