use of android.view.WindowManagerPolicy in project android_frameworks_base by ParanoidAndroid.
the class DisplayMagnifier method getMagnificationSpecForWindowLocked.
public MagnificationSpec getMagnificationSpecForWindowLocked(WindowState windowState) {
MagnificationSpec spec = mMagnifedViewport.getMagnificationSpecLocked();
if (spec != null && !spec.isNop()) {
WindowManagerPolicy policy = mWindowManagerService.mPolicy;
final int windowType = windowState.mAttrs.type;
if (!policy.isTopLevelWindow(windowType) && windowState.mAttachedWindow != null && !policy.canMagnifyWindow(windowType)) {
return null;
}
if (!policy.canMagnifyWindow(windowState.mAttrs.type)) {
return null;
}
}
return spec;
}
Aggregations