mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 19:38:21 +00:00
Revert "Revert "Moving DeviceProfile properties into DevicePrope..."
Revert submission 33716851-revert-33672643-DataDeviceProfile1-XHYRAPLEBK Reason for revert: Error is fixed Reverted changes: /q/submissionid:33716851-revert-33672643-DataDeviceProfile1-XHYRAPLEBK Change-Id: Ib86824134955903c11e51e52dbfd6368aba1cd50
This commit is contained in:
committed by
Sebastian Franco
parent
1bec329180
commit
e1d31e5406
@@ -534,7 +534,7 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
}
|
||||
|
||||
private boolean isTwoPanelEnabled() {
|
||||
return !FOLDABLE_SINGLE_PAGE.get() && mLauncher.mDeviceProfile.isTwoPanels;
|
||||
return !FOLDABLE_SINGLE_PAGE.get() && mLauncher.mDeviceProfile.getDeviceProperties().isTwoPanels();
|
||||
}
|
||||
|
||||
public void deferRemoveExtraEmptyScreen() {
|
||||
@@ -692,7 +692,7 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
// created CellLayout.
|
||||
DeviceProfile dp = mLauncher.getDeviceProfile();
|
||||
CellLayout newScreen;
|
||||
if (FOLDABLE_SINGLE_PAGE.get() && dp.isTwoPanels) {
|
||||
if (FOLDABLE_SINGLE_PAGE.get() && dp.getDeviceProperties().isTwoPanels()) {
|
||||
newScreen = (CellLayout) LayoutInflater.from(getContext()).inflate(
|
||||
R.layout.workspace_screen_foldable, this, false /* attachToRoot */);
|
||||
} else {
|
||||
@@ -3443,13 +3443,13 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
@Override
|
||||
public int getExpectedHeight() {
|
||||
return getMeasuredHeight() <= 0 || !mIsLayoutValid
|
||||
? mLauncher.getDeviceProfile().heightPx : getMeasuredHeight();
|
||||
? mLauncher.getDeviceProfile().getDeviceProperties().getHeightPx() : getMeasuredHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getExpectedWidth() {
|
||||
return getMeasuredWidth() <= 0 || !mIsLayoutValid
|
||||
? mLauncher.getDeviceProfile().widthPx : getMeasuredWidth();
|
||||
? mLauncher.getDeviceProfile().getDeviceProperties().getWidthPx() : getMeasuredWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -3515,12 +3515,12 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
@Override
|
||||
protected boolean isSignificantMove(float absoluteDelta, int pageOrientedSize) {
|
||||
DeviceProfile deviceProfile = mLauncher.getDeviceProfile();
|
||||
if (!deviceProfile.isTablet) {
|
||||
if (!deviceProfile.getDeviceProperties().isTablet()) {
|
||||
return super.isSignificantMove(absoluteDelta, pageOrientedSize);
|
||||
}
|
||||
|
||||
return absoluteDelta
|
||||
> deviceProfile.availableWidthPx * SIGNIFICANT_MOVE_SCREEN_WIDTH_PERCENTAGE;
|
||||
> deviceProfile.getDeviceProperties().getAvailableWidthPx() * SIGNIFICANT_MOVE_SCREEN_WIDTH_PERCENTAGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user