Merge branch 'master' of https://github.com/jonatkins/ingress-intel-total-conversion
This commit is contained in:
commit
271d4fa1f3
@ -12,6 +12,16 @@ import java.io.File;
|
||||
* getContext().getCacheDir(); to decide where to store and read cached files.
|
||||
*/
|
||||
public class IITC_Application extends Application {
|
||||
|
||||
@Override
|
||||
public File getCacheDir() {
|
||||
if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean("pref_external_storage", false)) {
|
||||
return (getExternalCacheDir() != null) ? getExternalCacheDir() : super.getCacheDir();
|
||||
} else {
|
||||
return super.getCacheDir();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getFilesDir() {
|
||||
if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean("pref_external_storage", false)) {
|
||||
@ -20,4 +30,5 @@ public class IITC_Application extends Application {
|
||||
return super.getFilesDir();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user