DivestOS/Patches/LineageOS-20.0/android_frameworks_base/0020-Location_Indicators.patch
Tad 055ed9bfad
20.0: Initial bringup
Signed-off-by: Tad <tad@spotco.us>
2022-10-15 10:39:48 -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 f5f1c374b636..b3cadb3ea22b 100644
--- a/core/java/android/permission/PermissionUsageHelper.java
+++ b/core/java/android/permission/PermissionUsageHelper.java
@@ -118,7 +118,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 a676150f44a2..35a9b18d9f69 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
@@ -275,4 +275,4 @@ class PrivacyItemController @Inject constructor(
listeningCanceller = delegate.executeDelayed({ setListeningState() }, 0L)
}
}
-}
\ No newline at end of file
+}