Home
last modified time | relevance | path

Searched refs:stack (Results 1 – 25 of 85) sorted by relevance

1234

/packages/apps/DocumentsUI/src/com/android/documentsui/
DAbstractActionHandler.java346 (@Nullable DocumentStack stack) -> openFolderInSearchResult(stack, doc)); in openContainerDocument()
357 private void openFolderInSearchResult(@Nullable DocumentStack stack, DocumentInfo doc) { in openFolderInSearchResult() argument
358 if (stack == null) { in openFolderInSearchResult()
359 mState.stack.popToRootDocument(); in openFolderInSearchResult()
366 mState.stack.push(doc); in openFolderInSearchResult()
368 if (!Objects.equals(mState.stack.getRoot(), stack.getRoot())) { in openFolderInSearchResult()
369 Log.w(TAG, "Provider returns " + stack.getRoot() + " rather than expected " in openFolderInSearchResult()
370 + mState.stack.getRoot()); in openFolderInSearchResult()
373 final DocumentInfo top = stack.peek(); in openFolderInSearchResult()
376 stack.pop(); in openFolderInSearchResult()
[all …]
DBaseActivity.java331 mSearchManager.showMenu(mState.stack); in onPrepareOptionsMenu()
414 if (root.equals(getCurrentRoot()) && mState.stack.size() == 1) { in onRootPicked()
428 mState.stack.changeRoot(root); in onRootPicked()
553 mState.derivedMode = LocalPreferences.getViewMode(this, mState.stack.getRoot(), MODE_GRID); in refreshCurrentRootAndDirectory()
565 setTitle(mState.stack.getTitle()); in refreshCurrentRootAndDirectory()
657 if (!mState.stack.isInitialized()) { in updateHeaderTitle()
662 final RootInfo root = mState.stack.getRoot(); in updateHeaderTitle()
695 boolean isGlobalSearch = mSearchManager.isSearching() || mState.stack.size() > 1; in getHeaderRecentTitle()
733 if (!mState.stack.isInitialized()) { in getCurrentTitle()
737 if (mState.stack.size() > 1) { in getCurrentTitle()
[all …]
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/picker/
DActionHandlerTest.java134 mEnv.state.stack.changeRoot(TestProvidersAccess.DOWNLOADS); in testInitLocation_RestoresIfStackIsLoaded()
135 mEnv.state.stack.push(TestEnv.FOLDER_0); in testInitLocation_RestoresIfStackIsLoaded()
143 mEnv.state.stack.changeRoot(TestProvidersAccess.HAMMY); in testInitLocation_LoadsRootDocIfStackOnlyHasRoot()
194 DocumentStackAsserts.assertEqualsTo(mEnv.state.stack, TestProvidersAccess.HOME, in testInitLocation_LaunchToDocuments()
201 final DocumentStack stack = in testInitLocation_RestoresLastAccessedStack() local
203 mLastAccessed.setLastAccessed(mActivity, stack); in testInitLocation_RestoresLastAccessedStack()
208 assertEquals(stack, mEnv.state.stack); in testInitLocation_RestoresLastAccessedStack()
236 assertEquals(TestEnv.FOLDER_0, mEnv.state.stack.peek()); in testOpenContainerDocument()
244 mEnv.state.stack.changeRoot(TestProvidersAccess.HOME); in testIncreasePickCountRecordCalled()
245 mEnv.state.stack.push(TestEnv.FOLDER_1); in testIncreasePickCountRecordCalled()
[all …]
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/
DAbstractActionHandlerTest.java132 assertEquals(mEnv.docs.nextPath.getPath().size(), mEnv.state.stack.size()); in testOpensContainerDocuments_OpenFolderInSearch_JumpsToNewLocation()
133 assertEquals(TestEnv.FOLDER_2, mEnv.state.stack.pop()); in testOpensContainerDocuments_OpenFolderInSearch_JumpsToNewLocation()
134 assertEquals(TestEnv.FOLDER_1, mEnv.state.stack.pop()); in testOpensContainerDocuments_OpenFolderInSearch_JumpsToNewLocation()
151 assertEquals(2, mEnv.state.stack.size()); in testOpensContainerDocuments_ClickFolderInSearch_PushToRootDoc_NoFindPathSupport()
152 assertEquals(TestEnv.FOLDER_2, mEnv.state.stack.pop()); in testOpensContainerDocuments_ClickFolderInSearch_PushToRootDoc_NoFindPathSupport()
153 assertEquals(TestEnv.FOLDER_0, mEnv.state.stack.pop()); in testOpensContainerDocuments_ClickFolderInSearch_PushToRootDoc_NoFindPathSupport()
179 assertEquals(mEnv.docs.nextPath.getPath().size(), mEnv.state.stack.size()); in testOpensContainerDocuments_ClickArchiveInSearch_opensArchiveInArchiveProvider()
180 assertEquals(TestEnv.FILE_IN_ARCHIVE, mEnv.state.stack.pop()); in testOpensContainerDocuments_ClickArchiveInSearch_opensArchiveInArchiveProvider()
181 assertEquals(TestEnv.FOLDER_2, mEnv.state.stack.pop()); in testOpensContainerDocuments_ClickArchiveInSearch_opensArchiveInArchiveProvider()
182 assertEquals(TestEnv.FOLDER_1, mEnv.state.stack.pop()); in testOpensContainerDocuments_ClickArchiveInSearch_opensArchiveInArchiveProvider()
[all …]
DDragAndDropManagerTests.java744 final DocumentStack stack = new DocumentStack( in testDrop_Rejects_RootNotSupportCreate_DropOnDocument() local
746 assertFalse(mManager.drop(mClipData, mManager, stack, mCallback)); in testDrop_Rejects_RootNotSupportCreate_DropOnDocument()
763 final DocumentStack stack = new DocumentStack( in testDrop_Copies_DifferentRoot_DropOnDocument() local
765 assertTrue(mManager.drop(mClipData, mManager, stack, mCallback)); in testDrop_Copies_DifferentRoot_DropOnDocument()
767 mClipper.copyFromClip.assertLastArgument(Pair.create(stack, mClipData)); in testDrop_Copies_DifferentRoot_DropOnDocument()
785 final DocumentStack stack = new DocumentStack( in testDrop_Moves_SameRoot_DropOnDocument() local
787 assertTrue(mManager.drop(mClipData, mManager, stack, mCallback)); in testDrop_Moves_SameRoot_DropOnDocument()
789 mClipper.copyFromClip.assertLastArgument(Pair.create(stack, mClipData)); in testDrop_Moves_SameRoot_DropOnDocument()
807 final DocumentStack stack = new DocumentStack( in testDrop_Copies_SameRoot_ReadOnlyFile_DropOnDocument() local
809 assertTrue(mManager.drop(mClipData, mManager, stack, mCallback)); in testDrop_Copies_SameRoot_ReadOnlyFile_DropOnDocument()
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/base/
DDocumentStack.java196 public void reset(DocumentStack stack) { in reset() argument
198 Log.d(TAG, "Resetting the whole darn stack to: " + stack); in reset()
201 mList = stack.mList; in reset()
202 mRoot = stack.mRoot; in reset()
248 DocumentStack stack = new DocumentStack(); in fromLastAccessedCursor() local
251 DurableUtils.readFromArray(rawStack, stack); in fromLastAccessedCursor()
253 stack.updateRoot(matchingRoots); in fromLastAccessedCursor()
254 stack.updateDocuments(resolver); in fromLastAccessedCursor()
256 return stack; in fromLastAccessedCursor()
337 final DocumentStack stack = new DocumentStack();
[all …]
DState.java103 public final DocumentStack stack = new DocumentStack(); field in State
159 DurableUtils.writeToParcel(out, stack); in writeToParcel()
175 + ", stack=" + stack in toString()
198 DurableUtils.readFromParcel(in, state.stack);
/packages/apps/Dialer/java/com/android/voicemail/impl/mail/internet/
DMimeMessage.java550 private final Stack<Object> stack = new Stack<Object>(); field in MimeMessage.MimeMessageBuilder
555 if (!c.isInstance(stack.peek())) { in expect()
561 + stack.peek().getClass().getName() in expect()
568 if (stack.isEmpty()) { in startMessage()
569 stack.push(MimeMessage.this); in startMessage()
574 ((Part) stack.peek()).setBody(m); in startMessage()
575 stack.push(m); in startMessage()
585 stack.pop(); in endMessage()
598 ((Part) stack.peek()).addHeader(tokens[0], tokens[1].trim()); in field()
613 final Part e = (Part) stack.peek(); in startMultipart()
[all …]
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/base/
DDocumentStackTest.java141 DocumentStack stack = new DocumentStack(mStack); in testCopyConstructor() local
143 assertEquals(2, stack.size()); in testCopyConstructor()
144 assertEquals(DIR_1, stack.get(0)); in testCopyConstructor()
145 assertEquals(DIR_2, stack.get(1)); in testCopyConstructor()
146 assertEquals(ROOT_1, stack.getRoot()); in testCopyConstructor()
155 DocumentStack stack = new DocumentStack(mStack); in testCopyConstructor_MakesDeepCopy() local
159 assertEquals(2, stack.size()); in testCopyConstructor_MakesDeepCopy()
160 assertEquals(DIR_1, stack.get(0)); in testCopyConstructor_MakesDeepCopy()
161 assertEquals(DIR_2, stack.get(1)); in testCopyConstructor_MakesDeepCopy()
162 assertEquals(ROOT_1, stack.getRoot()); in testCopyConstructor_MakesDeepCopy()
/packages/apps/DocumentsUI/src/com/android/documentsui/files/
DActionHandler.java148 openInNewWindow(new DocumentStack(mState.stack, doc)); in openSelectedInNewWindow()
168 DocumentStack stack = new DocumentStack(root, doc); in pasteIntoFolder() local
169 mClipper.copyFromClipboard(doc, stack, mDialogs::showFileOperationStatus); in pasteIntoFolder()
257 mClipper.clipDocumentsForCut(mModel::getItemUri, selection, mState.stack.peek()); in cutToClipboard()
308 final @Nullable DocumentInfo srcParent = mState.stack.peek(); in deleteSelectedDocuments()
338 .withDestination(mState.stack) in deleteSelectedDocuments()
413 if (mState.stack.isInitialized()) { in initLocation()
475 DocumentStack stack = intent.getParcelableExtra(Shared.EXTRA_STACK); in launchToStackLocation() local
476 if (stack == null || stack.getRoot() == null) { in launchToStackLocation()
480 mState.stack.reset(stack); in launchToStackLocation()
[all …]
DConfig.java29 public boolean managedModeEnabled(DocumentStack stack) { in managedModeEnabled() argument
34 final RootInfo root = stack.getRoot(); in managedModeEnabled()
37 && stack.size() == 1; in managedModeEnabled()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/files/
DActionHandlerTest.java131 assertEquals(TestEnv.FOLDER_0, mEnv.state.stack.peek()); in testSpringOpenDirectory()
188 mEnv.state.stack.changeRoot(TestProvidersAccess.RECENTS); in testDeleteSelectedDocuments_RecentsRoot()
378 assertEquals(TestEnv.FILE_ARCHIVE, mEnv.state.stack.peek()); in testDocumentPicked_OpensArchives()
388 assertEquals(TestEnv.FOLDER_1, mEnv.state.stack.peek()); in testDocumentPicked_OpensDirectories()
413 mEnv.state.stack.changeRoot(TestProvidersAccess.DOWNLOADS); in testInitLocation_RestoresIfStackIsLoaded()
414 mEnv.state.stack.push(TestEnv.FOLDER_0); in testInitLocation_RestoresIfStackIsLoaded()
422 mEnv.state.stack.changeRoot(TestProvidersAccess.HAMMY); in testInitLocation_LoadsRootDocIfStackOnlyHasRoot()
515 DocumentStackAsserts.assertEqualsTo(mEnv.state.stack, TestProvidersAccess.HOME, in testInitLocation_LaunchToDocuments()
576 assertTrue(mEnv.state.stack.isEmpty()); in testRefresh_emptyStack()
674 Preconditions.checkState(mEnv.state.stack.size() == 1); in testShowInspector_OverridesRootDocumentName()
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/picker/
DActionHandler.java112 if (mState.stack.isInitialized()) { in initLocation()
186 private void onLastAccessedStackLoaded(@Nullable DocumentStack stack) { in onLastAccessedStackLoaded() argument
187 if (stack == null) { in onLastAccessedStackLoaded()
190 mState.stack.reset(stack); in onLastAccessedStackLoaded()
390 mState.stack, in saveDocument()
418 mState.stack, in finishPicking()
443 intent, mSearchMgr.isSearching(), Metrics.sanitizeRoot(mState.stack.getRoot())); in onPickFinished()
460 intent.putExtra(Shared.EXTRA_STACK, (Parcelable) mState.stack); in onPickFinished()
473 final DocumentInfo cwd = mState.stack.peek(); in getExecutorForCurrentDirectory()
DLastAccessedProvider.java123 ContentResolver resolver, String packageName, DocumentStack stack) { in setLastAccessed() argument
125 final byte[] rawStack = DurableUtils.writeToArrayOrNull(stack); in setLastAccessed()
243 final DocumentStack stack = new DocumentStack(); in purgeByAuthority() local
251 DurableUtils.readFromArray(rawStack, stack); in purgeByAuthority()
253 if (stack.getRoot() != null && predicate.test(stack.getRoot().authority)) { in purgeByAuthority()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/
DBinaryDictIOUtils.java83 Stack<Position> stack = new Stack<>(); in readUnigramsAndBigramsBinaryInner() local
87 stack.push(initPos); in readUnigramsAndBigramsBinaryInner()
89 while (!stack.empty()) { in readUnigramsAndBigramsBinaryInner()
90 Position p = stack.peek(); in readUnigramsAndBigramsBinaryInner()
106 stack.pop(); in readUnigramsAndBigramsBinaryInner()
124 stack.pop(); in readUnigramsAndBigramsBinaryInner()
132 stack.push(childrenPos); in readUnigramsAndBigramsBinaryInner()
/packages/apps/DocumentsUI/src/com/android/documentsui/queries/
DSearchViewManager.java255 public void update(DocumentStack stack) { in update() argument
281 showMenu(stack); in update()
284 public void showMenu(@Nullable DocumentStack stack) { in showMenu() argument
285 final DocumentInfo cwd = stack != null ? stack.peek() : null; in showMenu()
295 final RootInfo root = stack != null ? stack.getRoot() : null; in showMenu()
312 mMenuItem.setVisible(supportsSearch && (!stack.isRecents() || !mShowSearchBar)); in showMenu()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/queries/
DSearchViewManagerTest.java357 DocumentStack stack = new DocumentStack(root, new DocumentInfo()); in testSupportsMimeTypesSearch_showChips() local
359 mSearchViewManager.showMenu(stack); in testSupportsMimeTypesSearch_showChips()
372 DocumentStack stack = new DocumentStack(root, new DocumentInfo()); in testNotSupportsMimeTypesSearch_notShowChips() local
374 mSearchViewManager.showMenu(stack); in testNotSupportsMimeTypesSearch_notShowChips()
384 DocumentStack stack = new DocumentStack(root, new DocumentInfo()); in testSupportsSearch_showMenu() local
386 mSearchViewManager.showMenu(stack); in testSupportsSearch_showMenu()
396 DocumentStack stack = new DocumentStack(root, new DocumentInfo()); in testNotSupportsSearch_notShowMenuAndChips() local
399 mSearchViewManager.showMenu(stack); in testNotSupportsSearch_notShowMenuAndChips()
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/
DDocumentStackAsserts.java18 public static void assertEqualsTo(DocumentStack stack, RootInfo root, List<DocumentInfo> docs) { in assertEqualsTo() argument
19 assertEquals(root, stack.getRoot()); in assertEqualsTo()
20 assertEquals(docs.size(), stack.size()); in assertEqualsTo()
22 assertEquals(docs.get(i), stack.get(i)); in assertEqualsTo()
/packages/apps/DocumentsUI/src/com/android/documentsui/dirlist/
DDragHost.java105 mDragAndDropManager.updateState(v, mState.stack.getRoot(), mDestinationLookup.lookup(v)); in onDragEntered()
110 return (doc != null) && mDragAndDropManager.canSpringOpen(mState.stack.getRoot(), doc); in canSpringOpen()
128 DocumentStack dstStack = dst.equals(mState.stack.peek()) in handleDropEvent()
129 ? mState.stack in handleDropEvent()
130 : new DocumentStack(mState.stack, dst); in handleDropEvent()
/packages/apps/Gallery2/src/com/android/gallery3d/util/
DProfileData.java74 public void addSample(String[] stack) { in addSample() argument
75 int[] ids = new int[stack.length]; in addSample()
76 for (int i = 0; i < stack.length; i++) { in addSample()
77 ids[i] = nameToId(stack[i]); in addSample()
81 for (int i = stack.length - 1; i >= 0; i--) { in addSample()
DProfile.java127 StackTraceElement[] stack = thread.getStackTrace(); in sampleStack() local
128 String[] lines = new String[stack.length]; in sampleStack()
129 for (int i = 0; i < stack.length; i++) { in sampleStack()
130 lines[i] = stack[i].toString(); in sampleStack()
/packages/apps/LegacyCamera/jni/feature_mos/src/mosaic/
DDelaunay.cpp372 int stack[DM]; in rcssort() local
415 sj = stack[--m]; in rcssort()
416 si = stack[--m]; in rcssort()
423 stack[m++] = si; in rcssort()
424 stack[m++] = sL; in rcssort()
434 sj = stack[--m]; in rcssort()
435 si = stack[--m]; in rcssort()
442 stack[m++] = sk; in rcssort()
443 stack[m++] = sj; in rcssort()
/packages/apps/Messaging/src/com/android/messaging/mmslib/pdu/
DPduComposer.java1135 private LengthRecordNode stack = null; field in PduComposer.BufferStack
1157 temp.next = stack; in newbuf()
1158 stack = temp; in newbuf()
1173 mMessage = stack.currentMessage; in pop()
1174 mPosition = stack.currentPosition; in pop()
1176 toCopy = stack; in pop()
1179 stack = stack.next; in pop()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/services/
DAbstractJobTest.java100 DocumentStack stack = in createOperation() local
107 .withDestination(stack) in createOperation()
124 DocumentStack stack = in createJob() local
131 .withDestination(stack) in createJob()
/packages/apps/DocumentsUI/src/com/android/documentsui/archives/
DReadableArchive.java98 final Stack<ArchiveEntry> stack = new Stack<>(); in ReadableArchive() local
116 stack.push(entry); in ReadableArchive()
126 while (stack.size() > 0) { in ReadableArchive()
127 entry = stack.pop(); in ReadableArchive()
166 stack.push(parentEntry); in ReadableArchive()

1234