diff options
author | Nate Jiang <qiangjiang@google.com> | 2020-05-06 15:38:17 -0700 |
---|---|---|
committer | Nate Jiang <qiangjiang@google.com> | 2020-05-07 16:49:09 -0700 |
commit | b33fae243570a1934a03ca37ed6293120b4daf54 (patch) | |
tree | 46969179b7a8ba59957f715bbcb9ee9e49cff818 /service | |
parent | 431a8ab0ac838e332d43d4264b58d97cae3b7732 (diff) |
Add metrics for user revoke permission
Revoke permission can happen when user disable in settings or user
disallowed from UI.
Updated-PDD: TRUE
Bug: 154546365
Test: atest com.android.server.wifi
Change-Id: I76f0935867dc8a58ede0e1967b1629861e97a6ea
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiMetrics.java | 9 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java | 1 | ||||
-rw-r--r-- | service/proto/src/metrics.proto | 3 |
3 files changed, 13 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiMetrics.java b/service/java/com/android/server/wifi/WifiMetrics.java index f61723643..72ab4f3d8 100644 --- a/service/java/com/android/server/wifi/WifiMetrics.java +++ b/service/java/com/android/server/wifi/WifiMetrics.java @@ -5936,6 +5936,15 @@ public class WifiMetrics { } } + /** Increment number of user revoke suggestion permission. Including from settings or + * disallowed from UI. + */ + public void incrementNetworkSuggestionUserRevokePermission() { + synchronized (mLock) { + mWifiNetworkSuggestionApiLog.userRevokeAppSuggestionPermission++; + } + } + /** Clear and set the latest network suggestion API max list size histogram */ public void noteNetworkSuggestionApiListSizeHistogram(List<Integer> listSizes) { synchronized (mLock) { diff --git a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java index 516c89ecc..c97d5881b 100644 --- a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java +++ b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java @@ -411,6 +411,7 @@ public class WifiNetworkSuggestionsManager { // User disabled the app, remove app from database. We want the notification // again if the user enabled the app-op back. removeApp(mPackageName); + mWifiMetrics.incrementNetworkSuggestionUserRevokePermission(); } }); } diff --git a/service/proto/src/metrics.proto b/service/proto/src/metrics.proto index 9a33aafcc..55b3c2af8 100644 --- a/service/proto/src/metrics.proto +++ b/service/proto/src/metrics.proto @@ -2934,6 +2934,9 @@ message WifiNetworkSuggestionApiLog { // Event of user reaction to the UI. repeated UserReaction user_approval_app_ui_reaction = 6; + + // Number of user revoke app's permission from settings or disallowed from UI. + optional int32 user_revoke_app_suggestion_permission = 7; } // WifiLock metrics |