技术领域technical field
本公开涉及计算机技术领域,特别涉及一种权限控制方法及装置。The present disclosure relates to the field of computer technology, and in particular to a permission control method and device.
背景技术Background technique
目前,诸如手机、平板电脑之类的终端设备通常都具备锁屏功能。Currently, terminal devices such as mobile phones and tablet computers usually have a screen locking function.
锁屏功能即为屏幕锁定功能。当终端设备的屏幕处于锁屏状态时,用户无法对终端设备中安装的应用进行正常操作。当终端设备的屏幕处于锁屏状态时,便会显示锁屏界面,用户在锁屏界面中输入密码(如数字、轨迹、指纹等)之后,如果终端设备验证用户输入的密码正确,则由锁屏状态切换至解锁状态。当终端设备的屏幕处于解锁状态时,用户即可对终端设备中安装的应用进行正常操作。The screen lock function is the screen lock function. When the screen of the terminal device is in a locked screen state, the user cannot perform normal operations on the applications installed in the terminal device. When the screen of the terminal device is in the lock screen state, the lock screen interface will be displayed. After the user enters the password (such as numbers, traces, fingerprints, etc.) in the lock screen interface, if the terminal device verifies that the password entered by the user is correct, the lock screen The screen status switches to the unlocked status. When the screen of the terminal device is in an unlocked state, the user can perform normal operations on the applications installed in the terminal device.
在相关技术中,部分终端设备的操作系统提供有在锁屏界面上显示窗口的功能,一些应用通过该功能可在锁屏界面上显示设定窗口,如充电屏保窗口、广告窗口、通知推送窗口等。In related technologies, the operating systems of some terminal devices provide the function of displaying windows on the lock screen interface. Some applications can display setting windows on the lock screen interface through this function, such as charging screen saver windows, advertisement windows, and notification push windows. Wait.
发明内容Contents of the invention
本公开实施例提供了一种权限控制方法及装置。所述技术方案如下:Embodiments of the present disclosure provide a permission control method and device. Described technical scheme is as follows:
根据本公开实施例的第一方面,提供了一种权限控制方法,所述方法包括:According to a first aspect of an embodiment of the present disclosure, a permission control method is provided, the method comprising:
获取应用发送的窗口显示请求;Obtain the window display request sent by the application;
检测所述窗口显示请求是否用于请求在锁屏界面上显示窗口;Detecting whether the window display request is used to request to display a window on the lock screen interface;
若所述窗口显示请求用于请求在所述锁屏界面上显示窗口,则检测所述应用是否具备锁屏上显示权限;其中,所述锁屏上显示权限是指在所述锁屏界面上显示窗口的权限;If the window display request is used to request to display a window on the lock screen interface, it is detected whether the application has the display permission on the lock screen; wherein, the display permission on the lock screen refers to the display permission on the lock screen interface Display window permissions;
若所述应用不具备所述锁屏上显示权限,则禁止所述应用的窗口在所述锁屏界面上显示。If the application does not have the display permission on the lock screen, prohibiting the window of the application from being displayed on the lock screen interface.
可选地,所述窗口显示请求中携带标志位,所述标志位用于指示是否在所述锁屏界面上显示窗口。Optionally, the window display request carries a flag, and the flag is used to indicate whether to display the window on the lock screen interface.
可选地,所述检测所述窗口显示请求是否用于请求在锁屏界面上显示窗口,包括:Optionally, the detecting whether the window display request is for requesting to display a window on the lock screen interface includes:
读取所述窗口显示请求中携带的所述标志位;reading the flag bit carried in the window display request;
根据所述标志位的值,确定所述窗口显示请求是否用于请求在所述锁屏界面上显示窗口。According to the value of the flag bit, it is determined whether the window display request is for requesting to display a window on the lock screen interface.
可选地,所述禁止所述应用的窗口在所述锁屏界面上显示,包括:Optionally, the prohibiting the window of the application from being displayed on the lock screen interface includes:
将所述标志位的值由第一值修改为第二值;Modifying the value of the flag bit from a first value to a second value;
其中,所述第一值用于指示在所述锁屏界面上显示窗口,所述第二值用于指示不在所述锁屏界面上显示窗口。Wherein, the first value is used to indicate to display a window on the lock screen interface, and the second value is used to indicate not to display a window on the lock screen interface.
可选地,所述检测所述应用是否具备锁屏上显示权限,包括:Optionally, the detecting whether the application has the permission to display on the lock screen includes:
调用应用权限管理器的权限检测方法,向所述权限检测方法发送权限检测请求;其中,所述权限检测请求中携带所述应用的标识,所述权限检测方法用于从所述应用权限管理器中查询获取所述应用是否具备所述锁屏上显示权限;Invoke the permission detection method of the application permission manager, and send a permission detection request to the permission detection method; wherein, the permission detection request carries the identification of the application, and the permission detection method is used to obtain the application permission from the application permission manager Query to obtain whether the application has the display permission on the lock screen;
获取所述权限检测方法返回的权限检测结果;其中,所述权限检测结果为:所述应用具备所述锁屏上显示权限,或者,所述应用不具备所述锁屏上显示权限。Obtain a permission detection result returned by the permission detection method; wherein, the permission detection result is: the application has the display permission on the lock screen, or the application does not have the display permission on the lock screen.
可选地,所述方法还包括:Optionally, the method also includes:
从所述窗口显示请求中获取所述应用的标识;Obtain the application identifier from the window display request;
其中,所述应用的标识包括:所述应用的包名和当前系统所对应的UID(UserIdentification,用户个人身份识别码)。Wherein, the application identification includes: a package name of the application and a UID (User Identification, user personal identification code) corresponding to the current system.
可选地,所述获取应用发送的窗口显示请求,包括:Optionally, the acquiring the window display request sent by the application includes:
获取所述应用发送的添加窗口请求,所述添加窗口请求用于请求添加窗口;Obtaining a window addition request sent by the application, where the window addition request is used to request to add a window;
或者,or,
获取所述应用发送的重新布局窗口请求,所述重新布局窗口请求用于请求重新布局窗口。Obtain the window rearrangement request sent by the application, where the window rearrangement request is used to request the window rearrangement.
可选地,所述方法还包括:Optionally, the method also includes:
接收云端服务器发送的所述应用的所述锁屏上显示权限的推荐开关设置,所述推荐开关设置由所述云端服务器根据为所述应用开启所述锁屏上显示权限的用户数量和为所述应用关闭所述锁屏上显示权限的用户数量确定;Receiving the recommended switch setting of the display permission on the lock screen of the application sent by the cloud server, the recommended switch setting is determined by the cloud server according to the number of users who have enabled the display permission on the lock screen for the application and the number of users. Determine the number of users whose permission to display the application on the lock screen is turned off;
根据所述推荐开关设置为所述应用开启或关闭所述锁屏上显示权限。The display permission on the lock screen is enabled or disabled for the application according to the recommended switch setting.
根据本公开实施例的第二方面,提供了一种权限控制装置,所述装置包括:According to a second aspect of an embodiment of the present disclosure, there is provided an authority control device, the device comprising:
请求获取模块,被配置为获取应用发送的窗口显示请求;The request acquisition module is configured to acquire the window display request sent by the application;
请求检测模块,被配置为检测所述窗口显示请求是否用于请求在锁屏界面上显示窗口;A request detection module configured to detect whether the window display request is for requesting to display a window on the lock screen interface;
权限检测模块,被配置为当所述窗口显示请求用于请求在所述锁屏界面上显示窗口时,检测所述应用是否具备锁屏上显示权限;其中,所述锁屏上显示权限是指在所述锁屏界面上显示窗口的权限;The permission detection module is configured to detect whether the application has the display permission on the lock screen when the window display request is for requesting to display a window on the lock screen interface; wherein, the display permission on the lock screen refers to The authority to display windows on the lock screen interface;
禁止显示模块,被配置为当所述应用不具备所述锁屏上显示权限时,禁止所述应用的窗口在所述锁屏界面上显示。The display prohibiting module is configured to prohibit the window of the application from being displayed on the lock screen interface when the application does not have the right to display on the lock screen.
可选地,所述窗口显示请求中携带标志位,所述标志位用于指示是否在所述锁屏界面上显示窗口。Optionally, the window display request carries a flag, and the flag is used to indicate whether to display the window on the lock screen interface.
可选地,所述请求检测模块,包括:Optionally, the request detection module includes:
读取子模块,被配置为读取所述窗口显示请求中携带的所述标志位;A reading submodule configured to read the flag bit carried in the window display request;
确定子模块,被配置为根据所述标志位的值,确定所述窗口显示请求是否用于请求在所述锁屏界面上显示窗口。The determining submodule is configured to determine whether the window display request is for requesting to display a window on the lock screen interface according to the value of the flag bit.
可选地,所述禁止显示模块,被配置为将所述标志位的值由第一值修改为第二值;Optionally, the display prohibition module is configured to modify the value of the flag bit from a first value to a second value;
其中,所述第一值用于指示在所述锁屏界面上显示窗口,所述第二值用于指示不在所述锁屏界面上显示窗口。Wherein, the first value is used to indicate to display a window on the lock screen interface, and the second value is used to indicate not to display a window on the lock screen interface.
可选地,所述权限检测模块,包括:Optionally, the authority detection module includes:
调用子模块,被配置为调用应用权限管理器的权限检测方法,向所述权限检测方法发送权限检测请求;其中,所述权限检测请求中携带所述应用的标识,所述权限检测方法用于从所述应用权限管理器中查询获取所述应用是否具备所述锁屏上显示权限;The calling submodule is configured to call the permission detection method of the application permission manager, and send a permission detection request to the permission detection method; wherein, the permission detection request carries the identification of the application, and the permission detection method is used to Querying from the application authority manager whether the application has the display authority on the lock screen;
获取子模块,被配置为获取所述权限检测方法返回的权限检测结果;其中,所述权限检测结果为:所述应用具备所述锁屏上显示权限,或者,所述应用不具备所述锁屏上显示权限。The obtaining sub-module is configured to obtain the permission detection result returned by the permission detection method; wherein, the permission detection result is: the application has the display permission on the lock screen, or the application does not have the lock screen display permission. Permissions are displayed on the screen.
可选地,所述装置还包括:Optionally, the device also includes:
标识获取模块,被配置为从所述窗口显示请求中获取所述应用的标识;An identification obtaining module configured to obtain the application identification from the window display request;
其中,所述应用的标识包括:所述应用的包名和当前系统所对应的UID。Wherein, the identification of the application includes: the package name of the application and the UID corresponding to the current system.
可选地,所述请求获取模块,被配置为:Optionally, the request acquisition module is configured to:
获取所述应用发送的添加窗口请求,所述添加窗口请求用于请求添加窗口;Obtaining a window addition request sent by the application, where the window addition request is used to request to add a window;
或者,or,
获取所述应用发送的重新布局窗口请求,所述重新布局窗口请求用于请求重新布局窗口。Obtain the window rearrangement request sent by the application, where the window rearrangement request is used to request the window rearrangement.
可选地,所述装置还包括:Optionally, the device also includes:
设置接收模块,被配置为接收云端服务器发送的所述应用的所述锁屏上显示权限的推荐开关设置,所述推荐开关设置由所述云端服务器根据为所述应用开启所述锁屏上显示权限的用户数量和为所述应用关闭所述锁屏上显示权限的用户数量确定;The setting receiving module is configured to receive the recommended switch setting of the display permission on the lock screen of the application sent by the cloud server, and the recommended switch setting is set by the cloud server according to enabling the display on the lock screen for the application. Determine the number of users with permission and the number of users who turn off the permission displayed on the lock screen for the application;
权限开关模块,被配置为根据所述推荐开关设置为所述应用开启或关闭所述锁屏上显示权限。The authority switch module is configured to enable or disable the display authority on the lock screen for the application according to the recommended switch setting.
根据本公开实施例的第三方面,提供了一种权限控制装置,所述装置包括:According to a third aspect of the embodiments of the present disclosure, there is provided an authority control device, the device comprising:
处理器;processor;
用于存储所述处理器的可执行指令的存储器;memory for storing executable instructions of the processor;
其中,所述处理器被配置为:Wherein, the processor is configured as:
获取应用发送的窗口显示请求;Obtain the window display request sent by the application;
检测所述窗口显示请求是否用于请求在锁屏界面上显示窗口;Detecting whether the window display request is used to request to display a window on the lock screen interface;
若所述窗口显示请求用于请求在所述锁屏界面上显示窗口,则检测所述应用是否具备锁屏上显示权限;其中,所述锁屏上显示权限是指在所述锁屏界面上显示窗口的权限;If the window display request is used to request to display a window on the lock screen interface, it is detected whether the application has the display permission on the lock screen; wherein, the display permission on the lock screen refers to the display permission on the lock screen interface Display window permissions;
若所述应用不具备所述锁屏上显示权限,则禁止所述应用的窗口在所述锁屏界面上显示。If the application does not have the display permission on the lock screen, prohibiting the window of the application from being displayed on the lock screen interface.
本公开实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
通过获取应用发送的窗口显示请求,检测窗口显示请求是否用于请求在锁屏界面上显示窗口,若是则继续检测该应用是否具备锁屏上显示权限,若不具备则禁止该应用的窗口在锁屏界面上显示;由于增加了锁屏上显示权限,仅允许具备该锁屏上显示权限的应用在锁屏界面上显示窗口,避免未经允许的应用滥用在锁屏界面上显示窗口的功能,避免影响用户操作,提高系统性能。By obtaining the window display request sent by the application, detect whether the window display request is used to request to display the window on the lock screen interface, if so, continue to detect whether the application has the display permission on the lock screen, if not, prohibit the window of the application from being displayed on the lock screen Display on the screen interface; due to the increase of the display permission on the lock screen, only applications with the display permission on the lock screen are allowed to display windows on the lock screen interface, preventing unauthorized applications from abusing the function of displaying windows on the lock screen interface. Avoid affecting user operations and improve system performance.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.
图1是根据一示例性实施例示出的一种权限检测方法的流程图;Fig. 1 is a flowchart of a permission detection method according to an exemplary embodiment;
图2A是根据一示例性实施例示出的一种权限控制装置的框图;Fig. 2A is a block diagram of an authority control device according to an exemplary embodiment;
图2B是根据另一示例性实施例示出的一种权限控制装置的框图;Fig. 2B is a block diagram of an authority control device according to another exemplary embodiment;
图3是根据一示例性实施例示出的一种装置的框图。Fig. 3 is a block diagram of a device according to an exemplary embodiment.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present disclosure as recited in the appended claims.
在相关技术中,由于操作系统向应用提供了在锁屏界面上显示窗口的功能,但并未对使用该功能的权限进行控制,导致部分应用滥用该功能,影响用户操作及系统性能。基于此,本公开实施例提供了一种权限控制方法,和基于这个方法的装置,以解决上述相关技术中存在的问题。本公开实施例提供的技术方案,核心思想是在应用权限管理器(Application Operations Manager)中增加锁屏上显示权限,锁屏上显示权限是指在锁屏界面上显示窗口的权限。通过应用权限管理器对终端设备中安装的各个应用是否具备该权限进行管理,仅允许具备该锁屏上显示权限的应用在锁屏界面上显示窗口,避免未经允许的应用滥用在锁屏界面上显示窗口的功能。In related technologies, since the operating system provides applications with the function of displaying windows on the lock screen interface, but does not control the authority to use this function, some applications abuse this function, affecting user operations and system performance. Based on this, an embodiment of the present disclosure provides a permission control method and a device based on the method, so as to solve the problems existing in the above-mentioned related technologies. The core idea of the technical solution provided by the embodiments of the present disclosure is to add the display permission on the lock screen to the Application Operations Manager (Application Operations Manager). The display permission on the lock screen refers to the permission to display windows on the lock screen interface. Through the application authority manager, whether each application installed in the terminal device has the authority is managed, and only the application with the display authority on the lock screen is allowed to display the window on the lock screen interface, so as to prevent unauthorized applications from abusing the lock screen interface function of the displayed window.
本公开实施例提供的方法,各步骤的执行主体可以是终端设备,如手机、平板电脑、电子书阅读器、多媒体播放设备、PDA(Personal Digital Assistant,个人数字助理)、可穿戴设备等。在本公开实施例中,对终端设备的操作系统的类型不作限定,如Android(安卓)操作系统、iOS操作系统、Windows Phone操作系统等。In the method provided by the embodiments of the present disclosure, the execution subject of each step may be a terminal device, such as a mobile phone, a tablet computer, an e-book reader, a multimedia playback device, a PDA (Personal Digital Assistant, personal digital assistant), a wearable device, and the like. In the embodiment of the present disclosure, the type of operating system of the terminal device is not limited, such as Android (Android) operating system, iOS operating system, Windows Phone operating system, and the like.
图1是根据一示例性实施例示出的一种权限检测方法的流程图。该方法可应用于终端设备中。该方法可以包括如下几个步骤:Fig. 1 is a flow chart of a permission detection method according to an exemplary embodiment. The method can be applied to terminal equipment. The method may include the following steps:
在步骤101中,获取应用发送的窗口显示请求。In step 101, a window display request sent by an application is obtained.
当应用需要显示窗口时,向系统服务发送窗口显示请求,窗口显示请求用于请求显示窗口。在本公开实施例中,对应用的种类不作限定,其可以是终端设备中安装运行的各类应用程序,如社交应用、通话通讯应用、网购支付应用、生活消费类应用、影音播放应用、安全杀毒应用、浏览器等。在本公开实施例中,应用的窗口(window)即为应用的用户界面(User Interface,UI),也可称为界面。在本公开实施例中,系统服务可以是窗口管理服务,如Android系统的WindowManagerService,窗口管理服务用于对系统中所有的窗口进行管理。When an application needs to display a window, it sends a window display request to the system service, and the window display request is used to request to display a window. In the embodiments of the present disclosure, the types of applications are not limited, and they can be various applications installed and running on terminal devices, such as social applications, communication applications, online shopping payment applications, consumer applications, audio-visual playback applications, security Antivirus apps, browsers, etc. In the embodiment of the present disclosure, the window (window) of the application is the user interface (User Interface, UI) of the application, which may also be referred to as an interface. In the embodiment of the present disclosure, the system service may be a window management service, such as WindowManagerService of the Android system, and the window management service is used to manage all windows in the system.
可选地,窗口显示请求中携带标志位,该标志位用于指示是否在锁屏界面上显示窗口。示例性地,窗口显示请求中携带布局参数WindowManager.LayoutParams,该布局参数中包含标志位参数flags,标志位参数flags中的标志位FLAG_SHOW_WHEN_LOCKED用于指示是否在锁屏界面上显示窗口。例如,当标志位的值为第一值(如1)时,用于指示在锁屏界面上显示窗口;当标志位的值为第二值(如0)时,用于指示不在锁屏界面上显示窗口。如果应用要在锁屏界面上显示窗口,则应用可以在窗口显示请求中将标志位的值设置为1。Optionally, the window display request carries a flag, and the flag is used to indicate whether to display the window on the lock screen interface. Exemplarily, the window display request carries a layout parameter WindowManager.LayoutParams, the layout parameter includes a flag parameter flags, and the flag bit FLAG_SHOW_WHEN_LOCKED in the flag parameter flags is used to indicate whether to display the window on the lock screen interface. For example, when the value of the flag bit is the first value (such as 1), it is used to indicate that the window is displayed on the lock screen interface; when the value of the flag bit is the second value (such as 0), it is used to indicate that the window is not on the lock screen interface display window. If the application wants to display the window on the lock screen interface, the application can set the value of the flag bit to 1 in the window display request.
可选地,窗口显示请求包括如下两种可能的情形:Optionally, the window display request includes the following two possible situations:
1,获取应用发送的添加窗口请求,添加窗口请求用于请求添加窗口;1. Obtain the add window request sent by the application, which is used to request to add a window;
以Android系统为例,窗口管理服务提供有WindowManagerService.addWindow方法,应用可通过调用该方法向窗口管理服务发送添加窗口请求。Taking the Android system as an example, the window management service provides the WindowManagerService.addWindow method, and the application can send a window addition request to the window management service by calling this method.
2、获取应用发送的重新布局窗口请求,重新布局窗口请求用于请求重新布局窗口。2. Obtain the window rearrangement request sent by the application, and the window rearrangement request is used to request the window rearrangement.
以Android系统为例,窗口管理服务提供有WindowManagerService.relayoutWindow方法,应用可通过调用该方法向窗口管理服务发送重新布局窗口请求。Taking the Android system as an example, the window management service provides the WindowManagerService.relayoutWindow method, and the application can send a window rearrangement request to the window management service by calling this method.
在步骤102中,检测窗口显示请求是否用于请求在锁屏界面上显示窗口。In step 102, it is detected whether the window display request is for requesting to display a window on the lock screen interface.
系统服务获取到应用发送的窗口显示请求之后,对该请求进行解析,检测该请求是否用于请求在锁屏界面上显示窗口。在一个示例中,系统服务读取窗口显示请求中携带的标志位;根据标志位的值,确定窗口显示请求是否用于请求在锁屏界面上显示窗口。例如,当标志位的值为第一值时,系统服务确定窗口显示请求用于请求在锁屏界面上显示窗口;当标志位的值为第二值时,系统服务确定窗口显示请求并非用于请求在锁屏界面上显示窗口。After the system service obtains the window display request sent by the application, it parses the request and detects whether the request is used to request to display the window on the lock screen interface. In an example, the system service reads the flag bit carried in the window display request; and determines whether the window display request is used to request to display the window on the lock screen interface according to the value of the flag bit. For example, when the value of the flag bit is the first value, the system service determines that the window display request is for requesting to display a window on the lock screen interface; when the value of the flag bit is the second value, the system service determines that the window display request is not for Request to show the window on the lock screen.
另外,在本公开实施例中,应用的窗口在锁屏界面上显示,是指应用的窗口(也即界面)叠加在锁屏界面的上层进行显示。In addition, in the embodiments of the present disclosure, the application window is displayed on the lock screen interface, which means that the application window (that is, the interface) is superimposed on the upper layer of the lock screen interface for display.
在步骤103中,若窗口显示请求用于请求在锁屏界面上显示窗口,则检测应用是否具备锁屏上显示权限。In step 103, if the window display request is for requesting to display a window on the lock screen interface, it is checked whether the application has the display permission on the lock screen.
当系统服务检测出窗口显示请求用于请求在锁屏界面上显示窗口时,系统服务继续检测应用是否具备锁屏上显示权限。其中,锁屏上显示权限是指在锁屏界面上显示窗口的权限。在本公开实施例中,通过预先在应用权限管理器中增加锁屏上显示权限,使得系统能够对在锁屏界面上显示窗口的功能进行权限管理。示例性地,锁屏上显示权限的名称为OP_SHOW_WHEN_LOCKED,锁屏上显示权限的标识(也称为值)为10020,用于唯一标识该权限。在应用权限管理器中,不同的权限所对应的标识也不同。When the system service detects that the window display request is for requesting to display the window on the lock screen interface, the system service continues to detect whether the application has the display permission on the lock screen. Wherein, the display permission on the lock screen refers to the permission to display the window on the lock screen interface. In the embodiment of the present disclosure, by pre-adding the display permission on the lock screen in the application permission manager, the system can perform permission management on the function of displaying windows on the lock screen interface. Exemplarily, the name of the display permission on the lock screen is OP_SHOW_WHEN_LOCKED, and the identifier (also referred to as a value) of the display permission on the lock screen is 10020, which are used to uniquely identify the permission. In the application permission manager, different permissions correspond to different identifiers.
可选地,本步骤可以包括如下几个子步骤:Optionally, this step may include the following sub-steps:
1,调用应用权限管理器的权限检测方法,向权限检测方法发送权限检测请求;1. Call the permission detection method of the application permission manager, and send a permission detection request to the permission detection method;
其中,权限检测请求中携带应用的标识,应用的标识用于唯一标识一个应用。可选地,应用的标识包括:应用的包名(packagename)和当前系统所对应的UID。应用的包名和当前系统所对应的UID可唯一标识当前系统中的一个应用,即便是终端设备支持多系统,也能够对系统进行区分,准确确定当前系统中发出请求的应用。另外,应用可在窗口显示请求中携带应用的标识,相应地,系统服务可从窗口显示请求中获取应用的标识。Wherein, the permission detection request carries an application identifier, and the application identifier is used to uniquely identify an application. Optionally, the identification of the application includes: a package name (packagename) of the application and a UID corresponding to the current system. The package name of the application and the UID corresponding to the current system can uniquely identify an application in the current system. Even if the terminal device supports multiple systems, it can also distinguish the systems and accurately determine the application that sends the request in the current system. In addition, the application can carry the application identifier in the window display request, and correspondingly, the system service can obtain the application identifier from the window display request.
权限检测方法用于从应用权限管理器中查询获取应用是否具备锁屏上显示权限。以Android系统为例,WindowManagerService可调用AppOpsManager.checkOpNoThrow方法,并向该方法发送携带有应用的标识的权限检测请求。The permission detection method is used to query from the application permission manager whether the application has the display permission on the lock screen. Taking the Android system as an example, WindowManagerService can call the AppOpsManager.checkOpNoThrow method, and send a permission check request carrying the application ID to this method.
2、获取权限检测方法返回的权限检测结果;2. Obtain the permission detection result returned by the permission detection method;
其中,权限检测结果为:应用具备锁屏上显示权限,或者,应用不具备锁屏上显示权限。仍然以Android系统为例,AppOpsManager.checkOpNoThrow方法被调用之后,根据应用的标识,从应用权限管理器中查询获取应用是否具备锁屏上显示权限。若应用具备锁屏上显示权限,则AppOpsManager.checkOpNoThrow方法向WindowManagerService返回AppOpsManager.MODE_ALLOWED,表示应用具备锁屏上显示权限;若应用不具备锁屏上显示权限,则AppOpsManager.checkOpNoThrow方法向WindowManagerService返回AppOpsManager.MODE_IGNORE,表示应用不具备锁屏上显示权限。Wherein, the permission detection result is: the application has the display permission on the lock screen, or the application does not have the display permission on the lock screen. Still taking the Android system as an example, after the AppOpsManager.checkOpNoThrow method is called, according to the identification of the application, query whether the application has the display permission on the lock screen from the application permission manager. If the application has the permission to display on the lock screen, the AppOpsManager.checkOpNoThrow method returns AppOpsManager.MODE_ALLOWED to WindowManagerService, indicating that the application has the permission to display on the lock screen; if the application does not have the permission to display on the lock screen, the AppOpsManager.checkOpNoThrow method returns AppOpsManager to WindowManagerService. MODE_IGNORE, indicating that the application does not have permission to display on the lock screen.
在一个示例中,以应用请求添加窗口为例,用于实现检测应用是否具备锁屏上显示权限的代码示例如下:In an example, taking an application requesting to add a window as an example, the code example for detecting whether the application has the permission to display on the lock screen is as follows:
另外,若窗口显示请求并非用于请求在锁屏界面上显示窗口,则系统服务按照原始的正常处理流程对窗口显示请求进行处理。In addition, if the window display request is not for requesting to display a window on the lock screen interface, the system service processes the window display request according to the original normal processing flow.
在步骤104中,若应用不具备锁屏上显示权限,则禁止应用的窗口在锁屏界面上显示。In step 104, if the application does not have the permission to display on the lock screen, the window of the application is prohibited from being displayed on the lock screen interface.
若应用不具备锁屏上显示权限,则系统服务禁止应用所请求显示的窗口在锁屏界面上显示。If the application does not have the display permission on the lock screen, the system service prohibits the window requested by the application from being displayed on the lock screen interface.
在一个示例中,系统服务将窗口显示请求中携带的标志位的值由第一值修改为第二值;其中,第一值用于指示在锁屏界面上显示窗口,第二值用于指示不在锁屏界面上显示窗口。仍然以Android系统为例,假设第一值为1且第二值为0,系统服务将窗口显示请求中携带的标志位FLAG_SHOW_WHEN_LOCKED的值由1修改为0。之后,系统服务按照原始的正常处理流程对修改后的窗口显示请求进行处理。由于用于指示是否请求在锁屏界面上显示窗口的标志位的值已由第一值修改为第二值,因此应用请求显示的窗口便不会在锁屏界面上显示。In one example, the system service modifies the value of the flag bit carried in the window display request from the first value to a second value; wherein, the first value is used to indicate that the window is displayed on the lock screen interface, and the second value is used to indicate Do not show windows on the lock screen. Still taking the Android system as an example, assuming that the first value is 1 and the second value is 0, the system service modifies the value of the flag bit FLAG_SHOW_WHEN_LOCKED carried in the window display request from 1 to 0. Afterwards, the system service processes the modified window display request according to the original normal processing flow. Because the value of the flag bit used to indicate whether to request to display the window on the lock screen interface has been modified from the first value to the second value, the window requested by the application to be displayed will not be displayed on the lock screen interface.
另外,若应用具备锁屏上显示权限,则系统服务不对窗口显示请求的参数进行修改,按照原始的正常处理流程对窗口显示请求进行处理。In addition, if the application has the permission to display on the lock screen, the system service does not modify the parameters of the window display request, and processes the window display request according to the original normal processing flow.
综上所述,本实施例提供的方法,通过获取应用发送的窗口显示请求,检测窗口显示请求是否用于请求在锁屏界面上显示窗口,若是则继续检测该应用是否具备锁屏上显示权限,若不具备则禁止该应用的窗口在锁屏界面上显示;由于增加了锁屏上显示权限,仅允许具备该锁屏上显示权限的应用在锁屏界面上显示窗口,避免未经允许的应用滥用在锁屏界面上显示窗口的功能,避免影响用户操作,提高系统性能。To sum up, the method provided in this embodiment, by obtaining the window display request sent by the application, detects whether the window display request is used to request to display the window on the lock screen interface, and if so, continues to detect whether the application has the display permission on the lock screen , if it does not have it, the window of the application is prohibited from being displayed on the lock screen interface; due to the increase of the display permission on the lock screen, only the application that has the display permission on the lock screen is allowed to display the window on the lock screen interface to avoid unauthorized access The application abuses the function of displaying windows on the lock screen interface to avoid affecting user operations and improve system performance.
需要补充说明的是,应用是否具备锁屏上显示权限,可以由系统默认设置,也可由用户自定义设置。It needs to be added that whether the application has the display permission on the lock screen can be set by the system by default or by the user.
可选地,操作系统所对应的云端服务器中可分别统计为各个应用开启/关闭锁屏上显示权限的用户数量。对于某一应用来说,云端服务器统计为该应用开启锁屏上显示权限的用户数量和为该应用关闭锁屏上显示权限的用户数量,根据上述统计结果确定该应用的锁屏上显示权限的推荐开关设置。示例性地,云端服务器根据为该应用开启锁屏上显示权限的用户数量和关闭锁屏上显示权限的用户数量的比例,确定该应用的锁屏上显示权限的推荐开关设置。在终端设备安装该应用之后,云端服务器可将该应用的锁屏上显示权限的推荐开关设置发送给终端设备;相应地,终端设备接收云端服务器发送的该应用的锁屏上显示权限的推荐开关设置。推荐开关设置是指推荐开启或关闭锁屏上显示权限。终端设备根据推荐开关设置为应用开启或关闭锁屏上显示权限。在一个示例中,终端设备根据该推荐开关设置自动设置为该应用开启或关闭锁屏上显示权限。例如,若推荐开关设置为开启,则终端设备为应用开启锁屏上显示权限;若推荐开关设置为关闭,则终端设备为应用关闭锁屏上显示权限。在另一示例中,终端设备将该推荐开关设置进行显示,由用户结合该推荐开关设置和自身实际需求设置为该应用开启或关闭锁屏上显示权限,终端设备获取用户设置的权限设置指示,根据用户设置的权限设置指示为应用开启或关闭锁屏上显示权限。另外,云端服务器可在终端设备安装应用之后,向终端设备发送该应用的锁屏上显示权限的推荐开关设置;云端服务器也可每隔预定时间间隔向终端设备发送该应用的锁屏上显示权限的推荐开关设置。Optionally, the cloud server corresponding to the operating system may separately count the number of users who enable/disable the display permission on the lock screen for each application. For an application, the cloud server counts the number of users who have enabled the display permission on the lock screen for the application and the number of users who have disabled the display permission on the lock screen for the application, and determines the number of display permissions on the lock screen of the application based on the above statistical results. Recommended switch settings. Exemplarily, the cloud server determines the recommended switch setting of the display permission on the lock screen of the application according to the ratio of the number of users who enable the display permission on the lock screen to the number of users who disable the display permission on the lock screen for the application. After the terminal device installs the application, the cloud server can send the recommended switch setting of the display permission on the lock screen of the application to the terminal device; correspondingly, the terminal device receives the recommended switch setting of the display permission on the lock screen of the application sent by the cloud server set up. The recommended switch setting refers to the recommendation to enable or disable the display permission on the lock screen. The terminal device enables or disables the display permission on the lock screen for the application according to the recommended switch setting. In an example, the terminal device is automatically set to enable or disable the display permission on the lock screen for the application according to the recommended switch setting. For example, if the recommendation switch is set to on, the terminal device enables the display permission on the lock screen for the application; if the recommendation switch is set to off, the terminal device disables the display permission on the lock screen for the application. In another example, the terminal device displays the recommended switch setting, and the user sets the recommended switch setting and his actual needs to enable or disable the display permission on the lock screen for the application, and the terminal device obtains the permission setting instruction set by the user, According to the permission setting instructions set by the user, enable or disable the display permission on the lock screen for the application. In addition, after the application is installed on the terminal device, the cloud server can send the recommended on/off setting of the display permission on the lock screen of the application to the terminal device; the cloud server can also send the display permission on the lock screen of the application to the terminal device every predetermined time interval. recommended switch settings.
在一个示例中,对于某一应用来说,若为该应用开启锁屏上显示权限的用户数量大于为该应用关闭锁屏上显示权限的用户数量,则云端服务器确定该应用的锁屏上显示权限的推荐开关设置为开启;若为该应用开启锁屏上显示权限的用户数量小于为该应用关闭锁屏上显示权限的用户数量,则云端服务器确定该应用的锁屏上显示权限的推荐开关设置为关闭。In one example, for an application, if the number of users who enable the display permission on the lock screen for the application is greater than the number of users who disable the display permission on the lock screen for the application, the cloud server determines that the display permission on the lock screen of the application The recommended switch of the permission is set to on; if the number of users who enable the display permission on the lock screen for the application is less than the number of users who turn off the display permission on the lock screen for the application, the cloud server determines the recommended switch of the display permission on the lock screen of the application Set to off.
在另一示例中,对于某一应用来说,若为该应用开启锁屏上显示权限的用户数量占用户总数的比例大于第一阈值,则云端服务器确定该应用的锁屏上显示权限的推荐开关设置为开启;若为该应用开启锁屏上显示权限的用户数量占用户总数的比例小于第二阈值,则云端服务器确定该应用的锁屏上显示权限的推荐开关设置为关闭。其中,第一阈值等于第二阈值,或者,第一阈值大于第二阈值。用户总数是指为该应用开启锁屏上显示权限的用户数量与为该应用关闭锁屏上显示权限的用户数量的总和。In another example, for a certain application, if the ratio of the number of users who have enabled the display permission on the lock screen for the application to the total number of users is greater than the first threshold, the cloud server determines the recommendation of the display permission on the lock screen of the application. The switch is set to on; if the proportion of the number of users who enable the display permission on the lock screen for the application to the total number of users is less than the second threshold, the cloud server determines that the recommended switch of the display permission on the lock screen of the application is set to off. Wherein, the first threshold is equal to the second threshold, or the first threshold is greater than the second threshold. The total number of users refers to the sum of the number of users who enable the display permission on the lock screen for the app and the number of users who turn off the display permission on the lock screen for the app.
另外,为了便于用户调整应用的锁屏上显示权限的开关。终端设备的系统设置中可相应增加各个应用的锁屏上显示权限的开关控件,以便于用户通过该开关控件进行自定义设置。例如,在设置功能—授权管理功能—应用权限管理功能中增加上述开关控件,用户通过调节开关控件便可为应用开启或关闭锁屏上显示权限。In addition, in order to facilitate the user to adjust the display permission switch on the lock screen of the application. In the system settings of the terminal device, a switch control for displaying permissions on the lock screen of each application can be added correspondingly, so that the user can customize settings through the switch control. For example, the above-mentioned switch control is added in the setting function-authorization management function-application rights management function, and the user can enable or disable the display permission on the lock screen for the application by adjusting the switch control.
下述为本公开装置实施例,可以用于执行本公开方法实施例。对于本公开装置实施例中未披露的细节,请参照本公开方法实施例。The following are device embodiments of the present disclosure, which can be used to implement the method embodiments of the present disclosure. For details not disclosed in the disclosed device embodiments, please refer to the disclosed method embodiments.
图2A是根据一示例性实施例示出的一种权限控制装置的框图。该装置具有实现上述方法示例的功能,所述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置可以包括:请求获取模块210、请求检测模块220、权限检测模块230和禁止显示模块240。Fig. 2A is a block diagram of a permission control device according to an exemplary embodiment. The device has the function of realizing the above-mentioned method example, and the function may be realized by hardware, or may be realized by executing corresponding software by the hardware. The apparatus may include: a request acquisition module 210 , a request detection module 220 , a permission detection module 230 and a display prohibition module 240 .
请求获取模块210,被配置为获取应用发送的窗口显示请求。The request acquiring module 210 is configured to acquire the window display request sent by the application.
请求检测模块220,被配置为检测所述窗口显示请求是否用于请求在锁屏界面上显示窗口。The request detection module 220 is configured to detect whether the window display request is for requesting to display a window on the lock screen interface.
权限检测模块230,被配置为当所述窗口显示请求用于请求在所述锁屏界面上显示窗口时,检测所述应用是否具备锁屏上显示权限。其中,所述锁屏上显示权限是指在所述锁屏界面上显示窗口的权限。The permission detection module 230 is configured to detect whether the application has display permission on the lock screen when the window display request is for requesting to display a window on the lock screen interface. Wherein, the display permission on the lock screen refers to the permission to display windows on the lock screen interface.
禁止显示模块240,被配置为当所述应用不具备所述锁屏上显示权限时,禁止所述应用的窗口在所述锁屏界面上显示。The display prohibiting module 240 is configured to prohibit the window of the application from being displayed on the lock screen interface when the application does not have the display permission on the lock screen.
综上所述,本实施例提供的装置,通过获取应用发送的窗口显示请求,检测窗口显示请求是否用于请求在锁屏界面上显示窗口,若是则继续检测该应用是否具备锁屏上显示权限,若不具备则禁止该应用的窗口在锁屏界面上显示;由于增加了锁屏上显示权限,仅允许具备该锁屏上显示权限的应用在锁屏界面上显示窗口,避免未经允许的应用滥用在锁屏界面上显示窗口的功能,避免影响用户操作,提高系统性能。To sum up, the device provided in this embodiment detects whether the window display request is used to request to display a window on the lock screen interface by obtaining the window display request sent by the application, and if so, continues to detect whether the application has the display permission on the lock screen , if it does not have it, the window of the application is prohibited from being displayed on the lock screen interface; due to the increase of the display permission on the lock screen, only the application that has the display permission on the lock screen is allowed to display the window on the lock screen interface to avoid unauthorized access The application abuses the function of displaying windows on the lock screen interface to avoid affecting user operations and improve system performance.
在基于图2A所示实施例提供的一个可选实施例中,所述窗口显示请求中携带标志位,所述标志位用于指示是否在所述锁屏界面上显示窗口。In an optional embodiment provided based on the embodiment shown in FIG. 2A , the window display request carries a flag bit, and the flag bit is used to indicate whether to display a window on the lock screen interface.
可选地,如图2B所示,所述请求检测模块220,包括:读取子模块220a和确定子模块220b。Optionally, as shown in FIG. 2B , the request detection module 220 includes: a reading submodule 220a and a determining submodule 220b.
读取子模块220a,被配置为读取所述窗口显示请求中携带的所述标志位。The reading submodule 220a is configured to read the flag bit carried in the window display request.
确定子模块220b,被配置为根据所述标志位的值,确定所述窗口显示请求是否用于请求在所述锁屏界面上显示窗口。The determining submodule 220b is configured to determine whether the window display request is for requesting to display a window on the lock screen interface according to the value of the flag bit.
可选地,所述禁止显示模块240,被配置为将所述标志位的值由第一值修改为第二值。其中,所述第一值用于指示在所述锁屏界面上显示窗口,所述第二值用于指示不在所述锁屏界面上显示窗口。Optionally, the display prohibition module 240 is configured to modify the value of the flag bit from a first value to a second value. Wherein, the first value is used to indicate to display a window on the lock screen interface, and the second value is used to indicate not to display a window on the lock screen interface.
在基于图2A所示实施例提供的另一可选实施例中,如图2B所示,所述权限检测模块230,包括:调用子模块230a和获取子模块230b。In another optional embodiment provided based on the embodiment shown in FIG. 2A , as shown in FIG. 2B , the authority detection module 230 includes: a call submodule 230a and an acquisition submodule 230b.
调用子模块230a,被配置为调用应用权限管理器的权限检测方法,向所述权限检测方法发送权限检测请求。其中,所述权限检测请求中携带所述应用的标识,所述权限检测方法用于从所述应用权限管理器中查询获取所述应用是否具备所述锁屏上显示权限。The calling sub-module 230a is configured to call the permission detection method of the application permission manager, and send a permission detection request to the permission detection method. Wherein, the permission detection request carries the identification of the application, and the permission detection method is used to query from the application permission manager whether the application has the display permission on the lock screen.
获取子模块230b,被配置为获取所述权限检测方法返回的权限检测结果。其中,所述权限检测结果为:所述应用具备所述锁屏上显示权限,或者,所述应用不具备所述锁屏上显示权限。The acquiring submodule 230b is configured to acquire the authority detection result returned by the authority detection method. Wherein, the permission detection result is: the application has the display permission on the lock screen, or the application does not have the display permission on the lock screen.
在基于图2A所示实施例提供的另一可选实施例中,如图2B所示,所述装置还包括:标识获取模块250。In another optional embodiment provided based on the embodiment shown in FIG. 2A , as shown in FIG. 2B , the device further includes: an identification obtaining module 250 .
标识获取模块250,被配置为从所述窗口显示请求中获取所述应用的标识。其中,所述应用的标识包括:所述应用的包名和当前系统所对应的UID。The identifier acquiring module 250 is configured to acquire the identifier of the application from the window display request. Wherein, the identification of the application includes: the package name of the application and the UID corresponding to the current system.
在基于图2A所示实施例提供的另一可选实施例中,如图2B所示,所述请求获取模块210,被配置为:获取所述应用发送的添加窗口请求,所述添加窗口请求用于请求添加窗口;或者,获取所述应用发送的重新布局窗口请求,所述重新布局窗口请求用于请求重新布局窗口。In another optional embodiment provided based on the embodiment shown in FIG. 2A , as shown in FIG. 2B , the request acquisition module 210 is configured to: acquire the window addition request sent by the application, and the window addition request It is used to request to add a window; or, to obtain a window rearrangement request sent by the application, and the window rearrangement request is used to request to rearrange windows.
在基于图2A所示实施例提供的另一可选实施例中,所述装置还包括:设置接收模块和权限开关模块。In another optional embodiment provided based on the embodiment shown in FIG. 2A , the device further includes: a setting receiving module and a permission switch module.
设置接收模块,被配置为接收云端服务器发送的所述应用的所述锁屏上显示权限的推荐开关设置,所述推荐开关设置由所述云端服务器根据为所述应用开启所述锁屏上显示权限的用户数量和为所述应用关闭所述锁屏上显示权限的用户数量确定。The setting receiving module is configured to receive the recommended switch setting of the display permission on the lock screen of the application sent by the cloud server, and the recommended switch setting is set by the cloud server according to enabling the display on the lock screen for the application. The number of users with permission and the number of users with permission to turn off display on the lock screen for the application are determined.
权限开关模块,被配置为根据所述推荐开关设置为所述应用开启或关闭所述锁屏上显示权限。The authority switch module is configured to enable or disable the display authority on the lock screen for the application according to the recommended switch setting.
需要说明的一点是,上述实施例提供的装置在实现其功能时,仅以上述各个功能模块的划分进行举例说明,实际应用中,可以根据实际需要而将上述功能分配由不同的功能模块完成,即将设备的内容结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。It should be noted that when the device provided by the above embodiment realizes its functions, it only uses the division of the above-mentioned functional modules as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional modules according to actual needs. That is, the content structure of the device is divided into different functional modules to complete all or part of the functions described above.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
本公开一示例性实施例还提供了一种权限控制装置,能够实现本公开提供的权限控制方法。该装置包括:处理器,以及用于存储处理器的可执行指令的存储器。其中,处理器被配置为:An exemplary embodiment of the present disclosure also provides a permission control device capable of implementing the permission control method provided in the present disclosure. The device includes: a processor, and a memory for storing executable instructions of the processor. where the processor is configured as:
获取应用发送的窗口显示请求;Obtain the window display request sent by the application;
检测所述窗口显示请求是否用于请求在锁屏界面上显示窗口;Detecting whether the window display request is used to request to display a window on the lock screen interface;
若所述窗口显示请求用于请求在所述锁屏界面上显示窗口,则检测所述应用是否具备锁屏上显示权限;其中,所述锁屏上显示权限是指在所述锁屏界面上显示窗口的权限;If the window display request is used to request to display a window on the lock screen interface, it is detected whether the application has the display permission on the lock screen; wherein, the display permission on the lock screen refers to the display permission on the lock screen interface Display window permissions;
若所述应用不具备所述锁屏上显示权限,则禁止所述应用的窗口在所述锁屏界面上显示。If the application does not have the display permission on the lock screen, prohibiting the window of the application from being displayed on the lock screen interface.
可选地,所述窗口显示请求中携带标志位,所述标志位用于指示是否在所述锁屏界面上显示窗口。Optionally, the window display request carries a flag, and the flag is used to indicate whether to display the window on the lock screen interface.
可选地,处理器被配置为:Optionally, the processor is configured to:
读取所述窗口显示请求中携带的所述标志位;reading the flag bit carried in the window display request;
根据所述标志位的值,确定所述窗口显示请求是否用于请求在所述锁屏界面上显示窗口。According to the value of the flag bit, it is determined whether the window display request is for requesting to display a window on the lock screen interface.
可选地,处理器被配置为:Optionally, the processor is configured to:
将所述标志位的值由第一值修改为第二值;Modifying the value of the flag bit from a first value to a second value;
其中,所述第一值用于指示在所述锁屏界面上显示窗口,所述第二值用于指示不在所述锁屏界面上显示窗口。Wherein, the first value is used to indicate to display a window on the lock screen interface, and the second value is used to indicate not to display a window on the lock screen interface.
可选地,处理器被配置为:Optionally, the processor is configured to:
调用应用权限管理器的权限检测方法,向所述权限检测方法发送权限检测请求;其中,所述权限检测请求中携带所述应用的标识,所述权限检测方法用于从所述应用权限管理器中查询获取所述应用是否具备所述锁屏上显示权限;Invoke the permission detection method of the application permission manager, and send a permission detection request to the permission detection method; wherein, the permission detection request carries the identification of the application, and the permission detection method is used to obtain the application permission from the application permission manager Query to obtain whether the application has the display permission on the lock screen;
获取所述权限检测方法返回的权限检测结果;其中,所述权限检测结果为:所述应用具备所述锁屏上显示权限,或者,所述应用不具备所述锁屏上显示权限。Obtain a permission detection result returned by the permission detection method; wherein, the permission detection result is: the application has the display permission on the lock screen, or the application does not have the display permission on the lock screen.
可选地,处理器还被配置为:Optionally, the processor is also configured to:
从所述窗口显示请求中获取所述应用的标识;Obtain the application identifier from the window display request;
其中,所述应用的标识包括:所述应用的包名和当前系统所对应的UID。Wherein, the identification of the application includes: the package name of the application and the UID corresponding to the current system.
可选地,处理器被配置为:Optionally, the processor is configured to:
获取所述应用发送的添加窗口请求,所述添加窗口请求用于请求添加窗口;Obtaining a window addition request sent by the application, where the window addition request is used to request to add a window;
或者,or,
获取所述应用发送的重新布局窗口请求,所述重新布局窗口请求用于请求重新布局窗口。Obtain the window rearrangement request sent by the application, where the window rearrangement request is used to request the window rearrangement.
可选地,处理器还被配置为:Optionally, the processor is also configured to:
接收云端服务器发送的所述应用的所述锁屏上显示权限的推荐开关设置,所述推荐开关设置由所述云端服务器根据为所述应用开启所述锁屏上显示权限的用户数量和为所述应用关闭所述锁屏上显示权限的用户数量确定;Receiving the recommended switch setting of the display permission on the lock screen of the application sent by the cloud server, the recommended switch setting is determined by the cloud server according to the number of users who have enabled the display permission on the lock screen for the application and the number of users. Determine the number of users whose permission to display the application on the lock screen is turned off;
根据所述推荐开关设置为所述应用开启或关闭所述锁屏上显示权限。The display permission on the lock screen is enabled or disabled for the application according to the recommended switch setting.
图3是根据一示例性实施例示出的一种装置300的框图。例如,装置300可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。Fig. 3 is a block diagram of a device 300 according to an exemplary embodiment. For example, the apparatus 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
参照图3,装置300可以包括以下一个或多个组件:处理组件302,存储器304,电源组件306,多媒体组件308,音频组件310,输入/输出(I/O)接口312,传感器组件314,以及通信组件316。3, apparatus 300 may include one or more of the following components: processing component 302, memory 304, power supply component 306, multimedia component 308, audio component 310, input/output (I/O) interface 312, sensor component 314, and communication component 316 .
处理组件302通常控制装置300的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件302可以包括一个或多个处理器320来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件302可以包括一个或多个模块,便于处理组件302和其他组件之间的交互。例如,处理组件302可以包括多媒体模块,以方便多媒体组件308和处理组件302之间的交互。The processing component 302 generally controls the overall operations of the device 300, such as those associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 302 may include one or more processors 320 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 302 may include one or more modules that facilitate interaction between processing component 302 and other components. For example, processing component 302 may include a multimedia module to facilitate interaction between multimedia component 308 and processing component 302 .
存储器304被配置为存储各种类型的数据以支持在装置300的操作。这些数据的示例包括用于在装置300上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器304可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 304 is configured to store various types of data to support operations at the device 300 . Examples of such data include instructions for any application or method operating on device 300, contact data, phonebook data, messages, pictures, videos, and the like. The memory 304 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
电源组件306为装置300的各种组件提供电力。电源组件306可以包括电源管理系统,一个或多个电源,及其他与为装置300生成、管理和分配电力相关联的组件。The power supply component 306 provides power to the various components of the device 300 . Power components 306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for device 300 .
多媒体组件308包括在所述装置300和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件308包括一个前置摄像头和/或后置摄像头。当装置300处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 308 includes a screen that provides an output interface between the device 300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 308 includes a front camera and/or a rear camera. When the device 300 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
音频组件310被配置为输出和/或输入音频信号。例如,音频组件310包括一个麦克风(MIC),当装置300处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器304或经由通信组件316发送。在一些实施例中,音频组件310还包括一个扬声器,用于输出音频信号。The audio component 310 is configured to output and/or input audio signals. For example, the audio component 310 includes a microphone (MIC), which is configured to receive external audio signals when the device 300 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 304 or sent via communication component 316 . In some embodiments, the audio component 310 also includes a speaker for outputting audio signals.
I/O接口312为处理组件302和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 312 provides an interface between the processing component 302 and a peripheral interface module, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
传感器组件314包括一个或多个传感器,用于为装置300提供各个方面的状态评估。例如,传感器组件314可以检测到装置300的打开/关闭状态,组件的相对定位,例如所述组件为装置300的显示器和小键盘,传感器组件314还可以检测装置300或装置300一个组件的位置改变,用户与装置300接触的存在或不存在,装置300方位或加速/减速和装置300的温度变化。传感器组件314可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件314还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件314还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。Sensor assembly 314 includes one or more sensors for providing various aspects of status assessment for device 300 . For example, the sensor component 314 can detect the open/closed state of the device 300, the relative positioning of components, such as the display and keypad of the device 300, and the sensor component 314 can also detect a change in the position of the device 300 or a component of the device 300 , the presence or absence of user contact with the device 300 , the device 300 orientation or acceleration/deceleration and the temperature change of the device 300 . The sensor assembly 314 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 314 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 314 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
通信组件316被配置为便于装置300和其他设备之间有线或无线方式的通信。装置300可以接入基于通信标准的无线网络,如Wi-Fi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件316经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件316还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 316 is configured to facilitate wired or wireless communication between the apparatus 300 and other devices. The device 300 can access wireless networks based on communication standards, such as Wi-Fi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 316 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,装置300可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, apparatus 300 may be programmed by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器304,上述指令可由装置300的处理器320执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as the memory 304 including instructions, which can be executed by the processor 320 of the device 300 to implement the above method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
一种非临时性计算机可读存储介质,当所述存储介质中的指令由装置300的处理器执行时,使得装置300能够执行上述方法。A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the device 300, the device 300 can execute the above method.
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。It should be understood that the "plurality" mentioned herein refers to two or more than two. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently. The character "/" generally indicates that the contextual objects are an "or" relationship.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, and these modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure . The specification and examples are to be considered exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the precise constructions which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2016/099065WO2018049609A1 (en) | 2016-09-14 | 2016-09-14 | Permission control method and device |
| Publication Number | Publication Date |
|---|---|
| CN106471513A CN106471513A (en) | 2017-03-01 |
| CN106471513Btrue CN106471513B (en) | 2019-09-13 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201680000874.4AExpired - Fee RelatedCN106471513B (en) | 2016-09-14 | 2016-09-14 | Authority control method and device |
| Country | Link |
|---|---|
| CN (1) | CN106471513B (en) |
| WO (1) | WO2018049609A1 (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106951239B (en)* | 2017-03-10 | 2020-10-30 | 广州三星通信技术研究有限公司 | Method and device for setting display of application program |
| JP6833609B2 (en)* | 2017-05-23 | 2021-02-24 | キヤノン株式会社 | Mobile terminals, their control methods, and programs |
| CN110908557B (en)* | 2019-10-28 | 2021-07-20 | 维沃移动通信有限公司 | Information display method and terminal device |
| CN111782126A (en)* | 2020-06-28 | 2020-10-16 | 掌阅科技股份有限公司 | Screen saver display method for reading application, computing equipment and computer storage medium |
| CN118394242B (en)* | 2024-04-12 | 2025-01-17 | 荣耀终端有限公司 | Suspension window management method and related device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103577594A (en)* | 2013-11-13 | 2014-02-12 | 广州市久邦数码科技有限公司 | Lock screen interface information pushing system and method |
| CN103761201A (en)* | 2014-02-14 | 2014-04-30 | 贝壳网际(北京)安全技术有限公司 | Method and device for processing application event of terminal |
| CN104615350A (en)* | 2015-01-14 | 2015-05-13 | 小米科技有限责任公司 | Method and device for displaying information on screen locking interface |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104598093A (en)* | 2014-08-14 | 2015-05-06 | 小米科技有限责任公司 | Method and device for prompting message during screen locking |
| CN105117139B (en)* | 2015-09-29 | 2018-11-20 | 北京金山安全软件有限公司 | Operation method and device of screen locking interface and electronic equipment |
| CN105243326A (en)* | 2015-09-29 | 2016-01-13 | 北京金山安全软件有限公司 | Display method and device of screen locking interface and electronic equipment |
| CN105677313A (en)* | 2015-11-06 | 2016-06-15 | 乐视移动智能信息技术(北京)有限公司 | Display method, device and terminal equipment for notification messages |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103577594A (en)* | 2013-11-13 | 2014-02-12 | 广州市久邦数码科技有限公司 | Lock screen interface information pushing system and method |
| CN103761201A (en)* | 2014-02-14 | 2014-04-30 | 贝壳网际(北京)安全技术有限公司 | Method and device for processing application event of terminal |
| CN104615350A (en)* | 2015-01-14 | 2015-05-13 | 小米科技有限责任公司 | Method and device for displaying information on screen locking interface |
| Publication number | Publication date |
|---|---|
| CN106471513A (en) | 2017-03-01 |
| WO2018049609A1 (en) | 2018-03-22 |
| Publication | Publication Date | Title |
|---|---|---|
| US10129044B2 (en) | Method and apparatus for controlling smart device | |
| US9860844B2 (en) | Method and apparatus of temperature control | |
| US10075445B2 (en) | Methods and devices for permission management | |
| US20170289181A1 (en) | Payment method, apparatus and medium | |
| CN104376273A (en) | Data access control method and device | |
| CN106471513B (en) | Authority control method and device | |
| CN105656948A (en) | Account login method and device | |
| CN106462698A (en) | Authority control method and device | |
| CN106537288B (en) | The method and device of self-starting is applied in control | |
| CN107423146B (en) | Method, device and system for controlling mutual invocation of application programs | |
| CN106446653A (en) | Application authority management method and device and electronic equipment | |
| CN107436782B (en) | Application silent installation method and device | |
| WO2017045314A1 (en) | Text message reading method and device | |
| CN112163192A (en) | root authority acquisition method, root authority acquisition device, root authority acquisition medium and electronic equipment | |
| CN106462696A (en) | Authority controlling method and device | |
| CN106611112A (en) | Application program safe processing method, device and equipment | |
| CN105912922A (en) | Information management method and device, and terminal | |
| CN106372943A (en) | Message processing method and device | |
| CN105955635B (en) | Interface display method and device | |
| CN105760796B (en) | Application security processing method and device | |
| CN108037912A (en) | Show the method, apparatus of page info | |
| CN106062762A (en) | Application encryption method and device | |
| CN107040547A (en) | Method, device and the terminal device of administrator password | |
| WO2017166461A1 (en) | Method and apparatus for managing application program call | |
| CN106714173A (en) | Reminding method and device for network security |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | Granted publication date:20190913 | |
| CF01 | Termination of patent right due to non-payment of annual fee |