cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Bowser (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-11390) Released Media are not removed from Android's pausedForFocus or pausedForPhone lists, generating NullPointerException and crash.
Date Mon, 05 Dec 2016 23:47:58 GMT

     [ https://issues.apache.org/jira/browse/CB-11390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Joe Bowser updated CB-11390:
----------------------------
         Labels: Android  (was: )
    Component/s:     (was: Android)
                 Plugin Media

> Released Media are not removed from Android's pausedForFocus or pausedForPhone lists,
generating NullPointerException and crash.
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CB-11390
>                 URL: https://issues.apache.org/jira/browse/CB-11390
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Media
>    Affects Versions: 6.1.1
>         Environment: Mac OS X 10.11.5, Cordova 6.1.1, Cordova android 5.1.1, Nexus 5X
running Android 6.0.1
>            Reporter: Dale Beermann
>              Labels: Android
>
> When changing views, the {{AudioHandler}} receives {{onAudioFocusChange}} and adds all
running media to a {{pausedForFocus}} list. With Angular, a controller's life cycle might
not exactly match what Android is seeing for this event (I'm a bit unclear on how the focus
change events are fired). So if that media object is later released, it needs to be removed
from those lists in {{AudioHandler.release}}:
> {quote}
> pausedForFocus.remove(audio);
> pausedForPhone.remove(audio);
> {quote}
> If this does not happen, the {{AudioHandler}} receives another {{onAudioFocusChange}}
event and calls {{resumeAllGainedFocus}} which calls {{AudioPlayer.startPlaying}} with a {{null}}
file, in turn calling {{readyPlayer(null)}}, causing a NullPointerException and crash at the
line:
> {{if (this.audioFile.compareTo(file) == 0)}}
> There might be a root cause here that I am missing, but this displays the symptom I am
seeing. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message