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
2018-05-07 17:31:40 -07:00
parent c247a00e22
commit 59d086c3ce
9 changed files with 151 additions and 19 deletions

View File

@@ -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);
}