Home
last modified time | relevance | path

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

123

/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/apps/Bluetooth/src/com/android/bluetooth/opp/
DBluetoothOppSendFileInfo.java82 public BluetoothOppSendFileInfo(String fileName, String type, long length, in BluetoothOppSendFileInfo() argument
84 mFileName = fileName; in BluetoothOppSendFileInfo()
106 String fileName = null; in generateFileInfo() local
133 fileName = metadataCursor.getString(indexName); in generateFileInfo()
139 Log.d(TAG, "fileName = " + fileName + " length = " + length); in generateFileInfo()
146 if (fileName == null) { in generateFileInfo()
148 fileName = uri.getLastPathSegment(); in generateFileInfo()
149 if (D) Log.d(TAG, "fileName from URI :" + fileName); in generateFileInfo()
162 fileName = uri.getLastPathSegment(); in generateFileInfo()
241 return new BluetoothOppSendFileInfo(fileName, contentType, length, is, 0); in generateFileInfo()
DBluetoothOppNotification.java286 String fileName = cursor.getString(dataIndex); in updateActiveNotification() local
287 if (fileName == null) { in updateActiveNotification()
288 fileName = cursor.getString(filenameHintIndex); in updateActiveNotification()
290 if (fileName == null) { in updateActiveNotification()
291 fileName = mContext.getString(R.string.unknown_file); in updateActiveNotification()
306 item.description = mContext.getString(R.string.notification_sending, fileName); in updateActiveNotification()
309 mContext.getString(R.string.notification_receiving, fileName); in updateActiveNotification()
/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/tests/BugReportApp/src/com/google/android/car/bugreport/
DSimpleUploaderAsyncTask.java82 Storage storage, MetaBugReport bugReport, String fileName, InputStream data) in uploadSimple() argument
97 .setName(fileName) in uploadSimple()
107 Log.v(TAG, "started uploading object " + fileName + " to bucket " + bucket); in uploadSimple()
126 String fileName = bugReport.getBugReportFileName(); in upload() local
127 if (Strings.isNullOrEmpty(fileName)) { in upload()
129 fileName = new File(bugReport.getFilePath()).getName(); in upload()
132 StorageObject object = uploadSimple(storage, bugReport, fileName, inputStream); in upload()
133 Log.v(TAG, "finished uploading object " + object.getName() + " file " + fileName); in upload()
/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/DocumentsUI/tests/functional/com/android/documentsui/
DInternalStorageUiTest.java35 private static final String fileName = "!Test3345678"; field in InternalStorageUiTest
72 bots.directory.selectDocument(fileName); in testRenameFile()
82 bots.directory.assertDocumentsAbsent(fileName); in testRenameFile()
89 mDocsHelper.createFolder(rootPrimary, fileName); in createTestFiles()
95 if (bots.directory.hasDocuments(fileName)) { in deleteTestFiles()
96 bots.directory.selectDocument(fileName); in deleteTestFiles()
/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/apps/Launcher3/src/com/android/launcher3/logging/
DFileLog.java146 String fileName = FILE_NAME_PREFIX + (cal.get(Calendar.DAY_OF_YEAR) & 1); in handleMessage() local
148 if (!fileName.equals(mCurrentFileName)) { in handleMessage()
154 mCurrentFileName = fileName; in handleMessage()
157 File logFile = new File(sLogsDirectory, fileName); in handleMessage()
205 private static void dumpFile(PrintWriter out, String fileName) {
206 File logFile = new File(sLogsDirectory, fileName);
213 out.println("--- logfile: " + fileName + " ---");
/packages/services/Car/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/
DE2eCarTestBase.java85 protected List<CarPropertyValue> getExpectedEvents(String fileName) in getExpectedEvents() argument
87 try (InputStream in = mContext.getAssets().open(fileName)) { in getExpectedEvents()
88 Log.d(TAG, "Reading golden test data" + fileName); in getExpectedEvents()
97 protected File makeShareable(String fileName) throws IOException { in makeShareable() argument
105 File internalFile = new File(filesDir, fileName); in makeShareable()
108 InputStream in = mContext.getAssets().open(fileName); in makeShareable()
/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/CarrierConfig/tests/src/com/android/carrierconfig/
DCarrierConfigTest.java238 for (String fileName : files) { in forEachConfigXml()
240 if (!fileName.startsWith("carrier_config_")) continue; in forEachConfigXml()
241 if (fileName.startsWith("carrier_config_mccmnc_")) { in forEachConfigXml()
242 mccmnc = fileName.substring("carrier_config_mccmnc_".length(), in forEachConfigXml()
243 fileName.indexOf(".xml")); in forEachConfigXml()
248 parser.setInput(assetMgr.open(fileName), "utf-8"); in forEachConfigXml()
253 throw new AssertionError("Problem in " + fileName + ": " + e.getMessage(), e); in forEachConfigXml()
/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/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/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/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/testutils/
DCertUtils.java40 public static X509Certificate createCertFromPemFile(String fileName) throws Exception { in createCertFromPemFile() argument
43 context.getResources().getAssets().open(PEM_FOLDER_NAME + "/" + fileName); in createCertFromPemFile()
50 public static RSAPrivateKey createRsaPrivateKeyFromKeyFile(String fileName) throws Exception { in createRsaPrivateKeyFromKeyFile() argument
53 context.getResources().getAssets().open(KEY_FOLDER_NAME + "/" + fileName); in createRsaPrivateKeyFromKeyFile()
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/
DTelephonyBackupAgent.java440 private void backupAll(FullBackupDataOutput data, Cursor cursor, String fileName) in backupAll() argument
447 try (JsonWriter jsonWriter = getJsonWriter(fileName)) { in backupAll()
448 if (fileName.endsWith(SMS_BACKUP_FILE_SUFFIX)) { in backupAll()
454 backupFile(messagesWritten, fileName, data); in backupAll()
483 private void backupFile(int messagesWritten, String fileName, FullBackupDataOutput data) in backupFile() argument
485 final File file = new File(getFilesDir().getPath() + "/" + fileName); in backupFile()
533 final String fileName = file.getName(); in onHandleIntent() local
535 Log.d(TAG, "onHandleIntent restoring file " + fileName); in onHandleIntent()
538 mTelephonyBackupAgent.doRestoreFile(fileName, fileInputStream.getFD()); in onHandleIntent()
607 private void doRestoreFile(String fileName, FileDescriptor fd) throws IOException {
[all …]
/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()
/packages/apps/Test/connectivity/PMC/src/com/android/pmc/
DPMCStatusLogger.java46 public PMCStatusLogger(String fileName, String tag) { in PMCStatusLogger() argument
50 mFile = new File(LOG_DIR + "/" + fileName); in PMCStatusLogger()
54 Log.e(TAG, "Exception creating log file: " + fileName + " " + e); in PMCStatusLogger()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/
DMigrateSystemAppsSnapshotTask.java67 String fileName = file.getName(); in migrateIfNecessary() local
68 Matcher matcher = XML_FILE_NAME_PATTERN.matcher(fileName); in migrateIfNecessary()
70 ProvisionLogger.logw("Found invalid file during migration: " + fileName); in migrateIfNecessary()
/packages/apps/Dialer/java/com/android/dialer/backup/
DDialerPersistentBackupAgent.java78 for (String fileName : sharedPreferencesToBackup) { in getBackupSpecification()
79 LogUtil.i("DialerPersistentBackupAgent.getBackupSpecification", "arrayMap.put: " + fileName); in getBackupSpecification()
80 arrayMap.put(fileName, BackupKeyPredicates.alwaysTrue()); in getBackupSpecification()
/packages/apps/Messaging/src/android/support/v7/mms/pdu/
DPduBody.java66 byte[] fileName = part.getFilename(); in putPartToMaps()
67 if(null != fileName) { in putPartToMaps()
68 String clc = new String(fileName); in putPartToMaps()
/packages/apps/Nfc/src/com/android/nfc/beam/
DBeamTransferManager.java518 static File generateUniqueDestination(String path, String fileName) { in generateUniqueDestination() argument
519 int dotIndex = fileName.lastIndexOf("."); in generateUniqueDestination()
524 fileNameWithoutExtension = fileName; in generateUniqueDestination()
526 extension = fileName.substring(dotIndex); in generateUniqueDestination()
527 fileNameWithoutExtension = fileName.substring(0, dotIndex); in generateUniqueDestination()
529 File dstFile = new File(path + File.separator + fileName); in generateUniqueDestination()

123