Loading src/com/android/launcher3/model/DeviceGridState.java +1 −11 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCH import android.content.Context; import android.content.SharedPreferences; import android.text.TextUtils; import android.util.Log; import androidx.annotation.IntDef; Loading Loading @@ -135,17 +134,8 @@ public class DeviceGridState { public boolean isCompatible(DeviceGridState other) { if (this == other) return true; if (other == null) return false; boolean isCompatible = mNumHotseat == other.mNumHotseat return mNumHotseat == other.mNumHotseat && deviceTypeCompatible(mDeviceType, other.mDeviceType) && Objects.equals(mGridSizeString, other.mGridSizeString); // TODO(b/198965093): Temporary fix for multi-display devices, ignore hotseat size changes // and type compatibility. if ((mDeviceType == TYPE_MULTI_DISPLAY || other.mDeviceType == TYPE_MULTI_DISPLAY) && !isCompatible && Objects.equals(mGridSizeString, other.mGridSizeString)) { Log.d("b/198965093", "Hotseat and deice type compatibility ignored: " + this + ", other: " + other); isCompatible = true; } return isCompatible; } } src/com/android/launcher3/util/DisplayController.java +8 −0 Original line number Diff line number Diff line Loading @@ -257,6 +257,14 @@ public class DisplayController implements DisplayListener, ComponentCallbacks, S } if (!newInfo.supportedBounds.equals(oldInfo.supportedBounds)) { change |= CHANGE_SUPPORTED_BOUNDS; PortraitSize realSize = new PortraitSize(newInfo.currentSize.x, newInfo.currentSize.y); PortraitSize expectedSize = oldInfo.mInternalDisplays.get( ApiWrapper.getUniqueId(display)); if (!realSize.equals(expectedSize) && display.getState() == Display.STATE_OFF) { Log.e("b/198965093", "Display size changed while display is off, ignoring change"); return; } } if (change != 0) { Loading Loading
src/com/android/launcher3/model/DeviceGridState.java +1 −11 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCH import android.content.Context; import android.content.SharedPreferences; import android.text.TextUtils; import android.util.Log; import androidx.annotation.IntDef; Loading Loading @@ -135,17 +134,8 @@ public class DeviceGridState { public boolean isCompatible(DeviceGridState other) { if (this == other) return true; if (other == null) return false; boolean isCompatible = mNumHotseat == other.mNumHotseat return mNumHotseat == other.mNumHotseat && deviceTypeCompatible(mDeviceType, other.mDeviceType) && Objects.equals(mGridSizeString, other.mGridSizeString); // TODO(b/198965093): Temporary fix for multi-display devices, ignore hotseat size changes // and type compatibility. if ((mDeviceType == TYPE_MULTI_DISPLAY || other.mDeviceType == TYPE_MULTI_DISPLAY) && !isCompatible && Objects.equals(mGridSizeString, other.mGridSizeString)) { Log.d("b/198965093", "Hotseat and deice type compatibility ignored: " + this + ", other: " + other); isCompatible = true; } return isCompatible; } }
src/com/android/launcher3/util/DisplayController.java +8 −0 Original line number Diff line number Diff line Loading @@ -257,6 +257,14 @@ public class DisplayController implements DisplayListener, ComponentCallbacks, S } if (!newInfo.supportedBounds.equals(oldInfo.supportedBounds)) { change |= CHANGE_SUPPORTED_BOUNDS; PortraitSize realSize = new PortraitSize(newInfo.currentSize.x, newInfo.currentSize.y); PortraitSize expectedSize = oldInfo.mInternalDisplays.get( ApiWrapper.getUniqueId(display)); if (!realSize.equals(expectedSize) && display.getState() == Display.STATE_OFF) { Log.e("b/198965093", "Display size changed while display is off, ignoring change"); return; } } if (change != 0) { Loading