OSDN Git Service

Fixed whitelist stats so it's only logged on add.
authorFelipe Leme <felipeal@google.com>
Fri, 20 May 2016 21:13:22 +0000 (14:13 -0700)
committerFelipe Leme <felipeal@google.com>
Fri, 20 May 2016 21:13:22 +0000 (14:13 -0700)
BUG: 28166693
Change-Id: If1f91167c21054e78a966670c20c174c3f73d2a5

src/com/android/settings/datausage/DataSaverBackend.java

index 8073f17..15c4241 100644 (file)
@@ -92,7 +92,9 @@ public class DataSaverBackend {
         } catch (RemoteException e) {
             Log.w(TAG, "Can't reach policy manager", e);
         }
-        MetricsLogger.action(mContext, MetricsEvent.ACTION_DATA_SAVER_WHITELIST, packageName);
+        if (whitelisted) {
+            MetricsLogger.action(mContext, MetricsEvent.ACTION_DATA_SAVER_WHITELIST, packageName);
+        }
     }
 
     public boolean isWhitelisted(int uid) {