Search in sources :

Example 1 with WindowManagerPolicy

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;
}
Also used : MagnificationSpec(android.view.MagnificationSpec) WindowManagerPolicy(android.view.WindowManagerPolicy) Point(android.graphics.Point) Paint(android.graphics.Paint)

Aggregations

Paint (android.graphics.Paint)1 Point (android.graphics.Point)1 MagnificationSpec (android.view.MagnificationSpec)1 WindowManagerPolicy (android.view.WindowManagerPolicy)1