SDK Version upgrade

Signed-off-by: qian-nan-xu <xuqiannan@huawei.com>
This commit is contained in:
qian-nan-xu 2022-04-20 17:43:53 +08:00
parent 78f3a271cc
commit 2610420923
50 changed files with 282 additions and 497 deletions

16
.gitignore vendored
View File

@ -1,16 +0,0 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
/entry/.preview
.cxx
/node_modules

66
build-profile.json5 Normal file
View File

@ -0,0 +1,66 @@
/**
* 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.
*/
{
"app": {
"signingConfigs": [
{
"name": "default",
"material": {
"storePassword": "0000001CC3BE691AB199070ED562DB03338CBA0946680428C3F19D83D67AEDF21600DC81465FB184AF81BB20",
"certpath": "signature/OpenHarmony.cer",
"keyAlias": "OpenHarmony Application Profile Release",
"keyPassword": "000000162E9AB177D8767B53401B9444E3E1E6EDDECCAA600359164ADA36F1CAF44FCE05D765",
"profile": "signature/com_ohos_Callui.p7b",
"signAlg": "SHA256withECDSA",
"storeFile": "signature/OpenHarmony.p12"
}
}
],
"compileSdkVersion": 8,
"compatibleSdkVersion": 8,
"products": [
{
"name": "default",
"signingConfig": "default",
}
]
},
"modules": [
{
"name": "callui",
"srcPath": "./callui",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
},
{
"name": "mobiledatasettings",
"srcPath": "./mobiledatasettings",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
}
]
}

View File

@ -1,34 +0,0 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'com.huawei.ohos.app'
//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
ohos {
compileSdkVersion 7
supportSystem "standard"
}
buildscript {
repositories {
maven {
url 'https://repo.huaweicloud.com/repository/maven/'
}
maven {
url 'https://developer.huawei.com/repo/'
}
}
dependencies {
classpath 'com.huawei.ohos:hap:3.0.5.2'
classpath 'com.huawei.ohos:decctest:1.2.7.2'
}
}
allprojects {
repositories {
maven {
url 'https://repo.huaweicloud.com/repository/maven/'
}
maven {
url 'https://developer.huawei.com/repo/'
}
}
}

View File

@ -0,0 +1,26 @@
/**
* 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.
*/
{
apiType: 'faMode',
showInServiceCenter: false,
buildOption: {
arkEnable: true,
},
"targets": [
{
"name": "default",
}
]
}

View File

