Home
last modified time | relevance | path

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

/development/samples/BrokenKeyDerivation/src/com/example/android/brokenkeyderivation/
DBrokenKeyDerivationActivity.java240 private void readFromFileOrCreateRandom(String fileName, byte[] bytes) { in readFromFileOrCreateRandom() argument
241 if (fileExists(fileName)) { in readFromFileOrCreateRandom()
242 readBytesFromFile(fileName, bytes); in readFromFileOrCreateRandom()
247 writeToFile(fileName, bytes); in readFromFileOrCreateRandom()
250 private boolean fileExists(String fileName) { in fileExists() argument
251 File file = new File(getFilesDir(), fileName); in fileExists()
255 private void removeFile(String fileName) { in removeFile() argument
256 File file = new File(getFilesDir(), fileName); in removeFile()
260 private void writeToFile(String fileName, byte[] bytes) { in writeToFile() argument
261 try (FileOutputStream fos = openFileOutput(fileName, Context.MODE_PRIVATE)) { in writeToFile()
[all …]
/development/samples/browseable/AutoBackupForApps/src/com.example.android.autobackupsample/
DAddFileActivity.java108 String fileName = getIntent().getStringExtra(FILE_NAME); in onResume() local
116 if (TextUtils.isEmpty(fileName) || in onResume()
117 isFileExists(fileName) || in onResume()
133 createFileWithRandomDataAndFinishActivity(fileName, mFileStorage, in onResume()
146 String fileName = fileNameEditText.getText().toString(); in onCreateFileButtonClick() local
149 if (TextUtils.isEmpty(fileName) || isFileExists(fileName)) { in onCreateFileButtonClick()
174 createFileWithRandomDataAndFinishActivity(fileName, mFileStorage, String.valueOf(fileSize)); in onCreateFileButtonClick()
222 private void createFileWithRandomDataAndFinishActivity(String fileName, FileStorage storage, in createFileWithRandomDataAndFinishActivity() argument
231 file = getInternalFile(fileName); in createFileWithRandomDataAndFinishActivity()
238 file = new File(externalAppDir, fileName); in createFileWithRandomDataAndFinishActivity()
[all …]
DMainActivityFragment.java110 String fileName = getItem(position).getAbsolutePath(); in onResume()
111 fileNameView.setText(fileName); in onResume()
/development/tools/winscope/src/
Ddecode.js218 function protoDecoder(buffer, fileType, fileName, store) { argument
229 return dataFile(fileName, data.map(x => x.timestamp), data, blobUrl, fileType.dataType);
232 function videoDecoder(buffer, fileType, fileName, store) { argument
235 return dataFile(fileName, timeline, blobUrl, blobUrl, fileType.dataType);
268 function decodedFile(fileType, buffer, fileName, store) { argument
269 return [fileType, fileType.decoder(buffer, fileType, fileName, store)];
272 function detectAndDecode(buffer, fileName, store) { argument
274 return decodedFile(FILE_TYPES['layers_trace'], buffer, fileName, store);
277 return decodedFile(FILE_TYPES['window_trace'], buffer, fileName, store);
280 return decodedFile(FILE_TYPES['screen_recording'], buffer, fileName, store);
[all …]
/development/samples/browseable/PermissionRequest/src/com.example.android.permissionrequest/
DSimpleWebServer.java185 private byte[] loadContent(String fileName) throws IOException { in loadContent() argument
189 input = mAssets.open(fileName); in loadContent()
212 private String detectMimeType(String fileName) { in detectMimeType() argument
213 if (TextUtils.isEmpty(fileName)) { in detectMimeType()
215 } else if (fileName.endsWith(".html")) { in detectMimeType()
217 } else if (fileName.endsWith(".js")) { in detectMimeType()
219 } else if (fileName.endsWith(".css")) { in detectMimeType()
/development/samples/browseable/ScopedDirectoryAccess/src/com.example.android.scopeddirectoryaccess/
DDirectoryEntryAdapter.java38 viewHolder.fileName.setText(mDirectoryEntries.get(position).fileName); in onBindViewHolder()
63 public TextView fileName; field in DirectoryEntryAdapter.ViewHolder
69 fileName = (TextView) v.findViewById(R.id.textview_filename); in ViewHolder()
DDirectoryEntry.java26 public String fileName; field in DirectoryEntry
32 fileName = in.readString(); in DirectoryEntry()
55 parcel.writeString(fileName); in writeToParcel()
DScopedDirectoryAccessFragment.java205 entry.fileName = childCursor.getString(childCursor.getColumnIndex( in updateDirectoryEntries()
/development/tools/apkcheck/src/com/android/apkcheck/
DApkCheck.java160 static boolean parseApiDescr(ApiList apiList, String fileName) { in parseApiDescr() argument
164 FileReader fileReader = new FileReader(fileName); in parseApiDescr()
165 result = parseXml(apiList, fileReader, fileName); in parseApiDescr()
168 System.err.println("Error opening " + fileName); in parseApiDescr()
181 String fileName) { in parseXml() argument
194 System.err.println("Error parsing " + fileName + " line " + in parseXml()
197 System.err.println("Error while reading " + fileName + ": " + in parseXml()
/development/samples/training/threadsample/src/com/example/android/threadsample/
DRSSPullParser.java145 String fileName; in parseXml() local
177 fileName = Uri.parse(urlValue).getLastPathSegment(); in parseXml()
178 mImage.put(imageNameKey, fileName); in parseXml()
/development/samples/ApiDemos/src/com/example/android/mmslib/pdu/
DPduBody.java66 byte[] fileName = part.getFilename(); in putPartToMaps()
67 if(null != fileName) { in putPartToMaps()
68 String clc = new String(fileName); in putPartToMaps()
DPduPart.java376 public void setFilename(byte[] fileName) { in setFilename() argument
377 if(null == fileName) { in setFilename()
381 mPartHeader.put(P_FILENAME, fileName); in setFilename()
/development/tools/rmtypedefs/test/com/android/tools/rmtypedefs/
DRmTypeDefsTest.java220 String fileName = file.getName(); in list() local
222 fileName = rootName; in list()
224 sb.append(fileName); in list()
238 prefix = prefix + fileName + "/"; in list()
/development/samples/browseable/Quiz/Application/src/com.example.android.wearable.quiz/
DJsonUtils.java37 public static JSONObject loadJsonFile(Context context, String fileName) throws IOException, in loadJsonFile() argument
39 InputStream is = context.getAssets().open(fileName); in loadJsonFile()
/development/samples/browseable/ActivitySceneTransitionBasic/src/com.example.android.activityscenetransitionbasic/
DItem.java52 Item (String name, String author, String fileName) { in Item() argument
55 mFileName = fileName; in Item()
/development/cmds/monkey/src/com/android/commands/monkey/
DMonkeySourceRandomScript.java63 for (String fileName: scriptFileNames) { in MonkeySourceRandomScript()
64 mScriptSources.add(new MonkeySourceScript(random, fileName, throttle, in MonkeySourceRandomScript()
DMonkey.java942 private static boolean loadPackageListFromFile(String fileName, Set<String> list) { in loadPackageListFromFile() argument
945 reader = new BufferedReader(new FileReader(fileName)); in loadPackageListFromFile()
/development/samples/ApiDemos/src/com/example/android/apis/os/
DMmsMessagingDemo.java161 final String fileName = "send." + String.valueOf(Math.abs(mRandom.nextLong())) + ".dat"; in sendMessage() local
162 mSendFile = new File(getCacheDir(), fileName); in sendMessage()
171 .path(fileName) in sendMessage()
216 final String fileName = "download." + String.valueOf(Math.abs(mRandom.nextLong())) + ".dat"; in downloadMessage() local
217 mDownloadFile = new File(getCacheDir(), fileName); in downloadMessage()
224 .path(fileName) in downloadMessage()
/development/tools/rmtypedefs/src/com/android/tools/rmtypedefs/
DRmTypeDefs.java179 String fileName = file.getName(); in addTypeDef() local
180 int index = fileName.lastIndexOf('$'); in addTypeDef()
184 File container = new File(parentFile, fileName.substring(0, index) + ".class"); in addTypeDef()
/development/samples/browseable/DirectorySelection/src/com.example.android.directoryselection/
DDirectoryEntry.java23 public String fileName; field in DirectoryEntry
DDirectoryEntryAdapter.java82 viewHolder.getFileName().setText(mDirectoryEntries.get(position).fileName); in onBindViewHolder()
DDirectorySelectionFragment.java179 entry.fileName = childCursor.getString(0); in updateDirectoryEntries()