diff --git a/common/src/main/ets/default/Constants.ts b/common/src/main/ets/default/Constants.ts
index f2326102f04dd90ca2a990c49bd002ef7684ab11..3eb067e5e3599fe79487d0eb223a19dc6eb15ed6 100644
--- a/common/src/main/ets/default/Constants.ts
+++ b/common/src/main/ets/default/Constants.ts
@@ -43,6 +43,7 @@ export default class Constants {
static readonly KEY_BRIGHTNESS_STATUS = settings.display.SCREEN_BRIGHTNESS_STATUS;
static readonly KEY_TIME_FORMAT = settings.date.TIME_FORMAT;
static readonly KEY_NAVIGATIONBAR_STATUS = 'settings.display.navigationbar_status';
+ static readonly KEY_AIRPLANE_MODE_STATUS = 'settings.telephony.airplanemode';
/**
* 获取拼接后的uri,适配settingsdata去常驻
diff --git a/common/src/main/ets/plugindatasource/PluginDataSourceManager.ts b/common/src/main/ets/plugindatasource/PluginDataSourceManager.ts
index 46761181e80175cea97411991dc086ab27a8bdce..189f44987918b5117f9b70d7b0244f11f3736de1 100644
--- a/common/src/main/ets/plugindatasource/PluginDataSourceManager.ts
+++ b/common/src/main/ets/plugindatasource/PluginDataSourceManager.ts
@@ -1,3 +1,4 @@
+// @ts-nocheck
/*
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/common/src/main/ets/plugindatasource/common/BundleParseUtil.ts b/common/src/main/ets/plugindatasource/common/BundleParseUtil.ts
index fe9d7c029bed1b86b1a722935b3fb7b2c019e9a7..b39c19eab782f34c6adea3e6fcbf94873a352ea8 100644
--- a/common/src/main/ets/plugindatasource/common/BundleParseUtil.ts
+++ b/common/src/main/ets/plugindatasource/common/BundleParseUtil.ts
@@ -1,3 +1,4 @@
+// @ts-nocheck
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/common/src/main/ets/plugindatasource/sourceloader/MetaSourceLoader.ts b/common/src/main/ets/plugindatasource/sourceloader/MetaSourceLoader.ts
index a95d754130219fb31a7a7674ee69ad7c3d2fa9cf..71b71969618a3f7963bb781bedd20d2e46579258 100644
--- a/common/src/main/ets/plugindatasource/sourceloader/MetaSourceLoader.ts
+++ b/common/src/main/ets/plugindatasource/sourceloader/MetaSourceLoader.ts
@@ -1,3 +1,4 @@
+// @ts-nocheck
/*
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/common/src/main/ets/plugindatasource/sourceloader/PluginSourceLoader.ts b/common/src/main/ets/plugindatasource/sourceloader/PluginSourceLoader.ts
index 1aaf92dc9aa0ca361642ed959dc351a0ba75d6e8..b7ccd1c94167347cb9d4d792afe4d42d3728ea00 100644
--- a/common/src/main/ets/plugindatasource/sourceloader/PluginSourceLoader.ts
+++ b/common/src/main/ets/plugindatasource/sourceloader/PluginSourceLoader.ts
@@ -1,3 +1,4 @@
+// @ts-nocheck
/*
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/entry/pc/src/main/module.json5 b/entry/pc/src/main/module.json5
index 210e98f093ab7e324c52dd7bab95383a47a8a8c1..096c78db97e1fabb6340bdfb6a3d5a136d863b16 100644
--- a/entry/pc/src/main/module.json5
+++ b/entry/pc/src/main/module.json5
@@ -97,6 +97,9 @@
},
{
"name": "ohos.permission.ACCESS_SERVICE_DM"
+ },
+ {
+ "name": "ohos.permission.CONNECTIVITY_INTERNAL"
}
]
}
diff --git a/entry/phone/src/main/module.json5 b/entry/phone/src/main/module.json5
index bda73cbd677f880466db9295449e976ac34faba5..fd9507ba70ea612635921b179a811ccb9ce37a66 100644
--- a/entry/phone/src/main/module.json5
+++ b/entry/phone/src/main/module.json5
@@ -97,6 +97,9 @@
},
{
"name": "ohos.permission.ACCESS_SERVICE_DM"
+ },
+ {
+ "name": "ohos.permission.CONNECTIVITY_INTERNAL"
}
]
}
diff --git a/features/airplanecomponent/src/main/ets/default/common/Constants.ts b/features/airplanecomponent/src/main/ets/default/common/Constants.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a223420cf75fe47f14dd98af51ea3231b3708ff7
--- /dev/null
+++ b/features/airplanecomponent/src/main/ets/default/common/Constants.ts
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2021-2023 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.
+ */
+
+export interface AirplaneServiceListener {
+ updateState: (state: boolean) => void;
+}
+
+export enum AIRPLANE_MODE_STATUS {
+ ON = '1',
+ OFF = '0'
+}
\ No newline at end of file
diff --git a/features/airplanecomponent/src/main/ets/default/common/StyleConfiguration.ts b/features/airplanecomponent/src/main/ets/default/common/StyleConfiguration.ts
new file mode 100644
index 0000000000000000000000000000000000000000..87114276888d434517f9eda4639e0b54bb1b5ed2
--- /dev/null
+++ b/features/airplanecomponent/src/main/ets/default/common/StyleConfiguration.ts
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2021-2023 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 CommonStyleManager from '../../../../../../../common/src/main/ets/default/CommonStyleManager';
+
+const TAG = 'airplane-StyleConfiguration';
+
+export class StatusBarAirplaneComponentStyle {
+ statusBarAirplaneWidth: Length = $r("app.float.status_bar_airplane_width");
+ statusBarAirplaneHeight: Length = $r("app.float.status_bar_airplane_height");
+}
+
+export default class StyleConfiguration {
+ static getStatusBarAirplaneComponentStyle(): StatusBarAirplaneComponentStyle {
+ const key = TAG + '-StatusBarAirplaneComponent';
+ return CommonStyleManager.getStyle(key, StatusBarAirplaneComponentStyle);
+ }
+}
diff --git a/features/airplanecomponent/src/main/ets/default/model/AirplaneService.ts b/features/airplanecomponent/src/main/ets/default/model/AirplaneService.ts
new file mode 100644
index 0000000000000000000000000000000000000000..7e8ddd547883ce66625a128616d34490863605a4
--- /dev/null
+++ b/features/airplanecomponent/src/main/ets/default/model/AirplaneService.ts
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2021-2023 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 CommonEvent from '@ohos.commonEvent'
+import connection from '@ohos.net.connection'
+import { CommonEventSubscriber } from 'commonEvent/commonEventSubscriber';
+import { CommonEventData } from 'commonEvent/commonEventData';
+
+import createOrGet from '../../../../../../../common/src/main/ets/default/SingleInstanceHelper';
+import Log from '../../../../../../../common/src/main/ets/default/Log';
+import type { AirplaneServiceListener } from '../common/Constants';
+import { AIRPLANE_MODE_STATUS } from '../common/Constants';
+
+const TAG = 'AirplaneModel';
+
+const AIRPLANE_SUBSCRIBE_INFO = {
+ events: [CommonEvent.Support.COMMON_EVENT_AIRPLANE_MODE_CHANGED]
+};
+
+class AirplaneService {
+ mIsStart = false;
+ mListener: AirplaneServiceListener;
+ mSubscriber: CommonEventSubscriber;
+
+ startService() {
+ if (this.mIsStart) return;
+ this.mIsStart = true;
+
+ this.subscribe();
+ }
+
+ stopService() {
+ if (!this.mIsStart) return;
+ this.mIsStart = false;
+
+ this.mListener = null;
+ this.unsubscribe();
+ this.unregisterListener();
+ }
+
+ async subscribe() {
+ this.unsubscribe();
+
+ this.mSubscriber = await CommonEvent.createSubscriber(AIRPLANE_SUBSCRIBE_INFO);
+ CommonEvent.subscribe(this.mSubscriber, (err, data: CommonEventData) => {
+ Log.showInfo(TAG, `subscribe cb -> err:${JSON.stringify(err || {})} data:${JSON.stringify(data || {})}`);
+ if (err && err.code !== 0) {
+ Log.showInfo(TAG, `subscribe error ${JSON.stringify(err)}`);
+ return;
+ }
+ if (data && data.event === CommonEvent.Support.COMMON_EVENT_AIRPLANE_MODE_CHANGED) {
+ const status = String(data.code) === AIRPLANE_MODE_STATUS.ON;
+ this.mListener?.updateState(status);
+ }
+ })
+ }
+
+ unsubscribe() {
+ if (!this.mSubscriber) return;
+
+ CommonEvent.unsubscribe(this.mSubscriber);
+ this.mSubscriber = null;
+ }
+
+ registerListener(listener: AirplaneServiceListener) {
+ this.mListener = listener;
+ }
+
+ unregisterListener() {
+ this.mListener = null;
+ }
+
+ enableAirplaneMode() {
+ Log.showInfo(TAG, 'open airplane');
+ return connection.enableAirplaneMode();
+ }
+
+ disableAirplaneMode() {
+ Log.showInfo(TAG, 'close airplane');
+ return connection.disableAirplaneMode();
+ }
+}
+
+const sAirplaneService = createOrGet(AirplaneService, TAG);
+
+export default sAirplaneService;
diff --git a/features/airplanecomponent/src/main/ets/default/pages/ControlCenterSimpleToggleAirplaneComponent.ets b/features/airplanecomponent/src/main/ets/default/pages/ControlCenterSimpleToggleAirplaneComponent.ets
new file mode 100644
index 0000000000000000000000000000000000000000..e462c89fa64d4cbbcf86efe50a31ce95e020f064
--- /dev/null
+++ b/features/airplanecomponent/src/main/ets/default/pages/ControlCenterSimpleToggleAirplaneComponent.ets
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2021-2023 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 SimpleToggleBase from '../../../../../../../common/src/main/ets/template/SimpleToggleBase';
+import Log from '../../../../../../../common/src/main/ets/default/Log';
+import ViewModel from '../viewmodel/AirplaneVM';
+
+const TAG = 'airplane-ControlCenterSimpleToggleAirplaneComponent';
+
+@Component
+export default struct ControlCenterSimpleToggleAirplaneComponent {
+ private keyId: string;
+ private mEditMode: boolean = false;
+ private mDragMode: boolean = false;
+ @State mIcon: Resource = $r("app.media.airplane");
+ @State mLabel: Resource = $r("app.string.airplane_mode");
+ @StorageLink('Airplane_Status') airplaneStatus: boolean = false;
+
+ aboutToAppear() {
+ ViewModel.startVM();
+ Log.showInfo(TAG, 'aboutToAppear');
+ Log.showInfo(TAG, `mIcon: ${JSON.stringify(this.mIcon)} ${JSON.stringify(this.mLabel)}`)
+ }
+
+ aboutToDisappear() {
+ Log.showInfo(TAG, 'aboutToDisappear');
+ }
+
+ build() {
+ SimpleToggleBase({
+ mToggleId: this.keyId,
+ mChangeSwitch: $airplaneStatus,
+ mIcon: $mIcon,
+ mLabel: $mLabel,
+ mEditMode: this.mEditMode,
+ mDragMode: this.mDragMode,
+ mClickEvent: () => this.mClickEvent()
+ })
+ }
+
+ mClickEvent() {
+ ViewModel.handleClick();
+ }
+}
\ No newline at end of file
diff --git a/features/airplanecomponent/src/main/ets/default/pages/StatusBarIconItemAirplaneComponent.ets b/features/airplanecomponent/src/main/ets/default/pages/StatusBarIconItemAirplaneComponent.ets
new file mode 100644
index 0000000000000000000000000000000000000000..0d3c30c902c793bfb76a78a17e2683a15e65947c
--- /dev/null
+++ b/features/airplanecomponent/src/main/ets/default/pages/StatusBarIconItemAirplaneComponent.ets
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2021-2023 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 StyleConfigurationCommon, { CommonStyle } from '../../../../../../../common/src/main/ets/default/StyleConfiguration'
+import { TintContentInfo } from '../../../../../../../common/src/main/ets/default/TintStateManager';
+import Log from '../../../../../../../common/src/main/ets/default/Log';
+import StyleConfiguration, { StatusBarAirplaneComponentStyle } from '../common/StyleConfiguration'
+import ViewModel from '../viewmodel/AirplaneVM'
+
+const TAG = 'airplane-StatusBarIconItemAirplaneComponent';
+
+@Component
+export default struct StatusBarIconItemAirplaneComponent {
+ @StorageLink('Airplane_Status') airplaneStatus: boolean = false;
+ @State mTintContentInfo: TintContentInfo = ViewModel.getTintContentInfo();
+ @State styleCommon: CommonStyle = StyleConfigurationCommon.getCommonStyle();
+ @State style: StatusBarAirplaneComponentStyle = StyleConfiguration.getStatusBarAirplaneComponentStyle();
+
+ aboutToAppear() {
+ ViewModel.startVM();
+ }
+
+ build() {
+ Row() {
+ if (this.airplaneStatus) {
+ Row().width(this.styleCommon.statusBarMarginLeftRight).height('100%')
+ Image($r("app.media.airplane"))
+ .objectFit(ImageFit.Contain)
+ .width(this.style.statusBarAirplaneWidth)
+ .height(this.style.statusBarAirplaneHeight)
+ .fillColor(this.mTintContentInfo.contentColor)
+ Row().width(this.styleCommon.statusBarMarginLeftRight).height('100%')
+ }
+ }
+ .height('100%')
+ .opacity($r("app.float.icon_component_opacity"))
+ }
+}
diff --git a/features/airplanecomponent/src/main/ets/default/viewmodel/AirplaneVM.ts b/features/airplanecomponent/src/main/ets/default/viewmodel/AirplaneVM.ts
new file mode 100644
index 0000000000000000000000000000000000000000..0b61fe741dca9da226565c695326ed16bd263165
--- /dev/null
+++ b/features/airplanecomponent/src/main/ets/default/viewmodel/AirplaneVM.ts
@@ -0,0 +1,93 @@
+//@ts-nocheck
+/*
+ * Copyright (c) 2021-2023 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 settings from '@ohos.settings';
+import Context from 'application/ServiceExtensionContext';
+import Log from '../../../../../../../common/src/main/ets/default/Log';
+import createOrGet from '../../../../../../../common/src/main/ets/default/SingleInstanceHelper';
+import { TintContentInfo, getOrCreateTintContentInfo
+} from '../../../../../../../common/src/main/ets/default/TintStateManager';
+import { FASlotName } from '../../../../../../../common/src/main/ets/default/Constants';
+import AbilityManager from '../../../../../../../common/src/main/ets/default/abilitymanager/abilityManager';
+import Constants from '../../../../../../../common/src/main/ets/default/Constants';
+import AirplaneService from '../model/AirplaneService';
+import type { AirplaneServiceListener } from '../common/Constants';
+import { AIRPLANE_MODE_STATUS } from '../common/Constants';
+
+const TAG = 'AirplaneVM';
+
+class AirplaneVM implements AirplaneServiceListener {
+ mIsStart: boolean = false;
+ mAirplaneStatus: boolean = false;
+ mTintContentInfo: TintContentInfo = getOrCreateTintContentInfo(FASlotName.AIR_PLANE);
+ mIsToggling: boolean = false;
+ context: Context;
+
+ constructor() {
+ this.context = AbilityManager.getContext(AbilityManager.getContextName(AbilityManager.ABILITY_NAME_CONTROL_PANEL));
+
+ this.mAirplaneStatus =
+ settings.getValueSync(this.context, Constants.KEY_AIRPLANE_MODE_STATUS, AIRPLANE_MODE_STATUS.OFF) === AIRPLANE_MODE_STATUS.ON
+
+ AppStorage.SetOrCreate('Airplane_Status', this.mAirplaneStatus);
+ }
+
+ startVM() {
+ if (this.mIsStart) return;
+ this.mIsStart = true;
+
+ AirplaneService.registerListener(this);
+ AirplaneService.startService();
+
+ Log.showInfo(TAG, 'startVM')
+ }
+
+ stopVM() {
+ if (!this.mIsStart) return;
+ this.mIsStart = false;
+
+ AirplaneService.stopService();
+ }
+
+ updateState(status: boolean) {
+ Log.showInfo(TAG, `updateState ${status}`)
+ this.mAirplaneStatus = status;
+ AppStorage.Set('Airplane_Status', this.mAirplaneStatus);
+ }
+
+ getAirplaneStatus() {
+ return this.mAirplaneStatus;
+ }
+
+ getTintContentInfo(): TintContentInfo {
+ return this.mTintContentInfo;
+ }
+
+ async handleClick() {
+ Log.showInfo(TAG, `handleClick ${this.mIsToggling}`)
+
+ if (this.mIsToggling) return
+ this.mIsToggling = true
+
+ await AirplaneService[this.mAirplaneStatus ? "disableAirplaneMode" : "enableAirplaneMode"]();
+ Log.showInfo(TAG, 'await over')
+ this.mIsToggling = false
+ }
+}
+
+const sAirplaneVM = createOrGet(AirplaneVM, TAG);
+
+export default sAirplaneVM;
diff --git a/features/airplanecomponent/src/main/resources/base/element/float.json b/features/airplanecomponent/src/main/resources/base/element/float.json
new file mode 100644
index 0000000000000000000000000000000000000000..083948d5c483232253605e88fe9922e43543f92d
--- /dev/null
+++ b/features/airplanecomponent/src/main/resources/base/element/float.json
@@ -0,0 +1,16 @@
+{
+ "float": [
+ {
+ "name": "status_bar_airplane_width",
+ "value": "24vp"
+ },
+ {
+ "name": "status_bar_airplane_height",
+ "value": "24vp"
+ },
+ {
+ "name": "icon_component_opacity",
+ "value": "1"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/features/airplanecomponent/src/main/resources/phone/element/float.json b/features/airplanecomponent/src/main/resources/phone/element/float.json
new file mode 100644
index 0000000000000000000000000000000000000000..6f7b40992003290b74766871151331797f95426d
--- /dev/null
+++ b/features/airplanecomponent/src/main/resources/phone/element/float.json
@@ -0,0 +1,16 @@
+{
+ "float": [
+ {
+ "name": "status_bar_airplane_width",
+ "value": "13vp"
+ },
+ {
+ "name": "status_bar_airplane_height",
+ "value": "15vp"
+ },
+ {
+ "name": "icon_component_opacity",
+ "value": "0.7"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/features/brightnesscomponent/src/main/ets/default/pages/brightnessComponent.ets b/features/brightnesscomponent/src/main/ets/default/pages/brightnessComponent.ets
index 9034fc0135c83cf8e8962cbbbce126adc252712c..d1f83abad1b5b376513860d4ca398f5f088378fa 100644
--- a/features/brightnesscomponent/src/main/ets/default/pages/brightnessComponent.ets
+++ b/features/brightnesscomponent/src/main/ets/default/pages/brightnessComponent.ets
@@ -72,6 +72,7 @@ export default struct MyBrightness {
.selectedColor(this.style.sliderSelectedColor)
.onChange((value: number, mode: SliderChangeMode) => {
mBrightnessManager.setValue(value, mode);
+ this.brightnessValue = value
})
Image($r('app.media.ic_brightness_plus'))
diff --git a/features/controlcentercomponent/src/main/ets/com/ohos/pages/SimpleToggleLoadComponent.ets b/features/controlcentercomponent/src/main/ets/com/ohos/pages/SimpleToggleLoadComponent.ets
index 27c60ea388dfef6a7f77a909d4d99710d9d208c1..e7b21027687a8b5896b2916a69242b55007d349a 100644
--- a/features/controlcentercomponent/src/main/ets/com/ohos/pages/SimpleToggleLoadComponent.ets
+++ b/features/controlcentercomponent/src/main/ets/com/ohos/pages/SimpleToggleLoadComponent.ets
@@ -20,6 +20,7 @@ import LocationComponent from '../../../../../../../locationcomponent/src/main/e
import RingModeComponent from '../../../../../../../ringmodecomponent/src/main/ets/com/ohos/pages/ControlCenterSimpleToggleRingModeComponent';
import AutoRotateComponent from '../../../../../../../autorotatecomponent/src/main/ets/com/ohos/pages/ControlCenterSimpleToggleAutoRotateComponent';
import NFCComponent from '../../../../../../../nfccomponent/src/main/ets/com/ohos/pages/ControlCenterSimpleToggleNFComponent';
+import AirplaneComponent from '../../../../../../../airplanecomponent/src/main/ets/default/pages/ControlCenterSimpleToggleAirplaneComponent';
import SimpleToggleComponent from './SimpleToggleComponent';
const TAG = 'SimpleToggleLoadComponent';
@@ -58,6 +59,12 @@ export default struct SimpleToggleLoadComponent {
mEditMode: this.mEditMode,
mDragMode: this.mDragMode,
})
+ } else if (this.keyId == FASlotName.AIR_PLANE) {
+ AirplaneComponent({
+ keyId: this.keyId,
+ mEditMode: this.mEditMode,
+ mDragMode: this.mDragMode,
+ })
} else if (this.keyId == FASlotName.NFC) {
if (isNfcAvailable()) {
NFCComponent({
diff --git a/features/locationcomponent/src/main/ets/com/ohos/model/LocationService.ts b/features/locationcomponent/src/main/ets/com/ohos/model/LocationService.ts
index 67201d72652f2e4798ca306b0933badc37c83b80..b88e8a05dfdad5a160f0bcb1b0b859483db5dc74 100644
--- a/features/locationcomponent/src/main/ets/com/ohos/model/LocationService.ts
+++ b/features/locationcomponent/src/main/ets/com/ohos/model/LocationService.ts
@@ -34,10 +34,14 @@ export class LocationService {
Log.showInfo(TAG, 'startService');
this.mIsStart = true;
this.getServiceState();
- geolocation.on('locationEnabledChange', (state: boolean) => {
- Log.showInfo(TAG, `startService locationChange, state: ${JSON.stringify(state)}`);
- this.getServiceState();
- });
+ try {
+ geolocation.on('locationEnabledChange', (state: boolean) => {
+ Log.showInfo(TAG, `startService locationChange, state: ${JSON.stringify(state)}`);
+ this.getServiceState();
+ });
+ } catch {
+ Log.showError(TAG, 'geolocation.on try-catch error');
+ }
}
stopService(): void {
@@ -46,9 +50,13 @@ export class LocationService {
};
Log.showInfo(TAG, 'stopService');
this.mIsStart = false;
- geolocation.off('locationEnabledChange', (state: boolean) => {
- Log.showInfo(TAG, `stopService locationChange, state: ${JSON.stringify(state)}`)
- });
+ try {
+ geolocation.off('locationEnabledChange', (state: boolean) => {
+ Log.showInfo(TAG, `stopService locationChange, state: ${JSON.stringify(state)}`)
+ });
+ } catch {
+ Log.showError(TAG, 'geolocation.off try-catch error');
+ }
}
registerListener(listener: LocationStatrListener): void {
@@ -69,16 +77,24 @@ export class LocationService {
enableLocation(): void {
Log.showInfo(TAG, 'enableLocation');
- geolocation.enableLocation()
- .then((res) => Log.showInfo(TAG, `enableLocation, result: ${JSON.stringify(res)}`))
- .then(() => {
- }).catch((err) => {
- });
+ try {
+ geolocation.enableLocation()
+ .then((res) => Log.showInfo(TAG, `enableLocation, result: ${JSON.stringify(res)}`))
+ .then(() => {
+ }).catch((err) => {
+ });
+ } catch {
+ Log.showError(TAG, 'geolocation.enableLocation try-catch error');
+ }
}
disableLocation(): void {
Log.showInfo(TAG, 'disableLocation');
- geolocation.disableLocation()
+ try {
+ geolocation.disableLocation();
+ } catch {
+ Log.showError(TAG, 'geolocation.disableLocation try-catch error');
+ }
}
}
diff --git a/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationDistributionManager.ts b/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationDistributionManager.ts
index d17a06f711ef64a81f42848a9d0b63279c488476..9997c713ef06f7d991a9de7a8f2d2f4d8710e98b 100644
--- a/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationDistributionManager.ts
+++ b/features/noticeitem/src/main/ets/com/ohos/noticeItem/model/NotificationDistributionManager.ts
@@ -14,7 +14,7 @@
*/
import Log from '../../../../../../../../../common/src/main/ets/default/Log';
-import DeviceManager from '@ohos.distributedHardware.deviceManager';
+import deviceManager from '@ohos.distributedDeviceManager';
import DeviceInfo from '@ohos.deviceInfo';
const TAG = 'NotificationDistributionManager';
@@ -41,12 +41,16 @@ export default class NotificationDistributionManager {
initDeviceManager(): void {
Log.showInfo(TAG, 'initDeviceManager');
- DeviceManager.createDeviceManager('com.ohos.systemui', (err, data) => {
- Log.showInfo(TAG, `initDeviceManager createDeviceManager err:${JSON.stringify(err)} data:${JSON.stringify(data)}`);
- if (data) {
- this.deviceManager = data;
+ try {
+ let dmInstance = deviceManager.createDeviceManager("com.ohos.systemui");
+ if (dmInstance) {
+ this.deviceManager = dmInstance;
+ } else {
+ Log.showDebug(TAG, 'initDeviceManager dmInstance else');
}
- });
+ } catch (err) {
+ Log.showError(TAG, `initDeviceManager trycatch-error ${JSON.stringify(err)}`);
+ }
}
getTrustedDeviceDeviceName(deviceId: string): string {
@@ -67,16 +71,20 @@ export default class NotificationDistributionManager {
getTrustedDeviceListSync(): any[] {
Log.showInfo(TAG, 'getTrustedDeviceListSync');
- return this.deviceManager.getTrustedDeviceListSync();
- }
-
- getLocalDeviceInfoSync(): any {
- Log.showInfo(TAG, 'getLocalDeviceInfoSync');
- return this.deviceManager.getLocalDeviceInfoSync();
+ return this.deviceManager.getAvailableDeviceListSync();
}
release(): void {
- this.deviceManager.release();
+ try {
+ if (this.deviceManager) {
+ deviceManager.releaseDeviceManager(this.deviceManager);
+ } else {
+ Log.showDebug(TAG, 'this.deviceManager err');
+ }
+
+ } catch (err) {
+ Log.showDebug(TAG, 'deviceManager release err');
+ }
}
}
diff --git a/features/signalcomponent/src/main/ets/default/pages/signalIcon.ets b/features/signalcomponent/src/main/ets/default/pages/signalIcon.ets
index fd06cd2fd711959fd5179b3480f95ba3f508b3ff..d4cf6e339bc656379b9938f43d50c1e5b1f72b40 100644
--- a/features/signalcomponent/src/main/ets/default/pages/signalIcon.ets
+++ b/features/signalcomponent/src/main/ets/default/pages/signalIcon.ets
@@ -30,6 +30,7 @@ export default struct SignalIcon {
@StorageLink('cellularType') cellularType: number = Constants.RADIO_TECHNOLOGY_UNKNOWN
@StorageLink('networkState') networkState: string = Constants.NET_NULL
@StorageLink('signalObserved') signalObserved: boolean = false
+ @StorageLink('Airplane_Status') airplaneStatus: boolean = false;
@State mTintContentInfo: TintContentInfo = ViewModel.getTintContentInfo()
@State styleCommon: CommonStyle = StyleConfigurationCommon.getCommonStyle()
@State style: SignalComponentStyle = StyleConfiguration.getSignalComponentStyle()
@@ -48,35 +49,37 @@ export default struct SignalIcon {
build() {
Row() {
- Row().width(this.styleCommon.statusBarMarginLeftRight).height('100%')
- Text(this.updateNetworkState(this.networkState))
- .fontSize(this.styleCommon.statusBarFontSize)
- .fontColor(this.mTintContentInfo.contentColor)
- .textOverflow({ overflow: TextOverflow.Ellipsis })
- .constraintSize({ maxWidth: this.style.signalTextMaxWeight })
- .fontWeight(FontWeight.Medium)
- .flexShrink(0)
- .maxLines(1)
- .textAlign(TextAlign.Center)
- Row().width(this.styleCommon.statusBarMarginLeftRight).height('100%')
-
- Stack({ alignContent: Alignment.TopStart }) {
- Text(this.updateCellularType(this.cellularType))
- .fontSize(this.cellularType == Constants.RADIO_TECHNOLOGY_UNKNOWN ? this.style.statusBarSignalUnknownFontSize : this.style.statusBarSignalTypeFontSize)
+ if (!this.airplaneStatus) {
+ Row().width(this.styleCommon.statusBarMarginLeftRight).height('100%')
+ Text(this.updateNetworkState(this.networkState))
+ .fontSize(this.styleCommon.statusBarFontSize)
.fontColor(this.mTintContentInfo.contentColor)
- .width(this.style.netSignalTextMaxWidth)
- .fontWeight(FontWeight.Bold)
+ .textOverflow({ overflow: TextOverflow.Ellipsis })
+ .constraintSize({ maxWidth: this.style.signalTextMaxWeight })
+ .fontWeight(FontWeight.Medium)
+ .flexShrink(0)
+ .maxLines(1)
.textAlign(TextAlign.Center)
- .textAlign(TextAlign.Start)
- .margin({left:$r("app.float.signal_component_text_margin_left")})
- Image(this.updateCellularImage(this.cellularLevel))
- .objectFit(ImageFit.Contain)
- .width(this.style.cellularImageWidth)
- .height(this.style.cellularImageHeight)
- .fillColor(this.mTintContentInfo.contentColor)
- }.flexShrink(1)
+ Row().width(this.styleCommon.statusBarMarginLeftRight).height('100%')
+
+ Stack({ alignContent: Alignment.TopStart }) {
+ Text(this.updateCellularType(this.cellularType))
+ .fontSize(this.cellularType == Constants.RADIO_TECHNOLOGY_UNKNOWN ? this.style.statusBarSignalUnknownFontSize : this.style.statusBarSignalTypeFontSize)
+ .fontColor(this.mTintContentInfo.contentColor)
+ .width(this.style.netSignalTextMaxWidth)
+ .fontWeight(FontWeight.Bold)
+ .textAlign(TextAlign.Center)
+ .textAlign(TextAlign.Start)
+ .margin({left:$r("app.float.signal_component_text_margin_left")})
+ Image(this.updateCellularImage(this.cellularLevel))
+ .objectFit(ImageFit.Contain)
+ .width(this.style.cellularImageWidth)
+ .height(this.style.cellularImageHeight)
+ .fillColor(this.mTintContentInfo.contentColor)
+ }.flexShrink(1)
- Row().width(this.styleCommon.statusBarMarginLeftRight).height('100%')
+ Row().width(this.styleCommon.statusBarMarginLeftRight).height('100%')
+ }
}
.height('100%')
.opacity($r("app.float.icon_component_opacity"))
diff --git a/features/statusbarcomponent/src/main/ets/com/ohos/pages/StatusBarComponent.ets b/features/statusbarcomponent/src/main/ets/com/ohos/pages/StatusBarComponent.ets
index 8a5ec0e31e65cad0d693413022c541af923cfe96..308e50b4bb13f0a1f81513cfd892ee3e857c7cb7 100644
--- a/features/statusbarcomponent/src/main/ets/com/ohos/pages/StatusBarComponent.ets
+++ b/features/statusbarcomponent/src/main/ets/com/ohos/pages/StatusBarComponent.ets
@@ -27,6 +27,7 @@ import { StringArray } from '../viewmodel/StatusBarVM'
import IconItemComponent from './IconItemComponent'
import BatteryIcon from '../../../../../../../batterycomponent/src/main/ets/default/pages/batteryIcon'
import ClockIcon from '../../../../../../../clockcomponent/src/main/ets/default/pages/clockIcon'
+import AirplaneIcon from '../../../../../../../airplanecomponent/src/main/ets/default/pages/StatusBarIconItemAirplaneComponent'
import WifiIcon from '../../../../../../../wificomponent/src/main/ets/default/pages/wifiIcon'
import BluetoothIcon from '../../../../../../../bluetoothcomponent/src/main/ets/com/ohos/pages/StatusBarIconItemBluetoothComponent'
import SignalIcon from '../../../../../../../signalcomponent/src/main/ets/default/pages/signalIcon'
@@ -263,6 +264,8 @@ struct StatusBarItemLoadComponent {
ClockIcon()
} else if (this.mComponentName == FASlotName.BATTERY) {
BatteryIcon()
+ } else if (this.mComponentName == FASlotName.AIR_PLANE) {
+ AirplaneIcon()
} else if (this.mComponentName == FASlotName.CAPSULE) {
CapsuleIcon()
} else if (this.mComponentName == FASlotName.NOTIFICATION) {
diff --git a/features/wificomponent/src/main/ets/default/wifiModel.ts b/features/wificomponent/src/main/ets/default/wifiModel.ts
index 310fd6e918aa4e456418ff4026d52cace75ef21e..5fd30ed8c15e25d70e43e4f3d1512240c3ff0e37 100644
--- a/features/wificomponent/src/main/ets/default/wifiModel.ts
+++ b/features/wificomponent/src/main/ets/default/wifiModel.ts
@@ -71,12 +71,15 @@ export class WifiModel {
onWifiStateChange(data: WifiState): void {
Log.showInfo(TAG, `onWifiStateChange, data: ${JSON.stringify(data)}`);
- let isWifiInactive = data == WifiState.STATE_OFF;
- mWifiOpenStatus.set(!isWifiInactive);
- if (!isWifiInactive) {
- this.getWifiConnectInfo();
- } else {
- this.setDisconnectedStatus();
+ if (data == WifiState.STATE_OFF || data == WifiState.STATE_ON) {
+ let checkState = wifi.isWifiActive();
+ Log.showInfo(TAG, `checkState, data: ${JSON.stringify(checkState)}`);
+ mWifiOpenStatus.set(checkState);
+ if (checkState) {
+ this.getWifiConnectInfo();
+ } else {
+ this.setDisconnectedStatus();
+ }
}
}
diff --git a/product/pc/controlpanel/package-lock.json b/product/pc/controlpanel/package-lock.json
index f6328c7c37cf016fa6497b7eb3e46104c1739f9c..d340278876b57ad948a95cf7383ac1d9e408db98 100644
--- a/product/pc/controlpanel/package-lock.json
+++ b/product/pc/controlpanel/package-lock.json
@@ -4,6 +4,9 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+ "@ohos/airplanecomponent": {
+ "version": "file:../../../features/airplanecomponent"
+ },
"@ohos/autorotatecomponent": {
"version": "file:../../../features/autorotatecomponent"
},
diff --git a/product/pc/controlpanel/package.json b/product/pc/controlpanel/package.json
index 10b7ed6ba4eaaec5b5e15978a71cf11d820afa8f..9ba935fedbe15fcc4893ef24e7f740c5fe8ef9cd 100644
--- a/product/pc/controlpanel/package.json
+++ b/product/pc/controlpanel/package.json
@@ -9,6 +9,7 @@
"version":"1.0.0",
"dependencies":{
"@ohos/controlcentercomponent":"file:../../../features/controlcentercomponent",
- "@ohos/autorotatecomponent":"file:../../../features/autorotatecomponent"
+ "@ohos/autorotatecomponent":"file:../../../features/autorotatecomponent",
+ "@ohos/airplanecomponent":"file:../../../features/airplanecomponent"
}
-}
\ No newline at end of file
+}
diff --git a/product/pc/statusbar/package-lock.json b/product/pc/statusbar/package-lock.json
index 9df1d802317d2b84e14c4761693af348b0aa9622..a3b8f0d9b5606da05baf949d15a4b3fd16862c58 100644
--- a/product/pc/statusbar/package-lock.json
+++ b/product/pc/statusbar/package-lock.json
@@ -4,6 +4,9 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+ "@ohos/airplanecomponent": {
+ "version": "file:../../../features/airplanecomponent"
+ },
"@ohos/batterycomponent": {
"version": "file:../../../features/batterycomponent"
},
diff --git a/product/pc/statusbar/package.json b/product/pc/statusbar/package.json
index a7a80d7aa332f9750651ec499961505237075f7b..298ce7e61a949b1fcd67cfb56a16f8e6f126e914 100644
--- a/product/pc/statusbar/package.json
+++ b/product/pc/statusbar/package.json
@@ -16,6 +16,7 @@
"@ohos/locationcomponent":"file:../../../features/locationcomponent",
"@ohos/batterycomponent":"file:../../../features/batterycomponent",
"@ohos/ringmodecomponent":"file:../../../features/ringmodecomponent",
- "@ohos/capsulecomponent":"file:../../../features/capsulecomponent"
+ "@ohos/capsulecomponent":"file:../../../features/capsulecomponent",
+ "@ohos/airplanecomponent":"file:../../../features/airplanecomponent"
}
-}
\ No newline at end of file
+}
diff --git a/product/pc/statusbar/src/main/resources/base/element/float.json b/product/pc/statusbar/src/main/resources/base/element/float.json
index 92039318784237ab7c56291b08b9d75a6ea73b39..4527d2f2affcb5b991dabf98ce661cc2d3665c61 100644
--- a/product/pc/statusbar/src/main/resources/base/element/float.json
+++ b/product/pc/statusbar/src/main/resources/base/element/float.json
@@ -147,6 +147,14 @@
{
"name": "status_bar_margin_left_right",
"value": "6vp"
+ },
+ {
+ "name": "status_bar_airplane_width",
+ "value": "24vp"
+ },
+ {
+ "name": "status_bar_airplane_height",
+ "value": "24vp"
}
]
}
\ No newline at end of file
diff --git a/product/pc/statusbar/src/main/resources/base/media/airplane.svg b/product/pc/statusbar/src/main/resources/base/media/airplane.svg
new file mode 100644
index 0000000000000000000000000000000000000000..d648b9f94b4f2a5352813535ab2cd8fbf222750f
--- /dev/null
+++ b/product/pc/statusbar/src/main/resources/base/media/airplane.svg
@@ -0,0 +1,14 @@
+
+
\ No newline at end of file
diff --git a/product/phone/dropdownpanel/package-lock.json b/product/phone/dropdownpanel/package-lock.json
index f472344d9553579f7293eb14d75c0593a0f48293..25ce101024a4ee8929a5f6d698e109cdd9967c1d 100644
--- a/product/phone/dropdownpanel/package-lock.json
+++ b/product/phone/dropdownpanel/package-lock.json
@@ -4,6 +4,9 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+ "@ohos/airplanecomponent": {
+ "version": "file:../../../features/airplanecomponent"
+ },
"@ohos/autorotatecomponent": {
"version": "file:../../../features/autorotatecomponent"
},
diff --git a/product/phone/dropdownpanel/package.json b/product/phone/dropdownpanel/package.json
index 57fb14b7364385208dd87748d8183b2e69db6405..bed25e5c1a334f190b053d5eb4debce656697b61 100644
--- a/product/phone/dropdownpanel/package.json
+++ b/product/phone/dropdownpanel/package.json
@@ -18,6 +18,7 @@
"@ohos/controlcentercomponent":"file:../../../features/controlcentercomponent",
"@ohos/ringmodecomponent":"file:../../../features/ringmodecomponent",
"@ohos/autorotatecomponent":"file:../../../features/autorotatecomponent",
- "@ohos/noticeitem":"file:../../../features/noticeitem"
+ "@ohos/noticeitem":"file:../../../features/noticeitem",
+ "@ohos/airplanecomponent":"file:../../../features/airplanecomponent"
}
-}
\ No newline at end of file
+}
diff --git a/product/phone/dropdownpanel/src/main/ets/pages/common/ControlCenterConfig.ts b/product/phone/dropdownpanel/src/main/ets/pages/common/ControlCenterConfig.ts
index 5164b7e97a9dbfe33f350fb2e12c9a349c361990..d48e85852a9bb5eab3bdafd952b84362e2895d34 100644
--- a/product/phone/dropdownpanel/src/main/ets/pages/common/ControlCenterConfig.ts
+++ b/product/phone/dropdownpanel/src/main/ets/pages/common/ControlCenterConfig.ts
@@ -19,10 +19,24 @@ import {isNfcAvailable} from '../../../../../../../../common/src/main/ets/defaul
const controlCenterConfig: ControlCenterConfig = {
ComplexToggleLayout: [FASlotName.WIFI, FASlotName.BLUETOOTH],
- DefaultSimpleToggleLayout: ["screenshot", FASlotName.RING_MODE, FASlotName.LOCATION, 'demosystemuicplmeta', isNfcAvailable()&&FASlotName.NFC, FASlotName.AUTO_ROTATE],
+ DefaultSimpleToggleLayout: [
+ "screenshot",
+ FASlotName.RING_MODE,
+ FASlotName.LOCATION,
+ 'demosystemuicplmeta',
+ isNfcAvailable()&&FASlotName.NFC,
+ FASlotName.AUTO_ROTATE,
+ FASlotName.AIR_PLANE
+ ],
LocalToggles: {
- ComplexToggles: [FASlotName.AIR_PLANE, FASlotName.BLUETOOTH, FASlotName.WIFI],
- SimpleToggles: [FASlotName.LOCATION, FASlotName.RING_MODE, isNfcAvailable()&&FASlotName.NFC, FASlotName.AUTO_ROTATE],
+ ComplexToggles: [FASlotName.BLUETOOTH, FASlotName.WIFI],
+ SimpleToggles: [
+ FASlotName.LOCATION,
+ FASlotName.RING_MODE,
+ isNfcAvailable()&&FASlotName.NFC,
+ FASlotName.AUTO_ROTATE,
+ FASlotName.AIR_PLANE
+ ],
},
MetaToggles: [
{
diff --git a/product/phone/dropdownpanel/src/main/ets/pages/control.ets b/product/phone/dropdownpanel/src/main/ets/pages/control.ets
index 887a647d307432b989298e2abc4c27761ca7f43a..83939f9e6687f57d58e6a8278c730595ae8eeaad 100644
--- a/product/phone/dropdownpanel/src/main/ets/pages/control.ets
+++ b/product/phone/dropdownpanel/src/main/ets/pages/control.ets
@@ -18,6 +18,7 @@ import AbilityManager from '../../../../../../../common/src/main/ets/default/abi
import ControlCenterComponent from '../../../../../../../features/controlcentercomponent/src/main/ets/com/ohos/pages/ControlCenterComponent'
import BatteryIcon from '../../../../../../../features/batterycomponent/src/main/ets/default/pages/batteryIcon'
import ClockIcon from '../../../../../../../features/clockcomponent/src/main/ets/default/pages/clockIcon'
+import AirplaneIcon from '../../../../../../../features/airplanecomponent/src/main/ets/default/pages/StatusBarIconItemAirplaneComponent'
import WifiIcon from '../../../../../../../features/wificomponent/src/main/ets/default/pages/wifiIcon'
import BluetoothIcon from '../../../../../../../features/bluetoothcomponent/src/main/ets/com/ohos/pages/StatusBarIconItemBluetoothComponent'
import SignalIcon from '../../../../../../../features/signalcomponent/src/main/ets/default/pages/signalIcon'
@@ -143,6 +144,7 @@ struct statusBar {
if( isNfcAvailable() ){
NfcIcon()
}
+ AirplaneIcon()
BatteryIcon()
ClockIcon()
}
diff --git a/product/phone/dropdownpanel/src/main/ets/pages/notification.ets b/product/phone/dropdownpanel/src/main/ets/pages/notification.ets
index 79185ce09daee473f7e54057a008fb61f45a8161..f5b8ed56fd6260db492dde8f9f8ad3905bbb5204 100644
--- a/product/phone/dropdownpanel/src/main/ets/pages/notification.ets
+++ b/product/phone/dropdownpanel/src/main/ets/pages/notification.ets
@@ -21,6 +21,7 @@ import { obtainStartAbility } from "../../../../../../../common/src/main/ets/def
import Constants from './common/constants';
import BatteryIcon from '../../../../../../../features/batterycomponent/src/main/ets/default/pages/batteryIcon';
import ClockIcon from '../../../../../../../features/clockcomponent/src/main/ets/default/pages/clockIcon';
+import AirplaneIcon from '../../../../../../../features/airplanecomponent/src/main/ets/default/pages/StatusBarIconItemAirplaneComponent';
import WifiIcon from '../../../../../../../features/wificomponent/src/main/ets/default/pages/wifiIcon';
import BluetoothIcon from '../../../../../../../features/bluetoothcomponent/src/main/ets/com/ohos/pages/StatusBarIconItemBluetoothComponent';
import SignalIcon from '../../../../../../../features/signalcomponent/src/main/ets/default/pages/signalIcon';
@@ -175,6 +176,7 @@ struct statusBar {
if(isNfcAvailable()){
NfcIcon()
}
+ AirplaneIcon()
BatteryIcon()
ClockIcon()
}
diff --git a/product/phone/dropdownpanel/src/main/resources/base/element/float.json b/product/phone/dropdownpanel/src/main/resources/base/element/float.json
index a698877b1d0784fa2e211a5b0df68c413af7ac50..bec181cee01b2b4715d2269fdc1d402d69d8e913 100644
--- a/product/phone/dropdownpanel/src/main/resources/base/element/float.json
+++ b/product/phone/dropdownpanel/src/main/resources/base/element/float.json
@@ -135,6 +135,14 @@
{
"name": "notification_title_setting_icon_height",
"value": "48px"
+ },
+ {
+ "name": "status_bar_airplane_width",
+ "value": "13vp"
+ },
+ {
+ "name": "status_bar_airplane_height",
+ "value": "15vp"
}
]
}
\ No newline at end of file
diff --git a/product/phone/statusbar/src/main/ets/pages/common/StatusbarConfig.ts b/product/phone/statusbar/src/main/ets/pages/common/StatusbarConfig.ts
index 0c1633551a2b3277b9d8f505b5a8d260172a8a98..e3e95b21418b153d5991cf70c635d0fb1b3ceda1 100644
--- a/product/phone/statusbar/src/main/ets/pages/common/StatusbarConfig.ts
+++ b/product/phone/statusbar/src/main/ets/pages/common/StatusbarConfig.ts
@@ -40,6 +40,7 @@ const statusbarConfig: StatusBarConfig = {
FASlotName.BLUETOOTH,
FASlotName.RING_MODE,
FASlotName.NFC,
+ FASlotName.AIR_PLANE,
FASlotName.BATTERY,
FASlotName.CLOCK,
],
@@ -56,6 +57,7 @@ const statusbarConfig: StatusBarConfig = {
FASlotName.NFC,
FASlotName.SIGNAL,
FASlotName.WIFI,
+ FASlotName.AIR_PLANE
],
MetaSlots: [
{
diff --git a/product/phone/statusbar/src/main/resources/base/element/float.json b/product/phone/statusbar/src/main/resources/base/element/float.json
index fdb640c9c71e7eede91ea2b02e34605a602daa05..ae845a8d0f8bd249bcd173901ca625c14d59514c 100644
--- a/product/phone/statusbar/src/main/resources/base/element/float.json
+++ b/product/phone/statusbar/src/main/resources/base/element/float.json
@@ -147,6 +147,14 @@
{
"name": "status_bar_margin_left_right",
"value": "5vp"
+ },
+ {
+ "name": "status_bar_airplane_width",
+ "value": "13vp"
+ },
+ {
+ "name": "status_bar_airplane_height",
+ "value": "15vp"
}
]
}
\ No newline at end of file
diff --git a/product/phone/statusbar/src/main/resources/base/media/airplane.svg b/product/phone/statusbar/src/main/resources/base/media/airplane.svg
new file mode 100644
index 0000000000000000000000000000000000000000..d648b9f94b4f2a5352813535ab2cd8fbf222750f
--- /dev/null
+++ b/product/phone/statusbar/src/main/resources/base/media/airplane.svg
@@ -0,0 +1,14 @@
+
+
\ No newline at end of file