Refine the check restriction function in WifiEntryPreference

- Move checkRestrictionAndSetDisabled function from WifiEntryPreference to necessary child-classes to avoid impacting other child-classes such as SavedAccessPointsPreference.

- Avoid adding ShadowRestrictedPreference to the unnecessary test class.

Bug: 233871529
Test: manual test
make RunSettingsRoboTests

Change-Id: Ia2145401558b293b5f4eaa0860f83b7d3bbab548
This commit is contained in:
Weng Su
2022-10-13 03:52:08 +08:00
parent b0bef1c529
commit 10ef69316f
4 changed files with 2 additions and 7 deletions

View File

@@ -40,13 +40,11 @@ import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
import java.util.ArrayList;
import java.util.List;
@RunWith(RobolectricTestRunner.class)
@Config(shadows = ShadowRestrictedPreference.class)
public class WifiEntryPreferenceTest {
private Context mContext;