Android Download Manager always displays correct free space #300

This commit is contained in:
mhutti1 2016-09-15 11:01:53 +01:00
parent 050142af5f
commit a8b09d17ad

View File

@ -276,7 +276,7 @@ public class LibraryFragment extends Fragment implements AdapterView.OnItemClick
public long getSpaceAvailable() {
return new File(PreferenceManager.getDefaultSharedPreferences(super.getActivity())
.getString(KiwixMobileActivity.PREF_STORAGE,Environment.getExternalStorageState())).getFreeSpace();
.getString(KiwixMobileActivity.PREF_STORAGE,Environment.getExternalStorageDirectory().getPath())).getFreeSpace();
}
public class DownloadServiceConnection {