OSDN Git Service

Decrease number of network logging notifications shown
authorphweiss <phweiss@google.com>
Thu, 30 Mar 2017 15:57:20 +0000 (17:57 +0200)
committerPhilipp Weiß <phweiss@google.com>
Tue, 18 Apr 2017 13:16:54 +0000 (13:16 +0000)
Now, network logging will show one notification when it is enabled
and one after the next reboot.

Bug: 36254499
Test: CTS Verifier > Managed Provisioning > Device Owner Tests
      > Network Logging UI

Change-Id: I60fc64e96ceb0ec0ae7ca832b74ac8b47e581be4
(cherry picked from commit 55dba53ed433d713a075ba0de15504a1ed42852b)

services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java

index bfa1b99..e82ba9c 100644 (file)
@@ -742,8 +742,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
         boolean forceEphemeralUsers = false; // Can only be set by a device owner.
         boolean isNetworkLoggingEnabled = false; // Can only be set by a device owner.
 
-        // one notification after enabling + 3 more after reboots
-        static final int DEF_MAXIMUM_NETWORK_LOGGING_NOTIFICATIONS_SHOWN = 4;
+        // one notification after enabling + one more after reboots
+        static final int DEF_MAXIMUM_NETWORK_LOGGING_NOTIFICATIONS_SHOWN = 2;
         int numNetworkLoggingNotifications = 0;
         long lastNetworkLoggingNotificationTimeMs = 0; // Time in milliseconds since epoch