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:
1 parent
1bec329180
commit
e1d31e5406
128 files changed
+727
-597
No files matched your search
@@ -207,7 +207,7 @@ public class InvariantDeviceProfile {
|
||||
public @StyleRes int allAppsStyle;
|
||||
|
||||
/**
|
||||
* Do not query directly. see {@link DeviceProfile#isScalableGrid}.
|
||||
* Do not query directly. see {@link deviceprofile#isScalableGrid}.
|
||||
*/
|
||||
protected boolean isScalable;
|
||||
@XmlRes
|
||||
@@ -488,14 +488,14 @@ public class InvariantDeviceProfile {
|
||||
|
||||
int numMinShownHotseatIconsForTablet = supportedProfiles
|
||||
.stream()
|
||||
.filter(deviceProfile -> deviceProfile.isTablet)
|
||||
.filter(deviceProfile -> deviceProfile.getDeviceProperties().isTablet())
|
||||
.mapToInt(deviceProfile -> deviceProfile.numShownHotseatIcons)
|
||||
.min()
|
||||
.orElse(0);
|
||||
|
||||
supportedProfiles
|
||||
.stream()
|
||||
.filter(deviceProfile -> deviceProfile.isTablet)
|
||||
.filter(deviceProfile -> deviceProfile.getDeviceProperties().isTablet())
|
||||
.forEach(deviceProfile -> {
|
||||
deviceProfile.numShownHotseatIcons = numMinShownHotseatIconsForTablet;
|
||||
deviceProfile.recalculateHotseatWidthAndBorderSpace();
|
||||
@@ -924,12 +924,12 @@ public class InvariantDeviceProfile {
|
||||
float minDiff = Float.MAX_VALUE;
|
||||
|
||||
for (DeviceProfile profile : supportedProfiles) {
|
||||
float diff = Math.abs(profile.widthPx - screenWidth)
|
||||
+ Math.abs(profile.heightPx - screenHeight);
|
||||
float diff = Math.abs(profile.getDeviceProperties().getWidthPx() - screenWidth)
|
||||
+ Math.abs(profile.getDeviceProperties().getHeightPx() - screenHeight);
|
||||
if (diff < minDiff) {
|
||||
minDiff = diff;
|
||||
bestMatch = profile;
|
||||
} else if (diff == minDiff && profile.rotationHint == rotation) {
|
||||
} else if (diff == minDiff && profile.getDeviceProperties().getRotationHint() == rotation) {
|
||||
bestMatch = profile;
|
||||
}
|
||||
}
|
||||
@@ -995,7 +995,7 @@ public class InvariantDeviceProfile {
|
||||
displayInfo.getDeviceType()), isLandscape);
|
||||
}
|
||||
|
||||
/** Class to expose properties required for external displays to {@link DeviceProfile} */
|
||||
/** Class to expose properties required for external displays to {@link deviceprofile} */
|
||||
public static final class DisplayOptionSpec {
|
||||
public final int typeIndex;
|
||||
public final int numShownHotseatIcons;
|
||||
|
||||
Reference in new issue
Block a user