mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user