Set aspect ratio app list settings page id as attribtion in logs
When loging the users aspect ratio change, set the logs attribution as `USER_ASPECT_RATIO_APP_LIST_SETTINGS` if the user came from the aspect ratio app list page. Fix: 309424648 Bug: 298030311 Test: atest SettingsSpaUnitTests:UserAspectRatioAppsPageProviderTest && UserAspectRatioAppPreferenceTest Change-Id: Ia88f0dee8ed2c9c8e54919cf02c7526caf944dee
This commit is contained in:
@@ -63,18 +63,18 @@ class UserAspectRatioAppPresenter(
|
||||
}.flowOn(Dispatchers.IO)
|
||||
|
||||
fun startActivity() =
|
||||
navigateToAppAspectRatioSettings(context, app)
|
||||
navigateToAppAspectRatioSettings(context, app, AppInfoSettingsProvider.METRICS_CATEGORY)
|
||||
|
||||
val summaryFlow = flow {
|
||||
emit(manager.getUserMinAspectRatioEntry(app.packageName, context.userId))
|
||||
}.flowOn(Dispatchers.IO)
|
||||
}
|
||||
|
||||
fun navigateToAppAspectRatioSettings(context: Context, app: ApplicationInfo) {
|
||||
fun navigateToAppAspectRatioSettings(context: Context, app: ApplicationInfo, metricsCategory: Int) {
|
||||
AppInfoDashboardFragment.startAppInfoFragment(
|
||||
UserAspectRatioDetails::class.java,
|
||||
app,
|
||||
context,
|
||||
AppInfoSettingsProvider.METRICS_CATEGORY,
|
||||
metricsCategory,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.settings.spa.app.appcompat
|
||||
|
||||
import android.app.settings.SettingsEnums
|
||||
import android.content.Context
|
||||
import android.content.pm.ApplicationInfo
|
||||
import android.content.pm.PackageInfo
|
||||
@@ -155,7 +156,13 @@ class UserAspectRatioAppListModel(private val context: Context)
|
||||
override fun AppListItemModel<UserAspectRatioAppListItemModel>.AppItem() {
|
||||
val app = record.app
|
||||
AppListItem(
|
||||
onClick = { navigateToAppAspectRatioSettings(context, app) }
|
||||
onClick = {
|
||||
navigateToAppAspectRatioSettings(
|
||||
context,
|
||||
app,
|
||||
SettingsEnums.USER_ASPECT_RATIO_APP_LIST_SETTINGS
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user