/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/ |
D | AbstractActionHandlerTest.java | 74 private TestEnv mEnv; field in AbstractActionHandlerTest 91 mEnv = TestEnv.create(); in setUp() 92 mActivity = TestActivity.create(mEnv); in setUp() 94 mEnv.state.configStore = mTestConfigStore; in setUp() 99 mEnv.state.canForwardToProfileIdMap.put(TestProvidersAccess.USER_ID, true); in setUp() 103 mEnv.state, in setUp() 104 mEnv.providers, in setUp() 105 mEnv.docs, in setUp() 106 mEnv.searchViewManager, in setUp() 107 mEnv::lookupExecutor, in setUp() [all …]
|
D | GlobalSearchLoaderTest.java | 60 private TestEnv mEnv; field in GlobalSearchLoaderTest 80 mEnv = TestEnv.create(); in setUp() 81 mActivity = TestActivity.create(mEnv); in setUp() 84 mEnv.state.configStore = mTestConfigStore; in setUp() 89 mEnv.state.canForwardToProfileIdMap.put(TestProvidersAccess.USER_ID, true); in setUp() 92 mEnv.state.action = State.ACTION_BROWSE; in setUp() 93 mEnv.state.acceptMimes = new String[]{"*/*"}; in setUp() 96 mLoader = new GlobalSearchLoader(mActivity, mEnv.providers, mEnv.state, in setUp() 100 final DocumentInfo doc = mEnv.model.createFile(SEARCH_STRING + ".jpg", FILE_FLAG); in setUp() 102 mEnv.mockProviders.get(TestProvidersAccess.DOWNLOADS.authority) in setUp() [all …]
|
D | RecentsLoaderTests.java | 61 private TestEnv mEnv; field in RecentsLoaderTests 80 mEnv = TestEnv.create(); in setUp() 81 mActivity = TestActivity.create(mEnv); in setUp() 85 mEnv.state.configStore = mTestConfigStore; in setUp() 87 mEnv.state.action = State.ACTION_BROWSE; in setUp() 88 mEnv.state.acceptMimes = new String[]{"*/*"}; in setUp() 92 mEnv.state.canForwardToProfileIdMap.put(UserId.DEFAULT_USER, true); in setUp() 93 mEnv.state.canForwardToProfileIdMap.put(TestProvidersAccess.OtherUser.USER_ID, true); in setUp() 95 mEnv.state.canShareAcrossProfile = true; in setUp() 98 mLoader = new RecentsLoader(mActivity, mEnv.providers, mEnv.state, in setUp() [all …]
|
D | DocumentsAccessTest.java | 48 private TestEnv mEnv; field in DocumentsAccessTest 65 mEnv = TestEnv.create(); in setUp() 66 mEnv.reset(); in setUp() 67 mActivity = TestActivity.create(mEnv); in setUp() 68 mDocumentsAccess = DocumentsAccess.create(mActivity, mEnv.state); in setUp() 69 mEnv.state.configStore = mTestConfigStore; in setUp()
|
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/dirlist/ |
D | DirectoryAddonsAdapterTest.java | 44 private TestEnv mEnv; field in DirectoryAddonsAdapterTest 51 mEnv = TestEnv.create(AUTHORITY); in setUp() 53 mEnv.clear(); in setUp() 57 DocumentsAdapter.Environment env = new TestEnvironment(testContext, mEnv, mActionHandler); in setUp() 68 mEnv.model.addUpdateListener(mAdapter.getModelUpdateListener()); in setUp() 73 mEnv.reset(); // creates a mix of folders and files for us. in testItemCount_mixed() 75 assertEquals(mEnv.model.getItemCount() + 1, mAdapter.getItemCount()); in testItemCount_mixed() 79 mEnv.model.createFolder("a"); // id will be "1"...derived from insert position. in testGetPosition() 80 mEnv.model.createFile("b"); // id will be "2" in testGetPosition() 81 mEnv.model.update(); in testGetPosition() [all …]
|
D | DirectoryAddonsAdapterPrivateSpaceTest.java | 56 private TestEnv mEnv; field in DirectoryAddonsAdapterPrivateSpaceTest 67 mEnv = TestEnv.create(AUTHORITY); in setUp() 69 mEnv.clear(); in setUp() 80 DocumentsAdapter.Environment env = new TestEnvironment(testContext, mEnv, mActionHandler); in setUp() 94 mEnv.model.addUpdateListener(mAdapter.getModelUpdateListener()); in setUp() 99 mEnv.reset(); // creates a mix of folders and files for us. in testItemCount_mixed() 101 assertEquals(mEnv.model.getItemCount() + 1, mAdapter.getItemCount()); in testItemCount_mixed() 105 mEnv.model.createFolder("a"); // id will be "1"...derived from insert position. in testGetPosition() 106 mEnv.model.createFile("b"); // id will be "2" in testGetPosition() 107 mEnv.model.update(); in testGetPosition() [all …]
|
D | ModelBackedDocumentsAdapterTest.java | 38 private TestEnv mEnv; field in ModelBackedDocumentsAdapterTest 46 mEnv = TestEnv.create(AUTHORITY); in setUp() 50 DocumentsAdapter.Environment env = new TestEnvironment(testContext, mEnv, mActionHandler); in setUp() 62 assertEquals(mEnv.model.getItemCount(), mAdapter.getItemCount()); in testItemCount()
|
D | ModelBackedDocumentsAdapterPrivateSpaceTest.java | 38 private TestEnv mEnv; field in ModelBackedDocumentsAdapterPrivateSpaceTest 50 mEnv = TestEnv.create(AUTHORITY); in setUp() 55 DocumentsAdapter.Environment env = new TestEnvironment(testContext, mEnv, mActionHandler); in setUp() 67 assertEquals(mEnv.model.getItemCount(), mAdapter.getItemCount()); in testItemCount()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/picker/ |
D | ActionHandlerTest.java | 84 private TestEnv mEnv; field in ActionHandlerTest 104 mEnv = TestEnv.create(); in setUp() 105 mActivity = TestActivity.create(mEnv); in setUp() 106 mEnv.providers.configurePm(mActivity.packageMgr); in setUp() 107 mEnv.injector.pickResult = new PickResult(); in setUp() 110 mEnv.state.configStore = mTestConfigStore; in setUp() 115 mEnv.state.canForwardToProfileIdMap.put(TestProvidersAccess.USER_ID, true); in setUp() 120 mEnv.state, in setUp() 121 mEnv.providers, in setUp() 122 mEnv.docs, in setUp() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/dirlist/ |
D | Message.java | 74 protected final Environment mEnv; field in Message 90 mEnv = env; in Message() 173 } else if (mEnv.getModel().error != null) { in update() 174 update(null, mEnv.getModel().error, null, in update() 175 mEnv.getContext().getDrawable(R.drawable.ic_dialog_alert)); in update() 176 } else if (mEnv.getModel().info != null) { in update() 177 update(null, mEnv.getModel().info, null, in update() 178 mEnv.getContext().getDrawable(R.drawable.ic_dialog_info)); in update() 179 } else if (mEnv.getDisplayState().action == State.ACTION_OPEN_TREE in update() 180 && mEnv.getDisplayState().stack.peek() != null in update() [all …]
|
D | ModelBackedDocumentsAdapter.java | 53 private final Environment mEnv; field in ModelBackedDocumentsAdapter 68 mEnv = env; in ModelBackedDocumentsAdapter() 79 onModelUpdate(mEnv.getModel()); in ModelBackedDocumentsAdapter() 93 final State state = mEnv.getDisplayState(); in onCreateViewHolder() 100 mEnv.getContext(), parent, mIconHelper, mConfigStore); in onCreateViewHolder() 104 ? new GridPhotoHolder(mEnv.getContext(), parent, mIconHelper, in onCreateViewHolder() 106 : new GridDocumentHolder(mEnv.getContext(), parent, mIconHelper, in onCreateViewHolder() 115 mEnv.getContext(), parent, mIconHelper, mFileTypeLookup, mConfigStore); in onCreateViewHolder() 121 mEnv.initDocumentHolder(holder); in onCreateViewHolder() 128 final boolean selected = mEnv.isSelected(mModelIds.get(position)); in onBindViewHolder() [all …]
|
D | DirectoryAddonsAdapter.java | 46 private final Environment mEnv; field in DirectoryAddonsAdapter 66 mEnv = environment; in DirectoryAddonsAdapter() 97 final int columnCount = mEnv.getColumnCount(); in createSpanSizeLookup() 104 } else if (mEnv.getDisplayState().isPhotoPicking() in createSpanSizeLookup() 105 && mEnv.getDisplayState().derivedMode == State.MODE_GRID) { in createSpanSizeLookup() 122 holder = new TransparentDividerDocumentHolder(mEnv.getContext(), mConfigStore); 123 mEnv.initDocumentHolder(holder); 126 holder = new HeaderMessageDocumentHolder(mEnv.getContext(), parent, mConfigStore); 127 mEnv.initDocumentHolder(holder); 130 holder = new InflateMessageDocumentHolder(mEnv.getContext(), parent, mConfigStore); [all …]
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/files/ |
D | ActionHandlerTest.java | 95 private TestEnv mEnv; field in ActionHandlerTest 121 mEnv = TestEnv.create(mFeatures); in setUp() 122 mActivity = TestActivity.create(mEnv); in setUp() 129 mEnv.state.configStore = mTestConfigStore; in setUp() 134 mEnv.state.canForwardToProfileIdMap.put(TestProvidersAccess.USER_ID, true); in setUp() 137 mEnv.providers.configurePm(mActivity.packageMgr); in setUp() 138 ((TestActivityConfig) mEnv.injector.config).nextDocumentEnabled = true; in setUp() 139 mEnv.injector.dialogs = mDialogs; in setUp() 143 mEnv.selectDocument(TestEnv.FILE_GIF); in setUp() 150 DocumentStack path = new DocumentStack(Roots.create("123"), mEnv.model.getDocument("1")); in testOpenSelectedInNewWindow() [all …]
|
D | QuickViewIntentBuilderTest.java | 42 private TestEnv mEnv; field in QuickViewIntentBuilderTest 51 mEnv = TestEnv.create(); in setUp() 61 mContext, mRes, TestEnv.FILE_IN_ARCHIVE, mEnv.archiveModel, false); in testSetsNoFeatures_InArchiveDocument() 72 new QuickViewIntentBuilder(mContext, mRes, TestEnv.FILE_JPG, mEnv.model, false); in testSetsFullFeatures_RegularDocument() 92 new QuickViewIntentBuilder(mContext, mRes, TestEnv.FILE_JPG, mEnv.model, true); in testPickerFeatures_RegularDocument() 105 mEnv.model.reset(); in testBuild() 106 DocumentInfo previewDoc = mEnv.model.createFile("a.png", 0); in testBuild() 107 mEnv.model.createFile("b.png", 0); in testBuild() 108 mEnv.model.createFile("c.png", 0); in testBuild() 109 mEnv.model.update(); in testBuild() [all …]
|
/packages/apps/Gallery2/jni_jpegstream/src/ |
D | stream_wrapper.cpp | 22 StreamWrapper::StreamWrapper() : mEnv(NULL), in StreamWrapper() 37 mEnv = env; in updateEnv() 41 if (mEnv != NULL) { in init() 45 mEnv = env; in init() 71 if (mEnv != NULL) { in cleanup() 73 mEnv->DeleteGlobalRef(mStream); in cleanup() 78 mEnv->ReleaseByteArrayElements(mByteArray, mBytes, JNI_ABORT); in cleanup() 81 mEnv->DeleteGlobalRef(mByteArray); in cleanup() 87 mEnv = NULL; in cleanup()
|
D | inputstream_wrapper.cpp | 28 mEnv->ReleaseByteArrayElements(mByteArray, mBytes, JNI_COMMIT); in read() 30 if (mEnv->ExceptionCheck()) { in read() 33 bytesRead = static_cast<int32_t>(mEnv->CallIntMethod(mStream, sReadID, in read() 35 if (mEnv->ExceptionCheck()) { in read() 38 mBytes = mEnv->GetByteArrayElements(mByteArray, NULL); in read() 39 if (mBytes == NULL || mEnv->ExceptionCheck()) { in read() 50 bytesSkipped = static_cast<int64_t>(mEnv->CallLongMethod(mStream, sSkipID, in skip() 52 if (mEnv->ExceptionCheck() || bytesSkipped < 0) { in skip()
|
D | outputstream_wrapper.cpp | 26 mEnv->ReleaseByteArrayElements(mByteArray, mBytes, JNI_COMMIT); in write() 28 if (mEnv->ExceptionCheck()) { in write() 36 mEnv->CallVoidMethod(mStream, sWriteID, mByteArray, offset, length); in write() 37 if (mEnv->ExceptionCheck()) { in write() 40 mBytes = mEnv->GetByteArrayElements(mByteArray, NULL); in write() 41 if (mBytes == NULL || mEnv->ExceptionCheck()) { in write()
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/dirlist/ |
D | TestEnvironment.java | 30 private final TestEnv mEnv; field in TestEnvironment 35 mEnv = env; in TestEnvironment() 41 return mEnv.features; in getFeatures() 65 return mEnv.model; in getModel() 70 return mEnv.state; in getDisplayState()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
D | NavigationViewManager.java | 62 private final NavigationViewManager.Environment mEnv; field in NavigationViewManager 119 mEnv = env; in NavigationViewManager() 166 ? new ProfileTabs(tabLayoutContainer, mState, userManagerState, mEnv, activity, in getProfileTabs() 168 : new ProfileTabs(tabLayoutContainer, mState, userIdManager, mEnv, activity, in getProfileTabs() 240 mEnv.refreshCurrentRootAndDirectory(AnimationView.ANIM_LEAVE); in onNavigationItemSelected() 259 if (mEnv.isSearchExpanded()) { in update() 265 mDrawer.setTitle(mEnv.getDrawerTitle()); in update() 277 ? mEnv.getCurrentRoot().title : mState.stack.getTitle(); in update() 347 return mState.stack.isRecents() && !mEnv.isSearchExpanded() && mShowSearchBar; in shouldShowSearchBar()
|
D | HorizontalBreadcrumb.java | 153 private final Environment mEnv; field in HorizontalBreadcrumb.BreadcrumbAdapter 163 mEnv = env; in BreadcrumbAdapter() 185 isFirst ? mEnv.getCurrentRoot().title : mState.stack.get(position).displayName); in onBindViewHolder()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/dirlist/ |
D | DragHostTest.java | 52 private TestEnv mEnv; field in DragHostTest 65 mEnv = TestEnv.create(); in setUp() 66 mActivity = TestActivity.create(mEnv); in setUp() 76 mEnv.state, in setUp()
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/ |
D | TestActionHandler.java | 33 private final TestEnv mEnv; field in TestActionHandler 55 mEnv = env; in TestActionHandler() 90 mEnv.mExecutor.submit(() -> { in getRootDocument()
|
/packages/modules/Media/apex/framework/jni/ |
D | android_media_MediaParserJNI.cpp | 48 JstringHandle(JNIEnv* env, jstring value) : mEnv(env), mJstringValue(value) { in JstringHandle() 54 mEnv->ReleaseStringUTFChars(mJstringValue, mCstringValue); in ~JstringHandle() 62 JNIEnv* mEnv; member in __anonf92f792c0111::JstringHandle
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/sidebar/ |
D | RootsFragmentTest.java | 64 private TestEnv mEnv; field in RootsFragmentTest 96 mEnv = TestEnv.create(); in setUp() 97 mEnv.state.configStore = mTestConfigStore; in setUp() 121 mEnv.state, in testSortLoadResult_WithCorrectOrder()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/inspector/ |
D | InspectorControllerTest.java | 74 private TestEnv mEnv; field in InspectorControllerTest 88 mEnv = TestEnv.create(); in setUp() 89 mUserId = mEnv.userId; in setUp() 300 if (user.equals(mEnv.userHandle)) { in startActivityAsUser()
|