Only call into VirtualDeviceManager if we have one
VirtualDeviceManager will not be instantiated if a device is missing the feature flag, FEATURE_COMPANION_DEVICE_SETUP. At the moment, at least cf_x86_tv doesn't have this feature flag, so we add a null check to make such targets happy again. Unnecessary global locking in the common case of VibrationSettings looking up DEFAULT_DISPLAY is also taken out so that calling isAppOrDisplayOnAnyVirtualDevice in the middle of shouldIgnoreVibration won't recursively take mLock. Change-Id: I683109f3065e0208b78ed37b39ad49cfc615201b Test: atest VibrationSettingsTest Test: atest VibratorManagerServiceTest Bug: 189474679 Bug: 244116059
Loading
Please register or sign in to comment