diff --git a/common/component/src/main/ets/default/doubleLineComponent.ets b/common/component/src/main/ets/default/doubleLineComponent.ets index 95cf0fb9e113f3747eccd9fdcd0568ed2bc5152f..c83d67f89efe2cac718f14eaab06eacd0d8d2529 100644 --- a/common/component/src/main/ets/default/doubleLineComponent.ets +++ b/common/component/src/main/ets/default/doubleLineComponent.ets @@ -42,7 +42,6 @@ export default struct DoubleLineComponent { .width(this.image_wh) .height(this.image_wh) .margin({ right: $r('app.float.wh_value_16') }) - .visibility('' === this.settingIcon ? Visibility.None : Visibility.Visible) .objectFit(ImageFit.Contain); Column() { diff --git a/common/component/src/main/ets/default/subEntryComponent.ets b/common/component/src/main/ets/default/subEntryComponent.ets index 985188e201811a354373a7762fcdfb69c893156b..dbd9dc30ecd884c7cce085044c5c677e11b39d34 100644 --- a/common/component/src/main/ets/default/subEntryComponent.ets +++ b/common/component/src/main/ets/default/subEntryComponent.ets @@ -78,7 +78,7 @@ export struct SubEntryComponent { @Component export struct SubEntryComponentWithEndText { @State isTouched: boolean = false; - @Prop endText: string; + private endText: string | Resource; private targetPage: string; private title: string | Resource; diff --git a/product/phone/src/main/ets/controller/bluetooth/BluetoothDeviceController.ts b/product/phone/src/main/ets/controller/bluetooth/BluetoothDeviceController.ts index 3ec1f101726a601bc8a93ee8c1a3c311224d419f..07e9cd2b47e405b729d451b75facc84daeb8b4e2 100644 --- a/product/phone/src/main/ets/controller/bluetooth/BluetoothDeviceController.ts +++ b/product/phone/src/main/ets/controller/bluetooth/BluetoothDeviceController.ts @@ -87,11 +87,10 @@ export default class BluetoothDeviceController extends BaseSettingsController { clearTimeout(this.discoveryStopTimeoutId); } - BluetoothModel.unsubscribeStateChange(); BluetoothModel.unsubscribeBluetoothDeviceFind(); BluetoothModel.unsubscribeBondStateChange(); BluetoothModel.unsubscribeDeviceStateChange(); - + AppStorage.Delete('BluetoothFailedDialogFlag'); return this; } @@ -201,6 +200,7 @@ export default class BluetoothDeviceController extends BaseSettingsController { * @param deviceId device id */ unpair(deviceId: string): boolean { + AppStorage.SetOrCreate('BluetoothFailedDialogFlag', false); const result = BluetoothModel.unpairDevice(deviceId); LogUtil.log(this.TAG + 'bluetooth paired device unpair. result = ' + result) this.refreshPairedDevices() @@ -327,15 +327,18 @@ export default class BluetoothDeviceController extends BaseSettingsController { } this.forceRefresh(this.availableDevices); AppStorage.SetOrCreate('bluetoothAvailableDevices', this.availableDevices); - - this.showConnectFailedDialog(); - - } else if (data.bondState == BondState.BOND_STATE_BONDED) { - // case success - LogUtil.log(this.TAG + 'bluetooth bonded : remove device.'); - this.removeAvailableDevice(data.deviceId); - BluetoothModel.connectDevice(data.deviceId); - } + let showFlag = AppStorage.Get('BluetoothFailedDialogFlag'); + if (showFlag == false) { + AppStorage.SetOrCreate('BluetoothFailedDialogFlag', true); + return; + } + this.showConnectFailedDialog(this.getDevice(data.deviceId).deviceName); + } else if (data.bondState == BondState.BOND_STATE_BONDED) { + // case success + LogUtil.log(this.TAG + 'bluetooth bonded : remove device.'); + this.removeAvailableDevice(data.deviceId); + BluetoothModel.connectDevice(data.deviceId); + } }); } @@ -466,24 +469,24 @@ export default class BluetoothDeviceController extends BaseSettingsController { LogUtil.log(this.TAG + 'removeAvailableDevice : after : availableDevices length = ' + this.availableDevices.length); } - /** - * Connect Failed Dialog - */ - private showConnectFailedDialog() { - AlertDialog.show({ - title: $r("app.string.bluetooth_connect_failed"), - message: $r("app.string.bluetooth_connect_failed_msg"), - confirm: { - value: $r("app.string.bluetooth_know_button"), - action: () => { - LogUtil.info('Button-clicking callback') - } - }, - cancel: () => { - LogUtil.info('Closed callbacks') - }, - alignment: DialogAlignment.Bottom - }) + /** + * Connect Failed Dialog + */ + private showConnectFailedDialog(deviceName: string) { + AlertDialog.show({ + title: $r("app.string.bluetooth_connect_failed"), + message: $r("app.string.bluetooth_connect_failed_msg", deviceName), + confirm: { + value: $r("app.string.bluetooth_know_button"), + action: () => { + LogUtil.info('Button-clicking callback') + } + }, + cancel: () => { + LogUtil.info('Closed callbacks') + }, + alignment: DialogAlignment.Bottom + }) } } \ No newline at end of file diff --git a/product/phone/src/main/ets/model/abilityInfoImpl/AbilityInfoModel.ts b/product/phone/src/main/ets/model/abilityInfoImpl/AbilityInfoModel.ts index 7098094ddda4ffead79f5e54050e0e46e18e5ae3..980c341c0036fd8447aa68cf6a92e317ed9e0af4 100644 --- a/product/phone/src/main/ets/model/abilityInfoImpl/AbilityInfoModel.ts +++ b/product/phone/src/main/ets/model/abilityInfoImpl/AbilityInfoModel.ts @@ -88,7 +88,7 @@ export class AbilityInfoModel extends BaseModel { label = metaBase.labelName; } else { if (metaBase.labelId > 0) { - globalThis.settingsAbilityContext.resourceManager.getString(parseInt(metaBase.labelId), (error, value) => { + globalThis.settingsAbilityContext.resourceManager.getString(parseInt(metaBase.labelId), (error, value) => { if (error != null) { LogUtil.info('settings getAbilityInfoListener getString error:' + error); label = ''; diff --git a/product/phone/src/main/ets/model/aboutDeviceImpl/AboutDeviceModel.ts b/product/phone/src/main/ets/model/aboutDeviceImpl/AboutDeviceModel.ts index cd8148f2f19010c8ed995b9006dad189e709aca6..aef99d8424feb6e608896319a5c3dc7c0064b428 100644 --- a/product/phone/src/main/ets/model/aboutDeviceImpl/AboutDeviceModel.ts +++ b/product/phone/src/main/ets/model/aboutDeviceImpl/AboutDeviceModel.ts @@ -55,6 +55,7 @@ export class AboutDeviceModel extends BaseModel { constructor(){ super(); this.urivar = this.getUri(); + // @ts-ignore this.dataAbilityHelper = featureAbility.acquireDataAbilityHelper(globalThis.settingsAbilityContext, this.uri); } diff --git a/product/phone/src/main/ets/model/appManagementImpl/AppManagementModel.ts b/product/phone/src/main/ets/model/appManagementImpl/AppManagementModel.ts index 7f21aa5b22b6d284fb15bd3d9d38f7888d29e0f5..efffda74679044c5f160b72a26aee455c0c9b381 100644 --- a/product/phone/src/main/ets/model/appManagementImpl/AppManagementModel.ts +++ b/product/phone/src/main/ets/model/appManagementImpl/AppManagementModel.ts @@ -15,80 +15,110 @@ import BaseModel from '../../../../../../../common/utils/src/main/ets/default/model/BaseModel'; import LogUtil from '../../../../../../../common/utils/src/main/ets/default/baseUtil/LogUtil'; import Bundle from '@ohos.bundle'; -//import ResMgr from '@ohos.resourceManager'; import appManager from '@ohos.application.appManager' import osAccount from '@ohos.account.osAccount'; import ConfigData from '../../../../../../../common/utils/src/main/ets/default/baseUtil/ConfigData'; -import {LogAll} from '../../../../../../../common/utils/src/main/ets/default/baseUtil/LogDecorator'; +import { LogAll } from '../../../../../../../common/utils/src/main/ets/default/baseUtil/LogDecorator'; const INDEX = 0; const IS_INCLUDE_ABILITY_INFO = 0; const URI_PAGE = 'pages/applicationInfo'; let icon_arrow = $r('app.media.ic_settings_arrow'); let icon_default = $r('app.media.icon_default'); +let icon_default_str = ""; const MODULE_TAG = ConfigData.TAG + 'application-> '; /** * app management service class */ -@LogAll export class AppManagementModel extends BaseModel { - private mBundleInfoList: any[]= []; - /** - * get application data - */ - setAppManagementListener() { - this.mBundleInfoList = []; - Bundle.getAllBundleInfo(IS_INCLUDE_ABILITY_INFO) - .then((data) => { - LogUtil.info('settings AppManagementModel setAppManagementListener getBundleInfos() start '); - LogUtil.info('settings AppManagementModel data.length: ' + data.length + ' data: ' + JSON.stringify(data)); - this.getResourceItem(INDEX, data.length, data); - }); - LogUtil.info('settings appManagement init AppManagementModel setAppManagementListener end'); - } - - /** - * get resource information according to resource id - * - * @param index - array position - * @param count - array length - * @param data - data - */ - getResourceItem(index, count, data) { - LogUtil.info('settings AppManagementModel getIconItem start data.length' + data.length); - let imageValue = ''; - let label = ''; - let that = this; - LogUtil.info('settings AppManagementModel data[index].name :' + data[index].name); - try { - let appInfo = data[index].appInfo; - LogUtil.info('settings AppManagementModel getResourceManager appInfo.labelId:' + JSON.stringify(appInfo)); - let bundleContext = globalThis.settingsAbilityContext.createBundleContext(data[index].name) - if (appInfo.labelId > 0) { - bundleContext.resourceManager.getString(appInfo.labelId, (error, value) => { - LogUtil.info('settings AppManagementModel getResourceManager value.length:' + value.length); - if (value != null) { - LogUtil.info('settings AppManagementModel getResourceManager getString() value:' + value); - label = value; - LogUtil.info('settings AppManagementModel getResourceManager getString() label:' + label); + private mBundleInfoList: any[] = []; + + constructor() { + super(); + try { + globalThis.settingsAbilityContext.resourceManager.getMediaBase64(icon_default) + .then((res) => { + icon_default_str = res; + LogUtil.info('settings AppManagementModel getResourceManager init defaultIcon res:' + icon_default_str); + }) + .catch((err) => { + icon_default_str = ""; + LogUtil.info('settings AppManagementModel getResourceManager init defaultIcon error:' + err); + }); + } catch (err) { + icon_default_str = ""; + LogUtil.info('settings AppManagementModel getResourceManager init defaultIcon error:' + err); + } + + } + /** + * get application data + */ + setAppManagementListener() { + this.mBundleInfoList = []; + Bundle.getAllBundleInfo(IS_INCLUDE_ABILITY_INFO) + .then((data) => { + LogUtil.info('settings AppManagementModel setAppManagementListener getBundleInfos() start '); + LogUtil.info('settings AppManagementModel data.length: ' + data.length + ' data: ' + JSON.stringify(data)); + this.getResourceItem(INDEX, data.length, data); + }); + LogUtil.info('settings appManagement init AppManagementModel setAppManagementListener end'); + } + + /** + * get resource information according to resource id + * + * @param index - array position + * @param count - array length + * @param data - data + */ + async getResourceItem(index, count, data) { + LogUtil.info('settings AppManagementModel getIconItem start data.length' + data.length); + let imageValue = ''; + let label = ''; + let that = this; + LogUtil.info('settings AppManagementModel data[index].name :' + data[index].name); + try { + let context = globalThis.settingsAbilityContext; + let appInfo = data[index].appInfo; + LogUtil.info('settings AppManagementModel getResourceManager appInfo.labelId:' + JSON.stringify(appInfo.labelResource)); + if (appInfo.labelResource.id > 0) { + await context.resourceManager.getString(appInfo.labelResource) + .then((res) => { + label = res; + LogUtil.info('settings AppManagementModel getResourceManager getString() res:' + label); + }) + .catch((err) => { + LogUtil.info('settings AppManagementModel getResourceManager getString() error:' + err); + }); } else { - LogUtil.info('settings AppManagementModel getResourceManager getString() error:' + error); + label = appInfo.label; + if (label.length == 0) { + label = appInfo.labelResource.bundleName; + } + LogUtil.info('settings AppManagementModel getResourceManager getString() id=0:' + appInfo.label); } - }); - } else { - LogUtil.info('settings AppManagementModel getResourceManager getString() label:' + appInfo.label); - label = appInfo.label; - } - LogUtil.info('settings AppManagementModel getResourceManager getString() finish label:' + label); - if (appInfo.iconId > 0) { - bundleContext.resourceManager.getMediaBase64(appInfo.iconId, (error, value) => { - LogUtil.info('settings AppManagementModel getMediaBase64 error:' + error); - if (error != null) { - LogUtil.info('settings AppManagementModel getMediaBase64 error!=null:' + error); - this.mBundleInfoList.push({ - settingIcon: icon_default, + LogUtil.info('settings AppManagementModel getResourceManager getString() value:' + label); + LogUtil.info('settings AppManagementModel getResourceManager appInfo.iconResource:' + JSON.stringify(appInfo.iconResource)); + if (appInfo.iconResource.id > 0) { + await context.resourceManager.getMediaBase64(appInfo.iconResource) + .then((res) => { + imageValue = res; + LogUtil.info('settings AppManagementModel getResourceManager getMediaBase64() res:' + imageValue); + }) + .catch((err) => { + LogUtil.info('settings AppManagementModel getResourceManager getString() error:' + err); + imageValue = icon_default_str; + }); + } else { + imageValue = icon_default_str; + LogUtil.info('settings AppManagementModel getResourceManager getMediaBase64() id=0:' + icon_default_str); + } + LogUtil.info('settings AppManagementModel getResourceManager getMediaBase64() value:' + imageValue); + this.mBundleInfoList.push({ + settingIcon: imageValue, settingTitle: label, settingValue: '', settingArrow: icon_arrow, @@ -96,129 +126,91 @@ export class AppManagementModel extends BaseModel { settingBundleName: data[index].name, settingIconId: appInfo.iconId, settingUri: URI_PAGE - }); - if (count - 1 > index) { + }); + + + if (count - 1 > index) { LogUtil.info('settings AppManagementModel getMediaBase64() id=0:' + index + ' | count:' + count); index = index + 1; that.getResourceItem(index, count, data); - } else { + } else { LogUtil.info('settings AppManagementModel getMediaBase64() id=0:' + index + ' | count:' + count); LogUtil.info('settings AppManagementModel mBundleInfoList[i]: ' + JSON.stringify(this.mBundleInfoList)); AppStorage.SetOrCreate('appManagementList', this.mBundleInfoList); - } - } - LogUtil.info('settings AppManagementModel getResourceManager getMediaBase64() :' + value.length); - if (value.length > 0) { - imageValue = value; - LogUtil.info('settings AppManagementModel getResourceManager getMediaBase64() imageValue:' + imageValue); } - LogUtil.info('settings AppManagementModel getResourceManager getMediaBase64() end'); - this.mBundleInfoList.push({ - settingIcon: imageValue, - settingTitle: label, - settingValue: '', - settingArrow: icon_arrow, - settingSummary: data[index].versionName, - settingBundleName: data[index].name, - settingIconId: appInfo.iconId, - settingUri: URI_PAGE - }); - if (count - 1 > index) { - LogUtil.info('settings AppManagementModel getMediaBase64() if index:' + index + ' | count:' + count); - index = index + 1; - that.getResourceItem(index, count, data); - } else { - LogUtil.info('settings AppManagementModel getMediaBase64() else index:' + index + ' | count:' + count); - LogUtil.info('settings AppManagementModel mBundleInfoList[i]: ' + JSON.stringify(this.mBundleInfoList)); - AppStorage.SetOrCreate('appManagementList', this.mBundleInfoList); - } - }); - } else { - if (count - 1 > index) { - LogUtil.info('settings AppManagementModel getMediaBase64() id=0:' + index + ' | count:' + count); - index = index + 1; - that.getResourceItem(index, count, data); - } else { - LogUtil.info('settings AppManagementModel getMediaBase64() id=0:' + index + ' | count:' + count); - LogUtil.info('settings AppManagementModel mBundleInfoList[i]: ' + JSON.stringify(this.mBundleInfoList)); - AppStorage.SetOrCreate('appManagementList', this.mBundleInfoList); - } + } catch (error) { + LogUtil.error('settings AppManagementModel catch error:' + error); } - AppStorage.SetOrCreate('appManagementList', this.distinct(AppStorage.Get('appManagementList'))); - } catch (error) { - LogUtil.error('settings AppManagementModel catch error:' + error); + LogUtil.info('settings appManagement AppManagementModel getIconItem end'); } - LogUtil.info('settings appManagement AppManagementModel getIconItem end'); - } - - /** - * Remove duplicate item - */ - public distinct(arr){ - for(let i = 0; i < arr.length; i++ ){ - for(let j=i+1; j < arr.length; j++ ){ - if(arr[i].settingBundleName === arr[j].settingBundleName){ - arr.splice(j,1); - j--; + + /** + * Remove duplicate item + */ + public distinct(arr) { + for (let i = 0; i < arr.length; i++) { + for (let j = i + 1; j < arr.length; j++) { + if (arr[i].settingBundleName === arr[j].settingBundleName) { + arr.splice(j, 1); + j--; + } + } } - } + return arr; + } + + /** + * Clear up application data by bundle name + * @param bundleName bundle name + */ + clearUpApplicationData(bundleName: string, callback) { + appManager.clearUpApplicationData(bundleName, callback); } - return arr; - } - - /** - * Clear up application data by bundle name - * @param bundleName bundle name - */ - clearUpApplicationData(bundleName: string, callback) { - appManager.clearUpApplicationData(bundleName, callback); - } - - /** - * Clears cache data of a specified application. - * @param bundleName bundle name - */ - cleanBundleCacheFiles(bundleName: string, callback) { - Bundle.cleanBundleCacheFiles(bundleName, callback); - } - - /** - * Uninstall an application. - * @param bundleName bundle name - */ - async uninstall(bundleName: string, callback) { - LogUtil.info(ConfigData.TAG + "start uninstall in model"); - const bundlerInstaller = await Bundle.getBundleInstaller(); - const accountManager = await osAccount.getAccountManager(); - const mUserID = await accountManager.getOsAccountLocalIdFromProcess(); - LogUtil.info(ConfigData.TAG + "get bundlerInstaller : " + typeof bundlerInstaller); - bundlerInstaller.uninstall(bundleName, - { - userId: mUserID, - installFlag: 0, - isKeepData: false - }, (err, result) => { - AppStorage.SetOrCreate('appManagementList', []); - this.setAppManagementListener(); - callback(err, result); - }); - LogUtil.info(ConfigData.TAG + "end uninstall in model"); - } - - getBundleInfo(bundleName, callback) { - LogUtil.info(MODULE_TAG + 'start get bundle info'); - Bundle.getBundleInfo(bundleName, Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, callback); - LogUtil.info(MODULE_TAG + 'end get bundle info'); - } - - /** - * Kill processes by bundle name - * @param bundleName bundle name - */ - killProcessesByBundleName(bundleName: string, callback) { - appManager.killProcessesByBundleName(bundleName, callback); - } + /** + * Clears cache data of a specified application. + * @param bundleName bundle name + */ + cleanBundleCacheFiles(bundleName: string, callback) { + Bundle.cleanBundleCacheFiles(bundleName, callback); + } + + /** + * Uninstall an application. + * @param bundleName bundle name + */ + async uninstall(bundleName: string, callback) { + LogUtil.info(ConfigData.TAG + "start uninstall in model"); + const bundlerInstaller = await Bundle.getBundleInstaller(); + const accountManager = await osAccount.getAccountManager(); + const mUserID = await accountManager.getOsAccountLocalIdFromProcess(); + LogUtil.info(ConfigData.TAG + "get bundlerInstaller : " + typeof bundlerInstaller); + bundlerInstaller.uninstall(bundleName, + { + userId: mUserID, + installFlag: 0, + isKeepData: false + }, (err, result) => { + AppStorage.SetOrCreate('appManagementList', []); + this.setAppManagementListener(); + callback(err, result); + }); + LogUtil.info(ConfigData.TAG + "end uninstall in model"); + } + + getBundleInfo(bundleName, callback) { + LogUtil.info(MODULE_TAG + 'start get bundle info'); + Bundle.getBundleInfo(bundleName, Bundle.BundleFlag.GET_APPLICATION_INFO_WITH_PERMISSION, callback); + LogUtil.info(MODULE_TAG + 'end get bundle info'); + } + + /** + * Kill processes by bundle name + * @param bundleName bundle name + */ + killProcessesByBundleName(bundleName: string, callback) { + appManager.killProcessesByBundleName(bundleName, callback); + } } let appManagementModel = new AppManagementModel(); diff --git a/product/phone/src/main/ets/model/dateAndTimeImpl/DateAndTimeModel.ts b/product/phone/src/main/ets/model/dateAndTimeImpl/DateAndTimeModel.ts index 646589f9fe9b1f9e95b36859ca557b4de0725948..7128a8eba51957fdf7968e1ec637bf1272f8cf0f 100644 --- a/product/phone/src/main/ets/model/dateAndTimeImpl/DateAndTimeModel.ts +++ b/product/phone/src/main/ets/model/dateAndTimeImpl/DateAndTimeModel.ts @@ -34,6 +34,7 @@ export class DateAndTimeModel extends BaseModel { constructor() { super(); this.urivar = this.getUri(); + // @ts-ignore this.dataAbilityHelper = featureAbility.acquireDataAbilityHelper(globalThis.settingsAbilityContext, this.uri); } diff --git a/product/phone/src/main/ets/model/displayAndBrightnessImpl/brightness/BrightnessSettingModel.ts b/product/phone/src/main/ets/model/displayAndBrightnessImpl/brightness/BrightnessSettingModel.ts index 77437ef1ed398d65216d172378003bdbe9627063..98f9572a4a7c6130da54312543c66dc230de6f02 100644 --- a/product/phone/src/main/ets/model/displayAndBrightnessImpl/brightness/BrightnessSettingModel.ts +++ b/product/phone/src/main/ets/model/displayAndBrightnessImpl/brightness/BrightnessSettingModel.ts @@ -39,6 +39,7 @@ export class BrightnessSettingModel extends BaseModel{ constructor() { super(); this.urivar = this.getUri(); + // @ts-ignore this.dataAbilityHelper = featureAbility.acquireDataAbilityHelper(globalThis.settingsAbilityContext, this.uri); this.updateValue(); } diff --git a/product/phone/src/main/ets/model/moreConnectionsImpl/NfcModel.ts b/product/phone/src/main/ets/model/moreConnectionsImpl/NfcModel.ts index a98f0ee4a858d2d824589a53864ca9b525ebb7fe..982fcb1ed6e7c4d4c4b87fd6c2280c3a73d2b272 100644 --- a/product/phone/src/main/ets/model/moreConnectionsImpl/NfcModel.ts +++ b/product/phone/src/main/ets/model/moreConnectionsImpl/NfcModel.ts @@ -12,23 +12,53 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import LogUtil from '../../../../../../../common/utils/src/main/ets/default/baseUtil/LogUtil'; import ConfigData from '../../../../../../../common/utils/src/main/ets/default/baseUtil/ConfigData'; import nfcController from '@ohos.nfc.controller'; +const TAG = ConfigData.TAG + 'NfcModel: '; + export class NfcModel { - private isNfcOpen: boolean; - private TAG = ConfigData.TAG + 'NfcModel '; + /** + * register Nfc Status change + * @param callback + */ + registerNfcStatusObserver(callback) { + LogUtil.info(TAG + 'start register nfc status observer' ); + nfcController.on('nfcStateChange', (code) => { + AppStorage.SetOrCreate('nfcStatus', nfcController.isNfcOpen()); + callback(code); + }) + } + + /** + * check whether NFC is open + * return boolean. true is mean of NFC open, false is mean of NFC close + */ + isNfcOpen(): boolean { + const isOpen: boolean = nfcController.isNfcOpen(); + LogUtil.info(TAG + 'check nfc is open: ' + isOpen); + return isOpen; + } + /** + * open NFC + * return boolean. true is mean of NFC open success, false is mean of NFC open failed + */ openNfc(): boolean { - let enableNfc = nfcController.openNfc() - LogUtil.info(this.TAG + enableNfc) + let enableNfc = nfcController.openNfc(); + LogUtil.info(TAG + 'open nfc: ' + enableNfc); return enableNfc; } + /** + * close NFC + * return boolean. true is mean of NFC close success, false is mean of NFC close failed + */ closeNfc(): boolean { - let disableNfc = nfcController.closeNfc() - LogUtil.info(this.TAG + disableNfc) + let disableNfc = nfcController.closeNfc(); + LogUtil.info(TAG + 'close nfc' + disableNfc); return disableNfc; } } diff --git a/product/phone/src/main/ets/model/restoreFactorySettingsImpl/RestoreFactorySettingsModel.ts b/product/phone/src/main/ets/model/restoreFactorySettingsImpl/RestoreFactorySettingsModel.ts index de6282408b2f61c29c82c6b4fd6c76ddc241239e..db2033dfd323e36b6a4a3f6baab3cc2447a8c53c 100644 --- a/product/phone/src/main/ets/model/restoreFactorySettingsImpl/RestoreFactorySettingsModel.ts +++ b/product/phone/src/main/ets/model/restoreFactorySettingsImpl/RestoreFactorySettingsModel.ts @@ -18,20 +18,33 @@ import LogUtil from '../../../../../../../common/utils/src/main/ets/default/base import ConfigData from '../../../../../../../common/utils/src/main/ets/default/baseUtil/ConfigData'; import {LogAll} from '../../../../../../../common/utils/src/main/ets/default/baseUtil/LogDecorator'; +const TAG = ConfigData.TAG + 'RestoreFactorySettingsModel'; + /** * Restore factorySettings model */ @LogAll export class RestoreFactorySettingsModel extends BaseModel { - - /** * Reboot and clean userData */ rebootAndCleanUserData(callback?: (value) => void) { - Updater.getUpdater('/data/updater/updater.zip', 'OTA').rebootAndCleanUserData().then((value) => { - LogUtil.log(ConfigData.TAG + "rebootAndCleanUserData value:" + value) - }) + let restorer = Updater.getRestorer(); + if (!restorer) { + LogUtil.error(TAG + 'Updater getRestorer failed'); + return; + } + try { + restorer.factoryReset() + .then(() => { + LogUtil.info(TAG + 'factoryReset success'); + }) + .catch((err) => { + LogUtil.error(TAG + 'factoryReset failed: ' + JSON.stringify(err)); + }) + } catch(err) { + LogUtil.error(TAG + 'Updater factoryReset failed: ' + JSON.stringify(err)); + } } } diff --git a/product/phone/src/main/ets/model/wifiImpl/WifiModel.ts b/product/phone/src/main/ets/model/wifiImpl/WifiModel.ts index b014a482f8d96a0659ad9081c7a26c2a6c29ed62..1999e0c040c1e14557d4c858f18e50567228fbd7 100644 --- a/product/phone/src/main/ets/model/wifiImpl/WifiModel.ts +++ b/product/phone/src/main/ets/model/wifiImpl/WifiModel.ts @@ -304,6 +304,7 @@ export class WifiModel extends BaseModel { connectWiFi(password: string) { let apInfo = this.userSelectedAp.getApInfo(); + let ret = false; let connectParam: any = { "ssid": apInfo.ssid, "bssid": apInfo.bssid, @@ -311,13 +312,20 @@ export class WifiModel extends BaseModel { "isHiddenSsid": false, // we don't support connect to hidden ap yet "securityType": apInfo.securityType }; - + LogUtil.info(MODULE_TAG + 'disconnect WiFi isConnected is ' + wifi.isConnected()); if (wifi.isConnected() === true) { - wifi.disconnect(); + ret = wifi.disconnect(); + LogUtil.info(MODULE_TAG + 'disconnect WiFi ret is ' + ret); + this.registerWiFiConnectionObserver((code: Number) => { + if (code === 0) { + ret = wifi.connectToDevice(connectParam); + this.unregisterWiFiConnectionObserver(); + } + }) + }else{ + ret = wifi.connectToDevice(connectParam); + LogUtil.info(MODULE_TAG + 'connect WiFi ret is ' + ret); } - - let ret = wifi.connectToDevice(connectParam); - LogUtil.info(MODULE_TAG + 'connect WiFi ret is ' + ret); return ret; } @@ -351,7 +359,7 @@ export class WifiModel extends BaseModel { return WiFiEncryptMethodMap.OPEN; } if (apInfo.securityType === 2) { - return WiFiEncryptMethodMap.WPA; + return WiFiEncryptMethodMap.WEP; } return WiFiEncryptMethodMap.WPA2; } diff --git a/product/phone/src/main/ets/pages/moreConnections.ets b/product/phone/src/main/ets/pages/moreConnections.ets index 55c9c40a86958a31d8296c8d4d9890e17bbabf5c..29fe89d15a2577ca65dba139a7ddb325d3f305c8 100644 --- a/product/phone/src/main/ets/pages/moreConnections.ets +++ b/product/phone/src/main/ets/pages/moreConnections.ets @@ -17,7 +17,12 @@ import ConfigData from '../../../../../../common/utils/src/main/ets/default/base import HeadComponent from '../../../../../../common/component/src/main/ets/default/headComponent'; import {SubEntryComponentWithEndText} from '../../../../../../common/component/src/main/ets/default/subEntryComponent'; import ResourceUtil from '../../../../../../common/search/src/main/ets/default/common/ResourceUtil'; -import nfcController from '@ohos.nfc.controller'; +import NfcModel from '../model/moreConnectionsImpl/NfcModel'; +import display from '@ohos.display'; +import deviceInfo from '@ohos.deviceInfo'; + +const TAG = ConfigData.TAG + 'MoreConnections: '; +const deviceTypeInfo = deviceInfo.deviceType; /** * MoreConnections @@ -27,12 +32,17 @@ import nfcController from '@ohos.nfc.controller'; struct MoreConnections { @State columnMargin: string = '24vp'; @State nfcEnable: string = ''; - @State isNfcEnable: boolean = false; + @StorageLink('nfcStatus') nfcStatus: boolean = NfcModel.isNfcOpen(); + private maxScreenWidth; + private maxScreenHeight; + private nfcImageWidth; + private nfcImageHeight; build() { - Column(){ - GridContainer({columns:12, sizeType: SizeType.Auto, gutter: vp2px(1) === 2 ? '12vp' : '0vp', margin: vp2px(1) === 2 ? '24vp' : '0vp'}) { - Row({}) { + Column() { + GridContainer({columns: 12, sizeType: SizeType.Auto, + gutter: vp2px(1) === 2 ? '12vp' : '0vp', margin: vp2px(1) === 2 ? '24vp' : '0vp'}) { + Row() { Column() { } .width(ConfigData.WH_100_100) @@ -45,12 +55,12 @@ struct MoreConnections { Column() { HeadComponent({ headName: $r('app.string.moreConnectionsTab'), isActive: true }) Column({space: this.columnMargin}){ - SubEntryComponentWithEndText({targetPage:'pages/nfc', title: $r('app.string.NFC'), endText: this.nfcEnable}) + SubEntryComponentWithEndText({targetPage:'pages/nfc', title: $r('app.string.NFC'), endText: this.nfcStatus ? $r("app.string.enabled") : $r("app.string.disabled")}) } .margin({ top: $r("app.float.distance_8") }) .width(ConfigData.WH_100_100) } - .padding({ left: $r('app.float.distance_24'), right: $r('app.float.distance_24') }) + .margin({ left: $r('sys.float.ohos_id_card_margin_start'), right: $r('sys.float.ohos_id_card_margin_end') }) .width(ConfigData.WH_100_100) .height(ConfigData.WH_100_100) .useSizeType({ @@ -79,19 +89,45 @@ struct MoreConnections { } aboutToAppear(){ - LogUtil.info('settings moreConnections aboutToAppear in'); + LogUtil.info(TAG + 'aboutToAppear in'); ResourceUtil.getString($r('app.float.distance_24')).then(value => this.columnMargin = value); - let nfcState = nfcController.getNfcState(); - if (nfcState === ConfigData.STATE_ON) { - this.isNfcEnable = true; - this.nfcEnable = ConfigData.NFC_OPEN; - } - if (nfcState === ConfigData.STATE_OFF) { - this.isNfcEnable = false; - this.nfcEnable = ConfigData.NFC_CLOSE; - } - AppStorage.SetOrCreate('isNfcEnable', this.isNfcEnable) - LogUtil.info('settings moreConnections aboutToAppear out'); + // get screen max width and max height to show nfc image width and height + display.getDefaultDisplay((err, data) => { + if (err.code) { + LogUtil.error(TAG + 'Failed to obtain the default display object. Code: ' + JSON.stringify(err)); + return; + } + LogUtil.info(TAG + 'Succeeded in obtaining the default display object. Data:' + JSON.stringify(data)); + + // screen max width + this.maxScreenWidth = data.width; + // screen max height + this.maxScreenHeight = data.height; + + if (deviceTypeInfo === 'phone') { + if (this.maxScreenWidth < this.maxScreenHeight / 2) { + this.nfcImageWidth = this.maxScreenWidth * 0.8; + this.nfcImageHeight = this.maxScreenWidth * 0.8; + } else { + this.nfcImageWidth = (this.maxScreenHeight / 2) * 0.8; + this.nfcImageHeight = (this.maxScreenHeight / 2) * 0.8; + } + } + else { + if (this.maxScreenHeight > this.maxScreenWidth / 2) { + this.nfcImageWidth = (this.maxScreenWidth / 2) * 0.7; + this.nfcImageHeight = (this.maxScreenWidth / 2) * 0.7; + } else { + this.nfcImageWidth = this.maxScreenHeight * 0.7; + this.nfcImageHeight = this.maxScreenHeight * 0.7; + } + } + AppStorage.SetOrCreate('nfcImageWidth', this.nfcImageWidth); + AppStorage.SetOrCreate('nfcImageHeight', this.nfcImageHeight); + LogUtil.info('cq=====' + this.nfcImageWidth + typeof(this.maxScreenHeight)); + }) + + LogUtil.info(TAG + 'aboutToAppear out'); } } \ No newline at end of file diff --git a/product/phone/src/main/ets/pages/multipleUsers.ets b/product/phone/src/main/ets/pages/multipleUsers.ets index 4a49dee33f974252cd854279848754078bcc7963..83f45270ee7506da88edfc91e1575085a9206714 100644 --- a/product/phone/src/main/ets/pages/multipleUsers.ets +++ b/product/phone/src/main/ets/pages/multipleUsers.ets @@ -381,7 +381,7 @@ struct CurrentDialogBuilder { .onClick((event) => { LogUtil.info("Click to modify user image.") let chooseImageDialog = new CustomDialogController({ - builder: ChooseImageDialog({ controller: this.controller }), + builder: ChooseImageDialog(), alignment: DialogAlignment.Bottom, offset: ({ dx: 0, dy: '-24dp' }), }); diff --git a/product/phone/src/main/ets/pages/nfc.ets b/product/phone/src/main/ets/pages/nfc.ets index 4ff590c3a84368121959af7ef294017705bc7e88..c7eae4f688635e48864620d26a2476b2dbdf02d4 100644 --- a/product/phone/src/main/ets/pages/nfc.ets +++ b/product/phone/src/main/ets/pages/nfc.ets @@ -6,22 +6,26 @@ * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or - { - "name": "bluetoothTab", agreed to in writing, software + * 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 LogUtil from '../../../../../../common/utils/src/main/ets/default/baseUtil/LogUtil'; import HeadComponent from '../../../../../../common/component/src/main/ets/default/headComponent'; import ConfigData from '../../../../../../common/utils/src/main/ets/default/baseUtil/ConfigData'; import NfcModel from '../model/moreConnectionsImpl/NfcModel'; +const TAG = ConfigData.TAG + 'Nfc: '; + @Entry @Component struct Nfc { - @StorageLink('isNfcEnable') isNfcEnable: boolean = false; + @State isNfcEnable: boolean = false; + @StorageLink('nfcImageWidth') nfcImageWidth: number = null; + @StorageLink('nfcImageWidth') nfcImageHeight: number = null; build() { Column() { @@ -46,19 +50,19 @@ struct Nfc { } Image($r("app.media.ic_nfc")) - .height($r("app.float.wh_value_298")) - .width($r("app.float.wh_value_208")) + .width(this.nfcImageWidth + "px") + .height(this.nfcImageHeight + "px") .margin({ top: $r("app.float.distance_19") }) Text($r("app.string.nfcTips")) .fontFamily('HarmonyHeiTi') .fontWeight(FontWeight.Regular) .fontSize($r("app.float.font_14")) - .height($r("app.float.wh_value_19")) .lineHeight($r("app.float.lineHeight_19")) .fontColor($r("app.color.font_color_182431")) - .margin({ bottom: $r("app.float.distance_36"), top: $r("app.float.distance_27_5") }) + .margin({ bottom: $r("app.float.distance_36"), top: $r("app.float.distance_24") }) .opacity($r("app.float.opacity_100_60")) + .textAlign(TextAlign.Center) Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { Row() { @@ -75,15 +79,20 @@ struct Nfc { left: $r("app.float.wh_value_12") }) Toggle({ type: ToggleType.Switch, isOn: this.isNfcEnable }) - .width('36vp') - .height('20vp') - .selectedColor('#007DFF') + .width($r("app.float.switch_toggle_width")) + .height($r("app.float.switch_toggle_height")) + .selectedColor($r("app.color.toggle_selected_color_007DFF")) .margin({ right: $r('app.float.wh_value_6') }) .onChange((isOn: boolean) => { - if (isOn) { + this.isNfcEnable = !this.isNfcEnable; + if (this.isNfcEnable) { + // open NFC NfcModel.openNfc() + LogUtil.info(TAG + 'enable nfc: ' + NfcModel.openNfc()); } else { + // close NFC NfcModel.closeNfc() + LogUtil.info(TAG + 'disable nfc: ' + NfcModel.openNfc()); } }); } @@ -93,11 +102,7 @@ struct Nfc { .borderRadius($r('app.float.radius_24')) } .backgroundColor($r("sys.color.ohos_id_color_sub_background")) - .padding({ - left: $r('app.float.wh_24'), - right: $r('app.float.wh_24'), - bottom: $r('app.float.distance_32') - }) + .margin({ left: $r('sys.float.ohos_id_card_margin_start'), right: $r('sys.float.ohos_id_card_margin_end') }) .width(ConfigData.WH_100_100) .height(ConfigData.WH_100_100) .useSizeType({ @@ -125,4 +130,16 @@ struct Nfc { .width(ConfigData.WH_100_100) .height(ConfigData.WH_100_100); } + + aboutToAppear() { + LogUtil.info(TAG + 'aboutToAppear in'); + NfcModel.registerNfcStatusObserver((code) => { + LogUtil.info(TAG + 'aboutToAppear status code: ' + code); + this.isNfcEnable = NfcModel.isNfcOpen(); + LogUtil.info(TAG + 'aboutToAppear nfc open status: ' + this.isNfcEnable); + }) + // init nfc active status + this.isNfcEnable = NfcModel.isNfcOpen(); + LogUtil.info(TAG + 'aboutToAppear out'); + } } \ No newline at end of file diff --git a/product/phone/src/main/ets/pages/settingList.ets b/product/phone/src/main/ets/pages/settingList.ets index f3a14a2b9536c638131542d80465d63d4c8c405e..41a87d0f7b5f53958236e8d7411267a3a5be9890 100644 --- a/product/phone/src/main/ets/pages/settingList.ets +++ b/product/phone/src/main/ets/pages/settingList.ets @@ -23,7 +23,7 @@ import Router from '@system.router'; import FeatureAbility from '@ohos.ability.featureAbility'; import { BaseData } from '../../../../../../common/utils/src/main/ets/default/bean/BaseData'; import deviceInfo from '@ohos.deviceInfo'; -import parameter from '@ohos.systemParameter'; +import parameter from '@ohos.systemparameter'; const PAGE_SEARCH = 'pages/searchPage'; // for search const deviceTypeInfo = deviceInfo.deviceType @@ -281,7 +281,8 @@ struct EntryComponent { @State isPhone: boolean = false; aboutToAppear() { - let info: string = parameter.getSync("const.SystemCapability.Communication.NFC.Core" ,"false"); +// let info: string = parameter.getSync("const.SystemCapability.Communication.NFC.Core" ,"false"); + let info = 'false' if (info === 'true') { this.nfcInfo = true; } else { diff --git a/product/phone/src/main/ets/pages/wifi.ets b/product/phone/src/main/ets/pages/wifi.ets index 9c5b5355de321e02387f708bca7e9bbadc3f16b8..45a2c05a802b559212716d46a2983c42f9da5474 100644 --- a/product/phone/src/main/ets/pages/wifi.ets +++ b/product/phone/src/main/ets/pages/wifi.ets @@ -319,10 +319,12 @@ struct Index { } // as the ConnectionStateChange event is diff with the getLinkInfo callback, // we always get the diff status between them - if (this.connectedWiFi.settingTitle === '') { - return false + let titleSign: boolean = (!!this.connectedWiFi.settingTitle) && (this.connectedWiFi.settingTitle.length > 0); + let arrowSign: boolean = (!!this.connectedWiFi.settingArrow) && (this.connectedWiFi.settingArrow.length > 0); + if(titleSign && arrowSign){ + return true; } - return true; + return false; } jumpToConnectApPage(apInfo: WifiScanInfo) { @@ -379,6 +381,8 @@ struct Index { } else { this.isPhone = false } + + AppStorage.SetOrCreate('slConnectedWifi', (new ApScanResult()).renderToListModel()); } aboutToDisappear(): void { diff --git a/product/phone/src/main/ets/pages/wifiPsd.ets b/product/phone/src/main/ets/pages/wifiPsd.ets index dcdd9e6f94271b6f8754b19ce37c8517850748f2..6fdf617cd45dbd7aa7b0dc95ca77b14b9377dc6a 100644 --- a/product/phone/src/main/ets/pages/wifiPsd.ets +++ b/product/phone/src/main/ets/pages/wifiPsd.ets @@ -41,7 +41,9 @@ struct WifiPsd { private tobeConnectedAp: WifiScanInfo = null; private isConnectedBefore: boolean = false; private taskId: number = -1; + private toConnected: boolean = false; @State isPhone: boolean = false + @State @Watch("controlFailedDialog") ControlFailedDialog : boolean = false; private connectDialog: CustomDialogController = new CustomDialogController({ builder: connectProgressDialog({ ssid: this.tobeConnectedSSID, @@ -52,13 +54,20 @@ struct WifiPsd { customStyle: true }); private failedDialog: CustomDialogController = new CustomDialogController({ - builder: connectFailedDialog({}), + builder: connectFailedDialog({ControlFailedDialog:$ControlFailedDialog}), alignment: this.isPhone?DialogAlignment.Bottom:DialogAlignment.Center, offset: ({ dx: 0, dy: this.isPhone?'-16dp':0 }), autoCancel: true, customStyle: true }); + controlFailedDialog() { + if(this.ControlFailedDialog){ + this.failedDialog.close() + this.ControlFailedDialog =false + } + } + build() { Column() { GridContainer({ columns: 12, sizeType: SizeType.Auto, @@ -164,6 +173,7 @@ struct WifiPsd { () => { WifiModel.setUserSelectedAp(this.tobeConnectedAp); WifiModel.connectWiFi(this.userInputs); + this.toConnected = true; this.connectDialog.open(); }); } @@ -221,6 +231,7 @@ struct WifiPsd { } this.initTextInputHint(); this.isConnectedBefore = wifi.isConnected(); + if (this.isConnectedBefore) { LogUtil.info(MODULE_TAG + 'start task'); this.startLinkedInfoTask(); @@ -307,7 +318,8 @@ struct WifiPsd { }); WifiModel.refreshApScanResults(); } - if (result.connState === 6) { + if (result.connState === 6 && this.toConnected) { + this.toConnected = false; this.connectDialog.close() this.failedDialog.open() WifiModel.removeDeviceConfig(this.tobeConnectedAp); @@ -368,8 +380,8 @@ struct connectProgressDialog { @CustomDialog struct connectFailedDialog { - controller: CustomDialogController; - + controller: CustomDialogController ; + @Link ControlFailedDialog : boolean ; build() { Column() { Row() { @@ -389,9 +401,7 @@ struct connectFailedDialog { .fontColor($r('sys.color.ohos_id_color_text_primary_activated')) .fontWeight(FontWeight.Medium) .onClick(() => { - router.back({ - uri: 'pages/wifi', - }); + this.ControlFailedDialog = true }) } .alignItems(VerticalAlign.Top) diff --git a/product/phone/src/main/resources/base/element/color.json b/product/phone/src/main/resources/base/element/color.json index 875842df157248e3de086cc23422a560c16b632c..6fc2ac4fde6d6b7070c810c74d337f0917234c1c 100644 --- a/product/phone/src/main/resources/base/element/color.json +++ b/product/phone/src/main/resources/base/element/color.json @@ -44,6 +44,10 @@ "name": "font_color_007DFF", "value": "#007DFF" }, + { + "name": "toggle_selected_color_007DFF", + "value": "#007DFF" + }, { "name": "search_no_result_text_color", "value": "$color:font_color_182431" diff --git a/product/phone/src/main/resources/base/element/float.json b/product/phone/src/main/resources/base/element/float.json index f716b37bdbe3f260c853669c455f02d6f6579cab..1c64da3f633f60a5ab3ce6b9d9710b40245d5a85 100644 --- a/product/phone/src/main/resources/base/element/float.json +++ b/product/phone/src/main/resources/base/element/float.json @@ -188,10 +188,6 @@ "name": "wh_value_200", "value": "200vp" }, - { - "name": "wh_value_208", - "value": "208vp" - }, { "name": "wh_value_210", "value": "210vp" @@ -220,10 +216,6 @@ "name": "wh_value_280", "value": "280vp" }, - { - "name": "wh_value_298", - "value": "298vp" - }, { "name": "wh_value_336", "value": "336vp" @@ -416,10 +408,6 @@ "name": "distance_26", "value": "26vp" }, - { - "name": "distance_27_5", - "value": "27.5vp" - }, { "name": "distance_30", "value": "30vp" diff --git a/product/phone/src/main/resources/en_US/element/string.json b/product/phone/src/main/resources/en_US/element/string.json index 4c629f3eb3cef3c443b861a6207b3fef8d375ca7..913797e087c3d54b49e1e13b3a7dda65ca7aede3 100644 --- a/product/phone/src/main/resources/en_US/element/string.json +++ b/product/phone/src/main/resources/en_US/element/string.json @@ -462,7 +462,7 @@ }, { "name": "isCreatingUser", - "value": "正在创建..." + "value": "Is Creating User..." }, { "name": "isRemoving", @@ -817,7 +817,7 @@ "value": "Brightness" }, { - "name": "Screen", + "name": "screen", "value": "Screen" }, { @@ -1032,6 +1032,10 @@ "name": "softwareUpdateFailed", "value": "Software update startup failed, please make sure the function is available." }, + { + "name": "add", + "value": "Add" + }, { "name": "MANAGE_LOCAL_ACCOUNTS", "value": "MANAGE LOCAL ACCOUNTS" diff --git a/product/phone/src/main/resources/phone/element/float.json b/product/phone/src/main/resources/phone/element/float.json index 75ce60c4e4d28627d3f9879756419b18f946cd5e..3530e889da179cca4041612a46e21cdd9d649b80 100644 --- a/product/phone/src/main/resources/phone/element/float.json +++ b/product/phone/src/main/resources/phone/element/float.json @@ -995,6 +995,10 @@ { "name": "head_font_24", "value": "20vp" + }, + { + "name": "opacity_100_60", + "value": "0.6" } ] } \ No newline at end of file diff --git a/product/phone/src/main/resources/phone/element/string.json b/product/phone/src/main/resources/phone/element/string.json index 62426932e62cae7ae0a03171903956e146875244..83a6f244f8e1f7a02c5dcad5ab4f73084d096638 100644 --- a/product/phone/src/main/resources/phone/element/string.json +++ b/product/phone/src/main/resources/phone/element/string.json @@ -8,6 +8,18 @@ "name": "mainability_description", "value": "ETS_Empty Feature Ability" }, + { + "name": "moreConnectionsTab", + "value": "更多连接" + }, + { + "name": "NFC", + "value": "NFC" + }, + { + "name": "nfcTips", + "value": "若要进行移动支付、钥匙验证、碰一碰等操作,可将本设备背部触碰其他终端 NFC 感应区。" + }, { "name": "enabled", "value": "已开启" diff --git a/product/phone/src/main/resources/zh_CN/element/string.json b/product/phone/src/main/resources/zh_CN/element/string.json index c261a43fc489404c108e6deaedcee9f8ddccebb0..33ad43ea40d7d42d00e76e10db0d29b290eb8cad 100644 --- a/product/phone/src/main/resources/zh_CN/element/string.json +++ b/product/phone/src/main/resources/zh_CN/element/string.json @@ -1036,6 +1036,10 @@ "name": "softwareUpdateFailed", "value": "软件更新启动失败,请确定该功能是否可用" }, + { + "name": "add", + "value": "添加" + }, { "name": "MANAGE_LOCAL_ACCOUNTS", "value": "管理本地帐户"