Skip to content

Commit 4f23f21

Browse files
authored
Update MainActivity.java
1 parent 7c413b0 commit 4f23f21

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

app/src/main/java/com/example/rootfilepicker/MainActivity.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -138,26 +138,7 @@ private void saveSelectedPaths() {
138138
writer.write(item.getFile().getAbsolutePath() + "\n");
139139
}
140140
}
141-
Toast.makeText(this, "Đã lưu tại: " + outFile.getAbsolutePath(), Toast.LENGTH_LONG).show();
142-
} catch (IOException e) {
143-
Toast.makeText(this, "Lỗi lưu file", Toast.LENGTH_SHORT).show();
144-
}
145-
}
146-
147-
private boolean checkPermission() {
148-
return ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED;
149-
}
150141

151-
private void requestPermission() {
152-
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, PERMISSION_REQUEST_CODE);
153-
}
154-
155-
@Override
156-
public void onBackPressed() {
157-
if (currentDirectory != null && !currentDirectory.getAbsolutePath().equals("/")) {
158-
loadDirectory(currentDirectory.getParentFile());
159-
} else {
160-
saveSelectedPaths();
161142
super.onBackPressed();
162143
}
163144
}

0 commit comments

Comments
 (0)