Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
0ab839d6
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
0ab839d6
编写于
8月 06, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 06, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4829 增加medialibrary文件、音频资源查询条件
Merge pull request !4829 from 秦莉文/OpenHarmony-3.1-Release
上级
ed3e23cb
f4f15fe0
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
103 addition
and
93 deletion
+103
-93
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/favoriteTestCallBack.test.js
...js_standard/src/main/js/test/favoriteTestCallBack.test.js
+4
-4
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/favoriteTestPromise.test.js
..._js_standard/src/main/js/test/favoriteTestPromise.test.js
+4
-4
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fetchFileResultCallBack.test.js
...standard/src/main/js/test/fetchFileResultCallBack.test.js
+6
-6
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fetchFileResultPromise.test.js
..._standard/src/main/js/test/fetchFileResultPromise.test.js
+6
-6
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAsset2.test.js
...iaLibrary_js_standard/src/main/js/test/fileAsset2.test.js
+7
-4
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetCallBack2.test.js
...y_js_standard/src/main/js/test/fileAssetCallBack2.test.js
+7
-3
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetPromise2.test.js
...ry_js_standard/src/main/js/test/fileAssetPromise2.test.js
+7
-4
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetTestCallback.test.js
...s_standard/src/main/js/test/fileAssetTestCallback.test.js
+16
-16
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetTestPromise.test.js
...js_standard/src/main/js/test/fileAssetTestPromise.test.js
+18
-18
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetUriTestCallBack.test.js
...tandard/src/main/js/test/fileAssetUriTestCallBack.test.js
+6
-6
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetUriTestPromiese.test.js
...tandard/src/main/js/test/fileAssetUriTestPromiese.test.js
+6
-6
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileTestCallBack.test.js
...ary_js_standard/src/main/js/test/fileTestCallBack.test.js
+4
-4
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileTestPromise.test.js
...rary_js_standard/src/main/js/test/fileTestPromise.test.js
+4
-4
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/mediaLibraryTestCallBack.test.js
...tandard/src/main/js/test/mediaLibraryTestCallBack.test.js
+4
-4
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/mediaLibraryTestPromise.test.js
...standard/src/main/js/test/mediaLibraryTestPromise.test.js
+4
-4
未找到文件。
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/favoriteTestCallBack.test.js
浏览文件 @
0ab839d6
...
@@ -23,8 +23,8 @@ const imageType = mediaLibrary.MediaType.IMAGE;
...
@@ -23,8 +23,8 @@ const imageType = mediaLibrary.MediaType.IMAGE;
const
videoType
=
mediaLibrary
.
MediaType
.
VIDEO
;
const
videoType
=
mediaLibrary
.
MediaType
.
VIDEO
;
const
audioType
=
mediaLibrary
.
MediaType
.
AUDIO
;
const
audioType
=
mediaLibrary
.
MediaType
.
AUDIO
;
const
fileFetchOp
=
{
const
fileFetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND relative_path = ?
'
,
selectionArgs
:
[
fileType
.
toString
()],
selectionArgs
:
[
fileType
.
toString
()
,
'
Documents/
'
],
};
};
const
imageFetchOp
=
{
const
imageFetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
...
@@ -35,8 +35,8 @@ const videoFetchOp = {
...
@@ -35,8 +35,8 @@ const videoFetchOp = {
selectionArgs
:
[
videoType
.
toString
()],
selectionArgs
:
[
videoType
.
toString
()],
};
};
const
audioFetchOp
=
{
const
audioFetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND bucket_display_name = ?
'
,
selectionArgs
:
[
audioType
.
toString
()],
selectionArgs
:
[
audioType
.
toString
()
,
'
Camera
'
],
};
};
describe
(
'
favoriteTestCallBack.test.js
'
,
function
()
{
describe
(
'
favoriteTestCallBack.test.js
'
,
function
()
{
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/favoriteTestPromise.test.js
浏览文件 @
0ab839d6
...
@@ -23,8 +23,8 @@ const imageType = mediaLibrary.MediaType.IMAGE;
...
@@ -23,8 +23,8 @@ const imageType = mediaLibrary.MediaType.IMAGE;
const
videoType
=
mediaLibrary
.
MediaType
.
VIDEO
;
const
videoType
=
mediaLibrary
.
MediaType
.
VIDEO
;
const
audioType
=
mediaLibrary
.
MediaType
.
AUDIO
;
const
audioType
=
mediaLibrary
.
MediaType
.
AUDIO
;
const
fileFetchOp
=
{
const
fileFetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND relative_path = ?
'
,
selectionArgs
:
[
fileType
.
toString
()],
selectionArgs
:
[
fileType
.
toString
()
,
'
Documents/
'
],
};
};
const
imageFetchOp
=
{
const
imageFetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
...
@@ -35,8 +35,8 @@ const videoFetchOp = {
...
@@ -35,8 +35,8 @@ const videoFetchOp = {
selectionArgs
:
[
videoType
.
toString
()],
selectionArgs
:
[
videoType
.
toString
()],
};
};
const
audioFetchOp
=
{
const
audioFetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND bucket_display_name = ?
'
,
selectionArgs
:
[
audioType
.
toString
()],
selectionArgs
:
[
audioType
.
toString
()
,
'
Camera
'
],
};
};
describe
(
'
favoriteTestPromise.test.js
'
,
function
()
{
describe
(
'
favoriteTestPromise.test.js
'
,
function
()
{
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fetchFileResultCallBack.test.js
浏览文件 @
0ab839d6
...
@@ -466,11 +466,11 @@ describe('fetchFileResultCallback.test.js', async function() {
...
@@ -466,11 +466,11 @@ describe('fetchFileResultCallback.test.js', async function() {
if
(
firstObject
.
uri
==
undefined
)
{
if
(
firstObject
.
uri
==
undefined
)
{
console
.
info
(
'
MediaLibraryTest :firstObject.uri === undefined
'
);
console
.
info
(
'
MediaLibraryTest :firstObject.uri === undefined
'
);
}
}
expect
(
firstObject
.
mimeType
==
'
image/*
'
).
assertTrue
();
expect
(
firstObject
.
mimeType
.
startsWith
(
'
image/
'
)
).
assertTrue
();
if
(
firstObject
.
mimeType
!=
'
image/*
'
)
{
if
(
!
firstObject
.
mimeType
.
startsWith
(
'
image/
'
)
)
{
console
.
info
(
'
MediaLibraryTest :firstObject.mimeType:
'
+
firstObject
.
mimeType
);
console
.
info
(
'
Test
MediaLibraryTest :firstObject.mimeType:
'
+
firstObject
.
mimeType
);
}
}
expect
(
firstObject
.
mediaType
==
imageType
).
assertTrue
();
expect
(
firstObject
.
mediaType
==
imageType
).
assertTrue
();
if
(
firstObject
.
mediaType
!=
imageType
)
{
if
(
firstObject
.
mediaType
!=
imageType
)
{
...
@@ -571,4 +571,4 @@ describe('fetchFileResultCallback.test.js', async function() {
...
@@ -571,4 +571,4 @@ describe('fetchFileResultCallback.test.js', async function() {
done
();
done
();
}
}
});
});
});
});
\ No newline at end of file
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fetchFileResultPromise.test.js
浏览文件 @
0ab839d6
...
@@ -578,11 +578,11 @@ describe('fetchFileResultPromise.test.js', async function() {
...
@@ -578,11 +578,11 @@ describe('fetchFileResultPromise.test.js', async function() {
if
(
firstObject
.
uri
==
undefined
)
{
if
(
firstObject
.
uri
==
undefined
)
{
console
.
info
(
'
MediaLibraryTest :firstObject.uri === undefined
'
);
console
.
info
(
'
MediaLibraryTest :firstObject.uri === undefined
'
);
}
}
expect
(
firstObject
.
mimeType
==
'
image/*
'
).
assertTrue
();
expect
(
firstObject
.
mimeType
.
startsWith
(
'
image/
'
)
).
assertTrue
();
if
(
firstObject
.
mimeType
!=
'
image/*
'
)
{
if
(
!
firstObject
.
mimeType
.
startsWith
(
'
image/
'
)
)
{
console
.
info
(
'
MediaLibraryTest :firstObject.mimeType:
'
+
firstObject
.
mimeType
);
console
.
info
(
'
Test
MediaLibraryTest :firstObject.mimeType:
'
+
firstObject
.
mimeType
);
}
}
expect
(
firstObject
.
mediaType
==
imageType
).
assertTrue
();
expect
(
firstObject
.
mediaType
==
imageType
).
assertTrue
();
if
(
firstObject
.
mediaType
!=
imageType
)
{
if
(
firstObject
.
mediaType
!=
imageType
)
{
...
@@ -681,4 +681,4 @@ describe('fetchFileResultPromise.test.js', async function() {
...
@@ -681,4 +681,4 @@ describe('fetchFileResultPromise.test.js', async function() {
done
();
done
();
}
}
});
});
});
});
\ No newline at end of file
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAsset2.test.js
浏览文件 @
0ab839d6
...
@@ -40,6 +40,9 @@ function checkAttrs(done, asset, tNum) {
...
@@ -40,6 +40,9 @@ function checkAttrs(done, asset, tNum) {
done
();
done
();
}
}
}
}
function
sleep
(
time
){
for
(
let
t
=
Date
.
now
();
Date
.
now
()
-
t
<=
time
;);
}
describe
(
'
fileAsset2.test.js
'
,
async
function
()
{
describe
(
'
fileAsset2.test.js
'
,
async
function
()
{
let
fileKeyObj
=
mediaLibrary
.
FileKey
;
let
fileKeyObj
=
mediaLibrary
.
FileKey
;
...
@@ -83,7 +86,7 @@ describe('fileAsset2.test.js', async function () {
...
@@ -83,7 +86,7 @@ describe('fileAsset2.test.js', async function () {
try
{
try
{
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
newName
=
'
newName
'
;
const
newName
=
'
newName
'
+
new
Date
().
getTime
()
+
'
.jpg
'
;
asset
.
displayName
=
newName
;
asset
.
displayName
=
newName
;
const
id
=
asset
.
id
;
const
id
=
asset
.
id
;
await
asset
.
commitModify
();
await
asset
.
commitModify
();
...
@@ -200,14 +203,14 @@ describe('fileAsset2.test.js', async function () {
...
@@ -200,14 +203,14 @@ describe('fileAsset2.test.js', async function () {
try
{
try
{
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
asset
=
await
fetchFileResult
.
getFirstObject
();
let
neworientation
=
1
;
let
neworientation
=
90
;
if
(
asset
.
orientation
==
1
)
{
if
(
asset
.
orientation
==
90
)
{
neworientation
=
0
;
neworientation
=
0
;
}
}
asset
.
orientation
=
neworientation
;
asset
.
orientation
=
neworientation
;
const
id
=
asset
.
id
;
const
id
=
asset
.
id
;
await
asset
.
commitModify
();
await
asset
.
commitModify
();
sleep
(
1000
);
const
fetchFileResult2
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
fetchFileResult2
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
dataList
=
await
fetchFileResult2
.
getAllObject
();
const
dataList
=
await
fetchFileResult2
.
getAllObject
();
let
passed
=
false
;
let
passed
=
false
;
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetCallBack2.test.js
浏览文件 @
0ab839d6
...
@@ -40,6 +40,9 @@ function checkAttrs(done, asset, tNum) {
...
@@ -40,6 +40,9 @@ function checkAttrs(done, asset, tNum) {
done
();
done
();
}
}
}
}
function
sleep
(
time
){
for
(
let
t
=
Date
.
now
();
Date
.
now
()
-
t
<=
time
;);
}
describe
(
'
fileAssetCallBack2.test.js
'
,
async
function
()
{
describe
(
'
fileAssetCallBack2.test.js
'
,
async
function
()
{
let
fileKeyObj
=
mediaLibrary
.
FileKey
;
let
fileKeyObj
=
mediaLibrary
.
FileKey
;
...
@@ -83,7 +86,7 @@ describe('fileAssetCallBack2.test.js', async function () {
...
@@ -83,7 +86,7 @@ describe('fileAssetCallBack2.test.js', async function () {
try
{
try
{
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
newName
=
'
newName
'
;
const
newName
=
'
newName
'
+
new
Date
().
getTime
()
+
'
.jpg
'
;
asset
.
displayName
=
newName
;
asset
.
displayName
=
newName
;
const
id
=
asset
.
id
;
const
id
=
asset
.
id
;
asset
.
commitModify
(
async
()
=>
{
asset
.
commitModify
(
async
()
=>
{
...
@@ -202,13 +205,14 @@ describe('fileAssetCallBack2.test.js', async function () {
...
@@ -202,13 +205,14 @@ describe('fileAssetCallBack2.test.js', async function () {
try
{
try
{
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
asset
=
await
fetchFileResult
.
getFirstObject
();
let
neworientation
=
1
;
let
neworientation
=
90
;
if
(
asset
.
orientation
==
1
)
{
if
(
asset
.
orientation
==
90
)
{
neworientation
=
0
;
neworientation
=
0
;
}
}
asset
.
orientation
=
neworientation
;
asset
.
orientation
=
neworientation
;
const
id
=
asset
.
id
;
const
id
=
asset
.
id
;
asset
.
commitModify
(
async
()
=>
{
asset
.
commitModify
(
async
()
=>
{
sleep
(
1000
);
const
fetchFileResult2
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
fetchFileResult2
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
dataList
=
await
fetchFileResult2
.
getAllObject
();
const
dataList
=
await
fetchFileResult2
.
getAllObject
();
let
passed
=
false
;
let
passed
=
false
;
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetPromise2.test.js
浏览文件 @
0ab839d6
...
@@ -40,6 +40,9 @@ function checkAttrs(done, asset, tNum) {
...
@@ -40,6 +40,9 @@ function checkAttrs(done, asset, tNum) {
done
();
done
();
}
}
}
}
function
sleep
(
time
){
for
(
let
t
=
Date
.
now
();
Date
.
now
()
-
t
<=
time
;);
}
describe
(
'
fileAssetPromise2.test.js
'
,
async
function
()
{
describe
(
'
fileAssetPromise2.test.js
'
,
async
function
()
{
let
fileKeyObj
=
mediaLibrary
.
FileKey
;
let
fileKeyObj
=
mediaLibrary
.
FileKey
;
...
@@ -83,7 +86,7 @@ describe('fileAssetPromise2.test.js', async function () {
...
@@ -83,7 +86,7 @@ describe('fileAssetPromise2.test.js', async function () {
try
{
try
{
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
newName
=
'
newName
'
;
const
newName
=
'
newName
'
+
new
Date
().
getTime
()
+
'
.jpg
'
;
asset
.
displayName
=
newName
;
asset
.
displayName
=
newName
;
const
id
=
asset
.
id
;
const
id
=
asset
.
id
;
await
asset
.
commitModify
();
await
asset
.
commitModify
();
...
@@ -200,14 +203,14 @@ describe('fileAssetPromise2.test.js', async function () {
...
@@ -200,14 +203,14 @@ describe('fileAssetPromise2.test.js', async function () {
try
{
try
{
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
fetchFileResult
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
asset
=
await
fetchFileResult
.
getFirstObject
();
const
asset
=
await
fetchFileResult
.
getFirstObject
();
let
neworientation
=
1
;
let
neworientation
=
90
;
if
(
asset
.
orientation
==
1
)
{
if
(
asset
.
orientation
==
90
)
{
neworientation
=
0
;
neworientation
=
0
;
}
}
asset
.
orientation
=
neworientation
;
asset
.
orientation
=
neworientation
;
const
id
=
asset
.
id
;
const
id
=
asset
.
id
;
await
asset
.
commitModify
();
await
asset
.
commitModify
();
sleep
(
1000
);
const
fetchFileResult2
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
fetchFileResult2
=
await
media
.
getFileAssets
(
imagesfetchOp
);
const
dataList
=
await
fetchFileResult2
.
getAllObject
();
const
dataList
=
await
fetchFileResult2
.
getAllObject
();
let
passed
=
false
;
let
passed
=
false
;
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetTestCallback.test.js
浏览文件 @
0ab839d6
...
@@ -42,8 +42,8 @@ describe('fileAssetTestCallback.test.js', async function() {
...
@@ -42,8 +42,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try
{
try
{
let
fileType
=
mediaLibrary
.
MediaType
.
FILE
;
let
fileType
=
mediaLibrary
.
MediaType
.
FILE
;
let
fileFetchOp
=
{
let
fileFetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND relative_path = ?
'
,
selectionArgs
:
[
fileType
.
toString
()
],
selectionArgs
:
[
fileType
.
toString
()
,
'
Documents/
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fileFetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fileFetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -109,8 +109,8 @@ describe('fileAssetTestCallback.test.js', async function() {
...
@@ -109,8 +109,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try
{
try
{
let
type
=
mediaLibrary
.
MediaType
.
FILE
;
let
type
=
mediaLibrary
.
MediaType
.
FILE
;
let
fetchOp
=
{
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND relative_path = ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
,
'
Documents/
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -173,8 +173,8 @@ describe('fileAssetTestCallback.test.js', async function() {
...
@@ -173,8 +173,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try
{
try
{
let
type
=
mediaLibrary
.
MediaType
.
FILE
;
let
type
=
mediaLibrary
.
MediaType
.
FILE
;
let
fetchOp
=
{
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND relative_path = ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
,
'
Documents/
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -438,8 +438,8 @@ describe('fileAssetTestCallback.test.js', async function() {
...
@@ -438,8 +438,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try
{
try
{
let
fileType
=
mediaLibrary
.
MediaType
.
AUDIO
;
let
fileType
=
mediaLibrary
.
MediaType
.
AUDIO
;
let
fileFetchOp
=
{
let
fileFetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND bucket_display_name = ?
'
,
selectionArgs
:
[
fileType
.
toString
()
],
selectionArgs
:
[
fileType
.
toString
()
,
'
Camera
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fileFetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fileFetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -499,8 +499,8 @@ describe('fileAssetTestCallback.test.js', async function() {
...
@@ -499,8 +499,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try
{
try
{
let
type
=
mediaLibrary
.
MediaType
.
AUDIO
;
let
type
=
mediaLibrary
.
MediaType
.
AUDIO
;
let
fetchOp
=
{
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND bucket_display_name = ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
,
'
Camera
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -566,8 +566,8 @@ describe('fileAssetTestCallback.test.js', async function() {
...
@@ -566,8 +566,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try
{
try
{
let
type
=
mediaLibrary
.
MediaType
.
AUDIO
;
let
type
=
mediaLibrary
.
MediaType
.
AUDIO
;
let
fetchOp
=
{
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND bucket_display_name = ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
,
'
Camera
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -845,8 +845,8 @@ describe('fileAssetTestCallback.test.js', async function() {
...
@@ -845,8 +845,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try
{
try
{
let
type
=
mediaLibrary
.
MediaType
.
FILE
;
let
type
=
mediaLibrary
.
MediaType
.
FILE
;
let
fetchOp
=
{
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND relative_path = ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
,
'
Documents/
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -941,8 +941,8 @@ describe('fileAssetTestCallback.test.js', async function() {
...
@@ -941,8 +941,8 @@ describe('fileAssetTestCallback.test.js', async function() {
try
{
try
{
let
type
=
mediaLibrary
.
MediaType
.
AUDIO
;
let
type
=
mediaLibrary
.
MediaType
.
AUDIO
;
let
fetchOp
=
{
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND bucket_display_name = ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
,
'
Camera
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetTestPromise.test.js
浏览文件 @
0ab839d6
...
@@ -42,8 +42,8 @@ describe('fileAssetTestPromise.test.js', async function() {
...
@@ -42,8 +42,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try
{
try
{
let
fileType
=
mediaLibrary
.
MediaType
.
FILE
;
let
fileType
=
mediaLibrary
.
MediaType
.
FILE
;
let
fileFetchOp
=
{
let
fileFetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND relative_path = ?
'
,
selectionArgs
:
[
fileType
.
toString
()
],
selectionArgs
:
[
fileType
.
toString
()
,
'
Documents/
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fileFetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fileFetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -95,8 +95,8 @@ describe('fileAssetTestPromise.test.js', async function() {
...
@@ -95,8 +95,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try
{
try
{
let
type
=
mediaLibrary
.
MediaType
.
FILE
;
let
type
=
mediaLibrary
.
MediaType
.
FILE
;
let
fetchOp
=
{
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND relative_path = ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
,
'
Documents/
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -136,8 +136,8 @@ describe('fileAssetTestPromise.test.js', async function() {
...
@@ -136,8 +136,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try
{
try
{
let
type
=
mediaLibrary
.
MediaType
.
FILE
;
let
type
=
mediaLibrary
.
MediaType
.
FILE
;
let
fetchOp
=
{
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND relative_path = ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
,
'
Documents/
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -183,7 +183,7 @@ describe('fileAssetTestPromise.test.js', async function() {
...
@@ -183,7 +183,7 @@ describe('fileAssetTestPromise.test.js', async function() {
let
fileType
=
mediaLibrary
.
MediaType
.
IMAGE
;
let
fileType
=
mediaLibrary
.
MediaType
.
IMAGE
;
let
fileFetchOp
=
{
let
fileFetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selectionArgs
:
[
fileType
.
toString
()
],
selectionArgs
:
[
fileType
.
toString
()],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fileFetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fileFetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -320,8 +320,8 @@ describe('fileAssetTestPromise.test.js', async function() {
...
@@ -320,8 +320,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try
{
try
{
let
fileType
=
mediaLibrary
.
MediaType
.
AUDIO
;
let
fileType
=
mediaLibrary
.
MediaType
.
AUDIO
;
let
fileFetchOp
=
{
let
fileFetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND bucket_display_name = ?
'
,
selectionArgs
:
[
fileType
.
toString
()
],
selectionArgs
:
[
fileType
.
toString
()
,
'
Camera
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fileFetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fileFetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -371,8 +371,8 @@ describe('fileAssetTestPromise.test.js', async function() {
...
@@ -371,8 +371,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try
{
try
{
let
type
=
mediaLibrary
.
MediaType
.
AUDIO
;
let
type
=
mediaLibrary
.
MediaType
.
AUDIO
;
let
fetchOp
=
{
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND bucket_display_name = ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
,
'
Camera
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -412,8 +412,8 @@ describe('fileAssetTestPromise.test.js', async function() {
...
@@ -412,8 +412,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try
{
try
{
let
type
=
mediaLibrary
.
MediaType
.
AUDIO
;
let
type
=
mediaLibrary
.
MediaType
.
AUDIO
;
let
fetchOp
=
{
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND bucket_display_name = ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
,
'
Camera
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -459,7 +459,7 @@ describe('fileAssetTestPromise.test.js', async function() {
...
@@ -459,7 +459,7 @@ describe('fileAssetTestPromise.test.js', async function() {
let
fileType
=
mediaLibrary
.
MediaType
.
VIDEO
;
let
fileType
=
mediaLibrary
.
MediaType
.
VIDEO
;
let
fileFetchOp
=
{
let
fileFetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selectionArgs
:
[
fileType
.
toString
()
],
selectionArgs
:
[
fileType
.
toString
()],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fileFetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fileFetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -610,8 +610,8 @@ describe('fileAssetTestPromise.test.js', async function() {
...
@@ -610,8 +610,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try
{
try
{
let
type
=
mediaLibrary
.
MediaType
.
FILE
;
let
type
=
mediaLibrary
.
MediaType
.
FILE
;
let
fetchOp
=
{
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND relative_path = ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
,
'
Documents/
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
@@ -698,8 +698,8 @@ describe('fileAssetTestPromise.test.js', async function() {
...
@@ -698,8 +698,8 @@ describe('fileAssetTestPromise.test.js', async function() {
try
{
try
{
let
type
=
mediaLibrary
.
MediaType
.
AUDIO
;
let
type
=
mediaLibrary
.
MediaType
.
AUDIO
;
let
fetchOp
=
{
let
fetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND bucket_display_name = ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
,
'
Camera
'
],
};
};
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
let
fetchFileResult
=
await
media
.
getFileAssets
(
fetchOp
);
const
dataList
=
await
fetchFileResult
.
getAllObject
();
const
dataList
=
await
fetchFileResult
.
getAllObject
();
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetUriTestCallBack.test.js
浏览文件 @
0ab839d6
...
@@ -51,12 +51,12 @@ describe('fileAssetUriTestCallback.test.js', async function() {
...
@@ -51,12 +51,12 @@ describe('fileAssetUriTestCallback.test.js', async function() {
const
uri
=
firstObject
.
uri
;
const
uri
=
firstObject
.
uri
;
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 uri:
'
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 uri:
'
+
uri
);
+
uri
);
const
se
rachUri
=
'
dataability:///media/image/
'
+
id
;
const
se
archUri
=
uri
.
substr
(
0
,
uri
.
lastIndexOf
(
'
/
'
)
+
1
)
+
id
;
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 se
ra
chUri:
'
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 se
ar
chUri:
'
+
se
ra
chUri
);
+
se
ar
chUri
);
let
serchfetchOp
=
{
let
serchfetchOp
=
{
uri
:
se
ra
chUri
.
toString
(),
uri
:
se
ar
chUri
.
toString
(),
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selectionArgs
:
[
type
.
toString
()],
selectionArgs
:
[
type
.
toString
()],
};
};
...
@@ -64,11 +64,11 @@ describe('fileAssetUriTestCallback.test.js', async function() {
...
@@ -64,11 +64,11 @@ describe('fileAssetUriTestCallback.test.js', async function() {
const
result
=
await
media
.
getFileAssets
(
serchfetchOp
);
const
result
=
await
media
.
getFileAssets
(
serchfetchOp
);
console
.
info
(
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 getFileAssets by uri:
'
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 getFileAssets by uri:
'
+
se
ra
chUri
+
"
,result.getCount():
"
+
result
.
getCount
());
+
se
ar
chUri
+
"
,result.getCount():
"
+
result
.
getCount
());
asset
=
await
result
.
getFirstObject
();
asset
=
await
result
.
getFirstObject
();
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 asset.uri:
'
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 asset.uri:
'
+
asset
.
uri
);
+
asset
.
uri
);
expect
(
asset
.
uri
==
se
ra
chUri
).
assertTrue
();
expect
(
asset
.
uri
==
se
ar
chUri
).
assertTrue
();
fd
=
await
asset
.
open
(
'
r
'
);
fd
=
await
asset
.
open
(
'
r
'
);
expect
(
fd
>
0
).
assertTrue
();
expect
(
fd
>
0
).
assertTrue
();
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 fd:
'
+
fd
);
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_CALLBACK_005_35 fd:
'
+
fd
);
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileAssetUriTestPromiese.test.js
浏览文件 @
0ab839d6
...
@@ -50,12 +50,12 @@ describe('fileAssetUriTestPromise.test.js', async function() {
...
@@ -50,12 +50,12 @@ describe('fileAssetUriTestPromise.test.js', async function() {
const
id
=
firstObject
.
id
;
const
id
=
firstObject
.
id
;
const
uri
=
firstObject
.
uri
;
const
uri
=
firstObject
.
uri
;
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 uri:
'
+
uri
);
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 uri:
'
+
uri
);
const
se
rachUri
=
'
dataability:///media/image/
'
+
id
;
const
se
archUri
=
uri
.
substr
(
0
,
uri
.
lastIndexOf
(
'
/
'
)
+
1
)
+
id
;
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 se
ra
chUri:
'
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 se
ar
chUri:
'
+
se
ra
chUri
);
+
se
ar
chUri
);
let
serchfetchOp
=
{
let
serchfetchOp
=
{
uri
:
se
ra
chUri
.
toString
(),
uri
:
se
ar
chUri
.
toString
(),
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selectionArgs
:
[
type
.
toString
()
],
selectionArgs
:
[
type
.
toString
()
],
};
};
...
@@ -63,11 +63,11 @@ describe('fileAssetUriTestPromise.test.js', async function() {
...
@@ -63,11 +63,11 @@ describe('fileAssetUriTestPromise.test.js', async function() {
const
result
=
await
media
.
getFileAssets
(
serchfetchOp
);
const
result
=
await
media
.
getFileAssets
(
serchfetchOp
);
console
.
info
(
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 getFileAssets by uri:
'
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 getFileAssets by uri:
'
+
se
ra
chUri
+
"
,result.getCount():
"
+
result
.
getCount
());
+
se
ar
chUri
+
"
,result.getCount():
"
+
result
.
getCount
());
asset
=
await
result
.
getFirstObject
();
asset
=
await
result
.
getFirstObject
();
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 asset.uri:
'
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 asset.uri:
'
+
asset
.
uri
);
+
asset
.
uri
);
expect
(
asset
.
uri
==
se
ra
chUri
).
assertTrue
();
expect
(
asset
.
uri
==
se
ar
chUri
).
assertTrue
();
fd
=
await
asset
.
open
(
'
r
'
);
fd
=
await
asset
.
open
(
'
r
'
);
expect
(
fd
>
0
).
assertTrue
();
expect
(
fd
>
0
).
assertTrue
();
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 fd:
'
+
fd
);
console
.
info
(
'
MediaLibraryTest : SUB_MEDIA_MEDIALIBRARY_OPENANDCLOSE_ASSET_URI_PROMISE_005_35 fd:
'
+
fd
);
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileTestCallBack.test.js
浏览文件 @
0ab839d6
...
@@ -33,12 +33,12 @@ let videosfetchOp = {
...
@@ -33,12 +33,12 @@ let videosfetchOp = {
selectionArgs
:
[
videoType
.
toString
()],
selectionArgs
:
[
videoType
.
toString
()],
};
};
let
audiosfetchOp
=
{
let
audiosfetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND bucket_display_name = ?
'
,
selectionArgs
:
[
audioType
.
toString
()],
selectionArgs
:
[
audioType
.
toString
()
,
'
Camera
'
],
};
};
let
filesfetchOp
=
{
let
filesfetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND relative_path = ?
'
,
selectionArgs
:
[
fileType
.
toString
()],
selectionArgs
:
[
fileType
.
toString
()
,
'
Documents/
'
],
};
};
function
checkAssetAttr
(
done
,
attr
,
testNum
,
asset
,
checkType
)
{
function
checkAssetAttr
(
done
,
attr
,
testNum
,
asset
,
checkType
)
{
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/fileTestPromise.test.js
浏览文件 @
0ab839d6
...
@@ -33,12 +33,12 @@ let videosfetchOp = {
...
@@ -33,12 +33,12 @@ let videosfetchOp = {
selectionArgs
:
[
videoType
.
toString
()],
selectionArgs
:
[
videoType
.
toString
()],
};
};
let
audiosfetchOp
=
{
let
audiosfetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND bucket_display_name = ?
'
,
selectionArgs
:
[
audioType
.
toString
()],
selectionArgs
:
[
audioType
.
toString
()
,
'
Camera
'
],
};
};
let
filesfetchOp
=
{
let
filesfetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND relative_path = ?
'
,
selectionArgs
:
[
fileType
.
toString
()],
selectionArgs
:
[
fileType
.
toString
()
,
'
Documents/
'
],
};
};
function
checkAssetAttr
(
done
,
attr
,
testNum
,
asset
,
checkType
)
{
function
checkAssetAttr
(
done
,
attr
,
testNum
,
asset
,
checkType
)
{
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/mediaLibraryTestCallBack.test.js
浏览文件 @
0ab839d6
...
@@ -44,12 +44,12 @@ let videosfetchOp = {
...
@@ -44,12 +44,12 @@ let videosfetchOp = {
selectionArgs
:
[
videoType
.
toString
()],
selectionArgs
:
[
videoType
.
toString
()],
};
};
let
audiosfetchOp
=
{
let
audiosfetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND bucket_display_name = ?
'
,
selectionArgs
:
[
audioType
.
toString
()],
selectionArgs
:
[
audioType
.
toString
()
,
'
Camera
'
],
};
};
let
filesfetchOp
=
{
let
filesfetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND relative_path = ?
'
,
selectionArgs
:
[
fileType
.
toString
()],
selectionArgs
:
[
fileType
.
toString
()
,
'
Documents/
'
],
};
};
let
imageAndVideofetchOp
=
{
let
imageAndVideofetchOp
=
{
...
...
multimedia/medialibrary/mediaLibrary_js_standard/src/main/js/test/mediaLibraryTestPromise.test.js
浏览文件 @
0ab839d6
...
@@ -44,12 +44,12 @@ let videosfetchOp = {
...
@@ -44,12 +44,12 @@ let videosfetchOp = {
selectionArgs
:
[
videoType
.
toString
()],
selectionArgs
:
[
videoType
.
toString
()],
};
};
let
audiosfetchOp
=
{
let
audiosfetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND bucket_display_name = ?
'
,
selectionArgs
:
[
audioType
.
toString
()],
selectionArgs
:
[
audioType
.
toString
()
,
'
Camera
'
],
};
};
let
filesfetchOp
=
{
let
filesfetchOp
=
{
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
'
,
selections
:
mediaLibrary
.
FileKey
.
MEDIA_TYPE
+
'
= ?
AND relative_path = ?
'
,
selectionArgs
:
[
fileType
.
toString
()],
selectionArgs
:
[
fileType
.
toString
()
,
'
Documents/
'
],
};
};
let
imageAndVideofetchOp
=
{
let
imageAndVideofetchOp
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录