Lines Matching refs:doc

138         DocumentInfo doc = mModel.getDocument(selection.iterator().next());
139 assert(doc != null);
140 openInNewWindow(new DocumentStack(mState.stack, doc));
156 (DocumentInfo doc) -> pasteIntoFolder(root, doc));
159 private void pasteIntoFolder(RootInfo root, @Nullable DocumentInfo doc) {
160 DocumentStack stack = new DocumentStack(root, doc);
161 mClipper.copyFromClipboard(doc, stack, mDialogs::showFileOperationStatus);
192 DocumentInfo doc = mModel.getDocument(details.getModelId());
193 if (doc == null) {
199 return openDocument(doc, type, fallback);
204 public boolean openDocument(DocumentInfo doc, @ViewType int type, @ViewType int fallback) {
205 if (mConfig.isDocumentEnabled(doc.mimeType, doc.flags, mState)) {
206 onDocumentPicked(doc, type, fallback);
214 public void springOpenDirectory(DocumentInfo doc) {
215 assert(doc.isDirectory());
217 openContainerDocument(doc);
276 DocumentInfo doc = mModel.getDocument(selection.iterator().next());
278 intent.setPackage(mProviders.getPackageName(doc.authority));
280 intent.setData(doc.derivedUri);
284 Log.e(TAG, "Failed to view settings in application for " + doc.derivedUri, e);
357 DocumentInfo doc = docs.get(0);
358 intent.setType(doc.mimeType);
359 intent.putExtra(Intent.EXTRA_STREAM, doc.derivedUri);
366 for (DocumentInfo doc : docs) {
367 mimeTypes.add(doc.mimeType);
368 uris.add(doc.derivedUri);
482 public void showChooserForDoc(DocumentInfo doc) {
483 assert(!doc.isDirectory());
485 if (manageDocument(doc)) {
486 Log.w(TAG, "Open with is not yet supported for managed doc.");
490 Intent intent = Intent.createChooser(buildViewIntent(doc), null);
501 private void onDocumentPicked(DocumentInfo doc, @ViewType int type, @ViewType int fallback) {
502 if (doc.isContainer()) {
503 openContainerDocument(doc);
507 if (manageDocument(doc)) {
513 if (viewDocument(doc)) {
519 if (previewDocument(doc)) {
530 if (viewDocument(doc)) {
536 if (previewDocument(doc)) {
549 if (type != VIEW_TYPE_NONE && fallback != VIEW_TYPE_NONE && doc.isInArchive()) {
554 private boolean viewDocument(DocumentInfo doc) {
555 if (doc.isPartial()) {
560 if (doc.isInArchive()) {
565 if (doc.isDirectory()) {
570 Intent intent = buildViewIntent(doc);
584 private boolean previewDocument(DocumentInfo doc) {
585 if (doc.isPartial()) {
593 doc,
610 private boolean manageDocument(DocumentInfo doc) {
611 if (isManagedDownload(doc)) {
615 manage.setData(doc.derivedUri);
627 private boolean isManagedDownload(DocumentInfo doc) {
652 return MimeTypes.isApkType(doc.mimeType)
653 || doc.isPartial();
659 private Intent buildViewIntent(DocumentInfo doc) {
661 intent.setDataAndType(doc.derivedUri, doc.mimeType);
669 if (doc.isWriteSupported()) {
678 public void showInspector(DocumentInfo doc) {
685 intent.setData(doc.derivedUri);