Merge "When a Virtual Display is plugged in, we create a corresponding surface whose mutation should be owned by mSyncRoot(Owned by DisplayManagerService). However, there is an operation of getting the defaultSize of this Display which is performed without honouring the mSyncRoot." into tm-dev

This commit is contained in:
Rupesh Bansal
2022-03-24 11:57:11 +00:00
committed by Android (Google) Code Review
3 changed files with 3 additions and 3 deletions

View File

@@ -131,7 +131,7 @@ abstract class DisplayDevice {
* Only used for mirroring started from MediaProjection.
*/
@Nullable
public Point getDisplaySurfaceDefaultSize() {
public Point getDisplaySurfaceDefaultSizeLocked() {
return null;
}

View File

@@ -3880,8 +3880,8 @@ public final class DisplayManagerService extends SystemService {
if (device == null) {
return null;
}
return device.getDisplaySurfaceDefaultSizeLocked();
}
return device.getDisplaySurfaceDefaultSize();
}
@Override

View File

@@ -302,7 +302,7 @@ public class VirtualDisplayAdapter extends DisplayAdapter {
}
@Override
public Point getDisplaySurfaceDefaultSize() {
public Point getDisplaySurfaceDefaultSizeLocked() {
if (mSurface == null) {
return null;
}