/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/ |
D | UserIdManagerTest.java | 32 import com.android.documentsui.base.UserId; 70 UserId currentUser = UserId.of(systemUser); in testGetUserIds_systemUser_currentUserIsSystemUser() 72 assertThat(mUserIdManager.getUserIds()).containsExactly(UserId.of(systemUser)); in testGetUserIds_systemUser_currentUserIsSystemUser() 78 UserId currentUser = UserId.of(systemUser); in testGetUserIds_systemUserAndManagedUser_currentUserIsSystemUser() 81 .containsExactly(UserId.of(systemUser), UserId.of(managedUser1)).inOrder(); in testGetUserIds_systemUserAndManagedUser_currentUserIsSystemUser() 87 UserId currentUser = UserId.of(managedUser1); in testGetUserIds_systemUserAndManagedUser_currentUserIsManagedUser() 90 .containsExactly(UserId.of(systemUser), UserId.of(managedUser1)).inOrder(); in testGetUserIds_systemUserAndManagedUser_currentUserIsManagedUser() 96 UserId currentUser = UserId.of(systemUser); in testGetUserIds_managedUserAndSystemUser_currentUserIsSystemUser() 99 .containsExactly(UserId.of(systemUser), UserId.of(managedUser1)).inOrder(); in testGetUserIds_managedUserAndSystemUser_currentUserIsSystemUser() 106 UserId currentUser = UserId.of(nonManagedUser2); in testGetUserIds_NormalUser1AndNormalUser2_currentUserIsNormalUser2() [all …]
|
D | ProfileTabsTest.java | 32 import com.android.documentsui.base.UserId; 47 private final UserId systemUser = UserId.of(UserHandle.SYSTEM); 48 private final UserId managedUser = UserId.of(100); 224 private void initializeWithUsers(UserId... userIds) { in initializeWithUsers() 226 for (UserId userId : userIds) { in initializeWithUsers() 308 public UserId getSelectedUser() { in getSelectedUser()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/base/ |
D | UserIdTest.java | 48 assertEquals(UserId.CURRENT_USER, UserId.CURRENT_USER); in testEquals() 49 assertEquals(UserId.of(UserHandle.of(10)), UserId.of(UserHandle.of(10))); in testEquals() 54 assertFalse(UserId.CURRENT_USER.equals(null)); in testEquals_handlesNulls() 59 assertFalse(UserId.of(UserHandle.of(0)).equals(UserId.of(UserHandle.of(10)))); in testNotEquals_differentUserHandle() 64 assertEquals(UserId.of(UserHandle.of(0)).hashCode(), in testHashCode_sameUserHandle() 65 UserId.of(UserHandle.of(0)).hashCode()); in testHashCode_sameUserHandle() 70 assertThat(UserId.of(UserHandle.of(0)).hashCode()).isNotEqualTo( in testHashCode_differentUserHandle() 71 UserId.of(UserHandle.of(10)).hashCode()); in testHashCode_differentUserHandle() 76 UserId userId = UserId.of(Process.myUserHandle()); in testAsContext_sameUserReturnProvidedContext() 82 assertSame(mContext, UserId.UNSPECIFIED_USER.asContext(mContext)); in testAsContext_unspecifiedUserReturnProvidedContext() [all …]
|
D | RootInfoTest.java | 34 rootInfo.userId = UserId.of(100); in testEquals_sameUser() 39 rootInfo2.userId = UserId.of(100); in testEquals_sameUser() 49 rootInfo.userId = UserId.of(100); in testNotEquals_differentUser() 54 rootInfo2.userId = UserId.of(101); in testNotEquals_differentUser() 64 rootInfo.userId = UserId.of(100); in testCopyInfo_equal()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
D | UserIdManager.java | 38 import com.android.documentsui.base.UserId; 53 List<UserId> getUserIds(); in getUserIds() 60 UserId getSystemUser(); in getSystemUser() 67 UserId getManagedUser(); in getManagedUser() 84 private final UserId mCurrentUser; 88 private final List<UserId> mUserIds = new ArrayList<>(); 90 private UserId mSystemUser = null; 92 private UserId mManagedUser = null; 105 this(context, UserId.CURRENT_USER, in RuntimeUserIdManager() 110 RuntimeUserIdManager(Context context, UserId currentUser, boolean isDeviceSupported) { in RuntimeUserIdManager() [all …]
|
D | ProfileTabs.java | 28 import com.android.documentsui.base.UserId; 48 private List<UserId> mUserIds; 63 mUserIds = Collections.singletonList(UserId.CURRENT_USER); in ProfileTabs() 69 mListener.onUserSelected((UserId) tab.getTag()); in ProfileTabs() 106 List<UserId> userIds = mUserIdManager.getUserIds(); in updateTabsIfNeeded() 127 public UserId getSelectedUser() { in getSelectedUser() 129 return (UserId) mTabs.getTabAt(mTabs.getSelectedTabPosition()).getTag(); in getSelectedUser() 131 return UserId.CURRENT_USER; in getSelectedUser() 148 private TabLayout.Tab createTab(int resId, UserId userId) { in createTab() 175 void onUserSelected(UserId userId); in onUserSelected()
|
D | DocumentsAccess.java | 38 import com.android.documentsui.base.UserId; 51 @Nullable DocumentInfo getDocument(Uri uri, UserId userId); in getDocument() 52 @Nullable DocumentInfo getArchiveDocument(Uri uri, UserId userId); in getArchiveDocument() 57 Path findDocumentPath(Uri uri, UserId userId) in findDocumentPath() 60 List<DocumentInfo> getDocuments(UserId userId, String authority, List<String> docIds) in getDocuments() 89 public @Nullable DocumentInfo getDocument(Uri uri, UserId userId) { in getDocument() 102 public List<DocumentInfo> getDocuments(UserId userId, String authority, List<String> docIds) in getDocuments() 128 public DocumentInfo getArchiveDocument(Uri uri, UserId userId) { in getArchiveDocument() 140 public Path findDocumentPath(Uri docUri, UserId userId) in findDocumentPath() 166 return UserId.CURRENT_USER.equals(parentDoc.userId) in createDocument()
|
D | ActionHandler.java | 33 import com.android.documentsui.base.UserId; 92 void requestQuietModeDisabled(RootInfo info, UserId userId); in requestQuietModeDisabled() 94 void showAppDetails(ResolveInfo info, UserId userId); in showAppDetails() 98 void openRoot(ResolveInfo app, UserId userId); in openRoot() 100 void loadRoot(Uri uri, UserId userId); in loadRoot() 102 void loadCrossProfileRoot(RootInfo info, UserId selectedUser); in loadCrossProfileRoot()
|
D | ThumbnailCache.java | 32 import com.android.documentsui.base.UserId; 73 public Result getThumbnail(Uri uri, UserId userId, Point size) { in getThumbnail() 127 public void putThumbnail(Uri uri, UserId userId, Point size, Bitmap thumbnail, in putThumbnail() 151 public void removeUri(Uri uri, UserId userId) { in removeUri() 328 final UserId userId; 330 SizeIndexKey(Uri uri, UserId userId) { in SizeIndexKey() 361 final UserId userId; 364 CacheKey(Uri uri, UserId userId, Point point) { in CacheKey()
|
D | AbstractActionHandler.java | 59 import com.android.documentsui.base.UserId; 178 public void requestQuietModeDisabled(RootInfo info, UserId userId) { in requestQuietModeDisabled() 266 public void openRoot(ResolveInfo app, UserId userId) { in openRoot() 271 public void showAppDetails(ResolveInfo info, UserId userId) { in showAppDetails() 708 protected final void loadDocument(Uri uri, UserId userId, LoadDocStackCallback callback) { in loadDocument() 719 public final void loadRoot(Uri uri, UserId userId) { in loadRoot() 725 public final void loadCrossProfileRoot(RootInfo info, UserId selectedUser) { in loadCrossProfileRoot() 737 private final UserId mSelectedUserId; 739 LoadCrossProfileRootCallback(RootInfo rootInfo, UserId selectedUser) { in LoadCrossProfileRootCallback() 776 loadDocument(uri, UserId.DEFAULT_USER, this::onStackLoaded); in launchToDocument() [all …]
|
D | DirectoryLoader.java | 48 import com.android.documentsui.base.UserId; 129 final List<UserId> userIds = new ArrayList<>(); in loadInBackground() 133 for (UserId userId : DocumentsApplication.getUserIdManager( in loadInBackground() 222 private Cursor queryOnUsers(List<UserId> userIds, String authority, Bundle queryArgs) in queryOnUsers() 225 for (UserId userId : userIds) { in queryOnUsers() 237 if (UserId.CURRENT_USER.equals(userId)) { in queryOnUsers()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/base/ |
D | UserId.java | 43 public final class UserId { class 46 public static final UserId UNSPECIFIED_USER = UserId.of(UserHandle.of(-1000)); 48 public static final UserId CURRENT_USER = UserId.of(Process.myUserHandle()); 51 public static final UserId DEFAULT_USER = CURRENT_USER; 57 private UserId(UserHandle userHandle) { in UserId() method in UserId 65 public static UserId of(UserHandle userHandle) { in of() 66 return new UserId(userHandle); in of() 74 public static UserId of(int userIdentifier) { in of() 223 if (o instanceof UserId) { in equals() 224 UserId other = (UserId) o; in equals() [all …]
|
D | DocumentInfo.java | 60 public UserId userId; 80 userId = UserId.UNSPECIFIED_USER; in reset() 98 userId = UserId.read(in); in read() 101 userId = UserId.CURRENT_USER; in read() 124 UserId.write(out, userId); in write() 163 final UserId userId = UserId.of(getCursorInt(cursor, RootCursorWrapper.COLUMN_USER_ID)); in fromDirectoryCursor() 168 public static DocumentInfo fromCursor(Cursor cursor, UserId userId, String authority) { in fromCursor() 175 public void updateFromCursor(Cursor cursor, UserId userId, String authority) { in updateFromCursor() 193 public static DocumentInfo fromUri(ContentResolver resolver, Uri uri, UserId userId) in fromUri() 204 public void updateSelf(ContentResolver resolver, UserId userId) throws FileNotFoundException { in updateSelf() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/roots/ |
D | ProvidersCache.java | 61 import com.android.documentsui.base.UserId; 97 private final Map<UserId, RootsChangedObserver> mRootsChangedObservers = new HashMap<>(); 100 private final Map<UserId, RootInfo> mRecentsRoots = new HashMap<>(); 125 private RootInfo generateRecentsRoot(UserId rootUserId) { in generateRecentsRoot() 138 private RootInfo createOrGetRecentsRoot(UserId userId) { 142 private RootsChangedObserver createOrGetRootsChangedObserver(UserId userId) { 147 private static <T> T createOrGetByUserId(Map<UserId, T> map, UserId userId, 148 Function<UserId, T> supplier) { 159 private final UserId mUserId; 161 RootsChangedObserver(UserId userId) { [all …]
|
D | ProvidersAccess.java | 29 import com.android.documentsui.base.UserId; 48 RootInfo getRootOneshot(UserId userId, String authority, String rootId); in getRootOneshot() 56 RootInfo getRecentsRoot(UserId userId); in getRecentsRoot() 58 String getApplicationName(UserId userId, String authority); in getApplicationName() 60 String getPackageName(UserId userId, String authority); in getPackageName() 66 Collection<RootInfo> getRootsForAuthorityBlocking(UserId userId, String authority); in getRootsForAuthorityBlocking() 116 if (!UserId.CURRENT_USER.equals(root.userId) && !state.supportsCrossProfile()) { in getMatchingRoots()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/sidebar/ |
D | RootItemListBuilderTest.java | 24 import com.android.documentsui.base.UserId; 69 UserId.DEFAULT_USER, Collections.singletonList(UserId.DEFAULT_USER)); in testGetList_empty() 78 UserId.DEFAULT_USER, Collections.singletonList(UserId.DEFAULT_USER)); in testGetList_singleUser() 91 mBuilder = new RootItemListBuilder(UserId.DEFAULT_USER, in testGetList_twoUsers_allMultiProfileRootsMatchOther_defaultUser() 92 Lists.newArrayList(UserId.DEFAULT_USER, TestProvidersAccess.OtherUser.USER_ID)); in testGetList_twoUsers_allMultiProfileRootsMatchOther_defaultUser() 118 Lists.newArrayList(UserId.DEFAULT_USER, TestProvidersAccess.OtherUser.USER_ID)); in testGetList_twoUsers_allMultiProfileRootsMatchOther_otherUser() 141 mBuilder = new RootItemListBuilder(UserId.DEFAULT_USER, in testGetList_twoUsers_defaultUserHasAllMatchingRoots() 142 Lists.newArrayList(UserId.DEFAULT_USER, TestProvidersAccess.OtherUser.USER_ID)); in testGetList_twoUsers_defaultUserHasAllMatchingRoots() 164 Lists.newArrayList(UserId.DEFAULT_USER, TestProvidersAccess.OtherUser.USER_ID)); in testGetList_twoUsers_secondUserFillsUpNonMatchingRoots()
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/ |
D | TestUserIdManager.java | 19 import com.android.documentsui.base.UserId; 25 public List<UserId> userIds = new ArrayList<>(); 26 public UserId systemUser = null; 27 public UserId managedUser = null; 30 public List<UserId> getUserIds() { in getUserIds() 35 public UserId getSystemUser() { in getSystemUser() 40 public UserId getManagedUser() { in getManagedUser()
|
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/ |
D | TestProvidersAccess.java | 26 import com.android.documentsui.base.UserId; 40 public static final UserId USER_ID = UserId.of(USER_HANDLE); 57 UserId userId = TestProvidersAccess.USER_ID; 174 public static final UserId USER_ID = UserId.of(OtherUser.USER_HANDLE); 183 UserId userId = OtherUser.USER_ID; 260 public RootInfo getRootOneshot(UserId userId, String authority, String rootId) { in getRootOneshot() 281 public Collection<RootInfo> getRootsForAuthorityBlocking(UserId userId, String authority) { in getRootsForAuthorityBlocking() 300 public RootInfo getRecentsRoot(UserId userId) { in getRecentsRoot() 305 public String getApplicationName(UserId userId, String authority) { in getApplicationName() 310 public String getPackageName(UserId userId, String authority) { in getPackageName()
|
D | TestDocumentsAccess.java | 29 import com.android.documentsui.base.UserId; 54 public DocumentInfo getDocument(Uri uri, UserId userId) { in getDocument() 59 public List<DocumentInfo> getDocuments(UserId userId, String authority, List<String> docIds) { in getDocuments() 78 public DocumentInfo getArchiveDocument(Uri uri, UserId userId) { in getArchiveDocument() 88 public Path findDocumentPath(Uri docUri, UserId userId) throws RemoteException { in findDocumentPath()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/dirlist/ |
D | IconHelperTest.java | 29 import com.android.documentsui.base.UserId; 41 private UserId systemUser = UserId.of(UserHandle.SYSTEM); 42 private UserId managedUser = UserId.of(100);
|
/packages/apps/DocumentsUI/src/com/android/documentsui/sidebar/ |
D | RootItemListBuilder.java | 21 import com.android.documentsui.base.UserId; 54 private final UserId mSelectedUser; 55 private final List<UserId> mUserIds; 58 RootItemListBuilder(UserId selectedUser, List<UserId> userIds) { in RootItemListBuilder()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/roots/ |
D | ProvidersAccessTest.java | 31 import com.android.documentsui.base.UserId; 42 private static final UserId OTHER_USER = UserId.of(UserId.DEFAULT_USER.getIdentifier() + 1); 179 root.userId = UserId.DEFAULT_USER; in testExcludedAuthorities() 206 return buildForMimeTypes(UserId.DEFAULT_USER, mimeTypes); in buildForMimeTypes() 209 private static RootInfo buildForMimeTypes(UserId userId, String... mimeTypes) { in buildForMimeTypes()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/inspector/ |
D | RuntimeDataSupplier.java | 35 import com.android.documentsui.base.UserId; 67 public void loadDocInfo(Uri uri, UserId userId, Consumer<DocumentInfo> updateView) { in loadDocInfo() 112 public void getDocumentMetadata(Uri uri, UserId userId, Consumer<Bundle> callback) { in getDocumentMetadata() 166 private final UserId mUserId; 170 Callbacks(Context context, Uri uri, UserId userId, Consumer<Cursor> callback) { in Callbacks() 183 return UserId.createCursorLoader(mContext, mUri, mUserId); in onCreateLoader()
|
D | InspectorActivity.java | 35 import com.android.documentsui.base.UserId; 49 public static Intent createIntent(Context context, Uri uri, UserId userId) { in createIntent() 86 UserId userId = UserId.of( in onStart() 87 getIntent().getIntExtra(EXTRA_USER_ID, UserId.UNSPECIFIED_USER.getIdentifier())); in onStart()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/dirlist/ |
D | IconHelper.java | 48 import com.android.documentsui.base.UserId; 68 private final UserId mManagedUser; 81 @Nullable UserId managedUser) { in IconHelper() 170 public void load(Uri uri, UserId userId, String mimeType, int docFlags, int docIcon, in load() 201 private boolean loadThumbnail(Uri uri, UserId userId, String docAuthority, long docLastModified, in loadThumbnail() 246 private Drawable getDocumentIcon(Context context, UserId userId, String authority, String id, in getDocumentIcon()
|