Loading core/java/android/service/wallpaper/WallpaperService.java +2 −4 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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 Loading Loading @@ -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); } Loading core/java/android/view/ViewRootImpl.java +2 −5 Original line number Diff line number Diff line Loading @@ -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"; Loading Loading @@ -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. */ Loading Loading @@ -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) { Loading Loading @@ -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; } Loading core/java/com/android/internal/util/ScreenShapeHelper.java +0 −12 Original line number Diff line number Diff line Loading @@ -33,16 +33,4 @@ public class ScreenShapeHelper { } return 0; } /** * Get whether a device has has a round screen. */ public static boolean getWindowIsRound(Resources resources) { if (IS_EMULATOR) { return SystemProperties.getBoolean(ViewRootImpl.PROPERTY_EMULATOR_CIRCULAR, false); } else { return resources.getBoolean( com.android.internal.R.bool.config_windowIsRound); } } } core/res/res/values/symbols.xml +0 −1 Original line number Diff line number Diff line Loading @@ -294,7 +294,6 @@ <java-symbol type="bool" name="config_wifi_batched_scan_supported" /> <java-symbol type="bool" name="config_enableMultiUserUI"/> <java-symbol type="bool" name="config_disableUsbPermissionDialogs"/> <java-symbol type="bool" name="config_windowIsRound" /> <java-symbol type="bool" name="config_hasRecents" /> <java-symbol type="bool" name="config_windowShowCircularMask" /> <java-symbol type="bool" name="config_windowEnableCircularEmulatorDisplayOverlay" /> Loading services/core/java/com/android/server/display/LocalDisplayAdapter.java +6 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.server.display; import android.content.res.Resources; import android.os.Build; import com.android.server.LocalServices; import com.android.server.lights.Light; import com.android.server.lights.LightsManager; Loading Loading @@ -50,6 +51,8 @@ final class LocalDisplayAdapter extends DisplayAdapter { private static final String UNIQUE_ID_PREFIX = "local:"; private static final String PROPERTY_EMULATOR_CIRCULAR = "ro.emulator.circular"; private static final int[] BUILT_IN_DISPLAY_IDS_TO_SCAN = new int[] { SurfaceControl.BUILT_IN_DISPLAY_ID_MAIN, SurfaceControl.BUILT_IN_DISPLAY_ID_HDMI, Loading Loading @@ -273,8 +276,9 @@ final class LocalDisplayAdapter extends DisplayAdapter { com.android.internal.R.string.display_manager_built_in_display_name); mInfo.flags |= DisplayDeviceInfo.FLAG_DEFAULT_DISPLAY | DisplayDeviceInfo.FLAG_ROTATES_WITH_CONTENT; if (res.getBoolean( com.android.internal.R.bool.config_mainBuiltInDisplayIsRound)) { if (res.getBoolean(com.android.internal.R.bool.config_mainBuiltInDisplayIsRound) || (Build.HARDWARE.contains("goldfish") && SystemProperties.getBoolean(PROPERTY_EMULATOR_CIRCULAR, false))) { mInfo.flags |= DisplayDeviceInfo.FLAG_ROUND; } mInfo.type = Display.TYPE_BUILT_IN; Loading Loading
core/java/android/service/wallpaper/WallpaperService.java +2 −4 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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 Loading Loading @@ -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); } Loading
core/java/android/view/ViewRootImpl.java +2 −5 Original line number Diff line number Diff line Loading @@ -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"; Loading Loading @@ -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. */ Loading Loading @@ -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) { Loading Loading @@ -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; } Loading
core/java/com/android/internal/util/ScreenShapeHelper.java +0 −12 Original line number Diff line number Diff line Loading @@ -33,16 +33,4 @@ public class ScreenShapeHelper { } return 0; } /** * Get whether a device has has a round screen. */ public static boolean getWindowIsRound(Resources resources) { if (IS_EMULATOR) { return SystemProperties.getBoolean(ViewRootImpl.PROPERTY_EMULATOR_CIRCULAR, false); } else { return resources.getBoolean( com.android.internal.R.bool.config_windowIsRound); } } }
core/res/res/values/symbols.xml +0 −1 Original line number Diff line number Diff line Loading @@ -294,7 +294,6 @@ <java-symbol type="bool" name="config_wifi_batched_scan_supported" /> <java-symbol type="bool" name="config_enableMultiUserUI"/> <java-symbol type="bool" name="config_disableUsbPermissionDialogs"/> <java-symbol type="bool" name="config_windowIsRound" /> <java-symbol type="bool" name="config_hasRecents" /> <java-symbol type="bool" name="config_windowShowCircularMask" /> <java-symbol type="bool" name="config_windowEnableCircularEmulatorDisplayOverlay" /> Loading
services/core/java/com/android/server/display/LocalDisplayAdapter.java +6 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.server.display; import android.content.res.Resources; import android.os.Build; import com.android.server.LocalServices; import com.android.server.lights.Light; import com.android.server.lights.LightsManager; Loading Loading @@ -50,6 +51,8 @@ final class LocalDisplayAdapter extends DisplayAdapter { private static final String UNIQUE_ID_PREFIX = "local:"; private static final String PROPERTY_EMULATOR_CIRCULAR = "ro.emulator.circular"; private static final int[] BUILT_IN_DISPLAY_IDS_TO_SCAN = new int[] { SurfaceControl.BUILT_IN_DISPLAY_ID_MAIN, SurfaceControl.BUILT_IN_DISPLAY_ID_HDMI, Loading Loading @@ -273,8 +276,9 @@ final class LocalDisplayAdapter extends DisplayAdapter { com.android.internal.R.string.display_manager_built_in_display_name); mInfo.flags |= DisplayDeviceInfo.FLAG_DEFAULT_DISPLAY | DisplayDeviceInfo.FLAG_ROTATES_WITH_CONTENT; if (res.getBoolean( com.android.internal.R.bool.config_mainBuiltInDisplayIsRound)) { if (res.getBoolean(com.android.internal.R.bool.config_mainBuiltInDisplayIsRound) || (Build.HARDWARE.contains("goldfish") && SystemProperties.getBoolean(PROPERTY_EMULATOR_CIRCULAR, false))) { mInfo.flags |= DisplayDeviceInfo.FLAG_ROUND; } mInfo.type = Display.TYPE_BUILT_IN; Loading