mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Revert "Moving DeviceProfile properties into DeviceProperties da..."
Revert submission 33672643-DataDeviceProfile1 Reason for revert: Droidmonitor created revert due to b/419867875. Will be verifying through ABTD before submission. Fix: 419867875 Reverted changes: /q/submissionid:33672643-DataDeviceProfile1 Change-Id: Icb66aefbbcee24e05806b2139923e1f2ea1c65e3
This commit is contained in:
committed by
Android (Google) Code Review
parent
e1111e28c2
commit
7705e92d93
@@ -534,7 +534,7 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
|
||||
}
|
||||
|
||||
private boolean isTwoPanelEnabled() {
|
||||
return !FOLDABLE_SINGLE_PAGE.get() && mLauncher.mDeviceProfile.getDeviceProperties().isTwoPanels();
|
||||
return !FOLDABLE_SINGLE_PAGE.get() && mLauncher.mDeviceProfile.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.getDeviceProperties().isTwoPanels()) {
|
||||
if (FOLDABLE_SINGLE_PAGE.get() && dp.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().getDeviceProperties().getHeightPx() : getMeasuredHeight();
|
||||
? mLauncher.getDeviceProfile().heightPx : getMeasuredHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getExpectedWidth() {
|
||||
return getMeasuredWidth() <= 0 || !mIsLayoutValid
|
||||
? mLauncher.getDeviceProfile().getDeviceProperties().getWidthPx() : getMeasuredWidth();
|
||||
? mLauncher.getDeviceProfile().widthPx : 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.getDeviceProperties().isTablet()) {
|
||||
if (!deviceProfile.isTablet) {
|
||||
return super.isSignificantMove(absoluteDelta, pageOrientedSize);
|
||||
}
|
||||
|
||||
return absoluteDelta
|
||||
> deviceProfile.getDeviceProperties().getAvailableWidthPx() * SIGNIFICANT_MOVE_SCREEN_WIDTH_PERCENTAGE;
|
||||
> deviceProfile.availableWidthPx * SIGNIFICANT_MOVE_SCREEN_WIDTH_PERCENTAGE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user