Commit faa49ffb authored by fallenstardust's avatar fallenstardust

remove getFavoriteFile

parent cc492897
......@@ -687,10 +687,4 @@ public class AppsSettings {
// Log.i("kk", "saveTemp:" + array);
mSharedPreferences.putString(Constants.PREF_LAST_ROOM_LIST, array.toString());
}
@Deprecated
//获取收藏文件
public File getFavoriteFile() {
return new File(getResourcePath(), "/favorite.txt");
}
}
......@@ -73,25 +73,8 @@ public class CardFavorites {
public void load() {
mList.clear();
File config = AppsSettings.get().getFavoriteFile();
List<String> lines;
if (config.exists()) {
//重命名
if (!config.renameTo(AppsSettings.get().getSystemConfig())) {
Log.w(TAG, "copy txt to conf");
try {
FileUtils.copyFile(AppsSettings.get().getFavoriteFile().getPath(), AppsSettings.get().getSystemConfig().getPath());
} catch (IOException e) {
//TODO 复制失败,直接删除?
FileUtils.deleteFile(AppsSettings.get().getFavoriteFile());
}
} else {
Log.d(TAG, "rename txt to conf");
}
config = AppsSettings.get().getSystemConfig();
} else {
config = AppsSettings.get().getSystemConfig();
}
File config = AppsSettings.get().getSystemConfig();
if (!config.exists()) {
Log.w(TAG, "config is no exists:" + config.getPath());
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment