StringUtils工具类整理
This commit is contained in:
@@ -18,7 +18,7 @@ import com.chwl.library.easyphoto.constant.Type;
|
||||
import com.chwl.library.easyphoto.models.album.entity.Album;
|
||||
import com.chwl.library.easyphoto.result.Result;
|
||||
import com.chwl.library.easyphoto.setting.Setting;
|
||||
import com.chwl.library.easyphoto.utils.string.StringUtils;
|
||||
import com.chwl.library.easyphoto.utils.string.EPStringUtils;
|
||||
import com.chwl.library.easyphoto.models.album.entity.AlbumItem;
|
||||
import com.chwl.library.easyphoto.models.album.entity.Photo;
|
||||
|
||||
@@ -281,7 +281,7 @@ public class AlbumModel {
|
||||
continue;
|
||||
}
|
||||
folderPath = parentFile.getAbsolutePath();
|
||||
albumName = StringUtils.getLastPathSegment(folderPath);
|
||||
albumName = EPStringUtils.getLastPathSegment(folderPath);
|
||||
}
|
||||
|
||||
album.addAlbumItem(albumName, folderPath, path, uri);
|
||||
|
@@ -62,7 +62,7 @@ import com.chwl.library.easyphoto.utils.media.DurationUtils;
|
||||
import com.chwl.library.easyphoto.utils.media.MediaScannerConnectionUtils;
|
||||
import com.chwl.library.easyphoto.utils.permission.PermissionUtil;
|
||||
import com.chwl.library.easyphoto.utils.settings.SettingsUtils;
|
||||
import com.chwl.library.easyphoto.utils.string.StringUtils;
|
||||
import com.chwl.library.easyphoto.utils.string.EPStringUtils;
|
||||
import com.chwl.library.easyphoto.utils.system.EPSystemUtils;
|
||||
import com.chwl.library.easyphoto.utils.uri.UriUtils;
|
||||
|
||||
@@ -460,7 +460,7 @@ public class EasyPhotosActivity extends AppCompatActivity implements AlbumItemsA
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
||||
MediaScannerConnectionUtils.refresh(this, photo.path);
|
||||
folderPath = new File(photo.path).getParentFile().getAbsolutePath();
|
||||
albumName = StringUtils.getLastPathSegment(folderPath);
|
||||
albumName = EPStringUtils.getLastPathSegment(folderPath);
|
||||
}
|
||||
|
||||
String albumItem_all_name = albumModel.getAllAlbumName(this);
|
||||
|
@@ -4,7 +4,7 @@ package com.chwl.library.easyphoto.utils.string;
|
||||
* 字符串工具类
|
||||
* Created by huan on 2017/10/20.
|
||||
*/
|
||||
public class StringUtils {
|
||||
public class EPStringUtils {
|
||||
public static String getLastPathSegment(String content) {
|
||||
if (content == null || content.length() == 0) {
|
||||
return "";
|
Reference in New Issue
Block a user