Ejemplo n.º 1
0
 /**
  * Load the poster image.
  *
  * @param url is the URL of the poster image.
  */
 public void loadPoster(String url) {
   if (url == null) {
     Message message = obtainMessage(LOAD_DEFAULT_POSTER);
     sendMessage(message);
     return;
   }
   // Cancel any active poster download.
   if (mPosterDownloader != null) {
     mPosterDownloader.cancelAndReleaseQueue();
   }
   // Load the poster asynchronously
   mPosterDownloader = new PosterDownloader(url, this);
   mPosterDownloader.start();
 }
Ejemplo n.º 2
0
  /** Tear down this proxy object. */
  public void teardown() {
    // This is called by the C++ MediaPlayerPrivate dtor.
    // Cancel any active poster download.
    Xlog.d(XLOGTAG, "teardown::mPosterDownloader is: " + mPosterDownloader);
    if (mPosterDownloader != null) {
      mPosterDownloader.cancelAndReleaseQueue();
    }
    mNativePointer = 0;

    /// M: Have to stop java player here,
    ///    or it will keep playing if teardown invoked during buffering @{
    Message msg = obtainMessage(TEARDOWN);
    sendMessage(msg);
    /// @}
  }