Add the jank detection to Settings sliders
- Currently most the sliders are implemented by com.android.settings.widget.SeekBarPreference. - Volume ones are implemented by VolumeSeekBarPreference, which resets the OnSeekBarChangeListener, so need special handling. - PointerSpeedPreference is standalone, added separately. Bug: 230285829 Test: Verify trace via jank developer guideline. Change-Id: Ia2978df196676ad6675d2834f6af6cb2aa9094cf
This commit is contained in:
@@ -26,13 +26,17 @@ import android.widget.LinearLayout;
|
||||
|
||||
import androidx.preference.PreferenceViewHolder;
|
||||
|
||||
import com.android.settings.testutils.shadow.ShadowInteractionJankMonitor;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
import org.robolectric.annotation.Config;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
@Config(shadows = {ShadowInteractionJankMonitor.class})
|
||||
public class BalanceSeekBarPreferenceTest {
|
||||
private static final int BALANCE_CENTER_VALUE = 100;
|
||||
private static final int BALANCE_MAX_VALUE = 200;
|
||||
|
Reference in New Issue
Block a user