DivestOS/Patches/LineageOS-21.0/android_frameworks_base/0020-Location_Indicators.patch
Tavi d98f33a337 21.0: Initial bringup
TODO:
- f/w/b
- settings

Signed-off-by: Tavi <tavi@divested.dev>
2024-05-20 11:53:38 -04:00

49 lines
2.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Tue, 12 Oct 2021 01:03:59 +0300
Subject: [PATCH] SystemUI: Use new privacy indicators for location
Android has had location indicators for a while, but let's use the new
privacy indicator infrastructure for displaying them. This makes them
integrate better with the new camera and microphone indicators.
Change-Id: Ie457bb2dad17bddbf9dc3a818e3ec586023ce918
---
core/java/android/permission/PermissionUsageHelper.java | 2 +-
.../src/com/android/systemui/privacy/PrivacyItemController.kt | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/java/android/permission/PermissionUsageHelper.java b/core/java/android/permission/PermissionUsageHelper.java
index 1f798baf1bd6..20502cdc81c3 100644
--- a/core/java/android/permission/PermissionUsageHelper.java
+++ b/core/java/android/permission/PermissionUsageHelper.java
@@ -108,7 +108,7 @@ public class PermissionUsageHelper implements AppOpsManager.OnOpActiveChangedLis
private static boolean shouldShowLocationIndicator() {
return DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PRIVACY,
- PROPERTY_LOCATION_INDICATORS_ENABLED, false);
+ PROPERTY_LOCATION_INDICATORS_ENABLED, true);
}
private static long getRecentThreshold(Long now) {
diff --git a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
index eb8ef9bf3e50..4b406f76300a 100644
--- a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
+++ b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
@@ -63,7 +63,7 @@ class PrivacyItemController @Inject constructor(
val micCameraAvailable
get() = privacyConfig.micCameraAvailable
val locationAvailable
- get() = privacyConfig.locationAvailable
+ get() = true
val allIndicatorsAvailable
get() = micCameraAvailable && locationAvailable && privacyConfig.mediaProjectionAvailable
@@ -274,4 +274,4 @@ class PrivacyItemController @Inject constructor(
listeningCanceller = delegate.executeDelayed({ setListeningState() }, 0L)
}
}
-}
\ No newline at end of file
+}