Fork the Wi-Fi control setting page to SPA.

The page is located at "Apps > Special app access > Wi-Fi control".

Test: atest SettingsSpaUnitTests:com.android.settings.spa.app.specialaccess.WifiControlAppListModelTest
Test: local device (http://screen/3a4mkuAwPJoY6rf, http://screen/4fzttXjBqcEKcXA)
Bug: 262206181
Change-Id: Ibef029e6d83849a0eb0d779e5ed6dedfc2fe4b43
This commit is contained in:
Yilin Cai
2022-12-12 18:08:44 +08:00
parent 36903136af
commit fa93f941ef
6 changed files with 413 additions and 63 deletions

View File

@@ -29,6 +29,7 @@ import com.android.settings.spa.app.specialaccess.MediaManagementAppsAppListProv
import com.android.settings.spa.app.specialaccess.ModifySystemSettingsAppListProvider
import com.android.settings.spa.app.specialaccess.PictureInPictureListProvider
import com.android.settings.spa.app.specialaccess.SpecialAppAccessPageProvider
import com.android.settings.spa.app.specialaccess.WifiControlAppListProvider
import com.android.settings.spa.development.UsageStatsPageProvider
import com.android.settings.spa.home.HomePageProvider
import com.android.settings.spa.notification.AppListNotificationsPageProvider
@@ -43,17 +44,20 @@ import com.android.settingslib.spaprivileged.template.app.TogglePermissionAppLis
open class SettingsSpaEnvironment(context: Context) : SpaEnvironment(context) {
override val pageProviderRepository = lazy {
val togglePermissionAppListTemplate = TogglePermissionAppListTemplate(
allProviders = listOf(
AllFilesAccessAppListProvider,
DisplayOverOtherAppsAppListProvider,
MediaManagementAppsAppListProvider,
ModifySystemSettingsAppListProvider,
PictureInPictureListProvider,
InstallUnknownAppsListProvider,
AlarmsAndRemindersAppListProvider,
),
)
val togglePermissionAppListTemplate =
TogglePermissionAppListTemplate(
allProviders =
listOf(
AllFilesAccessAppListProvider,
DisplayOverOtherAppsAppListProvider,
MediaManagementAppsAppListProvider,
ModifySystemSettingsAppListProvider,
PictureInPictureListProvider,
InstallUnknownAppsListProvider,
AlarmsAndRemindersAppListProvider,
WifiControlAppListProvider,
),
)
SettingsPageProviderRepository(
allPageProviders = listOf(
HomePageProvider,