Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 915513c9 authored by Yeabkal Wubshit's avatar Yeabkal Wubshit
Browse files

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
parent 32a09a1a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment