diff options
| author | Griff Hazen <griff@google.com> | 2015-03-23 16:34:11 -0700 |
|---|---|---|
| committer | Griff Hazen <griff@google.com> | 2015-03-23 16:34:11 -0700 |
| commit | daf5c0ebd0aa4f73fcf2c9fecd8ce9d36e3db4fc (patch) | |
| tree | 4b3abb201211720a5967e65aa8cabe46dd36b45c /core/java/android/view/ViewRootImpl.java | |
| parent | 8a9225eb94ace75761ce6a3956f1eeef0b9897c1 (diff) | |
| parent | 583c7c569b7cdf7d334ead83e45fbc67bb2c7313 (diff) | |
| download | frameworks_base-daf5c0ebd0aa4f73fcf2c9fecd8ce9d36e3db4fc.zip frameworks_base-daf5c0ebd0aa4f73fcf2c9fecd8ce9d36e3db4fc.tar.gz frameworks_base-daf5c0ebd0aa4f73fcf2c9fecd8ce9d36e3db4fc.tar.bz2 | |
Merge commit '583c7c56' into master
Change-Id: I89c2c63005fbb6b1c058b2022f4469be5244505f
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index e790d4c..234de40 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -40,7 +40,6 @@ import android.hardware.display.DisplayManager; import android.hardware.display.DisplayManager.DisplayListener; import android.media.AudioManager; import android.os.Binder; -import android.os.Build; import android.os.Bundle; import android.os.Debug; import android.os.Handler; @@ -77,6 +76,7 @@ import android.widget.Scroller; import com.android.internal.R; import com.android.internal.os.SomeArgs; +import com.android.internal.util.ScreenShapeHelper; import com.android.internal.view.BaseSurfaceHolder; import com.android.internal.view.RootViewSurfaceTaker; @@ -120,8 +120,10 @@ public final class ViewRootImpl implements ViewParent, private static final String PROPERTY_PROFILE_RENDERING = "viewroot.profile_rendering"; private static final String PROPERTY_MEDIA_DISABLED = "config.disable_media"; - // property used by emulator to determine display shape + // properties used by emulator to determine display shape public static final String PROPERTY_EMULATOR_CIRCULAR = "ro.emulator.circular"; + public static final String PROPERTY_EMULATOR_WIN_OUTSET_BOTTOM_PX = + "ro.emu.win_outset_bottom_px"; /** * Maximum time we allow the user to roll the trackball enough to generate @@ -334,8 +336,6 @@ public final class ViewRootImpl implements ViewParent, /** Set to true once doDie() has been called. */ private boolean mRemoved; - private boolean mIsEmulator; - private boolean mIsCircularEmulator; private final boolean mWindowIsRound; /** @@ -392,8 +392,7 @@ public final class ViewRootImpl implements ViewParent, mChoreographer = Choreographer.getInstance(); mDisplayManager = (DisplayManager)context.getSystemService(Context.DISPLAY_SERVICE); loadSystemProperties(); - mWindowIsRound = context.getResources().getBoolean( - com.android.internal.R.bool.config_windowIsRound); + mWindowIsRound = ScreenShapeHelper.getWindowIsRound(context.getResources()); } public static void addFirstDrawHandler(Runnable callback) { @@ -1248,9 +1247,8 @@ public final class ViewRootImpl implements ViewParent, contentInsets = mPendingContentInsets; stableInsets = mPendingStableInsets; } - final boolean isRound = (mIsEmulator && mIsCircularEmulator) || mWindowIsRound; mLastWindowInsets = new WindowInsets(contentInsets, - null /* windowDecorInsets */, stableInsets, isRound); + null /* windowDecorInsets */, stableInsets, mWindowIsRound); } return mLastWindowInsets; } @@ -5590,11 +5588,6 @@ public final class ViewRootImpl implements ViewParent, mHandler.sendEmptyMessageDelayed(MSG_INVALIDATE_WORLD, 200); } } - - // detect emulator - mIsEmulator = Build.HARDWARE.contains("goldfish"); - mIsCircularEmulator = - SystemProperties.getBoolean(PROPERTY_EMULATOR_CIRCULAR, false); } }); } |
