public class AppSettings extends Object
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static boolean |
canShowFloating(Context context) |
Checks whether a specified application can draw over other applications.
|
static boolean |
checkSetPermission(Context context) |
Checks whether a specified application has permission to modify system settings based on the application
context.
|
public static boolean canShowFloating(Context context)
To draw over other applications, an application must declare the ohos.permission.SYSTEM_FLOAT_
WINDOW permission and get an explicit approval from end users. To achieve so, the application must display a
dialog box to ask end users for the permission.
context - Indicates the application context.true if the application can draw over other applications; returns false
otherwise.public static boolean checkSetPermission(Context context)
To modify system settings, an application must declare the ohos.permission.MODIFY_SETTINGS
permission and get an explicit approval from end users. To achieve so, the application must display a dialog
box to ask end users for the permission.
context - Indicates the application context.true if the application has permission to modify system settings; returns
false otherwise.