Migrate UsageStats to Spa

The UsageStats page is for testing only, cannot entry through Settings
Home, but is accessible by enter *#*#4636#*#* in dialer.

Migrate UsageStats to Spa for both improving the UI & performance.

Fix: 244675756
Bug: 235727273
Test: Manual with Settings App
Change-Id: I6ec6e233075a3f79ac1231aecafabf2a71dac716
This commit is contained in:
Chaohui Wang
2022-09-08 16:06:09 +08:00
parent e68cf6df7d
commit d22619e995
11 changed files with 228 additions and 381 deletions

View File

@@ -23,9 +23,9 @@ import com.android.settingslib.spa.framework.BrowseActivity
class SpaActivity : BrowseActivity(SpaEnvironment.settingsPageProviders) {
companion object {
@JvmStatic
fun startSpaActivity(context: Context, startDestination: String) {
fun startSpaActivity(context: Context, destination: String) {
val intent = Intent(context, SpaActivity::class.java).apply {
putExtra(KEY_DESTINATION, startDestination)
putExtra(KEY_DESTINATION, destination)
}
context.startActivity(intent)
}