add: supports for daily task and disposable task

This commit is contained in:
hyb1996
2017-11-28 20:59:29 +08:00
parent e8bab643af
commit 97382965da
51 changed files with 1106 additions and 171 deletions

View File

@@ -354,4 +354,11 @@ public class PFiles {
String pre = "KMGTPE".substring(exp - 1, exp);
return String.format(Locale.getDefault(), "%.1f %sB", bytes / Math.pow(unit, exp), pre);
}
public static String getSimplifiedPath(String path) {
if (path.startsWith(Environment.getExternalStorageDirectory().getPath())) {
return path.substring(Environment.getExternalStorageDirectory().getPath().length());
}
return path;
}
}