diff options
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/service/wallpaper/WallpaperService.java | 6 | ||||
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 7 |
2 files changed, 4 insertions, 9 deletions
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java index 016541f..b93a4a5 100644 --- a/core/java/android/service/wallpaper/WallpaperService.java +++ b/core/java/android/service/wallpaper/WallpaperService.java @@ -168,8 +168,6 @@ public abstract class WallpaperService extends Service { final Rect mFinalStableInsets = new Rect(); final Configuration mConfiguration = new Configuration(); - private boolean mWindowIsRound; - final WindowManager.LayoutParams mLayout = new WindowManager.LayoutParams(); IWindowSession mSession; @@ -640,7 +638,6 @@ public abstract class WallpaperService extends Service { // Retrieve watch round info TypedArray windowStyle = obtainStyledAttributes( com.android.internal.R.styleable.Window); - mWindowIsRound = ScreenShapeHelper.getWindowIsRound(getResources()); windowStyle.recycle(); // Add window @@ -776,7 +773,8 @@ public abstract class WallpaperService extends Service { mFinalStableInsets.set(mDispatchedStableInsets); mFinalSystemInsets.bottom = mIWallpaperEngine.mDisplayPadding.bottom; WindowInsets insets = new WindowInsets(mFinalSystemInsets, - null, mFinalStableInsets, mWindowIsRound); + null, mFinalStableInsets, + getResources().getConfiguration().isScreenRound()); onApplyWindowInsets(insets); } diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index b7d902c..23f3b62 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -122,7 +122,6 @@ public final class ViewRootImpl implements ViewParent, private static final String PROPERTY_PROFILE_RENDERING = "viewroot.profile_rendering"; // 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"; @@ -341,8 +340,6 @@ public final class ViewRootImpl implements ViewParent, /** Set to true once doDie() has been called. */ private boolean mRemoved; - private final boolean mWindowIsRound; - /** * Consistency verifier for debugging purposes. */ @@ -397,7 +394,6 @@ public final class ViewRootImpl implements ViewParent, mChoreographer = Choreographer.getInstance(); mDisplayManager = (DisplayManager)context.getSystemService(Context.DISPLAY_SERVICE); loadSystemProperties(); - mWindowIsRound = ScreenShapeHelper.getWindowIsRound(context.getResources()); } public static void addFirstDrawHandler(Runnable callback) { @@ -1271,7 +1267,8 @@ public final class ViewRootImpl implements ViewParent, stableInsets = mPendingStableInsets; } mLastWindowInsets = new WindowInsets(contentInsets, - null /* windowDecorInsets */, stableInsets, mWindowIsRound); + null /* windowDecorInsets */, stableInsets, + mContext.getResources().getConfiguration().isScreenRound()); } return mLastWindowInsets; } |
