diff options
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/ecm/EnhancedConfirmationService.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/service/java/com/android/ecm/EnhancedConfirmationService.java b/service/java/com/android/ecm/EnhancedConfirmationService.java index e06d97d9e..1a6b80a3c 100644 --- a/service/java/com/android/ecm/EnhancedConfirmationService.java +++ b/service/java/com/android/ecm/EnhancedConfirmationService.java @@ -833,11 +833,12 @@ public class EnhancedConfirmationService extends SystemService { String caller = callInProgress ? call.caller : null; int logHash = Objects.hash(caller, uid, settingIdentifier, allowed, trusted); Long lastLogTime = mLogCache.get(logHash); - long cutoff = SystemClock.elapsedRealtime() - MAX_LOGGING_FREQUENCY_MS; + long now = SystemClock.elapsedRealtime(); + long cutoff = now - MAX_LOGGING_FREQUENCY_MS; if (lastLogTime != null && lastLogTime > cutoff) { return; } - mLogCache.put(logHash, SystemClock.elapsedRealtime()); + mLogCache.put(logHash, now); PermissionControllerStatsLog.write(ECM_RESTRICTION_QUERY_IN_CALL_REPORTED, uid, settingIdentifier, allowed, callInProgress, incoming, trusted, |