1package com.android.internal.util;
2
3import android.content.res.Resources;
4import android.os.Build;
5import android.os.SystemProperties;
6import android.view.ViewRootImpl;
7
8/**
9 * @hide
10 */
11public class ScreenShapeHelper {
12    /**
13     * Return the bottom pixel window outset of a window given its style attributes.
14     * @return An outset dimension in pixels or 0 if no outset should be applied.
15     */
16    public static int getWindowOutsetBottomPx(Resources resources) {
17        if (Build.IS_EMULATOR) {
18            return SystemProperties.getInt(ViewRootImpl.PROPERTY_EMULATOR_WIN_OUTSET_BOTTOM_PX, 0);
19        } else {
20            return resources.getInteger(com.android.internal.R.integer.config_windowOutsetBottom);
21        }
22    }
23}
24