Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
flutter_plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林生雨
flutter_plugin
Commits
fdaaabfa
Commit
fdaaabfa
authored
Oct 28, 2019
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
592bc5ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
35 deletions
+15
-35
workspace.xml
.idea/workspace.xml
+1
-24
ImageRespository.kt
...flutter_plugin/ImagePlugin/repository/ImageRespository.kt
+14
-11
No files found.
.idea/workspace.xml
View file @
fdaaabfa
...
...
@@ -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"
>
...
...
android/src/main/java/com/example/gengmei_flutter_plugin/ImagePlugin/repository/ImageRespository.kt
View file @
fdaaabfa
...
...
@@ -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
))
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment