1 package com.android.internal.util;
2 
3 import android.content.res.Resources;
4 import android.os.Build;
5 import android.os.SystemProperties;
6 import android.view.ViewRootImpl;
7 
8 /**
9  * @hide
10  */
11 public 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      */
getWindowOutsetBottomPx(Resources resources)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