Show policy transparency dialog if adding Wi-Fi config is not allowed

- When the user is restricted by UserManager.DISALLOW_ADD_WIFI_CONFIG, clicking on a Wi-Fi network will show the Settings policy transparency dialog.

- The "Not allowed by your organization" summary in Wi-Fi networks will be removed in a separate CL.

Bug: 233871529
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=Wifi

Change-Id: Ia978be8e85a5809de1331f3e0edc11fbc8925c80
This commit is contained in:
Weng Su
2022-10-07 02:08:57 +08:00
parent a27418931c
commit a81bb19618
9 changed files with 68 additions and 42 deletions

View File

@@ -36,8 +36,10 @@ import org.mockito.Spy;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
@RunWith(RobolectricTestRunner.class)
@Config(shadows = ShadowRestrictedPreference.class)
public class LongPressWifiEntryPreferenceTest {
@Rule