From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Mon, 18 Oct 2021 10:23:42 +0300 Subject: [PATCH] fix usage UI summary for Network/Sensors 13: 9f1fd4ea8 --- PermissionController/res/values/strings.xml | 3 +++ .../ui/model/v31/PermissionUsageControlPreferenceUtils.kt | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/PermissionController/res/values/strings.xml b/PermissionController/res/values/strings.xml index 6e8005ad0..bc4739e44 100644 --- a/PermissionController/res/values/strings.xml +++ b/PermissionController/res/values/strings.xml @@ -1950,6 +1950,9 @@ Allow %4$s to upload a bug repo + + Tracking usage not yet supported + Accessed %1$s diff --git a/PermissionController/src/com/android/permissioncontroller/permission/ui/model/v31/PermissionUsageControlPreferenceUtils.kt b/PermissionController/src/com/android/permissioncontroller/permission/ui/model/v31/PermissionUsageControlPreferenceUtils.kt index 7d299fdda..fbc8022bb 100644 --- a/PermissionController/src/com/android/permissioncontroller/permission/ui/model/v31/PermissionUsageControlPreferenceUtils.kt +++ b/PermissionController/src/com/android/permissioncontroller/permission/ui/model/v31/PermissionUsageControlPreferenceUtils.kt @@ -75,7 +75,12 @@ object PermissionUsageControlPreferenceUtils { if (count == 0) { isEnabled = false val permissionUsageSummaryNotUsed = - if (show7Days) { + if ( + groupName == Manifest.permission_group.NETWORK + || groupName == Manifest.permission_group.OTHER_SENSORS) + { + context.getString(R.string.permission_usage_preference_summary_not_supported) + } else if (show7Days) { StringUtils.getIcuPluralsString( context, R.string.permission_usage_preference_summary_not_used_in_past_n_days,