Merge "Do not magnify if surface control is not set" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-04-26 03:22:29 +00:00
committed by Android (Google) Code Review

View File

@@ -922,6 +922,10 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
* @return Whether this WindowContainer should be magnified by the accessibility magnifier.
*/
boolean shouldMagnify() {
if (mSurfaceControl == null) {
return false;
}
for (int i = 0; i < mChildren.size(); i++) {
if (!mChildren.get(i).shouldMagnify()) {
return false;