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

Skip to content
Commit 6bf47f62 authored by Hai Zhang's avatar Hai Zhang
Browse files

Don't add SettingsLib to static_libs in Settings unit test.

Adding them results in duplicate classes and causes conflict for the R
classes and resource loading.

Meanwhile, correctly removing the SettingsLibSettingsSpinner resulted
in the test failing to find the getSelectedItem() method which is
unused inside Settings app. This is an inherent issue when unit
testing an optimized (and shrunk) app, and since there's no other way
for the test to get the current selected item, this change simply
changes the Settings code to invoke getSelectedItem() as well. This
has exactly the same effect because SettingsSpinnerPreference updates
its mPosition right before calling the OnItemSelectedListener in its
implementation.

Bug: 183340630
Bug: 177638625
Bug: 183342958
Test: atest SettingsSliderPreferenceControllerTest
Test: atest PrivateVolumeForgetTest
Change-Id: Ia26ca923369b41291614fb9bd50dfbd2aac2f0fa
parent 525659c2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment