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. Bug: 211153738 Test: Manual Change-Id: I5bedf0f25dc4635d828b96312f7f799fb9ed321c
This commit is contained in:
@@ -131,7 +131,7 @@ abstract class DisplayDevice {
|
||||
* Only used for mirroring started from MediaProjection.
|
||||
*/
|
||||
@Nullable
|
||||
public Point getDisplaySurfaceDefaultSize() {
|
||||
public Point getDisplaySurfaceDefaultSizeLocked() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -3880,8 +3880,8 @@ public final class DisplayManagerService extends SystemService {
|
||||
if (device == null) {
|
||||
return null;
|
||||
}
|
||||
return device.getDisplaySurfaceDefaultSizeLocked();
|
||||
}
|
||||
return device.getDisplaySurfaceDefaultSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -302,7 +302,7 @@ public class VirtualDisplayAdapter extends DisplayAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Point getDisplaySurfaceDefaultSize() {
|
||||
public Point getDisplaySurfaceDefaultSizeLocked() {
|
||||
if (mSurface == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user