Loading services/core/java/com/android/server/display/DisplayDeviceInfo.java +8 −1 Original line number Diff line number Diff line Loading @@ -254,6 +254,11 @@ final class DisplayDeviceInfo { */ public static final int DIFF_MODE_ID = 1 << 7; /** * Diff result: The frame rate override list differs. */ public static final int DIFF_FRAME_RATE_OVERRIDE = 1 << 8; /** * Diff result: Catch-all for "everything changed" */ Loading Loading @@ -523,6 +528,9 @@ final class DisplayDeviceInfo { if (modeId != other.modeId) { diff |= DIFF_MODE_ID; } if (!Arrays.equals(frameRateOverrides, other.frameRateOverrides)) { diff |= DIFF_FRAME_RATE_OVERRIDE; } if (!Objects.equals(name, other.name) || !Objects.equals(uniqueId, other.uniqueId) || width != other.width Loading @@ -546,7 +554,6 @@ final class DisplayDeviceInfo { || !Objects.equals(deviceProductInfo, other.deviceProductInfo) || ownerUid != other.ownerUid || !Objects.equals(ownerPackageName, other.ownerPackageName) || !Arrays.equals(frameRateOverrides, other.frameRateOverrides) || !BrightnessSynchronizer.floatEquals(brightnessMinimum, other.brightnessMinimum) || !BrightnessSynchronizer.floatEquals(brightnessMaximum, other.brightnessMaximum) || !BrightnessSynchronizer.floatEquals(brightnessDefault, Loading services/core/java/com/android/server/display/DisplayDeviceRepository.java +9 −4 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import com.android.internal.annotations.GuardedBy; import com.android.server.display.DisplayManagerService.SyncRoot; import com.android.server.display.utils.DebugUtils; import java.util.Arrays; import java.util.ArrayList; import java.util.List; import java.util.function.Consumer; Loading Loading @@ -177,18 +178,22 @@ class DisplayDeviceRepository implements DisplayAdapter.Listener { "handleDisplayDeviceChanged"); } int diff = device.mDebugLastLoggedDeviceInfo.diff(info); if (diff == DisplayDeviceInfo.DIFF_STATE) { if (diff == 0) { Slog.i(TAG, "Display device same: " + info); } else if (diff == DisplayDeviceInfo.DIFF_STATE) { Slog.i(TAG, "Display device changed state: \"" + info.name + "\", " + Display.stateToString(info.state)); } else if (diff == DisplayDeviceInfo.DIFF_ROTATION) { Slog.i(TAG, "Display device rotated: \"" + info.name + "\", " + Surface.rotationToString(info.rotation)); } else if (diff == (DisplayDeviceInfo.DIFF_MODE_ID | DisplayDeviceInfo.DIFF_RENDER_TIMINGS)) { } else if ((diff & (DisplayDeviceInfo.DIFF_MODE_ID | DisplayDeviceInfo.DIFF_RENDER_TIMINGS | DisplayDeviceInfo.DIFF_FRAME_RATE_OVERRIDE)) != 0) { Slog.i(TAG, "Display device changed render timings: \"" + info.name + "\", renderFrameRate=" + info.renderFrameRate + ", presentationDeadlineNanos=" + info.presentationDeadlineNanos + ", appVsyncOffsetNanos=" + info.appVsyncOffsetNanos); + ", appVsyncOffsetNanos=" + info.appVsyncOffsetNanos + ", frameRateOverrides=" + Arrays.toString(info.frameRateOverrides)); } else if (diff == DisplayDeviceInfo.DIFF_COMMITTED_STATE) { if (DEBUG) { Slog.i(TAG, "Display device changed committed state: \"" + info.name Loading Loading
services/core/java/com/android/server/display/DisplayDeviceInfo.java +8 −1 Original line number Diff line number Diff line Loading @@ -254,6 +254,11 @@ final class DisplayDeviceInfo { */ public static final int DIFF_MODE_ID = 1 << 7; /** * Diff result: The frame rate override list differs. */ public static final int DIFF_FRAME_RATE_OVERRIDE = 1 << 8; /** * Diff result: Catch-all for "everything changed" */ Loading Loading @@ -523,6 +528,9 @@ final class DisplayDeviceInfo { if (modeId != other.modeId) { diff |= DIFF_MODE_ID; } if (!Arrays.equals(frameRateOverrides, other.frameRateOverrides)) { diff |= DIFF_FRAME_RATE_OVERRIDE; } if (!Objects.equals(name, other.name) || !Objects.equals(uniqueId, other.uniqueId) || width != other.width Loading @@ -546,7 +554,6 @@ final class DisplayDeviceInfo { || !Objects.equals(deviceProductInfo, other.deviceProductInfo) || ownerUid != other.ownerUid || !Objects.equals(ownerPackageName, other.ownerPackageName) || !Arrays.equals(frameRateOverrides, other.frameRateOverrides) || !BrightnessSynchronizer.floatEquals(brightnessMinimum, other.brightnessMinimum) || !BrightnessSynchronizer.floatEquals(brightnessMaximum, other.brightnessMaximum) || !BrightnessSynchronizer.floatEquals(brightnessDefault, Loading
services/core/java/com/android/server/display/DisplayDeviceRepository.java +9 −4 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import com.android.internal.annotations.GuardedBy; import com.android.server.display.DisplayManagerService.SyncRoot; import com.android.server.display.utils.DebugUtils; import java.util.Arrays; import java.util.ArrayList; import java.util.List; import java.util.function.Consumer; Loading Loading @@ -177,18 +178,22 @@ class DisplayDeviceRepository implements DisplayAdapter.Listener { "handleDisplayDeviceChanged"); } int diff = device.mDebugLastLoggedDeviceInfo.diff(info); if (diff == DisplayDeviceInfo.DIFF_STATE) { if (diff == 0) { Slog.i(TAG, "Display device same: " + info); } else if (diff == DisplayDeviceInfo.DIFF_STATE) { Slog.i(TAG, "Display device changed state: \"" + info.name + "\", " + Display.stateToString(info.state)); } else if (diff == DisplayDeviceInfo.DIFF_ROTATION) { Slog.i(TAG, "Display device rotated: \"" + info.name + "\", " + Surface.rotationToString(info.rotation)); } else if (diff == (DisplayDeviceInfo.DIFF_MODE_ID | DisplayDeviceInfo.DIFF_RENDER_TIMINGS)) { } else if ((diff & (DisplayDeviceInfo.DIFF_MODE_ID | DisplayDeviceInfo.DIFF_RENDER_TIMINGS | DisplayDeviceInfo.DIFF_FRAME_RATE_OVERRIDE)) != 0) { Slog.i(TAG, "Display device changed render timings: \"" + info.name + "\", renderFrameRate=" + info.renderFrameRate + ", presentationDeadlineNanos=" + info.presentationDeadlineNanos + ", appVsyncOffsetNanos=" + info.appVsyncOffsetNanos); + ", appVsyncOffsetNanos=" + info.appVsyncOffsetNanos + ", frameRateOverrides=" + Arrays.toString(info.frameRateOverrides)); } else if (diff == DisplayDeviceInfo.DIFF_COMMITTED_STATE) { if (DEBUG) { Slog.i(TAG, "Display device changed committed state: \"" + info.name Loading