public static File[] getDownloadDirs(String subDir) {
Context context = XposedApp.getInstance();
ArrayList<File> dirs = new ArrayList<>(2);
for (File dir : ContextCompat.getExternalCacheDirs(context)) {
if (dir != null && EnvironmentCompat.getStorageState(dir).equals(Environment.MEDIA_MOUNTED)) {
dirs.add(new File(new File(dir, "downloads"), subDir));
}
}
dirs.add(new File(new File(context.getCacheDir(), "downloads"), subDir));
return dirs.toArray(new File[dirs.size()]);
}
我想问一下为啥这里的new File 构造函数 传递的一个是 dir 和 dowloads 但是下面的一个
您好,构造函数也是可以重载的