@@ -2286,8 +2286,7 @@ void SurfaceFlinger::scheduleSample() {
22862286
22872287void SurfaceFlinger::onComposerHalVsync (hal::HWDisplayId hwcDisplayId, int64_t timestamp,
22882288 std::optional<hal::VsyncPeriodNanos> vsyncPeriod) {
2289- if (FlagManager::getInstance ().connected_display () && timestamp < 0 &&
2290- vsyncPeriod.has_value ()) {
2289+ if (timestamp < 0 && vsyncPeriod.has_value ()) {
22912290 if (mIsHdcpViaNegVsync && vsyncPeriod.value () == ~1 ) {
22922291 const int32_t value = static_cast <int32_t >(-timestamp);
22932292 // one byte is good enough to encode android.hardware.drm.HdcpLevel
@@ -3552,9 +3551,8 @@ std::pair<DisplayModes, DisplayModePtr> SurfaceFlinger::loadDisplayModes(
35523551 std::vector<HWComposer::HWCDisplayMode> hwcModes;
35533552 std::optional<hal::HWConfigId> activeModeHwcIdOpt;
35543553
3555- const bool isExternalDisplay = FlagManager::getInstance ().connected_display () &&
3556- getHwComposer ().getDisplayConnectionType (displayId) ==
3557- ui::DisplayConnectionType::External;
3554+ const bool isExternalDisplay = getHwComposer ().getDisplayConnectionType (displayId) ==
3555+ ui::DisplayConnectionType::External;
35583556
35593557 int attempt = 0 ;
35603558 constexpr int kMaxAttempts = 3 ;
@@ -4049,8 +4047,7 @@ void SurfaceFlinger::processDisplayAdded(const wp<IBinder>& displayToken,
40494047 // For an external display, loadDisplayModes already attempted to select the same mode
40504048 // as DM, but SF still needs to be updated to match.
40514049 // TODO (b/318534874): Let DM decide the initial mode.
4052- if (const auto & physical = state.physical ;
4053- mScheduler && physical && FlagManager::getInstance ().connected_display ()) {
4050+ if (const auto & physical = state.physical ; mScheduler && physical) {
40544051 const bool isInternalDisplay = mPhysicalDisplays .get (physical->id )
40554052 .transform (&PhysicalDisplay::isInternal)
40564053 .value_or (false );
@@ -8359,10 +8356,6 @@ status_t SurfaceFlinger::getStalledTransactionInfo(
83598356
83608357void SurfaceFlinger::updateHdcpLevels (hal::HWDisplayId hwcDisplayId, int32_t connectedLevel,
83618358 int32_t maxLevel) {
8362- if (!FlagManager::getInstance ().connected_display ()) {
8363- return ;
8364- }
8365-
83668359 Mutex::Autolock lock (mStateLock );
83678360
83688361 const auto idOpt = getHwComposer ().toPhysicalDisplayId (hwcDisplayId);
0 commit comments