Disable preference list animation for Internet Settings

Bug: 173207801
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest

Change-Id: I774babec60cbb297b8ad0b24141eb57f082d2a5a
This commit is contained in:
Weng Su
2021-05-31 03:40:33 +08:00
parent 072bf553fe
commit b500e647e1

View File

@@ -416,9 +416,14 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
@Override
public void onResume() {
final Activity activity = getActivity();
super.onResume();
// Disable the animation of the preference list
final RecyclerView prefListView = getListView();
if (prefListView != null) {
prefListView.setItemAnimator(null);
}
// Because RestrictedSettingsFragment's onResume potentially requests authorization,
// which changes the restriction state, recalculate it.
final boolean alreadyImmutablyRestricted = mIsRestricted;