OSDN Git Service

Canonicalize notification channel sounds for backup
authorBernardo Rufino <brufino@google.com>
Tue, 3 Oct 2017 12:55:10 +0000 (13:55 +0100)
committerBernardo Rufino <brufino@google.com>
Thu, 5 Oct 2017 18:57:31 +0000 (19:57 +0100)
commitc27bb6ad34fd59161f6460b692ba72c7ede789b6
tree9def07fad34d4f1a8a9f98eb6ec7a935bfc8c919
parentc4381465ca35d89768128e198f79407f651c77e6
Canonicalize notification channel sounds for backup

Canonicalize for backup and canonicalize and uncanonicalize for restore
(see comment).

Test: Set custom notification sound, make backup, remove notification
sound from device (from Ringtones and make sure to update media content
provider), restore => Observe default instead of random number. Do the
same without removing the sound and observe restores successfully.
Test: runtest systemui-notification
Bug: 66444697
Change-Id: Id2f4685b7f64a35e397eb6dff5246802d795d996
core/java/android/app/NotificationChannel.java
services/core/java/com/android/server/notification/RankingHelper.java
services/tests/notification/src/com/android/server/notification/RankingHelperTest.java