Extract VibratorInfo aggregation logic to a factory

The aggregation logic used to live in SystemVibrator.
To allow the server side code to do VibratorInfo aggregation, we're
extracting this logic into a factory class in android.os that can be
used by both the client and server side codes. SystemVibrator now
uses the new class to combine its VibratorInfos. The factory will
later be used within VibratorManagerService.

Unit tests for the aggregation logic used to live in VibratorTest.
They have now been moved to the factory class's test, along with more
tests checking the factory method (ID assignment, handling of empty
vibrator info list, and handling of a size-1 list).

Bug: 296358077
Test: atest VibratorInfoFactoryTest
Test: atest VibratorTest
Test: atest VibratorInfoTest
Change-Id: I27a8245e3e9f322ccd046b7d748141ec05293b99
8 files changed