Merge "[DO NOT MERGE] Fixed NPE when trying to animate a window without display" into lmp-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f61aee97ad
@ -824,12 +824,16 @@ public class WindowAnimator {
|
|||||||
if (displayId < 0) {
|
if (displayId < 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return mService.getDisplayContentLocked(displayId).pendingLayoutChanges;
|
DisplayContent displayContent = mService.getDisplayContentLocked(displayId);
|
||||||
|
return (displayContent != null) ? displayContent.pendingLayoutChanges : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setPendingLayoutChanges(final int displayId, final int changes) {
|
void setPendingLayoutChanges(final int displayId, final int changes) {
|
||||||
if (displayId >= 0) {
|
if (displayId >= 0) {
|
||||||
mService.getDisplayContentLocked(displayId).pendingLayoutChanges |= changes;
|
DisplayContent displayContent = mService.getDisplayContentLocked(displayId);
|
||||||
|
if (displayContent != null) {
|
||||||
|
displayContent.pendingLayoutChanges |= changes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user