OSDN Git Service

Fix first notification of each app is not shown
authorTony Mak <tonymak@google.com>
Tue, 24 May 2016 17:57:50 +0000 (18:57 +0100)
committerTony Mak <tonymak@google.com>
Tue, 24 May 2016 17:57:50 +0000 (18:57 +0100)
commitfd303327083fdf309b9d8a15343f9eb70c014b11
tree20e5492e667337a4de8cc3aa70289ecd64ee1ddb
parentd86ac8116bfc64c61d8124ff8d3e92be5e55cd3e
Fix first notification of each app is not shown

When app tries to post its first notification,
value of now is equal to that of mLastEventTime.
And hence getRate return a very large number.

Bug: 28902358

Change-Id: If5b5b3c46e2bb80a9b40988ba7f7d777e40cc8e7
services/core/java/com/android/server/notification/NotificationUsageStats.java
services/core/java/com/android/server/notification/RateEstimator.java
services/tests/servicestests/src/com/android/server/notification/RateEstimatorTest.java