Version 10 - Fixed Download
This commit is contained in:
@@ -117,7 +117,7 @@ public class ModDetailAnnounceFragment extends Fragment implements Download.OnDo
|
|||||||
super.onAttach(context);
|
super.onAttach(context);
|
||||||
if (context instanceof MainActivityListener) {
|
if (context instanceof MainActivityListener) {
|
||||||
this.context = ((MainActivityListener) context);
|
this.context = ((MainActivityListener) context);
|
||||||
this.context.addRequestPermissionsResultListener(getDownload().getRequestPermissionsResultListener(), "ModDetailResourceFragment");
|
this.context.addRequestPermissionsResultListener(getDownload().getRequestPermissionsResultListener(), "ModDetailAnnounceFragment");
|
||||||
} else
|
} else
|
||||||
throw new RuntimeException(context.toString() + " must implement MainActivityListener");
|
throw new RuntimeException(context.toString() + " must implement MainActivityListener");
|
||||||
}
|
}
|
||||||
@@ -125,7 +125,7 @@ public class ModDetailAnnounceFragment extends Fragment implements Download.OnDo
|
|||||||
@Override
|
@Override
|
||||||
public void onDetach() {
|
public void onDetach() {
|
||||||
super.onDetach();
|
super.onDetach();
|
||||||
this.context.removeRequestPermissionsResultListener("ModDetailResourceFragment");
|
this.context.removeRequestPermissionsResultListener("ModDetailAnnounceFragment");
|
||||||
}
|
}
|
||||||
|
|
||||||
Download getDownload() {
|
Download getDownload() {
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ public class ModDetailAssignmentFragment extends Fragment implements Download.On
|
|||||||
super.onAttach(context);
|
super.onAttach(context);
|
||||||
if (context instanceof MainActivityListener) {
|
if (context instanceof MainActivityListener) {
|
||||||
this.context = ((MainActivityListener) context);
|
this.context = ((MainActivityListener) context);
|
||||||
this.context.addRequestPermissionsResultListener(getDownload().getRequestPermissionsResultListener(), "ModDetailResourceFragment");
|
this.context.addRequestPermissionsResultListener(getDownload().getRequestPermissionsResultListener(), "ModDetailAssignmentFragment");
|
||||||
} else
|
} else
|
||||||
throw new RuntimeException(context.toString() + " must implement MainActivityListener");
|
throw new RuntimeException(context.toString() + " must implement MainActivityListener");
|
||||||
}
|
}
|
||||||
@@ -125,7 +125,7 @@ public class ModDetailAssignmentFragment extends Fragment implements Download.On
|
|||||||
@Override
|
@Override
|
||||||
public void onDetach() {
|
public void onDetach() {
|
||||||
super.onDetach();
|
super.onDetach();
|
||||||
this.context.removeRequestPermissionsResultListener("ModDetailResourceFragment");
|
this.context.removeRequestPermissionsResultListener("ModDetailAssignmentFragment");
|
||||||
}
|
}
|
||||||
|
|
||||||
Download getDownload() {
|
Download getDownload() {
|
||||||
|
|||||||
@@ -613,7 +613,7 @@ class KVVModuleList extends HTTPService {
|
|||||||
// Saves file in folder: DOWNLOADS/moduleName
|
// Saves file in folder: DOWNLOADS/moduleName
|
||||||
File folder = new File(Environment.getExternalStoragePublicDirectory(
|
File folder = new File(Environment.getExternalStoragePublicDirectory(
|
||||||
Environment.DIRECTORY_DOWNLOADS), moduleName);
|
Environment.DIRECTORY_DOWNLOADS), moduleName);
|
||||||
if (!folder.mkdir()) {
|
if (!folder.mkdirs()) {
|
||||||
log.w( "Directory not created", folder.toString());
|
log.w( "Directory not created", folder.toString());
|
||||||
}
|
}
|
||||||
String path = "";
|
String path = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user