2024-05-20 08:00:14 -04:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Daniel Micay <danielmicay@gmail.com>
|
|
|
|
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
|
2024-12-06 10:55:23 -05:00
|
|
|
index 6e8005ad0..bc4739e44 100644
|
2024-05-20 08:00:14 -04:00
|
|
|
--- a/PermissionController/res/values/strings.xml
|
|
|
|
+++ b/PermissionController/res/values/strings.xml
|
2024-12-06 10:55:23 -05:00
|
|
|
@@ -1950,6 +1950,9 @@ Allow <xliff:g id="app_name" example="Gmail">%4$s</xliff:g> to upload a bug repo
|
2024-05-20 08:00:14 -04:00
|
|
|
|
|
|
|
<!-- Safety Label Change Notifications End -->
|
2024-12-06 10:55:23 -05:00
|
|
|
|
2024-05-20 08:00:14 -04:00
|
|
|
+ <!-- Summary text if tracking permission usage is not supported [CHAR LIMIT=60] -->
|
|
|
|
+ <string name="permission_usage_preference_summary_not_supported">Tracking usage not yet supported</string>
|
2024-12-06 10:55:23 -05:00
|
|
|
+
|
|
|
|
<!-- Summary for showing the last access text for today for Wear [CHAR LIMIT=50] -->
|
|
|
|
<string name="wear_app_perms_24h_access">Accessed <xliff:g id="time_date" example="12:42 PM">%1$s</xliff:g></string>
|
|
|
|
|
2024-05-20 08:00:14 -04:00
|
|
|
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,
|