Loading packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/debug/DebugActivity.kt +0 −23 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.settingslib.spa.debug import android.net.Uri import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent Loading @@ -41,8 +40,6 @@ import com.android.settingslib.spa.framework.theme.SettingsTheme import com.android.settingslib.spa.framework.util.SESSION_BROWSE import com.android.settingslib.spa.framework.util.SESSION_SEARCH import com.android.settingslib.spa.framework.util.createIntent import com.android.settingslib.spa.slice.fromEntry import com.android.settingslib.spa.slice.presenter.SliceDemo import com.android.settingslib.spa.widget.preference.Preference import com.android.settingslib.spa.widget.preference.PreferenceModel import com.android.settingslib.spa.widget.scaffold.HomeScaffold Loading @@ -52,7 +49,6 @@ private const val TAG = "DebugActivity" private const val ROUTE_ROOT = "root" private const val ROUTE_All_PAGES = "pages" private const val ROUTE_All_ENTRIES = "entries" private const val ROUTE_All_SLICES = "slices" private const val ROUTE_PAGE = "page" private const val ROUTE_ENTRY = "entry" private const val PARAM_NAME_PAGE_ID = "pid" Loading Loading @@ -87,7 +83,6 @@ class DebugActivity : ComponentActivity() { composable(route = ROUTE_ROOT) { RootPage() } composable(route = ROUTE_All_PAGES) { AllPages() } composable(route = ROUTE_All_ENTRIES) { AllEntries() } composable(route = ROUTE_All_SLICES) { AllSlices() } composable( route = "$ROUTE_PAGE/{$PARAM_NAME_PAGE_ID}", arguments = listOf( Loading @@ -109,8 +104,6 @@ class DebugActivity : ComponentActivity() { val entryRepository by spaEnvironment.entryRepository val allPageWithEntry = remember { entryRepository.getAllPageWithEntry() } val allEntry = remember { entryRepository.getAllEntries() } val allSliceEntry = remember { entryRepository.getAllEntries().filter { it.hasSliceSupport } } HomeScaffold(title = "Settings Debug") { Preference(object : PreferenceModel { override val title = "List All Pages (${allPageWithEntry.size})" Loading @@ -120,10 +113,6 @@ class DebugActivity : ComponentActivity() { override val title = "List All Entries (${allEntry.size})" override val onClick = navigator(route = ROUTE_All_ENTRIES) }) Preference(object : PreferenceModel { override val title = "List All Slices (${allSliceEntry.size})" override val onClick = navigator(route = ROUTE_All_SLICES) }) } } Loading Loading @@ -152,18 +141,6 @@ class DebugActivity : ComponentActivity() { } } @Composable fun AllSlices() { val entryRepository by spaEnvironment.entryRepository val authority = spaEnvironment.sliceProviderAuthorities val allSliceEntry = remember { entryRepository.getAllEntries().filter { it.hasSliceSupport } } RegularScaffold(title = "All Slices (${allSliceEntry.size})") { for (entry in allSliceEntry) { SliceDemo(sliceUri = Uri.Builder().fromEntry(entry, authority).build()) } } } @Composable fun OnePage(arguments: Bundle?) { Loading packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/debug/DebugFormat.kt +0 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,6 @@ fun SettingsEntry.debugContent(entryRepository: SettingsEntryRepository): String "allowSearch = $isAllowSearch", "isSearchDynamic = $isSearchDataDynamic", "isSearchMutable = $hasMutableStatus", "hasSlice = $hasSliceSupport", "------ SEARCH ------", "search_path = $entryPathWithTitle", searchData?.debugContent() ?: "no search data", Loading packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/search/SpaSearchContract.kt +0 −5 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ enum class ColumnEnum(val id: String) { INTENT_TARGET_PACKAGE("intentTargetPackage"), INTENT_TARGET_CLASS("intentTargetClass"), INTENT_EXTRAS("intentExtras"), SLICE_URI("sliceUri"), ENTRY_DISABLED("entryDisabled"), } Loading @@ -71,7 +70,6 @@ enum class QueryEnum( ColumnEnum.INTENT_TARGET_PACKAGE, ColumnEnum.INTENT_TARGET_CLASS, ColumnEnum.INTENT_EXTRAS, ColumnEnum.SLICE_URI, ) ), SEARCH_DYNAMIC_DATA_QUERY( Loading @@ -85,7 +83,6 @@ enum class QueryEnum( ColumnEnum.INTENT_TARGET_PACKAGE, ColumnEnum.INTENT_TARGET_CLASS, ColumnEnum.INTENT_EXTRAS, ColumnEnum.SLICE_URI, ) ), SEARCH_IMMUTABLE_STATUS_DATA_QUERY( Loading Loading @@ -115,7 +112,6 @@ enum class QueryEnum( ColumnEnum.INTENT_TARGET_PACKAGE, ColumnEnum.INTENT_TARGET_CLASS, ColumnEnum.INTENT_EXTRAS, ColumnEnum.SLICE_URI, ColumnEnum.ENTRY_DISABLED, ) ), Loading @@ -130,7 +126,6 @@ enum class QueryEnum( ColumnEnum.INTENT_TARGET_PACKAGE, ColumnEnum.INTENT_TARGET_CLASS, ColumnEnum.INTENT_EXTRAS, ColumnEnum.SLICE_URI, ColumnEnum.ENTRY_DISABLED, ) ), Loading packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/search/SpaSearchProvider.kt +0 −12 Original line number Diff line number Diff line Loading @@ -32,8 +32,6 @@ import com.android.settingslib.spa.framework.common.SettingsEntry import com.android.settingslib.spa.framework.common.SpaEnvironmentFactory import com.android.settingslib.spa.framework.util.SESSION_SEARCH import com.android.settingslib.spa.framework.util.createIntent import com.android.settingslib.spa.slice.fromEntry private const val TAG = "SpaSearchProvider" Loading Loading @@ -217,11 +215,6 @@ class SpaSearchProvider : ContentProvider() { .add(ColumnEnum.INTENT_TARGET_CLASS.id, spaEnvironment.browseActivityClass?.name) .add(ColumnEnum.INTENT_EXTRAS.id, marshall(intent.extras)) } if (entry.hasSliceSupport) row.add( ColumnEnum.SLICE_URI.id, Uri.Builder() .fromEntry(entry, spaEnvironment.sliceProviderAuthorities) ) } private fun fetchStatusData(entry: SettingsEntry, cursor: MatrixCursor) { Loading Loading @@ -252,11 +245,6 @@ class SpaSearchProvider : ContentProvider() { .add(ColumnEnum.INTENT_TARGET_CLASS.id, spaEnvironment.browseActivityClass?.name) .add(ColumnEnum.INTENT_EXTRAS.id, marshall(intent.extras)) } if (entry.hasSliceSupport) row.add( ColumnEnum.SLICE_URI.id, Uri.Builder() .fromEntry(entry, spaEnvironment.sliceProviderAuthorities) ) // Fetch status data. We can add runtime arguments later if necessary val statusData = entry.getStatusData() ?: return row.add(ColumnEnum.ENTRY_DISABLED.id, statusData.isDisabled) Loading Loading
packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/debug/DebugActivity.kt +0 −23 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.settingslib.spa.debug import android.net.Uri import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent Loading @@ -41,8 +40,6 @@ import com.android.settingslib.spa.framework.theme.SettingsTheme import com.android.settingslib.spa.framework.util.SESSION_BROWSE import com.android.settingslib.spa.framework.util.SESSION_SEARCH import com.android.settingslib.spa.framework.util.createIntent import com.android.settingslib.spa.slice.fromEntry import com.android.settingslib.spa.slice.presenter.SliceDemo import com.android.settingslib.spa.widget.preference.Preference import com.android.settingslib.spa.widget.preference.PreferenceModel import com.android.settingslib.spa.widget.scaffold.HomeScaffold Loading @@ -52,7 +49,6 @@ private const val TAG = "DebugActivity" private const val ROUTE_ROOT = "root" private const val ROUTE_All_PAGES = "pages" private const val ROUTE_All_ENTRIES = "entries" private const val ROUTE_All_SLICES = "slices" private const val ROUTE_PAGE = "page" private const val ROUTE_ENTRY = "entry" private const val PARAM_NAME_PAGE_ID = "pid" Loading Loading @@ -87,7 +83,6 @@ class DebugActivity : ComponentActivity() { composable(route = ROUTE_ROOT) { RootPage() } composable(route = ROUTE_All_PAGES) { AllPages() } composable(route = ROUTE_All_ENTRIES) { AllEntries() } composable(route = ROUTE_All_SLICES) { AllSlices() } composable( route = "$ROUTE_PAGE/{$PARAM_NAME_PAGE_ID}", arguments = listOf( Loading @@ -109,8 +104,6 @@ class DebugActivity : ComponentActivity() { val entryRepository by spaEnvironment.entryRepository val allPageWithEntry = remember { entryRepository.getAllPageWithEntry() } val allEntry = remember { entryRepository.getAllEntries() } val allSliceEntry = remember { entryRepository.getAllEntries().filter { it.hasSliceSupport } } HomeScaffold(title = "Settings Debug") { Preference(object : PreferenceModel { override val title = "List All Pages (${allPageWithEntry.size})" Loading @@ -120,10 +113,6 @@ class DebugActivity : ComponentActivity() { override val title = "List All Entries (${allEntry.size})" override val onClick = navigator(route = ROUTE_All_ENTRIES) }) Preference(object : PreferenceModel { override val title = "List All Slices (${allSliceEntry.size})" override val onClick = navigator(route = ROUTE_All_SLICES) }) } } Loading Loading @@ -152,18 +141,6 @@ class DebugActivity : ComponentActivity() { } } @Composable fun AllSlices() { val entryRepository by spaEnvironment.entryRepository val authority = spaEnvironment.sliceProviderAuthorities val allSliceEntry = remember { entryRepository.getAllEntries().filter { it.hasSliceSupport } } RegularScaffold(title = "All Slices (${allSliceEntry.size})") { for (entry in allSliceEntry) { SliceDemo(sliceUri = Uri.Builder().fromEntry(entry, authority).build()) } } } @Composable fun OnePage(arguments: Bundle?) { Loading
packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/debug/DebugFormat.kt +0 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,6 @@ fun SettingsEntry.debugContent(entryRepository: SettingsEntryRepository): String "allowSearch = $isAllowSearch", "isSearchDynamic = $isSearchDataDynamic", "isSearchMutable = $hasMutableStatus", "hasSlice = $hasSliceSupport", "------ SEARCH ------", "search_path = $entryPathWithTitle", searchData?.debugContent() ?: "no search data", Loading
packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/search/SpaSearchContract.kt +0 −5 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ enum class ColumnEnum(val id: String) { INTENT_TARGET_PACKAGE("intentTargetPackage"), INTENT_TARGET_CLASS("intentTargetClass"), INTENT_EXTRAS("intentExtras"), SLICE_URI("sliceUri"), ENTRY_DISABLED("entryDisabled"), } Loading @@ -71,7 +70,6 @@ enum class QueryEnum( ColumnEnum.INTENT_TARGET_PACKAGE, ColumnEnum.INTENT_TARGET_CLASS, ColumnEnum.INTENT_EXTRAS, ColumnEnum.SLICE_URI, ) ), SEARCH_DYNAMIC_DATA_QUERY( Loading @@ -85,7 +83,6 @@ enum class QueryEnum( ColumnEnum.INTENT_TARGET_PACKAGE, ColumnEnum.INTENT_TARGET_CLASS, ColumnEnum.INTENT_EXTRAS, ColumnEnum.SLICE_URI, ) ), SEARCH_IMMUTABLE_STATUS_DATA_QUERY( Loading Loading @@ -115,7 +112,6 @@ enum class QueryEnum( ColumnEnum.INTENT_TARGET_PACKAGE, ColumnEnum.INTENT_TARGET_CLASS, ColumnEnum.INTENT_EXTRAS, ColumnEnum.SLICE_URI, ColumnEnum.ENTRY_DISABLED, ) ), Loading @@ -130,7 +126,6 @@ enum class QueryEnum( ColumnEnum.INTENT_TARGET_PACKAGE, ColumnEnum.INTENT_TARGET_CLASS, ColumnEnum.INTENT_EXTRAS, ColumnEnum.SLICE_URI, ColumnEnum.ENTRY_DISABLED, ) ), Loading
packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/search/SpaSearchProvider.kt +0 −12 Original line number Diff line number Diff line Loading @@ -32,8 +32,6 @@ import com.android.settingslib.spa.framework.common.SettingsEntry import com.android.settingslib.spa.framework.common.SpaEnvironmentFactory import com.android.settingslib.spa.framework.util.SESSION_SEARCH import com.android.settingslib.spa.framework.util.createIntent import com.android.settingslib.spa.slice.fromEntry private const val TAG = "SpaSearchProvider" Loading Loading @@ -217,11 +215,6 @@ class SpaSearchProvider : ContentProvider() { .add(ColumnEnum.INTENT_TARGET_CLASS.id, spaEnvironment.browseActivityClass?.name) .add(ColumnEnum.INTENT_EXTRAS.id, marshall(intent.extras)) } if (entry.hasSliceSupport) row.add( ColumnEnum.SLICE_URI.id, Uri.Builder() .fromEntry(entry, spaEnvironment.sliceProviderAuthorities) ) } private fun fetchStatusData(entry: SettingsEntry, cursor: MatrixCursor) { Loading Loading @@ -252,11 +245,6 @@ class SpaSearchProvider : ContentProvider() { .add(ColumnEnum.INTENT_TARGET_CLASS.id, spaEnvironment.browseActivityClass?.name) .add(ColumnEnum.INTENT_EXTRAS.id, marshall(intent.extras)) } if (entry.hasSliceSupport) row.add( ColumnEnum.SLICE_URI.id, Uri.Builder() .fromEntry(entry, spaEnvironment.sliceProviderAuthorities) ) // Fetch status data. We can add runtime arguments later if necessary val statusData = entry.getStatusData() ?: return row.add(ColumnEnum.ENTRY_DISABLED.id, statusData.isDisabled) Loading