提交 ec5f1939 编写于 作者: F FULIZHONG 提交者: Gitee

Merge branch 'master' of gitee.com:openharmony/xts_acts into flz0512

......@@ -32,7 +32,6 @@ group("aafwk_standard") {
"context:context",
"featureability:featureability",
"formmanager:formmanager",
"setshowonlockscreen:setshowonlockscreen",
"want:want",
]
}
......
......@@ -85,45 +85,6 @@ describe('ActsStServiceAbilityTest', function () {
})
/**
* @tc.number: ACTS_AExecuteShellCommand_0200
* @tc.name: Execute a shell command with arguments (AsyncCallback).
* @tc.desc: Verify that the interface executes the Shell command successfully.
*/
it('ACTS_AExecuteShellCommand_Callback_0200', 0, async function (done) {
console.log("ACTS_AExecuteShellCommand_Callback_0200 --- start")
var currentAlertTimeout = 0;
try {
currentAlertTimeout = setTimeout(mySetTimeout, gSetTimeout);
function mySetTimeout() {
console.log('ACTS_AExecuteShellCommand_Callback_0200====<end mySetTimeout')
done();
}
var cmd = 'aa start -d 0 -a com.example.actskillProcessWithAccountclosetest.MainAbility'
+ ' -b com.example.actskillProcessWithAccountclosetest'
var AbilityDelegator = abilityDelegatorRegistry.getAbilityDelegator()
AbilityDelegator.executeShellCommand(cmd, 1000, (err, data) => {
clearTimeout(currentAlertTimeout);
console.log('ACTS_AExecuteShellCommand_Callback_0200 - executeShellCommand: start ')
console.log('ACTS_AExecuteShellCommand_Callback_0200 stdResult = ' + data.stdResult)
var i = data.stdResult.indexOf('start ability successfully.');
console.log('ACTS_AExecuteShellCommand_Callback_0200 query string i = ' + i);
expect(i == -1).assertEqual(false);
console.log('ACTS_AExecuteShellCommand_Callback_0200 exitCode = ' + data.exitCode)
expect(data.exitCode).assertEqual(0);
done()
})
} catch (error) {
clearTimeout(currentAlertTimeout);
console.log("ACTS_AExecuteShellCommand_Callback_0200 : error = " + error);
console.debug('ACTS_AExecuteShellCommand_Callback_0200====<end catch (error)');
done();
}
})
/**
* @tc.number: ACTS_AExecuteShellCommand_Promise_0100
* @tc.name: Execute a shell command without arguments (Promise).
......
......@@ -12,66 +12,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import appManager from '@ohos.application.appManager';
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index"
import featureAbility from '@ohos.ability.featureAbility';
import abilityfeatureAbility from '@ohos.ability.featureAbility';
var appbefore
var appafter
describe("appManagerTest", function () {
console.log("---appManagerTest-- starting---");
function sleep(time) {
return new Promise((resolve) => setTimeout(resolve, time))
}
/**
* @tc.number: SUB_AA_OpenHarmony_StateListener_0300
* @tc.name: Find all foreground application validations
* @tc.desc: Function test
* @tc.level 0
*/
it("SUB_AA_OpenHarmony_StateListener_0300", 0, async function (done) {
await appManager.getForegroundApplications().then((data) => {
console.log("---appM- starting---");
for (var i = 0; i < data.length; i++) {
if (data[i].bundleName == "com.example.statelistener") {
appbefore = data[i]
}
}
checkAppBefore(appbefore)
}).catch(()=>{
expect().assertFail()
})
var want = {
"bundleName": "com.example.fzgc",
"abilityName": "com.example.fzgc.MainAbility"
}
await featureAbility.startAbility({ want }).then().catch();
await sleep(1000)
await appManager.getForegroundApplications().then((data) => {
for (var i = 0; i < data.length; i++) {
if (data[i].bundleName == "com.example.fzgc") {
appafter = data[i]
}
}
checkAppAfter(appafter)
}).catch(()=>{
expect().assertFail()
})
await sleep(2000)
done();
})
function checkAppAfter(app) {
expect(app.state == 2).assertTrue();
expect(app.uid > 0).assertTrue();
expect(app.bundleName).assertEqual('com.example.fzgc');
}
function checkAppBefore(app) {
expect(app.state == 2).assertTrue();
expect(app.uid > 0).assertTrue();
expect(app.bundleName).assertEqual('com.example.statelistener');
}
})
......
......@@ -2157,42 +2157,4 @@ describe('ActsFeatureAbilityTest', function () {
done();
}
});
/*
* @tc.number: ACTS_StartAbility_0100
* @tc.name: featureAbility.getWindow : Get an ability window.
* @tc.desc: Check the return window of the interface (by AsyncCallback)
*/
it('ACTS_StartAbility_0100', 0, async function (done) {
console.log('ACTS_StartAbility_0100====<begin');
try {
featureAbility.getWindow((err,data)=>{
console.log('getWindow call back');
done();
});
done();
} catch (err) {
console.log('ACTS_StartAbility_0100====<end err=' + err)
done();
}
console.log('ACTS_StartAbility_0100====<end');
})
/*
* @tc.number: ACTS_StartAbility_0200
* @tc.name: featureAbility.getWindow : Get an ability window.
* @tc.desc: Check the return window of the interface
*/
it('ACTS_StartAbility_0200', 0, async function (done) {
console.log('ACTS_StartAbility_0200====<begin');
try {
var window = featureAbility.getWindow();
done();
} catch (err) {
console.log('ACTS_StartAbility_0200====<end err=' + err)
done();
}
console.log('ACTS_StartAbility_0200====<end');
})
})
......@@ -62,28 +62,6 @@ describe('ConnectAbilityTest', function () {
})
})
/*
* @tc.number: SUB_AA_JsApi_Ability_0400
* @tc.name: testAbility0400.
* @tc.desc: StartAbility-want only configure action (implicit start) - Ability
* without corresponding action (custom action).
*/
it("SUB_AA_JsApi_Ability_0400", 0, async function (done) {
let parameter = {
'want': {
'action': 'action.com.example.mytestw.TwoAbility123'
}
}
await featureAbility.startAbility(parameter).then((data) => {
console.log('testAbility0600 data: ' + JSON.stringify(data))
expect().assertFail()
}).catch((error) => {
console.log('testAbility0600 error: ' + JSON.stringify(error))
expect(errCode1).assertEqual(error.code)
})
done()
})
/*
* @tc.number: SUB_AA_JsApi_Ability_0500
* @tc.name: testAblity0500.
......
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
group("setshowonlockscreen") {
testonly = true
if (is_standard_system) {
deps = [
"setshowonlock:ActsSetshowonlockTest",
"showsethown:ActsShowsethownTest",
]
}
}
{
"description": "Configuration for hjunit demo Tests",
}
{
"app": {
"bundleName": "com.example.setshowonlock",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.setshowonlock",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry"
},
"abilities": [
{
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"name": "com.example.setshowonlock.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "standard",
"visible": true
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
{
"description": "Configuration for hjunit demo Tests",
}
{
"app": {
"bundleName": "com.example.showsethown",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.showsethown",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry"
},
"abilities": [
{
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"name": "com.example.showsethown.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "standard",
"visible":true
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
......@@ -20,11 +20,13 @@ group("multimedia") {
"audio/audio_js_standard/audioManager:audio_manager_js_hap",
"camera/camera_js_standard:camera_standard_ets_hap",
"image/image_js_standard:image_js_hap",
"media/media_js_standard/audioCodecFormat:audio_codec_format_js_hap",
"media/media_js_standard/audioDecoder:audio_decoder_js_hap",
"media/media_js_standard/audioEncoder:audio_encoder_js_hap",
"media/media_js_standard/audioPlayer:audio_player_js_hap",
"media/media_js_standard/audioRecorder:audio_recorder_js_hap",
"media/media_js_standard/recorderFormat:recorder_format_js_hap",
"media/media_js_standard/videoCodecFormat:video_codec_format_js_hap",
"media/media_js_standard/videoDecoder:video_decoder_js_hap",
"media/media_js_standard/videoEncoder:video_encoder_js_hap",
"media/media_js_standard/videoPlayer:video_player_js_hap",
......
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......@@ -13,19 +13,20 @@
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsSetshowonlockTest") {
hap_profile = "./entry/src/main/config.json"
ohos_js_hap_suite("audio_codec_format_js_hap") {
hap_profile = "./src/main/config.json"
js2abc = true
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
":audio_codec_format_js_assets",
":audio_codec_format_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsSetshowonlockTest"
hap_name = "ActsAudioCodecFormatJsTest"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/js/default"
ohos_js_assets("audio_codec_format_js_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("hjs_demo_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
ohos_resources("audio_codec_format_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
{
"description": "Configuration for audio codec format Tests",
"driver": {
"type": "JSUnitTest",
"test-timeout": "2000000",
"package": "ohos.acts.multimedia.audio.codecformat",
"shell-timeout": "600000"
},
"kits": [
{
"test-file-name": [
"ActsAudioCodecFormatJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
},
{
"type": "ShellKit",
"run-command": [
"rm -rf /storage/media/100/local/files/*",
"mkdir -p /data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"chmod 777 -R /data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/"
],
"teardown-command":[
]
},
{
"type": "PushKit",
"pre-push": [
],
"push": [
"./resource/audio/codecFormat/HEv2_AAC_2_96000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/LC_AAC_2_96000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/LC_AAC_1_96000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/LC_AAC_2_8000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/LC_AAC_1_8000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/LC_AAC_2_11025.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/LC_AAC_1_11025.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/LC_AAC_2_12000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/LC_AAC_1_12000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/LC_AAC_2_16000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/LC_AAC_1_16000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/LC_AAC_2_22050.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/LC_AAC_1_22050.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/HE_AAC_1_24000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/HE_AAC_2_24000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/HE_AAC_1_32000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/HE_AAC_2_32000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/HE_AAC_1_44100.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/HE_AAC_2_44100.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/HE_AAC_1_48000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/HE_AAC_2_48000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/HE_AAC_1_64000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/HE_AAC_2_64000.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/HE_AAC_1_88200.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/HE_AAC_2_88200.aac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_1_96000.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_2_8000.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_1_8000.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_2_11025.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_1_11025.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_2_12000.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_1_12000.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_2_16000.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_2_22050.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_1_16000.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_1_22050.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_2_24000.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_1_24000.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_2_32000.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_1_32000.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_2_44100.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_1_44100.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_2_48000.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_1_48000.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_2_64000.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_1_64000.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_2_88200.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_1_88200.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/FLAC_2_96000.flac ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_2_96000.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_1_96000.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_1_8000.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_1_12000.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_1_16000.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_1_22050.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_1_24000.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_1_32000.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_1_44100.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_1_48000.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_1_64000.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_1_88200.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_2_8000.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_2_12000.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_2_16000.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_2_22050.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_2_24000.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_2_32000.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_2_44100.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_2_48000.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_2_64000.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"./resource/audio/codecFormat/S16LE_2_88200.pcm ->/data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/"
]
},
{
"type": "ShellKit",
"run-command": [
"chmod 777 -R /data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/",
"chmod 777 /data/app/el1/bundle/public/ohos.acts.multimedia.audio.codecformat/ohos.acts.multimedia.audio.codecformat/assets/entry/resources/rawfile/*",
"chmod 777 -R /storage/media/100/local/files/",
"chmod 777 /storage/media/100/local/files/*",
"killall com.ohos.medialibrary.MediaScannerAbilityA",
"aa start -a MediaScannerAbility -b com.ohos.medialibrary.MediaScannerAbilityA"
],
"teardown-command":[
]
}
]
}
\ No newline at end of file
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import resourceManager from '@ohos.resourceManager';
export async function getFileDescriptor(fileName) {
let fileDescriptor = undefined;
await resourceManager.getResourceManager().then(async (mgr) => {
await mgr.getRawFileDescriptor(fileName).then(value => {
fileDescriptor = {fd: value.fd, offset: value.offset, length: value.length};
}).catch(error => {
console.log('case getRawFileDescriptor err: ' + error);
});
});
return fileDescriptor;
}
export async function closeFileDescriptor(fileName) {
await resourceManager.getResourceManager().then(async (mgr) => {
await mgr.closeRawFileDescriptor(fileName).then(value => {
console.log('case closeRawFileDescriptor success for file:' + fileName);
}).catch(error => {
console.log('case closeRawFileDescriptor err: ' + error);
});
});
}
streamId:0 pts:0 pts_time:0.000000 size:197165 flag:1
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册