diff options
author | Filip Gruszczynski <gruszczy@google.com> | 2015-03-25 23:41:15 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-03-25 23:41:15 +0000 |
commit | 1c6bfd69442e91458bb5c10490d0cff579f47e06 (patch) | |
tree | 5a67fc36833f8589d8eb209d047c71930025bef1 | |
parent | dfb1c2f2053d233cb1bed17b77bbebceb246f3f5 (diff) | |
parent | 70ef3af8d953091e3595de63a9a2f68a064c2352 (diff) | |
download | frameworks_base-1c6bfd69442e91458bb5c10490d0cff579f47e06.zip frameworks_base-1c6bfd69442e91458bb5c10490d0cff579f47e06.tar.gz frameworks_base-1c6bfd69442e91458bb5c10490d0cff579f47e06.tar.bz2 |
am 70ef3af8: am 2493d947: am 9001f14b: Merge "Don\'t use windowOutsetBottom for insets, depend on display padding only." into lmp-mr1-modular-dev
* commit '70ef3af8d953091e3595de63a9a2f68a064c2352':
Don't use windowOutsetBottom for insets, depend on display padding only.
-rw-r--r-- | core/java/android/service/wallpaper/WallpaperService.java | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java index d46b6f5..1674950 100644 --- a/core/java/android/service/wallpaper/WallpaperService.java +++ b/core/java/android/service/wallpaper/WallpaperService.java @@ -155,7 +155,6 @@ public abstract class WallpaperService extends Service { WindowManager.LayoutParams.PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS; int mCurWindowFlags = mWindowFlags; int mCurWindowPrivateFlags = mWindowPrivateFlags; - int mOutsetBottomPx; final Rect mVisibleInsets = new Rect(); final Rect mWinFrame = new Rect(); final Rect mOverscanInsets = new Rect(); @@ -624,18 +623,9 @@ public abstract class WallpaperService extends Service { mLayout.token = mWindowToken; if (!mCreated) { - // Retrieve watch round and outset info - final WindowManager windowService = (WindowManager)getSystemService( - Context.WINDOW_SERVICE); + // Retrieve watch round info TypedArray windowStyle = obtainStyledAttributes( com.android.internal.R.styleable.Window); - final Display display = windowService.getDefaultDisplay(); - final boolean shouldUseBottomOutset = - display.getDisplayId() == Display.DEFAULT_DISPLAY; - if (shouldUseBottomOutset) { - mOutsetBottomPx = ScreenShapeHelper.getWindowOutsetBottomPx( - getResources().getDisplayMetrics(), windowStyle); - } mWindowIsRound = ScreenShapeHelper.getWindowIsRound(getResources()); windowStyle.recycle(); @@ -770,10 +760,7 @@ public abstract class WallpaperService extends Service { mDispatchedStableInsets.set(mStableInsets); mFinalSystemInsets.set(mDispatchedOverscanInsets); mFinalStableInsets.set(mDispatchedStableInsets); - if (mOutsetBottomPx != 0) { - mFinalSystemInsets.bottom = - mIWallpaperEngine.mDisplayPadding.bottom + mOutsetBottomPx; - } + mFinalSystemInsets.bottom = mIWallpaperEngine.mDisplayPadding.bottom; WindowInsets insets = new WindowInsets(mFinalSystemInsets, null, mFinalStableInsets, mWindowIsRound); onApplyWindowInsets(insets); |