/**
   * Hook method dispatched by the IntentService framework to download the image requested via data
   * in an intent, store the image in a local file on the local device, and return the image file's
   * URI back to the ImageModelImpl's Handler via the Messenger passed with the intent.
   */
  @Override
  public void onHandleIntent(Intent intent) {
    // Extract the RequestMessage from the intent.
    final RequestMessage requestMessage =
        RequestMessage.makeRequestMessage((Message) intent.getParcelableExtra(REQUEST_MESSAGE));

    // Extract the URL for the image to download.
    // TODO -x- you fill in here.
    Uri uri = requestMessage.getImageURL();

    // Download the requested image.
    // TODO -x??- you fill in here.
    Uri path = requestMessage.getDirectoryPathname();

    // Extract the request code.
    // TODO -x- you fill in here.
    int requestCode = requestMessage.getRequestCode();

    // Extract the Messenger stored as an extra in the
    // intent under the key MESSENGER.
    // TODO -x- you fill in here.
    Messenger messenger = requestMessage.getMessenger();

    // Send the path to the image file back to the
    // MainActivity via the messenger.
    // TODO -x- you fill in here.
    sendPath(messenger, path, uri, requestCode);
  }