Home
last modified time | relevance | path

Searched refs:fileName (Results 1 – 25 of 114) sorted by relevance

12345

/packages/modules/IntentResolver/java/src/com/android/intentresolver/contentpreview/
DFileContentPreviewUi.java105 String fileName = in displayInternal() local
110 fileNameView.setText(fileName); in displayInternal()
176 String fileName = null; in extractFileInfo() local
187 fileName = cursor.getString(nameIndex); in extractFileInfo()
189 fileName = cursor.getString(titleIndex); in extractFileInfo()
207 if (TextUtils.isEmpty(fileName)) { in extractFileInfo()
208 fileName = uri.getPath(); in extractFileInfo()
209 fileName = fileName == null ? "" : fileName; in extractFileInfo()
210 int index = fileName.lastIndexOf('/'); in extractFileInfo()
212 fileName = fileName.substring(index + 1); in extractFileInfo()
[all …]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/debug/
DDataExporter.java55 final String fileName = generateRandomName() + OUT_FILE_SUFFIX; in exportData() local
56 final File outFile = getOutputFile(context, fileName); in exportData()
70 return DumpFileProvider.AUTHORITY_URI.buildUpon().appendPath(fileName).build(); in exportData()
82 public static void ensureValidFileName(String fileName) { in ensureValidFileName() argument
85 if (fileName.contains("..")) { in ensureValidFileName()
87 fileName); in ensureValidFileName()
90 if (!fileName.matches(VALID_FILE_NAME_REGEX)) { in ensureValidFileName()
92 " files are supported. Bad file name: " + fileName); in ensureValidFileName()
107 public static File getOutputFile(Context context, String fileName) { in getOutputFile() argument
108 return new File(getOutputDirectory(context), fileName); in getOutputFile()
DDumpFileProvider.java80 final String fileName = extractFileName(uri); in openFile() local
81 DataExporter.ensureValidFileName(fileName); in openFile()
82 final File file = DataExporter.getOutputFile(getContext(), fileName); in openFile()
93 final String fileName = extractFileName(uri); in query() local
94 DataExporter.ensureValidFileName(fileName); in query()
109 b.add(fileName); in query()
111 final File file = DataExporter.getOutputFile(getContext(), fileName); in query()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/opp/
DBluetoothOppSendFileInfo.java83 public BluetoothOppSendFileInfo(String fileName, String type, long length, in BluetoothOppSendFileInfo() argument
85 mFileName = fileName; in BluetoothOppSendFileInfo()
107 String fileName = null; in generateFileInfo() local
141 fileName = metadataCursor.getString(indexName); in generateFileInfo()
147 Log.d(TAG, "fileName = " + fileName + " length = " + length); in generateFileInfo()
154 if (fileName == null) { in generateFileInfo()
156 fileName = uri.getLastPathSegment(); in generateFileInfo()
157 if (D) Log.d(TAG, "fileName from URI :" + fileName); in generateFileInfo()
170 fileName = uri.getLastPathSegment(); in generateFileInfo()
253 return new BluetoothOppSendFileInfo(fileName, contentType, length, is, 0); in generateFileInfo()
DBluetoothOppIncomingFileConfirmActivity.java139 String fileName = mTransInfo.mFileName; in createView() local
140 if (fileName != null) { in createView()
141 fileName = fileName in createView()
146 ((TextView) view.findViewById(R.id.filename_content)).setText(fileName); in createView()
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/
DInternalStorageUiTest.java34 private static final String fileName = "!Test3345678"; field in InternalStorageUiTest
64 bots.directory.selectDocument(fileName); in testRenameFile()
74 bots.directory.assertDocumentsAbsent(fileName); in testRenameFile()
81 mDocsHelper.createFolder(rootPrimary, fileName); in createTestFiles()
87 if (bots.directory.hasDocuments(fileName)) { in deleteTestFiles()
88 bots.directory.selectDocument(fileName); in deleteTestFiles()
/packages/apps/Car/Settings/src/com/android/car/settings/system/
DLicenseHtmlGeneratorFromXml.java201 String fileName = readText(parser).trim(); in parse() local
202 if (!TextUtils.isEmpty(fileName)) { in parse()
203 fileNameToContentIdMap.put(fileName, contentId); in parse()
249 for (String fileName : fileNameList) { in generateHtml()
250 String contentId = fileNameToContentIdMap.get(fileName); in generateHtml()
261 contentIdAndFileNamesList.get(id).mFileNameList.add(fileName); in generateHtml()
262 writer.format("<li><a href=\"#id%d\">%s</a></li>\n", id, fileName); in generateHtml()
273 for (String fileName : contentIdAndFileNames.mFileNameList) { in generateHtml()
274 writer.format("%s <br/>\n", fileName); in generateHtml()
/packages/services/Car/service/src/com/android/car/telemetry/util/
DIoUtils.java63 @NonNull File dir, @NonNull String fileName, @NonNull PersistableBundle bundle) in writeBundle() argument
65 writeBundle(new File(dir, fileName), bundle); in writeBundle()
98 @NonNull File dir, @NonNull String fileName, @NonNull MessageLite proto) in writeProto() argument
100 writeProto(new File(dir, fileName), proto); in writeProto()
128 public static boolean deleteSilently(@NonNull File directory, @NonNull String fileName) { in deleteSilently() argument
131 directory.getAbsolutePath(), fileName)); in deleteSilently()
133 Slogf.w(CarLog.TAG_TELEMETRY, "Failed to delete file " + fileName + " in directory " in deleteSilently()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/inspector/
DHeaderTextSelectorTest.java55 CharSequence fileName = "filename"; in testSimpleFileName() local
57 String testSequence = fileName + extension; in testSimpleFileName()
65 assertEquals(selectedSequence, fileName); in testSimpleFileName()
71 CharSequence fileName = "filename"; in testLotsOfPeriodsInFileName() local
73 String testSequence = fileName + extension; in testLotsOfPeriodsInFileName()
81 assertEquals(selectedSequence, fileName); in testLotsOfPeriodsInFileName()
/packages/services/Car/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/
DE2eCarTestBase.java78 protected List<CarPropertyValue> getExpectedEvents(String fileName) in getExpectedEvents() argument
80 try (InputStream in = mContext.getAssets().open(fileName)) { in getExpectedEvents()
81 Log.d(TAG, "Reading golden test data" + fileName); in getExpectedEvents()
90 protected File makeShareable(String fileName) throws IOException { in makeShareable() argument
98 File internalFile = new File(filesDir, fileName); in makeShareable()
101 InputStream in = mContext.getAssets().open(fileName); in makeShareable()
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/opp/
DBluetoothOppSendFileInfoTest.java73 String fileName = "abc.txt"; in createInstance_withFileInputStream() local
79 new BluetoothOppSendFileInfo(fileName, type, length, inputStream, status); in createInstance_withFileInputStream()
82 assertThat(info.mFileName).isEqualTo(fileName); in createInstance_withFileInputStream()
144 String fileName = "coolName.txt"; in generateFileInfo_withUncorrectableMismatch_returnsSendFileInfoError() local
152 mCursor.addRow(new Object[]{fileName, fileLength}); in generateFileInfo_withUncorrectableMismatch_returnsSendFileInfoError()
179 String fileName = "coolName.txt"; in generateFileInfo_withCorrectableMismatch_returnInfoWithCorrectLength() local
187 mCursor.addRow(new Object[]{fileName, fileLength}); in generateFileInfo_withCorrectableMismatch_returnInfoWithCorrectLength()
205 assertThat(info.mFileName).isEqualTo(fileName); in generateFileInfo_withCorrectableMismatch_returnInfoWithCorrectLength()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
DDictionaryInfoUtils.java229 public static String getCategoryFromFileName(@Nonnull final String fileName) {
230 final String id = getWordListIdFromFileName(fileName);
272 final String fileName = replaceFileNameDangerousCharacters(id);
273 return getCacheDirectoryForLocale(locale, context) + File.separator + fileName;
286 final String fileName = replaceFileNameDangerousCharacters(
288 return stagingDirectory + File.separator + fileName;
295 final String fileName = stagingFile.getName();
296 final int index = fileName.indexOf(TEMP_DICT_FILE_SUB);
302 final String[] localeAndFileId = fileName.split(TEMP_DICT_FILE_SUB);
528 String fileName = dictionaryFile.getName();
[all …]
/packages/apps/TV/tuner/src/com/android/tv/tuner/source/
DTsStreamWriter.java224 String fileName = file.getName(); in getFileId() local
225 int lastSeparator = fileName.lastIndexOf(SEPARATOR); in getFileId()
226 if (!fileName.endsWith(".ts") || lastSeparator == -1) { in getFileId()
230 return Integer.parseInt(fileName.substring(lastSeparator + 1, fileName.length() - 3)); in getFileId()
233 Log.e(TAG, fileName + " is not a valid file name."); in getFileId()
/packages/apps/Launcher3/src/com/android/launcher3/logging/
DFileLog.java152 String fileName = FILE_NAME_PREFIX + (cal.get(Calendar.DAY_OF_YEAR) % LOG_DAYS); in handleMessage() local
154 if (!fileName.equals(mCurrentFileName)) { in handleMessage()
160 mCurrentFileName = fileName; in handleMessage()
163 File logFile = new File(sLogsDirectory, fileName); in handleMessage()
212 private static void dumpFile(PrintWriter out, String fileName) {
213 File logFile = new File(sLogsDirectory, fileName);
220 out.println("--- logfile: " + fileName + " ---");
/packages/modules/StatsD/statsd/src/storage/
DStorageManager.cpp86 char* fileName = de->d_name; in findTrainInfoFileNameLocked() local
87 if (fileName[0] == '.') continue; in findTrainInfoFileNameLocked()
89 size_t fileNameLength = strlen(fileName); in findTrainInfoFileNameLocked()
91 if (0 == strncmp(fileName + fileNameLength - trainName.length(), trainName.c_str(), in findTrainInfoFileNameLocked()
93 return string(fileName); in findTrainInfoFileNameLocked()
157 std::string fileName = in writeTrainInfo() local
161 int fd = open(fileName.c_str(), O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR); in writeTrainInfo()
163 VLOG("Attempt to access %s but failed", fileName.c_str()); in writeTrainInfo()
270 string fileName = findTrainInfoFileNameLocked(trainName); in readTrainInfoLocked() local
271 if (fileName.empty()) { in readTrainInfoLocked()
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/dirlist/
DDocumentHolder.java182 protected String getPreviewIconContentDescription(boolean isWorkProfile, String fileName) { in getPreviewIconContentDescription() argument
184 return getUpdatablePreviewIconContentDescription(isWorkProfile, fileName); in getPreviewIconContentDescription()
187 isWorkProfile ? R.string.preview_work_file : R.string.preview_file, fileName); in getPreviewIconContentDescription()
193 boolean isWorkProfile, String fileName) { in getUpdatablePreviewIconContentDescription() argument
201 () -> itemView.getResources().getString(defaultStringId, fileName), in getUpdatablePreviewIconContentDescription()
202 /* formatArgs= */ fileName); in getUpdatablePreviewIconContentDescription()
/packages/apps/CarrierConfig/tests/src/com/android/carrierconfig/
DCarrierConfigTest.java239 for (String fileName : files) { in forEachConfigXml()
241 if (!fileName.startsWith("carrier_config_")) continue; in forEachConfigXml()
242 if (fileName.startsWith("carrier_config_mccmnc_")) { in forEachConfigXml()
243 mccmnc = fileName.substring("carrier_config_mccmnc_".length(), in forEachConfigXml()
244 fileName.indexOf(".xml")); in forEachConfigXml()
249 parser.setInput(assetMgr.open(fileName), "utf-8"); in forEachConfigXml()
254 throw new AssertionError("Problem in " + fileName + ": " + e.getMessage(), e); in forEachConfigXml()
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/testutils/
DCertUtils.java43 public static X509Certificate createCertFromPemFile(String fileName) throws Exception { in createCertFromPemFile() argument
46 context.getResources().getAssets().open(PEM_FOLDER_NAME + "/" + fileName); in createCertFromPemFile()
53 public static RSAPrivateKey createRsaPrivateKeyFromKeyFile(String fileName) throws Exception { in createRsaPrivateKeyFromKeyFile() argument
56 context.getResources().getAssets().open(KEY_FOLDER_NAME + "/" + fileName); in createRsaPrivateKeyFromKeyFile()
/packages/services/BuiltInPrintService/src/com/android/bips/jni/
DPdfRender.java101 private int openDocument(String fileName) { in openDocument() argument
102 if (DEBUG) Log.d(TAG, "openDocument() " + fileName); in openDocument()
107 if (mCurrentFile != null && !mCurrentFile.equals(fileName)) { in openDocument()
112 ParcelFileDescriptor pfd = ParcelFileDescriptor.open(new File(fileName), in openDocument()
116 Log.w(TAG, "Failed to open " + fileName, ex); in openDocument()
/packages/modules/Wifi/service/java/com/android/server/wifi/hotspot2/anqp/
DIconInfo.java50 public IconInfo(int width, int height, String language, String iconType, String fileName) { in IconInfo() argument
55 mFileName = fileName; in IconInfo()
77 String fileName = in parse() local
80 return new IconInfo(width, height, language, iconType, fileName); in parse()
/packages/apps/TV/tuner/src/com/android/tv/tuner/exoplayer/buffer/
DDvrStorageManager.java169 String fileName = in readTrackInfoFiles() local
172 File file = new File(getBufferDir(), fileName); in readTrackInfoFiles()
209 String fileName = in readCaptionInfoFiles() local
212 File file = new File(getBufferDir(), fileName); in readCaptionInfoFiles()
334 String fileName = in writeTrackInfoFiles() local
337 File file = new File(getBufferDir(), fileName); in writeTrackInfoFiles()
367 String fileName = in writeCaptionInfoFiles() local
369 File file = new File(getBufferDir(), fileName); in writeCaptionInfoFiles()
/packages/apps/TV/tuner/src/com/android/tv/tuner/exoplayer2/buffer/
DDvrStorageManager.java169 String fileName = in readTrackInfoFiles() local
172 File file = new File(getBufferDir(), fileName); in readTrackInfoFiles()
209 String fileName = in readCaptionInfoFiles() local
212 File file = new File(getBufferDir(), fileName); in readCaptionInfoFiles()
334 String fileName = in writeTrackInfoFiles() local
337 File file = new File(getBufferDir(), fileName); in writeTrackInfoFiles()
367 String fileName = in writeCaptionInfoFiles() local
369 File file = new File(getBufferDir(), fileName); in writeCaptionInfoFiles()
/packages/providers/MediaProvider/src/com/android/providers/media/util/
DSyntheticPathUtils.java60 final String fileName = extractFileName(path); in isRedactedPath() local
62 return fileName != null in isRedactedPath()
64 && startsWith(fileName, REDACTED_URI_ID_PREFIX) in isRedactedPath()
65 && fileName.length() == REDACTED_URI_ID_SIZE; in isRedactedPath()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/
Dfile_utils.cpp108 const char *const fileName) { in getFilePathBufSize() argument
109 return strlen(dirPath) + 1 /* '/' */ + strlen(fileName) + 1 /* terminator */; in getFilePathBufSize()
112 /* static */ void FileUtils::getFilePath(const char *const dirPath, const char *const fileName, in getFilePath() argument
114 snprintf(outFilePath, filePathBufSize, "%s/%s", dirPath, fileName); in getFilePath()
/packages/services/BuiltInPrintService/jni/plugins/
Dpdf_render.c48 static int openDocument(pdf_render_ifc_t *obj, const char *fileName) { in openDocument() argument
49 LOGD("getPageCount %p %s", obj, fileName); in openDocument()
53 jstring fileNameString = (*self->env)->NewStringUTF(self->env, fileName); in openDocument()
56 LOGD("getPageCount %p %s returning %d", obj, fileName, count); in openDocument()

12345