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)
committerMichal Karpinski <mkarpinski@google.com>
Wed, 11 Oct 2017 14:22:32 +0000 (15:22 +0100)
commit2d7a4a3f674d62adfb2825b738f2e87ec246194d
tree1a805b16dab25d1fbe5fb74e465a4fb59fdbb8f5
parent43aca9cdc8fcaaafd98341aa87549630b2264367
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

(cherry picked from commit c27bb6ad34fd59161f6460b692ba72c7ede789b6)

Change-Id: I32c186d0d7479b01f6cc67cce9bc5cb66264a064
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