Create a Builder for Ringtone, add unit tests.
Currently hidden until the full new API is ready, but convert private factory methods from RingtoneManager to use it. This moves towards making the Ringtone class less mutable, and particularly for all required media player properties (esp AudioAttributes) being available for the initial construction. Adds an initial unit test covering basic properties and fallback, and "documenting" what happens when the uri is null, which was unclear before. Bug: Bug: 261571543 Test: manual, presubmit Change-Id: I81d512e9b21b64a2cca0450cb85c52d8a2125865
Showing
- media/java/android/media/LocalRingtonePlayer.java 14 additions, 8 deletionsmedia/java/android/media/LocalRingtonePlayer.java
- media/java/android/media/Ringtone.java 330 additions, 133 deletionsmedia/java/android/media/Ringtone.java
- media/java/android/media/RingtoneManager.java 31 additions, 94 deletionsmedia/java/android/media/RingtoneManager.java
- media/tests/MediaFrameworkTest/Android.bp 2 additions, 0 deletionsmedia/tests/MediaFrameworkTest/Android.bp
- media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/OWNERS 2 additions, 0 deletions...meworkTest/src/com/android/mediaframeworktest/unit/OWNERS
- media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/RingtoneTest.java 410 additions, 0 deletions...src/com/android/mediaframeworktest/unit/RingtoneTest.java
- packages/SystemUI/src/com/android/systemui/media/RingtonePlayer.java 5 additions, 4 deletions...stemUI/src/com/android/systemui/media/RingtonePlayer.java
- services/core/java/com/android/server/DockObserver.java 10 additions, 6 deletionsservices/core/java/com/android/server/DockObserver.java
Loading
Please register or sign in to comment