Using surface rotation instead of insets to determine seascape configuration

Insets may not correctly indicate seascape configuration in multi-window or
when the presence of device-cutouts

Bug: 79376298
Change-Id: I8268efca0001fe527a0ffefe48cc71e774fad01c
This commit is contained in:
Sunny Goyal committed 2018-05-07 17:32:46 -07:00
1 parent c247a00e22
commit 59d086c3ce
9 files changed
+151 -19

No files matched your search

@@ -213,19 +213,6 @@ public abstract class BaseActivity extends Activity {
return mForceInvisible != 0;
}
/**
* Sets the device profile, adjusting it accordingly in case of multi-window
*/
protected void setDeviceProfile(DeviceProfile dp) {
mDeviceProfile = dp;
if (isInMultiWindowModeCompat()) {
Display display = getWindowManager().getDefaultDisplay();
Point mwSize = new Point();
display.getSize(mwSize);
mDeviceProfile = mDeviceProfile.getMultiWindowProfile(this, mwSize);
}
}
public interface MultiWindowModeChangedListener {
void onMultiWindowModeChanged(boolean isInMultiWindowMode);
}