File tree Expand file tree Collapse file tree
app/src/main/java/com/example/rootfilepicker Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments