Home | History | Annotate | Download | only in downloads

Lines Matching defs:intent

30 import android.content.Intent;
43 * Build and start an {@link Intent} to view the download with given ID,
47 final Intent intent = OpenHelper.buildViewIntent(context, id);
48 if (intent == null) {
49 Log.w(TAG, "No intent built for " + id);
53 intent.addFlags(intentFlags);
55 context.startActivity(intent);
58 Log.w(TAG, "Failed to start " + intent + ": " + e);
64 * Build an {@link Intent} to view the download with given ID, handling
67 private static Intent buildViewIntent(Context context, long id) {
86 final Intent intent = new Intent(Intent.ACTION_VIEW);
87 intent.setDataAndType(documentUri, mimeType);
88 intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION
89 | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
94 intent.putExtra(Intent.EXTRA_ORIGINATING_URI, remoteUri);
95 intent.putExtra(Intent.EXTRA_REFERRER, getRefererUri(context, id));
96 intent.putExtra(Intent.EXTRA_ORIGINATING_UID, getOriginatingUid(context, id));
99 return intent;