Migrate to using DefaultDisplay
- Remove extra binder calls to get the default display
Bug: 140633033
Change-Id: I532645deac101a6065d90484b87a67b67aa717f5
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index aa02441..92e9509 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -500,6 +500,8 @@
// Load configuration-specific DeviceProfile
mDeviceProfile = idp.getDeviceProfile(this);
if (isInMultiWindowMode()) {
+ // Note: Calls to getSize() can't rely on our cached DefaultDisplay since it can return
+ // the app window size
Display display = getWindowManager().getDefaultDisplay();
Point mwSize = new Point();
display.getSize(mwSize);