We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1667437 + 600c3cf commit 775f845Copy full SHA for 775f845
mediacontroller/src/main/java/com/example/android/mediacontroller/TestUtils.kt
@@ -226,10 +226,14 @@ fun formatPlaybackStateExtras(extras: Bundle?): String {
226
}
227
228
var out = ""
229
- for (key in extras.keySet()) {
230
- out += "${key}: ${extras.get(key)} \n"
+ try {
+ for (key in extras.keySet()) {
231
+ out += "${key}: ${extras.get(key)} \n"
232
+ }
233
+ } catch (e: Exception) {
234
+ // might not be able to load all the keys from another app
235
+ e.printStackTrace()
236
-
237
return out
238
239
0 commit comments