本文整理汇总了Java中org.fdroid.fdroid.Utils.getIconsDir方法的典型用法代码示例。如果您正苦于以下问题:Java Utils.getIconsDir方法的具体用法?Java Utils.getIconsDir怎么用?Java Utils.getIconsDir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.fdroid.fdroid.Utils
的用法示例。
在下文中一共展示了Utils.getIconsDir方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateIconUrls
import org.fdroid.fdroid.Utils; //导入方法依赖的package包/类
private void updateIconUrls() {
final String appTable = getTableName();
final String apkTable = getApkTableName();
final String iconsDir = Utils.getIconsDir(getContext(), 1.0);
final String iconsDirLarge = Utils.getIconsDir(getContext(), 1.5);
String repoVersion = Integer.toString(Repo.VERSION_DENSITY_SPECIFIC_ICONS);
Utils.debugLog(TAG, "Updating icon paths for apps belonging to repos with version >= " + repoVersion);
Utils.debugLog(TAG, "Using icons dir '" + iconsDir + "'");
Utils.debugLog(TAG, "Using large icons dir '" + iconsDirLarge + "'");
String query = getIconUpdateQuery(appTable, apkTable);
final String[] params = {
repoVersion, iconsDir, Utils.FALLBACK_ICONS_DIR,
repoVersion, iconsDirLarge, Utils.FALLBACK_ICONS_DIR,
};
db().execSQL(query, params);
}
示例2: updateIconUrlLarge
import org.fdroid.fdroid.Utils; //导入方法依赖的package包/类
private void updateIconUrlLarge(SQLiteDatabase db, int oldVersion) {
if (oldVersion >= 50) {
return;
}
Utils.debugLog(TAG, "Recalculating app icon URLs so that the newly added large icons will get updated.");
String query = "UPDATE fdroid_app "
+ "SET iconUrl = ("
+ " SELECT (fdroid_repo.address || CASE WHEN fdroid_repo.version >= ? THEN ? ELSE ? END || fdroid_app.icon) "
+ " FROM fdroid_apk "
+ " JOIN fdroid_repo ON (fdroid_repo._id = fdroid_apk.repo) "
+ " WHERE fdroid_app.id = fdroid_apk.id AND fdroid_apk.vercode = fdroid_app.suggestedVercode "
+ "), iconUrlLarge = ("
+ " SELECT (fdroid_repo.address || CASE WHEN fdroid_repo.version >= ? THEN ? ELSE ? END || fdroid_app.icon) "
+ " FROM fdroid_apk "
+ " JOIN fdroid_repo ON (fdroid_repo._id = fdroid_apk.repo) "
+ " WHERE fdroid_app.id = fdroid_apk.id AND fdroid_apk.vercode = fdroid_app.suggestedVercode"
+ ")";
String iconsDir = Utils.getIconsDir(context, 1.0);
String iconsDirLarge = Utils.getIconsDir(context, 1.5);
String repoVersion = Integer.toString(Repo.VERSION_DENSITY_SPECIFIC_ICONS);
Utils.debugLog(TAG, "Using icons dir '" + iconsDir + "'");
Utils.debugLog(TAG, "Using large icons dir '" + iconsDirLarge + "'");
String[] args = {
repoVersion, iconsDir, Utils.FALLBACK_ICONS_DIR,
repoVersion, iconsDirLarge, Utils.FALLBACK_ICONS_DIR,
};
db.rawQuery(query, args);
clearRepoEtags(db);
}