use of com.clear.helpers.InfoCache in project AndroidCleaner by ReguloSarmiento.
the class HistoryActivity method espacioDescargas.
public String espacioDescargas() {
File file = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
long tamanoDescarga = 0;
if (file != null) {
if (file.listFiles() != null) {
for (File f : file.listFiles()) {
if (!f.isDirectory()) {
tamanoDescarga += f.length();
}
}
}
}
return new InfoCache().calculateSize(tamanoDescarga);
}
use of com.clear.helpers.InfoCache in project AndroidCleaner by ReguloSarmiento.
the class CacheActivity method iniciarHilo.
public void iniciarHilo() {
appsList = new ArrayList<InfoApp>();
app = new InfoCache(this, getPackageManager().getInstalledPackages(0));
app.setHandler(handler);
app.start();
}
use of com.clear.helpers.InfoCache in project AndroidCleaner by ReguloSarmiento.
the class HistoryActivity method espacioArchivos.
public String espacioArchivos() {
File file = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
long tamanoDescarga = 0;
if (file != null) {
if (file.listFiles() != null) {
for (File f : file.listFiles()) {
if (f.isDirectory()) {
for (File d : f.listFiles()) {
tamanoDescarga += d.length();
}
}
}
}
}
return new InfoCache().calculateSize(tamanoDescarga);
}