Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
66e43219
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看板
提交
66e43219
编写于
7月 26, 2023
作者:
O
openharmony_ci
提交者:
yangbo
7月 27, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix photoAccessHelper notify testcases
上级
59bb5868
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
330 addition
and
275 deletion
+330
-275
multimedia/photoAccess/photoAccess/entry/src/main/ets/test/PhotoAccessHelper/registerChange.ets
...ry/src/main/ets/test/PhotoAccessHelper/registerChange.ets
+32
-29
multimedia/photoAccess/photoAccess/entry/src/main/ets/test/PhotoAccessHelper/unRegisterChange.ets
.../src/main/ets/test/PhotoAccessHelper/unRegisterChange.ets
+63
-67
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/publicApiTestWithSystemApi.ets
...em/entry/src/main/ets/test/publicApiTestWithSystemApi.ets
+235
-179
未找到文件。
multimedia/photoAccess/photoAccess/entry/src/main/ets/test/PhotoAccessHelper/registerChange.ets
浏览文件 @
66e43219
...
...
@@ -13,7 +13,6 @@
* limitations under the License.
*/
// @ts-nocheck
import photoAccessHelper from '@ohos.file.photoAccessHelper'
import { describe, it, expect } from 'deccjsunit/index'
import {
...
...
@@ -22,7 +21,6 @@ import {
photoKeys,
getFileAsset,
photoFetchOption,
photoType,
} from '../../../../../../../common'
export default function registerChangeTest () {
...
...
@@ -34,20 +32,20 @@ export default function registerChangeTest () {
const DEFAULT_ALBUM_URI = photoAccessHelper.DefaultChangeUri.DEFAULT_ALBUM_URI;
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_
ON
_CALLBACK_0100
* @tc.name :
on
_callback_001
* @tc.desc : listening motify file
displayNam
e, type NOTIFY_UPDATE
* @tc.number : SUB_PHOTOACCESS_HELPER_
REGISTERCHANGE
_CALLBACK_0100
* @tc.name :
registerChange
_callback_001
* @tc.desc : listening motify file
titl
e, type NOTIFY_UPDATE
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('
on
_callback_001', 0, async function (done) {
const testNum = '
on
_callback_001';
it('
registerChange
_callback_001', 0, async function (done) {
const testNum = '
registerChange
_callback_001';
try {
let fetchOps = photoFetchOption(testNum, photoKeys.DISPLAY_NAME, 'on01.jpg');
const asset = await getFileAsset(testNum, fetchOps);
let count = 0;
await sleep(5
0
0);
await sleep(5
5
0);
helper.registerChange(asset.uri, false, async (changeData) => {
count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
...
...
@@ -55,6 +53,7 @@ export default function registerChangeTest () {
expect(changeData.type).assertEqual(NOTIFY_UPDATE);
expect(changeData.uris[0]).assertEqual(asset.uri);
});
await sleep(550);
const newTitle = testNum + asset.get(photoKeys.TITLE);
asset.set(photoKeys.TITLE, newTitle);
await asset.commitModify();
...
...
@@ -69,15 +68,15 @@ export default function registerChangeTest () {
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_
ON
_CALLBACK_0700
* @tc.name :
on
_callback_007
* @tc.number : SUB_PHOTOACCESS_HELPER_
REGISTERCHANGE
_CALLBACK_0700
* @tc.name :
registerChange
_callback_007
* @tc.desc : listening create album, type NOTIFY_ADD
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('
on
_callback_007', 0, async function (done) {
const testNum = '
on
_callback_007';
it('
registerChange
_callback_007', 0, async function (done) {
const testNum = '
registerChange
_callback_007';
try {
let changeDataUri = '';
let listenCount = 0;
...
...
@@ -88,10 +87,11 @@ export default function registerChangeTest () {
changeDataUri = changeData.uris[0];
expect(changeData.type).assertEqual(NOTIFY_ADD);
});
await sleep(550);
let albumName = 'testAlbum' + Date.now();
let album = await helper.createAlbum(albumName);
let creatAlbumUri = album.albumUri;
await sleep(
2
000);
await sleep(
1
000);
helper.unRegisterChange(DEFAULT_ALBUM_URI);
expect(creatAlbumUri).assertEqual(changeDataUri);
expect(listenCount).assertEqual(1);
...
...
@@ -104,28 +104,29 @@ export default function registerChangeTest () {
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_
ON
_CALLBACK_0800
* @tc.name :
on
_callback_008
* @tc.number : SUB_PHOTOACCESS_HELPER_
REGISTERCHANGE
_CALLBACK_0800
* @tc.name :
registerChange
_callback_008
* @tc.desc : listening change albumName, type NOTIFY_UPDATE
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('
on
_callback_008', 0, async function (done) {
const testNum = '
on
_callback_008';
it('
registerChange
_callback_008', 0, async function (done) {
const testNum = '
registerChange
_callback_008';
try {
let albumUri = '';
let count = 0;
let albumName = 'testAlbum' + Date.now();
let album = await helper.createAlbum(albumName);
albumUri = album.albumUri;
await sleep(5
0
0);
await sleep(5
5
0);
helper.registerChange(albumUri, false, async (changeData) => {
count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
expect(changeData.type).assertEqual(NOTIFY_UPDATE);
expect(changeData.uris[0]).assertEqual(albumUri);
});
await sleep(550);
album.albumName = Date.now() + album.albumName;
await album.commitModify();
await sleep(1000);
...
...
@@ -140,22 +141,22 @@ export default function registerChangeTest () {
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_
ON
_CALLBACK_1100
* @tc.name :
on
_callback_011
* @tc.desc : listening album
remove
Assets, type NOTIFY_ALBUM_ADD_ASSET
* @tc.number : SUB_PHOTOACCESS_HELPER_
REGISTERCHANGE
_CALLBACK_1100
* @tc.name :
registerChange
_callback_011
* @tc.desc : listening album
add
Assets, type NOTIFY_ALBUM_ADD_ASSET
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('
on
_callback_011', 0, async function (done) {
const testNum = '
on
_callback_011';
it('
registerChange
_callback_011', 0, async function (done) {
const testNum = '
registerChange
_callback_011';
try {
let albumName = 'testAlbum' + Date.now();
let album = await helper.createAlbum(albumName);
const fetchOps = fetchOption(testNum, photoKeys.DISPLAY_NAME, 'on11.jpg');
const asset = await getFileAsset(testNum, fetchOps);
let count = 0;
await sleep(5
0
0);
await sleep(5
5
0);
helper.registerChange(album.albumUri, false, async (changeData) => {
count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
...
...
@@ -163,6 +164,7 @@ export default function registerChangeTest () {
expect(changeData.uris[0]).assertEqual(album.albumUri);
expect(changeData.extraUris[0]).assertEqual(asset.uri);
});
await sleep(550);
await album.addAssets([asset]);
await sleep(1000);
helper.unRegisterChange(album.albumUri);
...
...
@@ -176,15 +178,15 @@ export default function registerChangeTest () {
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_
ON
_CALLBACK_1200
* @tc.name :
on
_callback_012
* @tc.number : SUB_PHOTOACCESS_HELPER_
REGISTERCHANGE
_CALLBACK_1200
* @tc.name :
registerChange
_callback_012
* @tc.desc : listening album removeAssets, type NOTIFY_ALBUM_REMOVE_ASSET
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('
on
_callback_012', 0, async function (done) {
const testNum = '
on
_callback_012';
it('
registerChange
_callback_012', 0, async function (done) {
const testNum = '
registerChange
_callback_012';
try {
let albumName = 'testAlbum' + Date.now();
let album = await helper.createAlbum(albumName);
...
...
@@ -192,7 +194,7 @@ export default function registerChangeTest () {
const asset = await getFileAsset(testNum, fetchOps);
let count = 0;
await album.addAssets([asset]);
await sleep(5
0
0);
await sleep(5
5
0);
helper.registerChange(album.albumUri, false, async (changeData) => {
count++;
console.info(`${testNum} changeData: ${JSON.stringify(changeData)}`);
...
...
@@ -200,6 +202,7 @@ export default function registerChangeTest () {
expect(changeData.uris[0]).assertEqual(album.albumUri);
expect(changeData.extraUris[0]).assertEqual(asset.uri);
});
await sleep(550);
await album.removeAssets([asset]);
await sleep(1000);
helper.unRegisterChange(album.albumUri);
...
...
multimedia/photoAccess/photoAccess/entry/src/main/ets/test/PhotoAccessHelper/unRegisterChange.ets
浏览文件 @
66e43219
...
...
@@ -13,7 +13,6 @@
* limitations under the License.
*/
// @ts-nocheck
import
photoAccessHelper
from
'@ohos.file.photoAccessHelper'
import
{
describe
,
it
,
expect
}
from
'deccjsunit/index'
import
{
...
...
@@ -22,9 +21,6 @@ import {
photoKeys
,
getFileAsset
,
photoFetchOption
,
photoType
,
albumType
,
albumSubtype
}
from
'../../../../../../../common'
export
default
function
unRegisterChangeTest
()
{
...
...
@@ -34,27 +30,27 @@ export default function unRegisterChangeTest () {
const
DEFAULT_ALBUM_URI
=
photoAccessHelper
.
DefaultChangeUri
.
DEFAULT_ALBUM_URI
;
/**
* @tc.number : SUB_PHOTOACCESS_
HELPER_OFF
_0100
* @tc.name :
off
_001
* @tc.desc :
off listening motify file displayName, type NOTIFY_UPDATE
* @tc.number : SUB_PHOTOACCESS_
UNREGISTERCHANGE
_0100
* @tc.name :
unRegisterChange
_001
* @tc.desc :
unRegister listening motify file title
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
off
_001'
,
0
,
async
function
(
done
)
{
const
testNum
=
'
off
_001'
;
it
(
'
unRegisterChange
_001'
,
0
,
async
function
(
done
)
{
const
testNum
=
'
unRegisterChange
_001'
;
try
{
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'off01.jpg'
);
const
asset
=
await
getFileAsset
(
testNum
,
fetchOps
);
let
count
=
0
;
await
sleep
(
5
0
0
);
await
sleep
(
5
5
0
);
helper
.
registerChange
(
asset
.
uri
,
false
,
async
(
changeData
)
=>
{
count
++
;
console
.
info
(
`${testNum} changeData: ${JSON.stringify(changeData)}`
);
});
await
sleep
(
10
0
);
await
sleep
(
55
0
);
helper
.
unRegisterChange
(
asset
.
uri
);
await
sleep
(
10
0
);
await
sleep
(
55
0
);
const
newTitle
=
testNum
+
asset
.
get
(
photoKeys
.
TITLE
);
asset
.
set
(
photoKeys
.
TITLE
,
newTitle
);
await
asset
.
commitModify
();
...
...
@@ -69,24 +65,24 @@ export default function unRegisterChangeTest () {
});
/**
* @tc.number : SUB_PHOTOACCESS_
HELPER_OFF
_0700
* @tc.name :
off
_007
* @tc.desc :
off listening create album, type NOTIFY_ADD
* @tc.number : SUB_PHOTOACCESS_
UNREGISTERCHANGE
_0700
* @tc.name :
unRegisterChange
_007
* @tc.desc :
unRegister listening create album
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
off
_007'
,
0
,
async
function
(
done
)
{
const
testNum
=
'
off
_007'
;
it
(
'
unRegisterChange
_007'
,
0
,
async
function
(
done
)
{
const
testNum
=
'
unRegisterChange
_007'
;
try
{
let
count
=
0
;
helper
.
registerChange
(
DEFAULT_ALBUM_URI
,
true
,
async
(
changeData
)
=>
{
count
++
;
console
.
info
(
`${testNum} changeData: ${JSON.stringify(changeData)}`
);
});
await
sleep
(
10
0
);
await
sleep
(
55
0
);
helper
.
unRegisterChange
(
DEFAULT_ALBUM_URI
);
await
sleep
(
10
0
);
await
sleep
(
55
0
);
let
albumName
=
testNum
+
Date
.
now
();
await
helper
.
createAlbum
(
albumName
);
await
sleep
(
1000
);
...
...
@@ -100,29 +96,29 @@ export default function unRegisterChangeTest () {
});
/**
* @tc.number : SUB_PHOTOACCESS_
HELPER_OFF
_0800
* @tc.name :
off
_008
* @tc.desc :
off listening create album, type NOTIFY_UPDATE
* @tc.number : SUB_PHOTOACCESS_
UNREGISTERCHANGE
_0800
* @tc.name :
unRegisterChange
_008
* @tc.desc :
unRegister listening create album
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
off
_008'
,
0
,
async
function
(
done
)
{
const
testNum
=
'
off
_008'
;
it
(
'
unRegisterChange
_008'
,
0
,
async
function
(
done
)
{
const
testNum
=
'
unRegisterChange
_008'
;
try
{
let
albumUri
=
''
;
let
count
=
0
;
let
albumName
=
testNum
+
Date
.
now
();
let
album
=
await
helper
.
createAlbum
(
albumName
);
albumUri
=
album
.
albumUri
;
await
sleep
(
5
0
0
);
await
sleep
(
5
5
0
);
helper
.
registerChange
(
albumUri
,
false
,
async
(
changeData
)
=>
{
count
++
;
console
.
info
(
`${testNum} changeData: ${JSON.stringify(changeData)}`
);
});
await
sleep
(
10
0
);
await
sleep
(
55
0
);
helper
.
unRegisterChange
(
albumUri
);
await
sleep
(
10
0
);
await
sleep
(
55
0
);
album
.
albumName
=
Date
.
now
()
+
album
.
albumName
;
await
album
.
commitModify
();
await
sleep
(
1000
);
...
...
@@ -136,15 +132,15 @@ export default function unRegisterChangeTest () {
});
/**
* @tc.number : SUB_PHOTOACCESS_
HELPER_OFF
_1000
* @tc.name :
off
_010
* @tc.desc :
off listening change album overUri, type NOTIFY_UPDATE
* @tc.number : SUB_PHOTOACCESS_
UNREGISTERCHANGE
_1000
* @tc.name :
unRegisterChange
_010
* @tc.desc :
unRegister listening change albumName
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
off
_010'
,
0
,
async
function
example
(
done
)
{
const
testNum
=
'
off
_010'
;
it
(
'
unRegisterChange
_010'
,
0
,
async
function
example
(
done
)
{
const
testNum
=
'
unRegisterChange
_010'
;
try
{
let
albumUri
=
''
;
let
count
=
0
;
...
...
@@ -154,14 +150,14 @@ export default function unRegisterChangeTest () {
const
asset
=
await
getFileAsset
(
testNum
,
fetchOps
);
albumUri
=
album
.
albumUri
;
await
album
.
addAssets
([
asset
]);
await
sleep
(
5
0
0
);
await
sleep
(
5
5
0
);
helper
.
registerChange
(
albumUri
,
false
,
async
(
changeData
)
=>
{
count
++
;
console
.
info
(
`${testNum} changeData: ${JSON.stringify(changeData)}`
);
});
await
sleep
(
10
0
);
await
sleep
(
55
0
);
helper
.
unRegisterChange
(
albumUri
);
await
sleep
(
10
0
);
await
sleep
(
55
0
);
album
.
albumName
=
testNum
+
album
.
albumName
;
await
album
.
commitModify
();
await
sleep
(
1000
);
...
...
@@ -175,29 +171,29 @@ export default function unRegisterChangeTest () {
});
/**
* @tc.number : SUB_PHOTOACCESS_
HELPER_OFF
_1100
* @tc.name :
off
_011
* @tc.desc :
off listening album removeAssets, type NOTIFY_ALBUM_ADD_ASSET
* @tc.number : SUB_PHOTOACCESS_
UNREGISTERCHANGE
_1100
* @tc.name :
unRegisterChange
_011
* @tc.desc :
unRegister listening album addAssets
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
off
_011'
,
0
,
async
function
(
done
)
{
const
testNum
=
'
off
_011'
;
it
(
'
unRegisterChange
_011'
,
0
,
async
function
(
done
)
{
const
testNum
=
'
unRegisterChange
_011'
;
try
{
let
albumName
=
'testAlbum'
+
Date
.
now
();
let
album
=
await
helper
.
createAlbum
(
albumName
);
const
fetchOps
=
fetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'off11.jpg'
);
const
asset
=
await
getFileAsset
(
testNum
,
fetchOps
);
let
count
=
0
;
await
sleep
(
5
0
0
);
await
sleep
(
5
5
0
);
helper
.
registerChange
(
album
.
albumUri
,
false
,
async
(
changeData
)
=>
{
count
++
;
console
.
info
(
`${testNum} changeData: ${JSON.stringify(changeData)}`
);
});
await
sleep
(
10
0
);
await
sleep
(
55
0
);
helper
.
unRegisterChange
(
album
.
albumUri
);
await
sleep
(
10
0
);
await
sleep
(
55
0
);
await
album
.
addAssets
([
asset
]);
await
sleep
(
1000
);
expect
(
count
)
.
assertEqual
(
0
);
...
...
@@ -210,15 +206,15 @@ export default function unRegisterChangeTest () {
});
/**
* @tc.number : SUB_PHOTOACCESS_
HELPER_OFF
_1200
* @tc.name :
off
_012
* @tc.desc :
off listening album removeAssets, type NOTIFY_ALBUM_REMOVE_ASSET
* @tc.number : SUB_PHOTOACCESS_
UNREGISTERCHANGE
_1200
* @tc.name :
unRegisterChange
_012
* @tc.desc :
unRegister listening album removeAssets
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
off
_012'
,
0
,
async
function
(
done
)
{
const
testNum
=
'
off
_012'
;
it
(
'
unRegisterChange
_012'
,
0
,
async
function
(
done
)
{
const
testNum
=
'
unRegisterChange
_012'
;
try
{
let
albumName
=
'testAlbum'
+
Date
.
now
();
let
album
=
await
helper
.
createAlbum
(
albumName
);
...
...
@@ -226,14 +222,14 @@ export default function unRegisterChangeTest () {
const
asset
=
await
getFileAsset
(
testNum
,
fetchOps
);
let
count
=
0
;
await
album
.
addAssets
([
asset
]);
await
sleep
(
5
0
0
);
await
sleep
(
5
5
0
);
helper
.
registerChange
(
album
.
albumUri
,
false
,
async
(
changeData
)
=>
{
count
++
;
console
.
info
(
`${testNum} changeData: ${JSON.stringify(changeData)}`
);
});
await
sleep
(
10
0
);
await
sleep
(
55
0
);
helper
.
unRegisterChange
(
album
.
albumUri
);
await
sleep
(
10
0
);
await
sleep
(
55
0
);
await
album
.
removeAssets
([
asset
]);
await
sleep
(
1000
);
expect
(
count
)
.
assertEqual
(
0
);
...
...
@@ -246,20 +242,20 @@ export default function unRegisterChangeTest () {
});
/**
* @tc.number : SUB_PHOTOACCESS_
HELPER_OFF
_1500
* @tc.name :
off
_015
* @tc.desc :
off
remove all listening
* @tc.number : SUB_PHOTOACCESS_
UNREGISTERCHANGE
_1500
* @tc.name :
unRegisterChange
_015
* @tc.desc :
unRegister
remove all listening
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
'
off
_015'
,
0
,
async
function
(
done
)
{
const
testNum
=
'
off
_015'
;
it
(
'
unRegisterChange
_015'
,
0
,
async
function
(
done
)
{
const
testNum
=
'
unRegisterChange
_015'
;
try
{
let
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'off15.jpg'
);
const
asset
=
await
getFileAsset
(
testNum
,
fetchOps
);
let
listenCount
=
0
;
await
sleep
(
5
0
0
);
await
sleep
(
5
5
0
);
helper
.
registerChange
(
asset
.
uri
,
false
,
async
(
changeData
)
=>
{
listenCount
++
;
console
.
info
(
`${testNum} changeData1: ${JSON.stringify(changeData)}`
);
...
...
@@ -268,9 +264,9 @@ export default function unRegisterChangeTest () {
listenCount
++
;
console
.
info
(
`${testNum} changeData2: ${JSON.stringify(changeData)}`
);
});
await
sleep
(
10
0
);
await
sleep
(
55
0
);
helper
.
unRegisterChange
(
asset
.
uri
);
await
sleep
(
10
0
);
await
sleep
(
55
0
);
const
newTitle
=
testNum
+
asset
.
get
(
photoKeys
.
TITLE
);
asset
.
set
(
photoKeys
.
TITLE
,
newTitle
);
await
asset
.
commitModify
();
...
...
@@ -285,21 +281,21 @@ export default function unRegisterChangeTest () {
});
/**
* @tc.number : SUB_PHOTOACCESS_
HELPER_OFF
_CALLBACK_0000
* @tc.name :
off
_callback_000
* @tc.desc :
off
remove specified callback
* @tc.number : SUB_PHOTOACCESS_
UNREGISTERCHANGE
_CALLBACK_0000
* @tc.name :
unRegisterChange
_callback_000
* @tc.desc :
unRegister
remove specified callback
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
'
off
_callback_000'
,
0
,
async
function
(
done
)
{
const
testNum
=
'
off
_callback_000'
;
it
(
'
unRegisterChange
_callback_000'
,
0
,
async
function
(
done
)
{
const
testNum
=
'
unRegisterChange
_callback_000'
;
try
{
let
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'offCb01.jpg'
);
const
asset
=
await
getFileAsset
(
testNum
,
fetchOps
);
let
listenCount1
=
0
;
let
listenCount2
=
0
;
await
sleep
(
5
0
0
);
await
sleep
(
5
5
0
);
const
callback1
=
async
(
changeData
)
=>
{
listenCount1
++
;
console
.
info
(
`${testNum} callback1: ${JSON.stringify(changeData)}`
);
...
...
@@ -312,9 +308,9 @@ export default function unRegisterChangeTest () {
helper
.
registerChange
(
asset
.
uri
,
false
,
callback1
);
helper
.
registerChange
(
asset
.
uri
,
false
,
callback2
);
await
sleep
(
10
0
);
await
sleep
(
55
0
);
helper
.
unRegisterChange
(
asset
.
uri
,
callback1
);
await
sleep
(
10
0
);
await
sleep
(
55
0
);
const
newTitle
=
testNum
+
asset
.
get
(
photoKeys
.
TITLE
);
asset
.
set
(
photoKeys
.
TITLE
,
newTitle
);
await
asset
.
commitModify
();
...
...
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/publicApiTestWithSystemApi.ets
浏览文件 @
66e43219
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录