@ -1,21 +0,0 @@
apply plugin: 'com.huawei.ohos.hap'
//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
ohos {
compileSdkVersion 7
defaultConfig {
compatibleSdkVersion 7
}
buildTypes {
release {
proguardOpt {
proguardEnabled false
rulesFiles 'proguard-rules.pro'
}
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
testImplementation 'junit:junit:4.13.1'
}

1
callui/hvigorfile.js Normal file
View File

@ -0,0 +1 @@
module.exports = require('@ohos/hvigor-ohos-plugin'). legacyHapTasks

View File

@ -1 +0,0 @@
# config module specific ProGuard rules here.

View File

@ -18,9 +18,9 @@
*/
import PA from '@ohos.ability.particleAbility';
import TelephonyCall from './TelephonyApi.ets';
import commonEvent from '@ohos.commonevent';
import HiLog from '../default/common/utils/Hilog.ets';
import TelephonyCall from './TelephonyApi';
import commonEvent from '@ohos.commonEvent';
import HiLog from '../default/common/utils/Hilog';
let subscriber;
const TAG = "CallManagerService";

View File

@ -17,8 +17,8 @@
* @file: service entry
*/
import CallManagerService from './CallManagerService.ets';
import HiLog from '../default/common/utils/Hilog.ets';
import CallManagerService from './CallManagerService';
import HiLog from '../default/common/utils/Hilog';
const TAG = "Service";

View File

@ -18,7 +18,7 @@
*/
import call from '@ohos.telephony.call';
import HiLog from '../default/common/utils/Hilog.ets';
import HiLog from '../default/common/utils/Hilog';
const prefixLog = 'callui service:@ohos.telephony.call:';
const TAG = "TelephonyApi";
@ -31,13 +31,13 @@ export default class TelephonyApi {
* @param { Function } callBack - inject an Function
*/
public registerCallStateCallback(callBack) {
call.on('callDetailsChange', (err, res) => {
if (err) {
HiLog.i(TAG,prefixLog + 'call.on registerCallStateCallback' + JSON.stringify(err))
call.on('callDetailsChange', (data) => {
if (!data) {
HiLog.i(TAG,prefixLog + 'call.on registerCallStateCallback' + JSON.stringify(data))
return;
}
HiLog.i(TAG,prefixLog + 'call.on registerCallStateCallback callState: ' + JSON.stringify(res.callState))
callBack(res);
HiLog.i(TAG,prefixLog + 'call.on registerCallStateCallback callState: ' + JSON.stringify(data.callState))
callBack(data);
});
}
@ -45,9 +45,9 @@ export default class TelephonyApi {
* onRegister call state callback
*/
public unRegisterCallStateCallback() {
call.off('callDetailsChange', (err, res) => {
if (err) {
HiLog.i(TAG,prefixLog + 'call.off unRegisterCallStateCallback' + JSON.stringify(err))
call.off('callDetailsChange', (data) => {
if (!data) {
HiLog.i(TAG,prefixLog + 'call.off unRegisterCallStateCallback' + JSON.stringify(data))
return;
}
HiLog.i(TAG,prefixLog + 'call.off unRegisterCallStateCallback')

View File

@ -13,9 +13,9 @@
* limitations under the License.
*/
import CallManager from './model/CallManager.ets';
import CallStateConst from './common/constant/CallStateConst.ets';
import HiLog from './common/utils/Hilog.ets';
import CallManager from './model/CallManager';
import CallStateConst from './common/constant/CallStateConst';
import HiLog from './common/utils/Hilog';
const TAG = "App";

View File

@ -17,8 +17,8 @@
* @file: bottom button component
*/
import CallServiceProxy from '../../model/CallServiceProxy.ets';
import HiLog from '../utils/Hilog.ets';
import CallServiceProxy from '../../model/CallServiceProxy';
import HiLog from '../utils/Hilog';
const TAG = "BottomBtn";

View File

@ -14,7 +14,7 @@
*/
import CallServiceProxy from "../../model/CallServiceProxy";
import HiLog from '../utils/Hilog.ets';
import HiLog from '../utils/Hilog';
const TAG = "DtmfBtn";

View File

@ -13,8 +13,8 @@
* limitations under the License.
*/
import Method from '../utils/Method.ets';
import HiLog from '../utils/Hilog.ets';
import Method from '../utils/Method';
import HiLog from '../utils/Hilog';
const TAG = "FuncBtn";

View File

@ -13,15 +13,15 @@
* limitations under the License.
*/
import Method from '../utils/Method.ets';
import FuncBtn from './FuncBtn.ets';
import Method from '../utils/Method';
import FuncBtn from './FuncBtn';
import FA from '@ohos.ability.featureAbility';
import CallStateConst from '../constant/CallStateConst.ets';
import CallServiceProxy from '../../model/CallServiceProxy.ets';
import Clone from '../utils/clone.ets';
import ConferenceConst from '../constant/ConferenceConst.ets';
import BtnGroupConfig from '../configs/BtnGroupConfig.ets';
import HiLog from '../utils/Hilog.ets';
import CallStateConst from '../constant/CallStateConst';
import CallServiceProxy from '../../model/CallServiceProxy';
import Clone from '../utils/clone';
import ConferenceConst from '../constant/ConferenceConst';
import BtnGroupConfig from '../configs/BtnGroupConfig';
import HiLog from '../utils/Hilog';
const TAG = 'FuncBtnGroup';
const textMap =

View File

@ -13,7 +13,7 @@
* limitations under the License.
*/
import HiLog from '../utils/Hilog.ets';
import HiLog from '../utils/Hilog';
const TAG = 'InComDialog';

View File

@ -13,15 +13,15 @@
* limitations under the License.
*/
import FuncBtn from './FuncBtn.ets';
import InComDialog from './InComDialog.ets';
import ImagePathConst from '../constant/ImagePathConst.ets';
import CallStateConst from '../constant/callStateConst.ets';
import CallServiceProxy from '../../model/CallServiceProxy.ets';
import FuncBtn from './FuncBtn';
import InComDialog from './InComDialog';
import ImagePathConst from '../constant/ImagePathConst';
import CallStateConst from '../constant/callStateConst';
import CallServiceProxy from '../../model/CallServiceProxy';
import sms from '@ohos.telephony.sms';
import resourceManager from '@ohos.resourceManager';
import prompt from '@system.prompt';
import HiLog from '../utils/Hilog.ets';
import HiLog from '../utils/Hilog';
const TAG = "IncomingCom";
const SMS_REJECTION = `${ImagePathConst.BASE_URL}ic_public_message.svg`;
@ -67,6 +67,7 @@ export default struct IncomingCom {
},
cancelHandle: () => {
},
// @ts-ignore
List: this.msgList
}),
cancel: () => {

View File

@ -13,8 +13,8 @@
* limitations under the License.
*/
import CallServiceProxy from '../../model/CallServiceProxy.ets';
import DtmfBtn from '../components/DtmfBtn.ets';
import CallServiceProxy from '../../model/CallServiceProxy';
import DtmfBtn from '../components/DtmfBtn';
const TAG = "Keyboard";

View File

@ -17,9 +17,9 @@
* @file: User list component
*/
import CallStateConst from '../constant/CallStateConst.ets';
import CallServiceProxy from '../../model/CallServiceProxy.ets';
import HiLog from '../utils/Hilog.ets';
import CallStateConst from '../constant/CallStateConst';
import CallServiceProxy from '../../model/CallServiceProxy';
import HiLog from '../utils/Hilog';
const TAG = "CallList";
const font_color = "rgba(255, 255, 255, 0.60)";

View File

@ -17,10 +17,10 @@
* @file: Header information display component
*/
import callList from '../components/CallList.ets';
import Utils from '../utils/utils.ets';
import callStateConst from '../constant/CallStateConst.ets';
import HiLog from '../utils/Hilog.ets';
import callList from '../components/CallList';
import Utils from '../utils/utils';
import callStateConst from '../constant/CallStateConst';
import HiLog from '../utils/Hilog';
const TAG = "contactCard";

View File

@ -17,7 +17,7 @@
* @file: Button group configuration file
*/
import ImagePathConst from '../constant/ImagePathConst.ets';
import ImagePathConst from '../constant/ImagePathConst';
const firstBtns = [
{

View File

@ -16,7 +16,7 @@
/**
* @file: Deep copy
*/
import Method from './Method.ets';
import Method from './Method';
const mapType = '[object Map]';
const setType = '[object Set]';

View File

@ -17,7 +17,7 @@
* @file: data storage
*/
import storage from '@ohos.data.storage';
import ImagePathConst from '../constant/ImagePathConst.ets';
import ImagePathConst from '../constant/ImagePathConst';
const storageObj = storage.getStorageSync(ImagePathConst.PHONE_NUMBER);

View File

@ -16,11 +16,11 @@
/**
* @file: Call data management
*/
import CallStateManager from './CallStateManager.ets';
import CallStateConst from '../common/constant/CallStateConst.ets';
import CallStateManager from './CallStateManager';
import CallStateConst from '../common/constant/CallStateConst';
import app from '@system.app';
import NotificationManager from '../model/NotificationManager.ets';
import HiLog from '../common/utils/Hilog.ets';
import NotificationManager from '../model/NotificationManager';
import HiLog from '../common/utils/Hilog';
const TAG = "CallDataManager";

View File

@ -16,15 +16,15 @@
/**
* @file: Call management
*/
import CallDataManager from './CallDataManager.ets';
import Utils from '../common/utils/utils.ets';
import commonEvent from '@ohos.commonevent';
import CallDataManager from './CallDataManager';
import Utils from '../common/utils/utils';
import commonEvent from '@ohos.commonEvent';
import featureAbility from '@ohos.ability.featureAbility';
import CallServiceProxy from './CallServiceProxy.ets';
import ContactManager from './ContactManager.ets';
import HiLog from '../common/utils/Hilog.ets';
import CallServiceProxy from './CallServiceProxy';
import ContactManager from './ContactManager';
import HiLog from '../common/utils/Hilog';
import call from '@ohos.telephony.call';
import CallStateConst from '../common/constant/CallStateConst.ets';
import CallStateConst from '../common/constant/CallStateConst';
const TAG = "CallManager";
let subscriber;

View File

@ -23,10 +23,10 @@
* which is convenient for development, so I will leave it for now.
*/
import commonEvent from '@ohos.commonevent';
import commonEvent from '@ohos.commonEvent';
import call from '@ohos.telephony.call';
import app from '@system.app';
import HiLog from '../common/utils/Hilog.ets';
import HiLog from '../common/utils/Hilog';
const TAG = "CallServiceProxy";
const prefixLog = 'callUI app:@ohos.telephony.call:';
@ -210,13 +210,13 @@ export default class CallServiceProxy {
* @param { Function } callBack - inject an Function
*/
public registerCallStateCallback(callBack) {
call.on('callDetailsChange', (err, res) => {
if (err) {
HiLog.i(TAG,prefixLog + "call.on registerCallStateCallback : %s" + JSON.stringify(err))
call.on('callDetailsChange', (data) => {
if (!data) {
HiLog.i(TAG,prefixLog + "call.on registerCallStateCallback : %s")
return;
}
HiLog.i(TAG,prefixLog + "call.on registerCallStateCallback callState : %s")
callBack(res);
callBack(data);
});
}
@ -224,9 +224,9 @@ export default class CallServiceProxy {
* onRegister call state callback
*/
public unRegisterCallStateCallback() {
call.off('callDetailsChange', (err, res) => {
if (err) {
HiLog.i(TAG,prefixLog + "call.off unRegisterCallStateCallback : %s" + JSON.stringify(err))
call.off('callDetailsChange', (data) => {
if (!data) {
HiLog.i(TAG,prefixLog + "call.off unRegisterCallStateCallback : %s")
return;
}
HiLog.i(TAG,prefixLog + "call.off unRegisterCallStateCallback : %s")
@ -237,9 +237,9 @@ export default class CallServiceProxy {
* register call event callback
*/
public registerCallEventCallback() {
call.on('callEventChange', (err, value) => {
if (err) {
HiLog.i(TAG,prefixLog + "call.on callEventChange : %s" + JSON.stringify(err))
call.on('callEventChange', (data) => {
if (!data) {
HiLog.i(TAG,prefixLog + "call.on callEventChange : %s")
} else {
HiLog.i(TAG,prefixLog + "call.on callEventChange : %s")
}
@ -250,9 +250,9 @@ export default class CallServiceProxy {
* unRegister call event callback
*/
public unRegisterCallEventCallback() {
call.off('callEventChange', (err, value) => {
if (err) {
HiLog.i(TAG,prefixLog + "call.off unRegisterCallEventCallback : %s" + JSON.stringify(err))
call.off('callEventChange', (data) => {
if (!data) {
HiLog.i(TAG,prefixLog + "call.off unRegisterCallEventCallback : %s")
} else {
HiLog.i(TAG,prefixLog + "call.off unRegisterCallEventCallback : %s")
}

View File

@ -19,7 +19,7 @@
import featureAbility from '@ohos.ability.featureAbility';
import dataAbility from '@ohos.data.dataAbility';
import HiLog from '../common/utils/Hilog.ets';
import HiLog from '../common/utils/Hilog';
const TAG = "ContactManager";
const DBbaseUri = 'dataability:///com.ohos.contactsdataability';
@ -40,7 +40,7 @@ export default class ContactManager {
const columns = ['id', 'display_name', 'detail_info'];
const predicates = new dataAbility.DataAbilityPredicates();
predicates.equalTo('detail_info', callData.accountNumber);
const dataAbilityHelper = await featureAbility.getDataAbilityHelper(DBbaseUri);
const dataAbilityHelper = await featureAbility.acquireDataAbilityHelper(DBbaseUri);
const resSet = await dataAbilityHelper.query(DBUri, columns, predicates);
HiLog.i(TAG, "getContactInfo resSet : %s")
if (resSet.rowCount > 0) {

View File

@ -19,9 +19,9 @@
import wantAgent from '@ohos.wantAgent';
import notification from '@ohos.notification';
import commonEvent from '@ohos.commonevent';
import callStateConst from '../common/constant/CallStateConst.ets';
import HiLog from '../common/utils/Hilog.ets';
import commonEvent from '@ohos.commonEvent';
import callStateConst from '../common/constant/CallStateConst';
import HiLog from '../common/utils/Hilog';
import resourceManager from '@ohos.resourceManager';
const TAG = "NotificationManager";

View File

@ -17,16 +17,16 @@
* @file: Main interface
*/
import ContactCard from '../common/components/ContactCard.ets';
import FuncBtnGroup from '../common/components/FuncBtnGroup.ets';
import Keyboard from '../common/components/Keyboard.ets';
import BottomBtn from '../common/components/BottomBtn.ets';
import IncomingCom from '../common/components/IncomingCom.ets';
import CallStateConst from '../common/constant/CallStateConst.ets';
import NotificationManager from '../model/NotificationManager.ets';
import ContactCard from '../common/components/ContactCard';
import FuncBtnGroup from '../common/components/FuncBtnGroup';
import Keyboard from '../common/components/Keyboard';
import BottomBtn from '../common/components/BottomBtn';
import IncomingCom from '../common/components/IncomingCom';
import CallStateConst from '../common/constant/CallStateConst';
import NotificationManager from '../model/NotificationManager';
import call from '@ohos.telephony.call';
import CallManager from '../model/CallManager.ets';
import HiLog from '../common/utils/Hilog.ets';
import CallManager from '../model/CallManager';
import HiLog from '../common/utils/Hilog';
import bundle from '@ohos.bundle';
import abilityAccessCtrl from "@ohos.abilityAccessCtrl";
import featureAbility from "@ohos.ability.featureAbility"
@ -114,7 +114,7 @@ export default struct Index {
HiLog.i(TAG, "initPermissions requestPermissions : " + requestPermissions.length)
if (requestPermissions.length > 0) {
let context = featureAbility.getContext()
context.requestPermissionsFromUser(requestPermissions, 2345, (data) => {
context.requestPermissionsFromUser(requestPermissions, 2345, (err, data) => {
for (let i = 0;i < data.authResults.length; i++) {
if(data.permissions[i] === "ohos.permission.READ_CONTACTS"){
if (data.authResults[i] === 0) {
@ -135,8 +135,6 @@ export default struct Index {
}
}
}
}).catch((error)=>{
HiLog.i(TAG, "Application catch error")
})
}
HiLog.i(TAG, "Application requestPermissionsFromUser end")

View File

@ -39,9 +39,10 @@
### 2.2 异步回调的使用
- 在需要回调操作的ets文件中创建回调函数
```JavaScript
subscribeCallback(err, data){
subscribeCallback(err, data)
{
// do something
},
}
```
- 调用应用内部封装的接口,并传入回调函数
```JavaScript
@ -49,7 +50,8 @@ Notification.subscribe(mSubscriber, this.subscribeCallback.bind(this));
```
- 在AsyncCallback返回数据时可以获取到错误信息或目标数据
```JavaScript
subscribeCallback(err, data) {
subscribeCallback(err, data)
{
Log.showInfo(TAG, 'subscribeCallback finished ====================' + JSON.stringify(data));
}
```

View File

@ -1,13 +0,0 @@
# Project-wide Gradle settings.
# IDE (e.g. DevEco Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# If the Chinese output is garbled, please configure the following parameter.
# This function is enabled by default when the DevEco Studio builds the hap/app,if you need disable gradle parallel,you should set org.gradle.parallel false.
# more information see https://docs.gradle.org/current/userguide/performance.html
# org.gradle.parallel=false
# org.gradle.jvmargs=-Dfile.encoding=GBK

Binary file not shown.

View File

@ -1,5 +0,0 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://repo.huaweicloud.com/gradle/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

183
gradlew vendored
View File

@ -1,183 +0,0 @@
#!/usr/bin/env sh
#
# 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.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"

103
gradlew.bat vendored
View File

@ -1,103 +0,0 @@
@rem
@rem Copyright (c) 2022 Huawei Device Co., Ltd.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

1
hvigorfile.js Normal file
View File

@ -0,0 +1 @@
module.exports = require('@ohos/hvigor-ohos-plugin').appTasks

13
local.properties Normal file
View File

@ -0,0 +1,13 @@
## This file is automatically generated by DevEco Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Wed Mar 23 14:49:28 CST 2022
sdk.dir=
nodejs.dir=
npm.dir=

View File

@ -0,0 +1,26 @@
/**
* 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.
*/
{
apiType: 'faMode',
showInServiceCenter: false,
buildOption: {
arkEnable: true,
},
"targets": [
{
"name": "default",
}
]
}

View File

@ -1,23 +0,0 @@
apply plugin: 'com.huawei.ohos.hap'
//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
ohos {
compileSdkVersion 7
defaultConfig {
compatibleSdkVersion 7
}
buildTypes {
release {
proguardOpt {
proguardEnabled false
rulesFiles 'proguard-rules.pro'
}
}
}
entryModules "callui"
}
dependencies {
entryImplementation project(':callui')
implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
testImplementation 'junit:junit:4.13'
}

View File

@ -0,0 +1 @@
module.exports = require('@ohos/hvigor-ohos-plugin'). legacyHapTasks

View File

@ -1 +0,0 @@
# config module specific ProGuard rules here.

View File

@ -1 +1,18 @@
{}
{
"license":"ISC",
"devDependencies":{},
"name":"callui",
"ohos":{
"org":"huawei",
"directoryLevel":"project",
"buildTool":"hvigor"
},
"description":"example description",
"repository":{},
"version":"1.0.0",
"dependencies":{
"@ohos/hvigor-ohos-plugin":"1.0.6",
"hypium":"^1.0.0",
"@ohos/hvigor":"1.0.6"
}
}

View File

@ -1 +0,0 @@
include ':callui',':mobiledatasettings'

29
signature/OpenHarmony.cer Normal file
View File

@ -0,0 +1,29 @@
-----BEGIN CERTIFICATE-----
MIICEjCCAZegAwIBAgIEI0/EFTAMBggqhkjOPQQDAwUAMGMxCzAJBgNVBAYTAkNO
MRQwEgYDVQQKEwtPcGVuSGFybW9ueTEZMBcGA1UECxMQT3Blbkhhcm1vbnkgVGVh
bTEjMCEGA1UEAxMaT3Blbkhhcm1vbnkgQXBwbGljYXRpb24gQ0EwHhcNMjIwMjE5
MTA0OTUwWhcNMzIwMjE3MTA0OTUwWjBIMQkwBwYDVQQGEwAxCTAHBgNVBAgTADEJ
MAcGA1UEBxMAMQkwBwYDVQQKEwAxCTAHBgNVBAsTADEPMA0GA1UEAxMGY2FsbHVp
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEO3mq1SqA2AQoZLknD3O6SOmPIjor
BBWJN3stcVYKLMEokHSIFlKoDyf8Tkfs1I6VtWpgCLChjglru8WymXkk+aNSMFAw
HwYDVR0jBBgwFoAU24a3IhbVC6FLt90le7nxBX2iLUcwDgYDVR0PAQH/BAQDAgeA
MB0GA1UdDgQWBBSmXyf83mxfSIaUXXElLP5a9zvSUDAMBggqhkjOPQQDAwUAA2cA
MGQCMH6u0jgEfp6+luebMhp/scK7lAiA38AiioPdMiBP9CFAGXJmPtGRbmlcAfMI
xQBBYAIwYqay38exYZy8S990ZdvTm1HiIh0nYMS6Rd6dWXHorcKYBpAAlrenEs44
xn3vyaa4
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIICYTCCAeWgAwIBAgIEHmXAPTAMBggqhkjOPQQDAwUAMGgxCzAJBgNVBAYTAkNO
MRQwEgYDVQQKEwtPcGVuSGFybW9ueTEZMBcGA1UECxMQT3Blbkhhcm1vbnkgVGVh
bTEoMCYGA1UEAxMfT3Blbkhhcm1vbnkgQXBwbGljYXRpb24gUm9vdCBDQTAeFw0y
MTAyMDIxMjE1MzJaFw00OTEyMzExMjE1MzJaMGMxCzAJBgNVBAYTAkNOMRQwEgYD
VQQKEwtPcGVuSGFybW9ueTEZMBcGA1UECxMQT3Blbkhhcm1vbnkgVGVhbTEjMCEG
A1UEAxMaT3Blbkhhcm1vbnkgQXBwbGljYXRpb24gQ0EwdjAQBgcqhkjOPQIBBgUr
gQQAIgNiAAQhnu7Hna8XNa2KyqRf5+lBJScE4xqf89N0g0OuqAb2re8nGsvWkw26
uDekfnBYicd+G3Cydqa2zFIwV7Talyg2ULW3r8KbGpyl84mJEPPRmCGJ+H9gtCsf
+OrJ4Y76LVWjYzBhMB8GA1UdIwQYMBaAFBc6EKGrGXzlAE+s0Zgnsphadw7NMA8G
A1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTbhrciFtUL
oUu33SV7ufEFfaItRzAMBggqhkjOPQQDAwUAA2gAMGUCMG3cXjiDmXTvf7D4Omhf
qcc2nuO+EMfWE+N9ZhBP5UhV34mAGWi3SfLU6rcV0urWEQIxAMYIb3epOnKhUrcm
Lfu1WKzFlpYQwmw73RaCHP2I3k6NcuWOYeNwWXSNZ8o0nzvaLg==
-----END CERTIFICATE-----

BIN
signature/OpenHarmony.p12 Normal file

Binary file not shown.

View File

@ -0,0 +1,2 @@
@¼)t`€{
å8̃/EšŽ

Binary file not shown.

View File

@ -0,0 +1 @@
B¶âR šÎhó5LcGnà

View File

@ -0,0 +1 @@
3RF<EFBFBD><EFBFBD>:<3A><>f<>4<EFBFBD><34><EFBFBD><EFBFBD>

View File

@ -0,0 +1 @@
ソ)<29>ワn゙@ン。<15>