• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15import { AsyncCallback } from './basic';
16import { DataAbilityHelper } from './ability/dataAbilityHelper';
17
18/**
19 * This module provides settings data access abilities.
20 *
21 * @since 7
22 * @syscap SystemCapability.Applications.settings.Core
23 * @permission N/A
24 */
25declare namespace settings {
26  /**
27   * Provides methods for setting time and date formats.
28   *
29   * @since 7
30   */
31  namespace date {
32    /**
33     * Indicates the date format.
34     *
35     * <p>The formats {@code mm/dd/yyyy}, {@code dd/mm/yyyy}, and {@code yyyy/mm/dd} are available.
36     *
37     * @since 7
38     */
39    const DATE_FORMAT: string
40
41    /**
42     * Specifies whether the time is displayed in 12-hour or 24-hour format.
43     *
44     * <p>If the value is {@code 12}, the 12-hour format is used. If the value is {@code 24}, the 24-hour format
45     * is used.
46     *
47     * @since 7
48     */
49    const TIME_FORMAT: string
50
51    /**
52     * Specifies whether the date, time, and time zone are automatically obtained from the Network
53     * Identity and Time Zone (NITZ).
54     *
55     * <p>If the value is {@code true}, the information is automatically obtained from NITZ.
56     * If the value is {@code false}, the information is not obtained from NITZ.
57     *
58     * @since 7
59     */
60    const AUTO_GAIN_TIME: string
61
62    /**
63     * Specifies whether the time zone is automatically obtained from NITZ.
64     *
65     * <p>If the value is {@code true}, the information is automatically obtained from NITZ. If the value
66     * is {@code false}, the information is not obtained from NITZ.
67     *
68     * @since 7
69     */
70    const AUTO_GAIN_TIME_ZONE: string
71  }
72
73    /**
74     * Provides methods for setting the display effect, including the font size, screen brightness, screen rotation,
75     * animation factor, and display color.
76     *
77     * @since 7
78     */
79  namespace display {
80    /**
81     * Indicates the scaling factor of fonts, which is a float number.
82     *
83     * @since 7
84     */
85    const FONT_SCALE: string
86
87    /**
88     * Indicates the screen brightness. The value ranges from 0 to 255.
89     *
90     * @since 7
91     */
92    const SCREEN_BRIGHTNESS_STATUS: string
93
94    /**
95     * Specifies whether automatic screen brightness adjustment is enabled.
96     *
97     * <p>If the value is {@code 1}, automatic adjustment is enabled. If the value is {@code 0}, automatic
98     * adjustment is disabled.
99     *
100     * @since 7
101     */
102    const AUTO_SCREEN_BRIGHTNESS: string
103
104    /**
105     * Indicates the value of {@code AUTO_SCREEN_BRIGHTNESS} when automatic screen brightness adjustment is used.
106     *
107     * @since 7
108     */
109    const AUTO_SCREEN_BRIGHTNESS_MODE: number
110
111    /**
112     * Indicates the value of {@code AUTO_SCREEN_BRIGHTNESS} when manual screen brightness adjustment is used.
113     *
114     * @since 7
115     */
116    const MANUAL_SCREEN_BRIGHTNESS_MODE: number
117
118    /**
119     * Indicates the duration that the device waits before going to sleep after a period of inactivity, in
120     * milliseconds.
121     *
122     * @since 7
123     */
124    const SCREEN_OFF_TIMEOUT: string
125
126    /**
127     * Indicates the screen rotation when no other policy is available.
128     *
129     * <p>This constant is invalid when auto-rotation is enabled. When auto-rotation is disabled, the following
130     * values are available:
131     *
132     * <ul>
133     * <li>{@code 0} - The screen rotates 0 degrees.
134     * <li>{@code 1} - The screen rotates 90 degrees.
135     * <li>{@code 2} - The screen rotates 180 degrees.
136     * <li>{@code 3} - The screen rotates 270 degrees.
137     * </ul>
138     *
139     * @since 7
140     */
141    const DEFAULT_SCREEN_ROTATION: string
142
143    /**
144     * Indicates the scaling factor for the animation duration.
145     *
146     * <p>This affects the start delay and duration of all such animations. If the value is {@code 0},
147     * the animation ends immediately. The default value is {@code 1}.
148     *
149     * @since 7
150     */
151    const ANIMATOR_DURATION_SCALE: string
152
153    /**
154     * Indicates the scaling factor for transition animations.
155     * If the value is {@code 0}, transition animations are disabled.
156     *
157     * @since 7
158     */
159    const TRANSITION_ANIMATION_SCALE: string
160
161    /**
162     * Indicates the scaling factor for normal window animations.
163     * If the value is {@code 0}, window animations are disabled.
164     *
165     * @since 7
166     */
167    const WINDOW_ANIMATION_SCALE: string
168
169    /**
170     * Specifies whether display color inversion is enabled.
171     *
172     * <p>If the value is {@code 1}, display color inversion is enabled. If the value is {@code 0}, display color
173     * inversion is disabled.
174     *
175     * @since 7
176     */
177    const DISPLAY_INVERSION_STATUS: string
178  }
179
180  /**
181   * Provides methods for setting general information about devices, including the device name, startup wizard,
182   * airplane mode, debugging information, accessibility feature switch, and touch exploration status.
183   *
184   * @since 7
185   */
186  namespace general {
187    /**
188     * Specifies whether the startup wizard has been run.
189     *
190     * <p>If the value is {@code 0}, the startup wizard has not been run. If the value is not {@code 0}, the startup
191     * wizard has been run.
192     *
193     * @since 7
194     */
195    const SETUP_WIZARD_FINISHED: string
196
197    /**
198     * Specifies what happens after the user presses the call end button if the user is not in a call.
199     *
200     * <ul>
201     * <li>{@code 0} - Nothing happens.
202     * <li>{@code 1} - The home screen is displayed.
203     * <li>{@code 2} - The device enters the sleep state and the screen is locked.
204     * <li>{@code 3} - The home screen is displayed. If the user is already on the home screen, the device enters
205     * the sleep state.
206     * </ul>
207     *
208     * @since 7
209     */
210    const END_BUTTON_ACTION: string
211
212    /**
213     * Specifies whether the accelerometer is used to change screen orientation, that is, whether auto-rotation is
214     * enabled.
215     *
216     * <p>The value {@code 1} indicates that the accelerometer is enabled by default, and {@code 0} indicates that
217     * the accelerometer is disabled by default.
218     *
219     * @since 7
220     */
221    const ACCELEROMETER_ROTATION_STATUS: string
222
223    /**
224     * Specifies whether airplane mode is enabled.
225     *
226     * <p>If the value is {@code 1}, airplane mode is enabled. If the value is {@code 0}, airplane mode is disabled.
227     *
228     * @since 7
229     */
230    const AIRPLANE_MODE_STATUS: string
231
232    /**
233     * Specifies whether the device is provisioned.
234     *
235     * <p>On a multi-user device with a single system user, the screen may be locked when the value is {@code true}.
236     * In addition, other abilities cannot be started on the system user unless they are marked to display over
237     * the screen lock.
238     *
239     * @since 7
240     */
241    const DEVICE_PROVISION_STATUS: string
242
243    /**
244     * Specifies whether the hard disk controller (HDC) on USB devices is enabled.
245     *
246     * <p>If the value is {@code true}, the HDC is enabled. If the value is {@code false}, the HDC is disabled.
247     *
248     * @since 7
249     */
250    const HDC_STATUS: string
251
252    /**
253     * Indicates the number of boot operations after the device is powered on.
254     *
255     * @since 7
256     */
257    const BOOT_COUNTING: string
258
259    /**
260     * Specifies whether contact metadata synchronization is enabled.
261     *
262     * <p>If the value is {@code true}, synchronization is enabled. If the value is {@code false},
263     * synchronization is disabled.
264     *
265     * @since 7
266     */
267    const CONTACT_METADATA_SYNC_STATUS: string
268
269    /**
270     * Specifies whether developer options are enabled.
271     *
272     * <p>If the value is {@code true}, developer options are enabled.
273     * If the value is {@code false}, developer options are disabled.
274     *
275     * @since 7
276     */
277    const DEVELOPMENT_SETTINGS_STATUS: string
278
279    /**
280     * Indicates the device name.
281     *
282     * @since 7
283     */
284    const DEVICE_NAME: string
285
286    /**
287     * Specifies whether USB mass storage is enabled.
288     *
289     * <p>If the value is {@code true}, USB mass storage is enabled.
290     * If the value is {@code false}, USB mass storage is disabled.
291     *
292     * @since 7
293     */
294    const USB_STORAGE_STATUS: string
295
296    /**
297     * Specifies whether the device waits for the debugger when starting an application to debug.
298     *
299     * <p>If the value is {@code 1}, the device waits for the debugger.
300     * If the value is {@code 0}, the system does not wait for the debugger, and so the application runs normally.
301     *
302     * @since 7
303     */
304    const DEBUGGER_WAITING: string
305
306    /**
307     * Indicates the bundle name of the application to debug.
308     *
309     * @since 7
310     */
311    const DEBUG_APP_PACKAGE: string
312
313    /**
314     * Specifies whether any accessibility feature is enabled.
315     *
316     * <p>If the value is {@code 1}, the accessibility feature is enabled. If the value is {@code 0}, the
317     * accessibility feature is disabled.
318     *
319     * @since 7
320     */
321    const ACCESSIBILITY_STATUS: string
322
323    /**
324     * Indicates the list of accessibility features that have been activated.
325     *
326     * @since 7
327     */
328    const ACTIVATED_ACCESSIBILITY_SERVICES: string
329
330    /**
331     * Indicates the default geographical location that can be used by the browser. Multiple geographical locations
332     * are separated by spaces.
333     *
334     * @since 7
335     */
336    const GEOLOCATION_ORIGINS_ALLOWED: string
337
338    /**
339     * Specifies whether an application should attempt to skip all introductory hints at the first startup. This is
340     * intended for temporary users or users who are familiar with the environment.
341     *
342     * <p>If the value is {@code 1}, the application attempts to skip all introductory hints at the first startup.
343     * If the value is {@code 0}, the application does not skip introductory hints at the first startup.
344     *
345     * @since 7
346     */
347    const SKIP_USE_HINTS: string
348
349    /**
350     * Indicates whether touch exploration is enabled.
351     *
352     * <p>If the value is {@code 1}, touch exploration is enabled. If the value is {@code 0}, touch exploration is
353     * disabled.
354     *
355     * @since 7
356     */
357    const TOUCH_EXPLORATION_STATUS: string
358  }
359
360  /**
361   * Provides methods for setting information about input methods, including automatic capitalization, automatic
362   * punctuation, autocorrect, password presentation, input method engine, and input method subtypes.
363   *
364   * @since 7
365   */
366  namespace input {
367    /**
368     * Indicates the default input method and its ID.
369     *
370     * @since 7
371     */
372    const DEFAULT_INPUT_METHOD: string
373
374    /**
375     * Indicates the default input method keyboard type and its ID.
376     *
377     * @since 7
378     */
379    const ACTIVATED_INPUT_METHOD_SUB_MODE: string
380
381    /**
382     * Indicates the list of input methods that have been activated.
383     *
384     * <p>The list is a string that contains the IDs of activated input methods. The IDs are separated by colons
385     * (:), and keyboardTypes of an input method are separated by semicolons (;). An example format is
386     * {@code ima0:keyboardType0;keyboardType1;ima1:ima2:keyboardTypes0}. The type of <b>imaID</b> is ElementName,
387     * and the type of <b>keyboard</b> is int.
388     *
389     * @since 7
390     */
391    const ACTIVATED_INPUT_METHODS: string
392
393    /**
394     * Specifies whether the input method selector is visible.
395     *
396     * <p>If the value is {@code 1}, the input method selector is visible. If the value is {@code 0}, the input
397     * method selector is invisible.
398     *
399     * @since 7
400     */
401    const SELECTOR_VISIBILITY_FOR_INPUT_METHOD: string
402
403    /**
404     * Specifies whether automatic capitalization is enabled for the text editor.
405     *
406     * <p>If the value is {@code 0}, automatic capitalization is disabled. If the value {@code 1}, automatic
407     * capitalization is enabled.
408     *
409     * @since 7
410     */
411    const AUTO_CAPS_TEXT_INPUT: string
412
413    /**
414     * Specifies whether automatic punctuation is enabled for the text editor. Automatic punctuation enables the
415     * text editor to convert two spaces into a period (.) and a space.
416     *
417     * <p>If the value is {@code 0}, automatic punctuation is disabled. If the value {@code 1}, automatic
418     * punctuation is enabled.
419     *
420     * @since 7
421     */
422    const AUTO_PUNCTUATE_TEXT_INPUT: string
423
424    /**
425     * Specifies whether autocorrect is enabled for the text editor. Autocorrect enables the text editor to correct
426     * typos.
427     *
428     * <p>If the value is {@code 0}, autocorrect is disabled. If the value {@code 1}, autocorrect is enabled.
429     *
430     * @since 7
431     */
432    const AUTO_REPLACE_TEXT_INPUT: string
433
434    /**
435     * Specifies whether password presentation is enabled in the text editor. Password presentation enables the
436     * text editor to show password characters when the user types them.
437     *
438     * <p>If the value is {@code 0}, password presentation is disabled. If the value {@code 1}, password
439     * presentation is enabled.
440     *
441     * @since 7
442     */
443    const SHOW_PASSWORD_TEXT_INPUT: string
444  }
445
446  /**
447   * Provides methods for setting network information, including the data roaming status, HTTP proxy configurations,
448   * and preferred networks.
449   *
450   * @since 7
451   */
452  namespace network {
453    /**
454     * Specifies whether data roaming is enabled.
455     *
456     * <p>If the value is {@code true}, data roaming is enabled. If the value is {@code false},
457     * data roaming is disabled.
458     *
459     * @since 7
460     */
461    const DATA_ROAMING_STATUS: string
462
463    /**
464     * Indicates the host name and port number of the global HTTP proxy.
465     * The host name and port number are separated by a colon (:).
466     *
467     * @since 7
468     */
469    const HTTP_PROXY_CFG: string
470
471    /**
472     * Indicates the user preferences of the network to use.
473     *
474     * @since 7
475     */
476    const NETWORK_PREFERENCE_USAGE: string
477  }
478
479  /**
480   * Provides methods for setting the answering mode of incoming and outgoing calls.
481   *
482   * @since 7
483   */
484  namespace phone {
485    /**
486     * Specifies whether real-time text (RTT) calling is enabled. If enabled, incoming and outgoing calls are
487     * answered as RTT calls when supported by the device and carrier. If the value is {@code 1}, RTT calling is
488     * enabled. If the value is {@code 0}, RTT calling is disabled.
489     *
490     * @since 7
491     */
492    const RTT_CALLING_STATUS: string
493  }
494
495  /**
496   * Provides methods for setting the sound effect, including the ringtone, dial tone, alarm sound, notification tone,
497   * and haptic feedback.
498   *
499   * @since 7
500   */
501  namespace sound {
502    /**
503     * Indicates whether the device vibrates when it is ringing for an incoming call.
504     *
505     * <p>This constant will be used by Phone and Settings applications. The value is of the boolean type.
506     * This constant affects only the scenario where the device rings for an incoming call. It does not affect
507     * any other application or scenario.
508     *
509     * @since 7
510     */
511    const VIBRATE_WHILE_RINGING: string
512
513    /**
514     * Indicates the storage area of the system default alarm.
515     *
516     * <p>You can obtain the URI of the system default alarm.
517     *
518     * @since 7
519     */
520    const DEFAULT_ALARM_ALERT: string
521
522    /**
523     * Indicates the type of the dual-tone multifrequency (DTMF) tone played when dialing.
524     *
525     * <p>The value {@code 0} indicates the normal short sound effect, and {@code 1} indicates the long sound
526     * effect.
527     *
528     * @since 7
529     */
530    const DTMF_TONE_TYPE_WHILE_DIALING: string
531
532    /**
533     * Specifies whether the DTMF tone is played when dialing.
534     *
535     * <p>If the value is {@code 1}, the DTMF tone is played. If the value is {@code 0}, the DTMF tone is not
536     * played.
537     *
538     * @since 7
539     */
540    const DTMF_TONE_WHILE_DIALING: string
541
542    /**
543     * Specifies which audio streams are affected by changes on the ringing mode and Do Not Disturb (DND) mode.
544     *
545     * <p>If you want a specific audio stream to be affected by changes of the ringing mode and DDN mode, set the
546     * corresponding bit to {@code 1}.
547     *
548     * @since 7
549     */
550    const AFFECTED_MODE_RINGER_STREAMS: string
551
552    /**
553     * Specifies which audio streams are affected by the mute mode.
554     *
555     * <p>If you want a specific audio stream to remain muted in mute mode, set the corresponding bit to {@code 1}.
556     *
557     * @since 7
558     */
559    const AFFECTED_MUTE_STREAMS: string
560
561    /**
562     * Indicates the storage area of the system default notification tone.
563     *
564     * <p>You can obtain the URI of the system default notification tone.
565     *
566     * @since 7
567     */
568    const DEFAULT_NOTIFICATION_SOUND: string
569
570    /**
571     * Indicates the storage area of the system default ringtone.
572     *
573     * <p>You can obtain the URI of the system default ringtone.
574     *
575     * @since 7
576     */
577    const DEFAULT_RINGTONE: string
578
579    /**
580     * Specifies whether the sound effects are enabled.
581     *
582     * <p>If the value is {@code 0}, the sound effects are disabled. If the value is {@code 1}, the sound effects
583     * are enabled.
584     *
585     * @since 7
586     */
587    const SOUND_EFFECTS_STATUS: string
588
589    /**
590     * Specifies whether the device vibrates for an event. This parameter is used inside the system.
591     *
592     * <p>If the value is {@code 1}, the device vibrates for an event. If the value is {@code 0}, the device does
593     * not vibrate for an event.
594     *
595     * @since 7
596     */
597    const VIBRATE_STATUS: string
598
599    /**
600     * Indicates whether the device enables haptic feedback.
601     *
602     * <p>The value is of the boolean type.
603     *
604     * @since 7
605     */
606    const HAPTIC_FEEDBACK_STATUS: string
607  }
608
609  /**
610   * Provides methods for setting information about text-to-speech (TTS) conversion, including the pitch, speech rate,
611   * engine, and plug-ins.
612   *
613   * @since 7
614   */
615  namespace TTS {
616    /**
617     * Indicates the default pitch of the text-to-speech (TTS) engine.
618     *
619     * <p>100 = 1x. If the value is set to {@code 200}, the frequency is twice the normal sound frequency.
620     *
621     * @since 7
622     */
623    const DEFAULT_TTS_PITCH: string
624
625    /**
626     * Indicates the default speech rate of the TTS engine. 100 = 1x.
627     *
628     * @since 7
629     */
630    const DEFAULT_TTS_RATE: string
631
632    /**
633     * Indicates the default TTS engine.
634     *
635     * @since 7
636     */
637    const DEFAULT_TTS_SYNTH: string
638
639    /**
640     * Indicates the list of activated plug-in packages used for TTS. Multiple plug-in packages are separated by
641     * spaces.
642     *
643     * @since 7
644     */
645    const ENABLED_TTS_PLUGINS: string
646  }
647
648  /**
649   * Provides methods for setting radio network information, including information about Bluetooth, Wi-Fi, Near Field
650   * Communication (NFC), and the airplane mode.
651   *
652   * @since 7
653   */
654  namespace wireless {
655  /**
656     * Specifies whether the device can be discovered or connected by other devices through Bluetooth.
657     *
658     * If the value is {@code 0}, the device cannot be connected or discovered. If the value is {@code 1}, the
659     * device can be connected but cannot be discovered. If the value is {@code 2}, the device can be connected
660     * and discovered.
661     *
662     * @since 7
663     */
664    const BLUETOOTH_DISCOVER_ABILITY_STATUS: string
665
666    /**
667     * Indicates the duration (in seconds) that the device can be discovered through Bluetooth.
668     *
669     * <p>After the duration expires, the device cannot be discovered through Bluetooth.
670     *
671     * @since 7
672     */
673    const BLUETOOTH_DISCOVER_TIMEOUT: string
674
675    /**
676     * Indicates the list of radio signals to be disabled when airplane mode is enabled. Multiple radio
677     * signals are separated by commas (,).
678     *
679     * <ul>
680     * <li>{@code BLUETOOTH_RADIO} - Bluetooth is disabled in airplane mode.
681     * <li>{@code CELL_RADIO} - Cellular radio is disabled in airplane mode.
682     * <li>{@code NFC_RADIO} - NFC is disabled in airplane mode.
683     * <li>{@code WIFI_RADIO} - Wi-Fi is disabled in airplane mode.
684     * </ul>
685     *
686     * @since 7
687     */
688    const AIRPLANE_MODE_RADIOS: string
689
690    /**
691     * Specifies whether Bluetooth is enabled.
692     *
693     * <p>If the value is {@code true}, Bluetooth is enabled. If the value is {@code false}, Bluetooth is disabled.
694     *
695     * @since 7
696     */
697    const BLUETOOTH_STATUS: string
698
699    /**
700     * A constant of {@code AIRPLANE_MODE_RADIOS} to indicate that Bluetooth is disabled in airplane mode.
701     *
702     * @since 7
703     */
704    const BLUETOOTH_RADIO: string
705
706    /**
707     * A constant of {@code AIRPLANE_MODE_RADIOS} to indicate that cellular radio is disabled in airplane mode.
708     *
709     * @since 7
710     */
711    const CELL_RADIO: string
712
713    /**
714     * A constant of {@code AIRPLANE_MODE_RADIOS} to indicate that NFC is disabled in airplane mode.
715     *
716     * @since 7
717     */
718    const NFC_RADIO: string
719
720    /**
721     * A constant of {@code AIRPLANE_MODE_RADIOS} to indicate that Wi-Fi is disabled in airplane mode.
722     *
723     * @since 7
724     */
725    const WIFI_RADIO: string
726
727    /**
728     * Specifies whether the Wi-Fi configuration created by the application of the device owner should be
729     * locked down.
730     *
731     * <p>If the value is {@code true}, the Wi-Fi configuration should be locked down.
732     * If the value is {@code false}, the Wi-Fi configuration should not be locked down.
733     *
734     * @since 7
735     */
736    const OWNER_LOCKDOWN_WIFI_CFG: string
737
738    /**
739     * Indicates the maximum number of attempts to obtain an IP address from the DHCP server.
740     *
741     * @since 7
742     */
743    const WIFI_DHCP_MAX_RETRY_COUNT: string
744
745    /**
746     * Indicates the maximum duration to hold a wake lock when waiting for the mobile data connection to
747     * establish after the Wi-Fi connection is disconnected.
748     *
749     * @since 7
750     */
751    const WIFI_TO_MOBILE_DATA_AWAKE_TIMEOUT: string
752
753    /**
754     * Specifies whether Wi-Fi is enabled.
755     *
756     * <p>If the value is {@code true}, Wi-Fi is enabled. If the value is {@code false}, Wi-Fi is disabled.
757     *
758     * @since 7
759     */
760    const WIFI_STATUS: string
761
762    /**
763     * Specifies whether Wi-Fi watchdog is enabled.
764     *
765     * <p>If the value is {@code true}, Wi-Fi watchdog is enabled.
766     * If the value is {@code false}, Wi-Fi watchdog is disabled.
767     *
768     * @since 7
769     */
770    const WIFI_WATCHDOG_STATUS: string
771  }
772
773  /**
774   * Constructs a URI for a specific name-value pair for monitoring data of the ability that uses the Data
775   * template.
776   *
777   * @param name Indicates the name of the setting to set.
778   * @returns Returns the corresponding URI; returns {@code null} if the URI does not exist.
779   * @since 7
780   * @deprecated since 9
781   */
782  function getURI(name: string, callback: AsyncCallback<object>): void;
783  function getURI(name: string): Promise<object>;
784
785  /**
786   * Obtains the value of a specified character string in the database.
787   *
788   * @param dataAbilityHelper Indicates the {@link ohos.aafwk.ability.DataAbilityHelper} used to access
789   * the database.
790   * @param name Indicates the name of the character string.
791   * @returns Returns the value of the character string in the table if any is found; returns {@code null}
792   * otherwise.
793   * @since 7
794   * @deprecated since 9
795   * @FAModelOnly
796   */
797  function getValue(dataAbilityHelper: DataAbilityHelper, name: string, callback: AsyncCallback<object>): void;
798  function getValue(dataAbilityHelper: DataAbilityHelper, name: string): Promise<object>;
799
800  /**
801   * Saves a character string name and its value to the database.
802   *
803   * @param dataAbilityHelper Indicates the {@link ohos.aafwk.ability.DataAbilityHelper} used to access
804   * the database.
805   * @param name Indicates the name of the character string.
806   * @param value Indicates the value of the character string.
807   * @returns Returns {@code true} if the operation is successful; returns {@code false} otherwise.
808   * @since 7
809   * @systemapi Hide this for inner system use.
810   * @deprecated since 9
811   * @FAModelOnly
812   */
813  function setValue(dataAbilityHelper: DataAbilityHelper, name: string, value: object, callback: AsyncCallback<boolean>): void;
814  function setValue(dataAbilityHelper: DataAbilityHelper, name: string, value: object): Promise<boolean>;
815
816  /**
817   * Enables or disables airplane mode.
818   *
819   * @param enable Specifies whether to enable airplane mode. The value {@code true} means to enable airplane
820   * mode, and {@code false} means to disable airplane mode.
821   * @returns Returns {@code true} if the operation is successful; returns {@code false} otherwise.
822   * @since 7
823   */
824  function enableAirplaneMode(enable: boolean, callback: AsyncCallback<void>): void;
825  function enableAirplaneMode(enable: boolean): Promise<void>;
826
827  /**
828   * Checks whether a specified application can show as float window.
829   *
830   * @param context Indicates the application context.
831   * @returns Returns {@code true} if the application can draw over other applications; returns {@code false}
832   * otherwise.
833   * @since 7
834   */
835  function canShowFloating(callback: AsyncCallback<boolean>): void;
836  function canShowFloating(): Promise<boolean>;
837
838  /**
839   * get settingsdata uri(synchronization method)
840   * @since 8
841   * @param name Indicates the name of the setting to set.
842   * @returns Returns settingsdata uri.
843   */
844   function getUriSync(name: string): string;
845
846   /**
847    * get value from settingsdata(synchronization method)
848    * @since 8
849    * @param dataAbilityHelper Indicates dataAbilityHelper instance
850    * @param name Indicates the name of the character string.
851    * @param defValue Indicates the default value of the character string.
852    * @returns settingsdata value
853    * @deprecated since 9
854    * @FAModelOnly
855    */
856   function getValueSync(dataAbilityHelper: DataAbilityHelper, name: string, defValue: string): string;
857
858   /**
859    * set settingsdata value(synchronization method)
860    * @permission ohos.permission.MANAGE_SECURE_SETTINGS
861    * @since 8
862    * @param dataAbilityHelper Indicates dataAbilityHelper instance
863    * @param name Indicates the name of the character string.
864    * @param value Indicates the value of the character string.
865    * @returns Returns {@code true} if the operation is successful; returns {@code false} otherwise.
866    * @deprecated since 9
867    * @FAModelOnly
868    */
869   function setValueSync(dataAbilityHelper: DataAbilityHelper, name: string, value: string): boolean;
870}
871
872export default settings;