Lines Matching defs:diskName
77 for (String diskName : databaseList) {
78 if (shouldDiskNameBeVisible(diskName)) {
79 mDatabaseNames.add(publicNameFromDiskName(diskName));
83 for (String diskName : fileList) {
84 if (shouldDiskNameBeVisible(diskName)) {
85 mFileNames.add(publicNameFromDiskName(diskName));
91 * Returns if the given diskName starts with the given prefix or not.
92 * @param diskName name of the database/file.
94 boolean shouldDiskNameBeVisible(String diskName) {
95 return diskName.startsWith(mFilePrefix);
99 * Returns the public name (everything following the prefix) of the given diskName.
100 * @param diskName name of the database/file.
102 String publicNameFromDiskName(String diskName) {
103 if (!shouldDiskNameBeVisible(diskName)) {
104 throw new IllegalArgumentException("disk file should not be visible: " + diskName);
106 return diskName.substring(mFilePrefix.length(), diskName.length());