From 01f280d376218c5a007fc29f70b876375ad24204 Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Mon, 18 May 2015 16:07:42 -0700 Subject: Migrate uses of config_windowIsRound to Configuration.isScreenRound Move existing code that previously relied on config_windowIsRound to use the new Configuration.isScreenRound() method. Also move the system property override for emulators over to the initial setup of a Display so that the configuration property is consistent with existing expectations. Remove config_windowIsRound from symbols.xml. The symbol now only exists as a default value redirect for overlays already configured to supply this value. Change-Id: I24e6564030a6051c3ac7262868983b43e13eee65 --- services/core/java/com/android/server/wm/AccessibilityController.java | 3 +-- services/core/java/com/android/server/wm/WindowManagerService.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'services/core/java/com/android/server/wm') diff --git a/services/core/java/com/android/server/wm/AccessibilityController.java b/services/core/java/com/android/server/wm/AccessibilityController.java index 91ce739..482ae24 100644 --- a/services/core/java/com/android/server/wm/AccessibilityController.java +++ b/services/core/java/com/android/server/wm/AccessibilityController.java @@ -432,8 +432,7 @@ final class AccessibilityController { mDrawBorderInset = (int) mBorderWidth / 2; mWindow = new ViewportWindow(mContext); - if (mContext.getResources().getBoolean( - com.android.internal.R.bool.config_windowIsRound)) { + if (mContext.getResources().getConfiguration().isScreenRound()) { mCircularPath = new Path(); mWindowManager.getDefaultDisplay().getRealSize(mTempPoint); final int centerXY = mTempPoint.x / 2; diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index e43861c..d94f5d9 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -5923,8 +5923,7 @@ public class WindowManagerService extends IWindowManager.Stub public void updateCircularDisplayMaskIfNeeded() { // we're fullscreen and not hosted in an ActivityView - if (mContext.getResources().getBoolean( - com.android.internal.R.bool.config_windowIsRound) + if (mContext.getResources().getConfiguration().isScreenRound() && mContext.getResources().getBoolean( com.android.internal.R.bool.config_windowShowCircularMask)) { // Device configuration calls for a circular display mask, but we only enable the mask -- cgit v1.1