Fix NPE in getCompatibleMagnificationSpecForWindow
The commit 179a6b0 forgot to change the returned result.
Note that if the "spec" is non-null, the old code will
cause the source spec of DisplayMagnifier to be cumulatively
multiplied and then become infinite scale.
Bug: 180050756
Test: Enable compat scale and TalkBack
Change-Id: I5a647d4129165021054631461fb97aef61def390
This commit is contained in:
@@ -7531,8 +7531,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
if (spec != null) {
|
||||
result.setTo(spec);
|
||||
}
|
||||
spec.scale *= windowState.mGlobalScale;
|
||||
return spec;
|
||||
result.scale *= windowState.mGlobalScale;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user