/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/sorting/ |
D | SortModelTest.java | 75 private SortModel mModel; field in SortModelTest 79 mModel = new SortModel(Arrays.asList(DIMENSIONS)); in setUp() 80 mModel.addListener(DUMMY_LISTENER); in setUp() 85 assertEquals(DIMENSIONS.length, mModel.getSize()); in testSizeEquals() 91 assertSame(DIMENSIONS[i], mModel.getDimensionAt(i)); in testDimensionSame_getDimensionAt() 98 assertSame(dimension, mModel.getDimensionById(dimension.getId())); in testDimensionSame_getDimensionById() 106 mModel.setDimensionVisibility(DIMENSION_1.getId(), View.GONE); in testSetDimensionVisibility() 114 assertEquals(SortModel.SORT_DIMENSION_ID_UNKNOWN, mModel.getSortedDimensionId()); in testNotSortedByDefault() 119 mModel.setDefaultDimension(DIMENSION_1.getId()); in testSortByDefault() 125 assertSame(mModel, DUMMY_LISTENER.mLastSortModel); in testSortByDefault() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/ingest/adapter/ |
D | MtpAdapter.java | 47 private MtpDeviceIndex mModel; field in MtpAdapter 59 mModel = index; in setMtpDeviceIndex() 64 return mModel; in getMtpDeviceIndex() 80 return (mModel != null) && mModel.isDeviceConnected(); in deviceConnected() 84 return (mModel != null) && mModel.isIndexReady(); in indexReady() 89 return mModel != null ? mModel.size() : 0; in getCount() 94 return mModel.get(position, mSortOrder); in getItem() 147 imageView.setMtpDeviceAndObjectInfo(mModel.getDevice(), in getView() 172 return mModel.getFirstPositionForBucketNumber(section, mSortOrder); in getPositionForSection() 184 return mModel.getBucketNumberForPosition(position, mSortOrder); in getSectionForPosition() [all …]
|
D | MtpPagerAdapter.java | 42 private MtpDeviceIndex mModel; field in MtpPagerAdapter 54 mModel = index; in setMtpDeviceIndex() 60 return mModel != null ? mModel.sizeWithoutLabels() : 0; in getCount() 70 if (mModel == null) { in translatePositionWithLabels() 73 return mModel.getPositionWithoutLabelsFromPosition(position, mSortOrder); in translatePositionWithLabels() 104 IngestObjectInfo i = mModel.getWithoutLabels(position, mSortOrder); in instantiateItem() 105 v.getImageView().setMtpDeviceAndObjectInfo(mModel.getDevice(), i, mGeneration); in instantiateItem()
|
/packages/apps/Car/CompanionDeviceSupport/src/com/android/car/companiondevicesupport/activity/ |
D | AssociationActivity.java | 66 private AssociatedDeviceViewModel mModel; field in AssociationActivity 83 mModel.stopAssociation(); in onBackPressed() 89 mModel = ViewModelProviders.of(this).get(AssociatedDeviceViewModel.class); in observeViewModel() 91 mModel.getAssociationState().observe(this, state -> { in observeViewModel() 99 mModel.resetAssociationState(); in observeViewModel() 105 mModel.resetAssociationState(); in observeViewModel() 117 mModel.getBluetoothState().observe(this, state -> { in observeViewModel() 124 mModel.getAdvertisedCarName().observe(this, name -> { in observeViewModel() 129 mModel.getPairingCode().observe(this, code -> { in observeViewModel() 134 mModel.getDeviceDetails().observe(this, deviceDetails -> { in observeViewModel() [all …]
|
D | AssociatedDeviceDetailFragment.java | 44 private AssociatedDeviceViewModel mModel; field in AssociatedDeviceDetailFragment 59 mModel = ViewModelProviders.of(getActivity()).get(AssociatedDeviceViewModel.class); in onViewCreated() 60 mModel.getDeviceDetails().observe(this, this::setDeviceDetails); in onViewCreated() 63 mModel.toggleConnectionStatusForCurrentDevice(); in onViewCreated() 66 mModel.selectCurrentDeviceToRemove()); in onViewCreated() 68 mModel.startFeatureActivityForCurrentDevice( in onViewCreated()
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
D | PhotoView.java | 197 private Model mModel; field in PhotoView 320 mModel = model; in setModel() 321 mTileView.setModel(mModel); in setModel() 367 if (mModel.isCamera(mNextBound) in handleMessage() 368 || mModel.isCamera(mPrevBound)) { in handleMessage() 421 if (Math.abs(mUndoIndexHint - mModel.getCurrentIndex()) >= 3) { in notifyDataChange() 437 mModel.isCamera(0), mSizes); in notifyDataChange() 606 mIsCamera = mModel.isCamera(0); in reload() 607 mIsPanorama = mModel.isPanorama(0); in reload() 608 mIsStaticCamera = mModel.isStaticCamera(0); in reload() [all …]
|
D | TileImageView.java | 76 private TileSource mModel; field in TileImageView 166 mModel = model; in setModel() 176 if (mModel == null) { in notifyModelInvalidated() 182 setScreenNail(mModel.getScreenNail()); in notifyModelInvalidated() 183 mImageWidth = mModel.getImageWidth(); in notifyModelInvalidated() 184 mImageHeight = mModel.getImageHeight(); in notifyModelInvalidated() 185 mLevelCount = mModel.getLevelCount(); in notifyModelInvalidated() 402 setScreenNail(mModel == null ? null : mModel.getScreenNail()); in prepareTextures() 675 mDecodedTile = DecodeUtils.ensureGLCompatibleBitmap(mModel.getTile( in decode()
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
D | LauncherAppState.java | 51 private final LauncherModel mModel; field in LauncherAppState 81 mModel = new LauncherModel(this, mIconCache, AppFilter.newInstance(mContext)); in LauncherAppState() 83 LauncherAppsCompat.getInstance(mContext).addOnAppsChangedCallback(mModel); in LauncherAppState() 98 FeatureFlags.APP_SEARCH_IMPROVEMENTS.addChangeListener(context, mModel::forceReload); in LauncherAppState() 100 mContext.registerReceiver(mModel, filter); in LauncherAppState() 134 mModel.forceReload(); in onIdpChanged() 141 mContext.unregisterReceiver(mModel); in onTerminate() 143 launcherApps.removeOnAppsChangedCallback(mModel); in onTerminate() 152 mModel.initialize(launcher); in setLauncher() 154 .setWidgetRefreshCallback(mModel::refreshAndBindWidgetsAndShortcuts); in setLauncher() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/dirlist/ |
D | DirectoryFragment.java | 134 private Model mModel; field in DirectoryFragment 230 mModel = mInjector.getModel(); in onCreateView() 231 mModel.reset(); in onCreateView() 270 mModel.removeUpdateListener(mModelUpdateListener); in onDestroyView() 271 mModel.removeUpdateListener(mAdapter.getModelUpdateListener()); in onDestroyView() 317 mModel.addUpdateListener(mAdapter.getModelUpdateListener()); in onActivityCreated() 318 mModel.addUpdateListener(mModelUpdateListener); in onActivityCreated() 321 new DocsSelectionPredicate(mInjector.config, mState, mModel, mRecView); in onActivityCreated() 323 mFocusManager = mInjector.getFocusManager(mRecView, mModel); in onActivityCreated() 330 mSelectionMetadata = new SelectionMetadata(mModel::getItem); in onActivityCreated() [all …]
|
/packages/apps/Car/CompanionDeviceSupport/src/com/android/car/companiondevicesupport/feature/trust/ui/ |
D | TrustedDeviceDetailFragment.java | 46 private TrustedDeviceViewModel mModel; field in TrustedDeviceDetailFragment 75 mModel = ViewModelProviders.of(getActivity()).get(TrustedDeviceViewModel.class); in onViewCreated() 81 mModel.setDeviceToEnable(mAssociatedDevice); in onViewCreated() 86 mModel.setDeviceToDisable(mTrustedDevice); in onViewCreated() 131 mModel.getAssociatedDevice().observe(this, device -> { in observeViewModel() 141 mModel.getTrustedDevices().observe(this, this::setTrustedDevices); in observeViewModel() 143 mModel.getDisabledDevice().observe(this, device -> { in observeViewModel() 147 mModel.setDisabledDevice(null); in observeViewModel() 154 mModel.getEnabledDevice().observe(this, device -> { in observeViewModel() 158 mModel.setEnabledDevice(null); in observeViewModel()
|
D | TrustedDeviceActivity.java | 109 private TrustedDeviceViewModel mModel; field in TrustedDeviceActivity 161 mModel.setAssociatedDevice(device); in onActivityResult() 216 mModel = ViewModelProviders.of(this).get(TrustedDeviceViewModel.class); in observeViewModel() 217 mModel.getDeviceToDisable().observe(this, trustedDevice -> { in observeViewModel() 221 mModel.setDeviceToDisable(null); in observeViewModel() 233 mModel.getDeviceToEnable().observe(this, associatedDevice -> { in observeViewModel() 237 mModel.setDeviceToEnable(null); in observeViewModel() 253 mModel.setAssociatedDevice(device); in hasAssociatedDevice() 393 AssociatedDevice addedDevice = mModel.getAssociatedDevice().getValue(); in showEnrollmentSuccessToast() 457 mModel.setTrustedDevices(mTrustedDeviceManager.getTrustedDevicesForActiveUser()); [all …]
|
/packages/apps/Calendar/src/com/android/calendar/widget/ |
D | CalendarAppWidgetService.java | 125 private static CalendarAppWidgetModel mModel; field in CalendarAppWidgetService.CalendarFactory 214 if (mModel == null) { 223 if (mModel.mEventInfos.isEmpty() || mModel.mRowInfos.isEmpty()) { 232 RowInfo rowInfo = mModel.mRowInfos.get(position); 236 DayInfo dayInfo = mModel.mDayInfos.get(rowInfo.mIndex); 241 final EventInfo eventInfo = mModel.mEventInfos.get(rowInfo.mIndex); 333 if (mModel == null) { 336 return Math.max(1, mModel.mRowInfos.size()); 341 if (mModel == null || mModel.mRowInfos.isEmpty() || position >= getCount()) { 344 RowInfo rowInfo = mModel.mRowInfos.get(position); [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/app/ |
D | PhotoPage.java | 130 private PhotoPage.Model mModel; field in PhotoPage 334 updateCurrentPhoto(mModel.getMediaItem(0)); in onCreate() 473 mModel = pda; in onCreate() 474 mPhotoView.setModel(mModel); in onCreate() 506 MediaItem photo = mModel.getMediaItem(0); in onCreate() 517 if (!mModel.isEmpty()) { in onCreate() 518 MediaItem photo = mModel.getMediaItem(0); in onCreate() 538 mModel = new SinglePhotoDataAdapter(mActivity, mPhotoView, mediaItem); in onCreate() 539 mPhotoView.setModel(mModel); in onCreate() 662 MediaItem current = mModel.getMediaItem(0); in launchTinyPlanet() [all …]
|
D | SlideshowPage.java | 80 private Model mModel; field in SlideshowPage 143 mModel.nextSlide(new FutureListener<Slide>() { in loadNextBitmap() 176 mModel.pause(); in onPause() 187 mModel.resume(); in onResume() 206 mModel = new SlideshowDataAdapter(mActivity, in initializeData() 214 mModel = new SlideshowDataAdapter(mActivity, new SequentialSource(mediaSet, repeat), in initializeData()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/sorting/ |
D | SortListFragment.java | 33 private SortModel mModel; field in SortListFragment 50 mModel.sortByUser(item.id, item.direction); in onItemClicked() 56 for (int i = 0; i < mModel.getSize(); ++i) { in setupSortingList() 57 SortDimension dimension = mModel.getDimensionAt(i); in setupSortingList() 111 mModel = args.getParcelable(TAG_MODEL); in onCreateDialog() 113 mModel = savedInstanceState.getParcelable(TAG_MODEL); in onCreateDialog() 138 outState.putParcelable(TAG_MODEL, mModel); in onSaveInstanceState() 154 boolean selected = item.id == mModel.getSortedDimensionId() in getView() 155 && item.direction == mModel.getCurrentSortDirection(); in getView()
|
D | TableHeaderController.java | 43 private final SortModel mModel; field in TableHeaderController 49 mModel = sortModel; in TableHeaderController() 58 onModelUpdate(mModel, SortModel.UPDATE_TYPE_UNSPECIFIED); in TableHeaderController() 60 mModel.addListener(mModelListener); in TableHeaderController() 78 mModel.removeListener(mModelListener); in destroy() 83 SortDimension dimension = mModel.getDimensionById(id); in bindCell() 99 mModel.sortByUser(dimension.getId(), dimension.getNextDirection()); in onCellClicked()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/files/ |
D | ActionHandler.java | 99 private final Model mModel; field in ActionHandler 123 mModel = injector.getModel(); in ActionHandler() 146 DocumentInfo doc = mModel.getDocument(selection.iterator().next()); in openSelectedInNewWindow() 200 DocumentInfo doc = mModel.getDocument(details.getSelectionKey()); in openItem() 250 if (mModel.hasDocuments(selection, DocumentFilters.NOT_MOVABLE)) { in cutToClipboard() 257 mClipper.clipDocumentsForCut(mModel::getItemUri, selection, mState.stack.peek()); in cutToClipboard() 272 mClipper.clipDocumentsForCopy(mModel::getItemUri, selection); in copyToClipboard() 285 DocumentInfo doc = mModel.getDocument(selection.iterator().next()); in viewInOwner() 311 List<DocumentInfo> docs = mModel.getDocuments(selection); in deleteSelectedDocuments() 325 mModel::getItemUri, in deleteSelectedDocuments() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/model/ |
D | BaseModelUpdateTask.java | 45 private LauncherModel mModel; field in BaseModelUpdateTask 53 mModel = model; in init() 61 if (!mModel.isModelLoaded()) { in run() 81 final Callbacks callbacks = mModel.getCallback(); in scheduleCallbackTask() 83 Callbacks cb = mModel.getCallback(); in scheduleCallbackTask() 93 return mModel.getWriter(false /* hasVerticalHotseat */, false /* verifyChanges */); in getModelWriter()
|
D | ModelPreload.java | 37 private LauncherModel mModel; field in ModelPreload 45 mModel = model; in init() 52 mModel.startLoaderForResultsIfNotLoaded( in run() 54 Log.d(TAG, "Preload completed : " + mModel.isModelLoaded()); in run() 55 onComplete(mModel.isModelLoaded()); in run()
|
D | SdCardAvailableReceiver.java | 43 private final LauncherModel mModel; field in SdCardAvailableReceiver 49 mModel = app.getModel(); in SdCardAvailableReceiver() 74 mModel.onPackagesRemoved(user, in onReceive() 78 mModel.onPackagesUnavailable( in onReceive()
|
/packages/apps/TV/common/src/com/android/tv/common/feature/ |
D | Model.java | 29 private final String mModel; field in Model.ModelFeature 32 mModel = model; in ModelFeature() 41 return android.os.Build.MODEL.equals(mModel); in isEnabled() 46 return "ModelFeature(" + mModel + ")=" + isEnabled(); in toString()
|
/packages/apps/Gallery2/src/com/android/photos/views/ |
D | TiledImageRenderer.java | 75 private TileSource mModel; field in TiledImageRenderer 192 if (mModel != model) { in setModel() 193 mModel = model; in setModel() 220 if (mModel == null) { in notifyModelInvalidated() 226 mImageWidth = mModel.getImageWidth(); in notifyModelInvalidated() 227 mImageHeight = mModel.getImageHeight(); in notifyModelInvalidated() 228 mPreview = mModel.getPreview(); in notifyModelInvalidated() 229 mTileSize = mModel.getTileSize(); in notifyModelInvalidated() 690 mDecodedTile = mModel.getTile(mTileLevel, mX, mY, reuse); in decode()
|
/packages/apps/WallpaperPicker/src/com/android/photos/views/ |
D | TiledImageRenderer.java | 75 private TileSource mModel; field in TiledImageRenderer 192 if (mModel != model) { in setModel() 193 mModel = model; in setModel() 220 if (mModel == null) { in notifyModelInvalidated() 226 mImageWidth = mModel.getImageWidth(); in notifyModelInvalidated() 227 mImageHeight = mModel.getImageHeight(); in notifyModelInvalidated() 228 mPreview = mModel.getPreview(); in notifyModelInvalidated() 229 mTileSize = mModel.getTileSize(); in notifyModelInvalidated() 690 mDecodedTile = mModel.getTile(mTileLevel, mX, mY, reuse); in decode()
|
/packages/apps/Car/libs/car-media-common/src/com/android/car/media/common/ |
D | MediaButtonController.java | 68 private PlaybackViewModel mModel; field in MediaButtonController 109 if (mModel != null) { in setModel() 112 mModel = model; in setModel() 282 if (mModel != null) { in getPlaybackState() 283 return mModel.getPlaybackStateWrapper().getValue(); in getPlaybackState()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
D | DirectoryLoader.java | 61 private final SortModel mModel; field in DirectoryLoader 86 mModel = state.sortModel; in DirectoryLoader() 125 mModel.addQuerySortArgs(queryArgs); in loadInBackground() 162 cursor = mModel.sortCursor(cursor, mFileTypeLookup); in loadInBackground()
|