Merge "[wm] fix npe when removing trusted task overlays" into udc-qpr-dev
This commit is contained in:
@@ -8270,6 +8270,13 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
@Override
|
||||
public void addTrustedTaskOverlay(int taskId,
|
||||
SurfaceControlViewHost.SurfacePackage overlay) {
|
||||
if (overlay == null) {
|
||||
throw new IllegalArgumentException("Invalid overlay passed in for task=" + taskId);
|
||||
} else if (overlay.getSurfaceControl() == null
|
||||
|| !overlay.getSurfaceControl().isValid()) {
|
||||
throw new IllegalArgumentException(
|
||||
"Invalid overlay surfacecontrol passed in for task=" + taskId);
|
||||
}
|
||||
synchronized (mGlobalLock) {
|
||||
final Task task = mRoot.getRootTask(taskId);
|
||||
if (task == null) {
|
||||
@@ -8282,6 +8289,13 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
@Override
|
||||
public void removeTrustedTaskOverlay(int taskId,
|
||||
SurfaceControlViewHost.SurfacePackage overlay) {
|
||||
if (overlay == null) {
|
||||
throw new IllegalArgumentException("Invalid overlay passed in for task=" + taskId);
|
||||
} else if (overlay.getSurfaceControl() == null
|
||||
|| !overlay.getSurfaceControl().isValid()) {
|
||||
throw new IllegalArgumentException(
|
||||
"Invalid overlay surfacecontrol passed in for task=" + taskId);
|
||||
}
|
||||
synchronized (mGlobalLock) {
|
||||
final Task task = mRoot.getRootTask(taskId);
|
||||
if (task == null) {
|
||||
|
||||
Reference in New Issue
Block a user