Commit fdaaabfa authored by 林生雨's avatar 林生雨

commit

parent 592bc5ed
......@@ -6,31 +6,8 @@
</component>
<component name="ChangeListManager">
<list default="true" id="5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/Thumb.kt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/ThumbUtil.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/Thumb.kt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/ThumbUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/bean/MediaFile.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/bean/MediaFile.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/ImageScanner.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/ImageScanner.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/VideoScanner.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/VideoScanner.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/utils/FileUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/utils/FileUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/utils/MyUtil.kt" beforeDir="false" afterPath="$PROJECT_DIR$/android/src/main/java/com/example/gengmei_flutter_plugin/utils/MyUtil.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/GengmeiFlutterPlugin.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/bean/MediaFile.kt" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/bean/MediaFile.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/ImageScanner.kt" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/local/ImageScanner.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/utils/FileUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/utils/FileUtil.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/utils/MyUtil.kt" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/android/src/main/java/com/example/gengmei_flutter_plugin/utils/MyUtil.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/example/lib/AlbumModel/page/album/AlbumModel.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/example/lib/AlbumModel/page/album/AlbumModel.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/example/lib/AlbumModel/page/album/AlbumPage.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/example/lib/AlbumModel/page/album/AlbumPage.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/gengmei_flutter_plugin.iml" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/gengmei_flutter_plugin.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gengmei_flutter_plugin.iml" beforeDir="false" afterPath="$PROJECT_DIR$/gengmei_flutter_plugin.iml" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/.dart_tool/" />
<ignored path="$PROJECT_DIR$/.idea/" />
......@@ -47,7 +24,7 @@
<component name="DefaultGradleProjectSettings">
<option name="isMigrated" value="true" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="Pixel_2_API_25" />
<component name="ExecutionTargetManager" SELECTED_TARGET="AKC0218316000622" />
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
......
......@@ -35,7 +35,7 @@ import android.graphics.Bitmap
*/
class ImageRespository {
private val globalThreadPool = ThreadPoolExecutor(10, 10
private val globalThreadPool = ThreadPoolExecutor(8, 8
, 30, TimeUnit.SECONDS, LinkedBlockingQueue<Runnable>());
val recordImageListMap = ArrayList<HashMap<String, Any>>()
......@@ -64,7 +64,9 @@ class ImageRespository {
val it2 = iterator.next()
for (item in images) {
if (item.id == it2.id) {
it2.path = item.path
if (item.path != null && File(item.path).exists()) {
it2.path = item.path
}
it2.isVideo = false
break
}
......@@ -78,13 +80,14 @@ class ImageRespository {
val it1 = iteratorVideo.next()
for (item in videos) {
if (item.id == it1.id) {
it1.path = item.path
if (item.path != null && File(item.path).exists()) {
it1.path = item.path
}
it1.isVideo = true
break
}
}
}
realVideos.addAll(realImages)
realVideos.sortByDescending {
it.dateToken
......@@ -96,7 +99,7 @@ class ImageRespository {
}
fun savePreviewImg(context: Context, listener: savePreviewListener) {
val start=System.currentTimeMillis();
val start = System.currentTimeMillis();
val needSize = recordImageListMap.size;
var currentSize = 0;
var letSize = 10
......@@ -108,7 +111,7 @@ class ImageRespository {
}
val realPath = it["realPath"] as String
globalThreadPool.execute {
if (any == null || !File(any as String).exists()) {
if (any == null) {
Log.e("lsy", " THREADMAME " + Thread.currentThread().name)
if (it["isVideo"] == "T") {
it["path"] = MyUtil.saveVideoImg("${fileDir}/${getFileName(realPath)!!}.png",
......@@ -126,7 +129,7 @@ class ImageRespository {
currentSize++;
Log.e("lsy", "HAVE PATH ${noPathSize} ${currentSize} ${needSize}")
if (currentSize == needSize) {
Log.e("lsy"," 压缩完成 耗时:${System.currentTimeMillis()-start}")
Log.e("lsy", " 压缩完成 耗时:${System.currentTimeMillis() - start}")
//FINISH
listener.onSuccess(toMap(context, recordImageListMap))
}
......@@ -138,7 +141,7 @@ class ImageRespository {
currentSize++;
Log.e("lsy", "HAVE PATH ${noPathSize} ${currentSize} ${needSize}")
if (currentSize == needSize) {
Log.e("lsy"," 压缩完成 耗时:${System.currentTimeMillis()-start}")
Log.e("lsy", " 压缩完成 耗时:${System.currentTimeMillis() - start}")
//FINISH
listener.onSuccess(toMap(context, recordImageListMap))
}
......@@ -150,7 +153,7 @@ class ImageRespository {
currentSize++;
Log.e("lsy", "HAVE PATH ${noPathSize} ${currentSize} ${needSize}")
if (currentSize == needSize) {
Log.e("lsy"," 压缩完成 耗时:${System.currentTimeMillis()-start}")
Log.e("lsy", " 压缩完成 耗时:${System.currentTimeMillis() - start}")
//FINISH
listener.onSuccess(toMap(context, recordImageListMap))
}
......@@ -172,7 +175,7 @@ class ImageRespository {
noPathSize++;
Log.e("lsy", "${noPathSize} ${currentSize} ${needSize}")
if (currentSize == needSize) {
Log.e("lsy"," 压缩完成 耗时:${System.currentTimeMillis()-start}")
Log.e("lsy", " 压缩完成 耗时:${System.currentTimeMillis() - start}")
//FINISH
listener.onSuccess(toMap(context, recordImageListMap))
} else {
......@@ -187,7 +190,7 @@ class ImageRespository {
currentSize++;
Log.e("lsy", "HAVE PATH ${noPathSize} ${currentSize} ${needSize}")
if (currentSize == needSize) {
Log.e("lsy"," 压缩完成 耗时:${System.currentTimeMillis()-start}")
Log.e("lsy", " 压缩完成 耗时:${System.currentTimeMillis() - start}")
//FINISH
listener.onSuccess(toMap(context, recordImageListMap))
}
......
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