WO2018049611A1 - 权限控制方法及装置 - Google Patents

权限控制方法及装置 Download PDF

Info

Publication number
WO2018049611A1
WO2018049611A1 PCT/CN2016/099067 CN2016099067W WO2018049611A1 WO 2018049611 A1 WO2018049611 A1 WO 2018049611A1 CN 2016099067 W CN2016099067 W CN 2016099067W WO 2018049611 A1 WO2018049611 A1 WO 2018049611A1
Authority
WO
WIPO (PCT)
Prior art keywords
lock screen
application
permission
disable
request
Prior art date
Application number
PCT/CN2016/099067
Other languages
English (en)
French (fr)
Inventor
伍亮雄
刘海涛
刘鸣
Original Assignee
北京小米移动软件有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京小米移动软件有限公司 filed Critical 北京小米移动软件有限公司
Priority to CN201680000873.XA priority Critical patent/CN106462696A/zh
Priority to PCT/CN2016/099067 priority patent/WO2018049611A1/zh
Publication of WO2018049611A1 publication Critical patent/WO2018049611A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Definitions

  • the present disclosure relates to the field of computer technologies, and in particular, to a rights control method and apparatus.
  • terminal devices such as mobile phones and tablet computers usually have a lock screen function.
  • the lock screen function is the screen lock function.
  • the lock screen interface is displayed.
  • the lock screen interface is displayed.
  • the terminal device verifies that the password input by the user is correct, the lock is The screen state is switched to the unlocked state.
  • the screen of the terminal device is in the unlocked state, the user can perform normal operations on the application installed in the terminal device.
  • the operating system of the terminal device provides a function of closing the lock screen interface, and some applications can use the preset interface to replace the lock screen interface for display.
  • Embodiments of the present disclosure provide a method and apparatus for controlling rights.
  • the technical solution is as follows:
  • an access control method comprising:
  • disabling the lock screen permission refers to disabling the permission of the lock screen interface
  • the application does not have the disable lock screen permission, the application is prohibited from disabling the lock screen interface.
  • the detecting whether the application has the permission to disable the lock screen includes:
  • the middle query obtains whether the application has the permission to disable the lock screen
  • the permission detection result is: The application is provided with the permission to disable the lock screen, or the application does not have the permission to disable the lock screen.
  • the method further includes:
  • the identifier of the application includes: a package name of the application and a UID (User Identification) corresponding to the current system.
  • UID User Identification
  • the obtaining the lock screen request sent by the application includes:
  • the closing lock screen request is used to request to close the lock screen interface
  • the hidden lock screen request being used to request to hide the lock screen interface.
  • the prohibiting the application from disabling the lock screen interface includes:
  • the method further includes:
  • the recommendation switch is set by the cloud server according to the number of users who disable the lock screen permission for the application and is the application Turning off the number of users who disable the lock screen permission;
  • the disabling lock screen permission is turned on or off according to the recommended switch setting.
  • an authority control apparatus comprising:
  • the request acquisition module is configured to obtain a disable lock screen request sent by the application
  • the permission detection module is configured to detect whether the application has the permission to disable the lock screen; wherein the disabling the lock screen permission refers to disabling the permission of the lock screen interface;
  • the forbidden module is configured to prohibit the application from disabling the lock screen interface when the application does not have the disable lock screen permission.
  • the permission detection module includes:
  • a submodule configured to invoke a permission detection method of the application rights manager, to send a permission detection request to the permission detection method; wherein the permission detection request carries an identifier of the application, and the permission detection method is used to Querying, by the application rights manager, whether the application has the permission to disable lock screen;
  • Obtaining a sub-module configured to obtain a permission detection result returned by the permission detection method, where the permission detection result is: the application is provided with the permission to disable lock screen, or the application does not have The lock screen permission is disabled.
  • the device further includes:
  • An identifier obtaining module configured to obtain an identifier of the application from the disable lock screen request
  • the identifier of the application includes: a package name of the application and a UID corresponding to the current system.
  • the request obtaining module is configured to:
  • the closing lock screen request is used to request to close the lock screen interface
  • the hidden lock screen request being used to request to hide the lock screen interface.
  • the prohibiting module is configured to terminate execution of the disable lock screen request.
  • the device further includes:
  • a receiving module configured to receive the recommended switch setting of the disabled lock screen permission of the application sent by the cloud server, where the recommended switch setting is enabled by the cloud server according to the permission to disable the lock screen for the application The number of users and the number of users who disable the lock screen permission for the application;
  • the permission switch module is configured to enable or disable the disable lock screen permission according to the recommended switch setting for the application.
  • an authority control apparatus comprising:
  • a memory for storing executable instructions of the processor
  • processor is configured to:
  • disabling the lock screen permission refers to disabling the permission of the lock screen interface
  • the application does not have the disable lock screen permission, the application is prohibited from disabling the lock screen interface.
  • the application After obtaining the disable lock screen request sent by the application, detecting whether the application has the permission to disable the lock screen, if it is detected that the application does not have the lock screen lock permission, the application is prohibited from disabling the lock screen interface; Due to the added permission to disable the lock screen, only the application with the permission to disable the lock screen is allowed to disable the lock screen interface, so as to prevent the unauthorized application from abusing the function of disabling the lock screen interface, thereby avoiding affecting user operations and providing system performance.
  • FIG. 1 is a flowchart of a method for detecting rights according to an exemplary embodiment
  • FIG. 2A is a block diagram of an authority control apparatus according to an exemplary embodiment
  • 2B is a block diagram of an authority control apparatus according to another exemplary embodiment
  • FIG. 3 is a block diagram of an apparatus, according to an exemplary embodiment.
  • the embodiments of the present disclosure provide a method for controlling rights, and an apparatus based on the method, to solve the problems in the related art.
  • the core idea of the technical solution provided by the embodiment of the present disclosure is to add the permission to disable the lock screen in the Application Operations Manager. Disabling the lock screen permission refers to the permission to disable the lock screen interface.
  • the application rights manager manages whether each application installed in the terminal device has the permission, and only the application with the permission to disable the lock screen is allowed to disable the lock screen interface, thereby preventing the unauthorized application from abusing the function of disabling the lock screen interface.
  • the method provided by the embodiment of the present disclosure 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), a wearable device, or the like.
  • the type of the operating system of the terminal device is not limited, such as an Android (Android) operating system, an iOS operating system, a Windows Phone operating system, and the like.
  • FIG. 1 is a flowchart of a method for detecting rights according to an exemplary embodiment. This method can be applied to a terminal device. The method can include the following steps:
  • step 101 the disable lock screen request sent by the application is obtained.
  • a disable lock screen request is sent to the system service, and the lock screen request is disabled for requesting to disable the lock screen interface.
  • the type of the application is not limited, and may be various types of applications installed and operated in the terminal device, such as a social application, a call communication application, an online shopping payment application, a living consumer application, a video playback application, and security. Antivirus applications, browsers, etc.
  • the system service may be a window management service, such as the WindowManagerService of the Android system, and the window management service can control the lock screen interface and provide an interface with lock screen control.
  • disabling the lock screen request includes the following two possible scenarios:
  • the window management service provides a WindowManagerService.disableKeyguard method, and the application can send a close lock screen request to the window management service by calling the method.
  • the window management service provides a WindowManagerService.dismissKeyguard method, and the application can send a hidden lock screen request to the window management service by calling the method.
  • the closing of the lock screen interface means that the lock screen interface is not displayed;
  • the hidden lock screen interface means that the lock screen interface is still displayed, but the lock screen interface is invisible to the user, for example, the transparency of the lock screen interface is set. It is completely transparent.
  • step 102 it is detected whether the application has the permission to disable the lock screen.
  • disabling the lock screen permission refers to the permission to disable the lock screen interface.
  • forbidden The lock screen permission refers to the permission to close the lock screen interface.
  • disabling lock screen permissions refers to hiding the permissions of the lock screen interface.
  • disabling lock screen permissions refers to the ability to close or hide the lock screen interface.
  • the system can perform rights management on the function of disabling the lock screen interface.
  • the name of the disabled lock screen permission is OP_DISMISS_KEYGUARD
  • the identifier also referred to as a value
  • the identifiers corresponding to different permissions are also different.
  • this step may include the following sub-steps:
  • the permission detection request carries an identifier of the application, and the identifier of the application is used to uniquely identify an application.
  • the identifier of the application includes: a package name of the application and a UID corresponding to the current system.
  • the application package name 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, the system can distinguish the system and accurately determine the application that makes the request in the current system.
  • the application can carry the identifier of the application in the disable lock screen request, and accordingly, the system service can obtain the identifier of the application from the disable lock screen request.
  • the permission detection method is used to query whether the application has the permission to disable the lock screen from the application rights manager.
  • WindowManagerService can call the AppOpsManager.checkOpNoThrow method, and send a permission detection request carrying the identifier of the application to the method.
  • the permission detection result is: the application has the permission to disable the lock screen, or the application does not have the permission to disable the lock screen. Still taking the Android system as an example, after the AppOpsManager.checkOpNoThrow method is called, according to the identifier of the application, the application permission manager queries whether the application has the permission to disable the lock screen. If the application has the permission to disable the lock screen, the AppOpsManager.checkOpNoThrow method returns information indicating the information to the WindowManagerService; if the application does not have the lock screen permission disabled, the AppOpsManager.checkOpNoThrow method returns information indicating that the file is not available to the WindowManagerService.
  • the code example for implementing the detection application to disable the lock screen permission is as follows:
  • step 103 if the application does not have the permission to disable the lock screen, the application is prohibited from disabling the lock screen interface.
  • the system service prohibits the application from disabling the lock screen interface. That is, the system service prohibits the application from closing or hiding the lock screen interface.
  • the system service terminates execution of the disable lock screen request, and does not perform logic to subsequently close or hide the lock screen interface.
  • the system service processes the disable lock screen request according to the original normal processing flow, and performs the logic of subsequently closing or hiding the lock screen interface.
  • the method provided by the embodiment after obtaining the disable lock screen request sent by the application, detects whether the application has the permission to disable the lock screen, and if it is detected that the application does not have the lock screen lock permission, the method is prohibited.
  • the application disables the lock screen interface; because the lock screen lock permission is added, only the application with the lock screen lock permission is allowed to disable the lock screen interface, thereby preventing the unauthorized application from abusing the function of disabling the lock screen interface, thereby avoiding affecting user operations and providing the system. performance.
  • the application has the permission to disable the lock screen, which can be set by the system default or by the user.
  • the number of users who disable the lock screen permission for each application may be separately counted in the cloud server corresponding to the operating system.
  • the cloud server statistics are turned on for the application.
  • the number of users who disable the lock screen permission and the number of users who disable the lock screen permission for the application determine the recommended switch settings for the application to disable the lock screen permission.
  • the cloud server determines the recommended switch setting of the application for disabling the lock screen permission according to the ratio of the number of users who disable the lock screen permission for the application and the number of users who disable the lock screen permission.
  • the cloud server may send the recommendation switch setting of the application for disabling the lock screen permission to the terminal device; correspondingly, the terminal device receives the recommended switch setting of the application for disabling the lock screen permission sent by the cloud server.
  • the recommended switch setting refers to the recommendation to enable or disable the lock screen permission.
  • the terminal device sets the permission to disable or disable the lock screen according to the recommended switch setting.
  • the terminal device automatically sets the disable lock screen permission for the application to be turned on or off according to the recommended switch setting. For example, if the recommended switch is set to be on, the terminal device disables the lock screen permission for the application; if the recommended switch is set to off, the terminal device disables the lock screen permission for the application close.
  • the terminal device displays the recommended switch setting, and the user sets the permission setting indication for the application to be turned on or off by the user in combination with the recommended switch setting and the actual demand setting thereof, and the terminal device acquires the permission setting indication set by the user, according to The permission setting set by the user indicates that the lock screen permission is disabled for the application to be turned on or off.
  • the cloud server may send the recommendation switch setting of the application for disabling the lock screen permission to the terminal device; the cloud server may also send the recommended permission for the lock screen permission of the application to the terminal device every predetermined time interval. Switch settings.
  • the cloud server determines the recommendation of the application to disable the lock screen permission.
  • the switch is set to be turned on; if the number of users who disable the lock screen permission for the application is less than the number of users who disable the lock screen permission for the application, the cloud server determines that the recommended switch for disabling the lock screen permission of the application is set to off.
  • the cloud server determines the recommended switch setting of the application for disabling the lock screen permission. If the ratio of the number of users who disable the lock screen permission to the total number of users is less than the second threshold, the cloud server determines that the recommended switch for disabling the lock screen permission of the application is set to off.
  • the first threshold is equal to the second threshold, or the first threshold is greater than the second threshold.
  • the total number of users is the sum of the number of users who have disabled lock screen permissions for the app and the number of users who have disabled lock screen permissions for the app.
  • the switch control for disabling the lock screen permission of each application can be correspondingly increased, so that the user can pass the switch.
  • the controls are customized. For example, in the setting function-authorization management function-application authority management function, the above-mentioned switch control is added, and the user can turn the lock screen permission on or off for the application by adjusting the switch control.
  • FIG. 2A is a block diagram of an authority control apparatus according to an exemplary embodiment.
  • the apparatus has a function of implementing the above-described method examples, and the functions may be implemented by hardware or by hardware to execute corresponding software.
  • the apparatus may include a request acquisition module 210, a rights detection module 220, and a prohibition module 230.
  • the request acquisition module 210 is configured to obtain a disable lock screen request sent by the application.
  • the permission detecting module 220 is configured to detect whether the application has the permission to disable the lock screen.
  • the disabling the lock screen permission refers to disabling the permission of the lock screen interface.
  • the prohibition module 230 is configured to prohibit the application from disabling the lock screen interface when the application does not have the disable lock screen permission.
  • the device detects whether the application has the permission to disable the lock screen after obtaining the disable lock screen request sent by the application, and if the application does not have the permission to disable the lock screen, the device is prohibited.
  • the application disables the lock screen interface; because the lock screen lock permission is added, only the application with the lock screen lock permission is allowed to disable the lock screen interface, thereby preventing the unauthorized application from abusing the function of disabling the lock screen interface, thereby avoiding affecting user operations and providing the system. performance.
  • the rights detection module 220 includes: a calling submodule 220a and an obtaining submodule 220b.
  • the calling submodule 220a is configured to invoke a permission detecting method of the application rights manager, and send a permission detecting request to the right detecting method.
  • the privilege detection request carries the identifier of the application, and the privilege detection method is used to query, from the application privilege manager, whether the application has the disabled lock screen permission.
  • the obtaining submodule 220b is configured to acquire the authority detection result returned by the authority detecting method.
  • the result of the permission detection is that the application has the permission to disable the lock screen, or the application does not have the permission to disable the lock screen.
  • the device further includes: an identifier obtaining module 240.
  • the identity obtaining module 240 is configured to obtain an identifier of the application from the disable lock screen request.
  • the identifier of the application includes: a package name of the application and a UID corresponding to the current system.
  • the request obtaining module 210 is configured to: acquire a shutdown lock screen request sent by the application, the close lock The screen request is used to request to close the lock screen interface; or, the hidden lock screen request sent by the application is obtained, and the hidden lock screen request is used to request to hide the lock screen interface.
  • the disabling module 230 is configured to terminate execution of the disable lock screen request.
  • the apparatus further includes: a setting receiving module and a rights switch module.
  • Setting a receiving module, configured to receive the recommended switch setting of the disabled lock screen permission of the application sent by the cloud server, where the recommended switch setting is enabled by the cloud server according to the permission to disable the lock screen for the application. The number of users and the number of users who disable the lock screen permission for the application are determined.
  • the permission switch module is configured to enable or disable the disable lock screen permission according to the recommended switch setting for the application.
  • An exemplary embodiment of the present disclosure also provides an authority control apparatus capable of implementing the authority control method provided by the present disclosure.
  • the apparatus includes a processor and a memory for storing executable instructions of the processor.
  • the processor is configured to:
  • disabling the lock screen permission refers to disabling the permission of the lock screen interface
  • the application does not have the disable lock screen permission, the application is prohibited from disabling the lock screen boundary surface.
  • the processor is configured to:
  • the middle query obtains whether the application has the permission to disable the lock screen
  • the processor is further configured to:
  • the identifier of the application includes: a package name of the application and a UID corresponding to the current system.
  • the processor is configured to:
  • the closing lock screen request is used to request to close the lock screen interface
  • the hidden lock screen request being used to request to hide the lock screen interface.
  • the processor is configured to:
  • the processor is further configured to:
  • the recommendation switch is set by the cloud server according to the number of users who disable the lock screen permission for the application and is the application Turning off the number of users who disable the lock screen permission;
  • the disabling lock screen permission is turned on or off according to the recommended switch setting.
  • FIG. 3 is a block diagram of an apparatus 300, according to an exemplary embodiment.
  • device 300 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
  • apparatus 300 can include one or more of the following components: processing component 302, memory 304, power component 306, multimedia component 308, audio component 310, input/output (I/O) interface 312, sensor component 314, and Communication component 316.
  • Processing component 302 typically controls the overall operation of device 300, such as with display, telephone calls, number According to communications, camera operations and recording operations are associated with operations.
  • Processing component 302 can include one or more processors 320 to execute instructions to perform all or part of the steps described above.
  • processing component 302 can include one or more modules to facilitate interaction between component 302 and other components.
  • processing component 302 can include a multimedia module to facilitate interaction between multimedia component 308 and processing component 302.
  • Memory 304 is configured to store various types of data to support operation at device 300. Examples of such data include instructions for any application or method operating on device 300, contact data, phone book data, messages, pictures, videos, and the like.
  • the memory 304 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM Electrically erasable programmable read only memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Disk Disk or Optical Disk.
  • Power component 306 provides power to various components of device 300.
  • Power component 306 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 300.
  • the multimedia component 308 includes a screen between the device 300 and the user that provides an output interface.
  • the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor may sense not only the boundary of the touch or sliding action, but also the duration and pressure associated with the touch or slide operation.
  • 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 and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 310 is configured to output and/or input an audio signal.
  • audio component 310 includes a microphone (MIC) that is configured to receive an external audio signal when device 300 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode.
  • the received audio signal may be further stored in memory 304 or transmitted via communication component 316.
  • audio component 310 also includes a speaker for outputting an audio signal.
  • the I/O interface 312 provides an interface between the processing component 302 and the peripheral interface module.
  • the port module can be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.
  • Sensor assembly 314 includes one or more sensors for providing status assessment of various aspects to device 300.
  • sensor assembly 314 can detect an open/closed state of device 300, relative positioning of components, such as the display and keypad of device 300, and sensor component 314 can also detect a change in position of one component of device 300 or device 300. The presence or absence of user contact with device 300, device 300 orientation or acceleration/deceleration, and temperature variation of device 300.
  • Sensor assembly 314 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
  • Sensor assembly 314 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor assembly 314 can also include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 316 is configured to facilitate wired or wireless communication between device 300 and other devices.
  • the device 300 can access a wireless network based on a communication standard, such as Wi-Fi, 2G or 3G, or a combination thereof.
  • communication component 316 receives broadcast signals or broadcast associated information from an external broadcast management system via a broadcast channel.
  • the communication component 316 also includes a near field communication (NFC) module to facilitate short range communication.
  • NFC near field communication
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • apparatus 300 may be implemented 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 above methods.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A gate array
  • controller microcontroller, microprocessor, or other electronic component implementation for performing the above methods.
  • non-transitory computer readable storage medium comprising instructions, such as a memory 304 comprising instructions executable by processor 320 of apparatus 300 to perform the above method.
  • the non-transitory computer readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
  • a non-transitory computer readable storage medium when instructions in the storage medium are executed by a processor of apparatus 300, to enable apparatus 300 to perform the above method.
  • a plurality as referred to herein means two or more.
  • "and / or” describes the association relationship of the associated object, indicating that there can be three relationships, for example, A and / or B, can mean: There are three cases where A exists separately, and A and B exist at the same time, and B exists separately.
  • the character "/" generally indicates that the contextual object is an "or" relationship.

Abstract

本公开是关于一种权限控制方法及装置,属于计算机技术领域。所述方法包括:获取应用发送的禁用锁屏请求;检测应用是否具备禁用锁屏权限;其中,禁用锁屏权限是指禁用锁屏界面的权限;若应用不具备禁用锁屏权限,则禁止应用禁用锁屏界面。由于增加了禁用锁屏权限,仅允许具备该禁用锁屏权限的应用禁用锁屏界面,避免未经允许的应用滥用禁用锁屏界面的功能,避免影响用户操作,提供系统性能。

Description

权限控制方法及装置 技术领域
本公开涉及计算机技术领域,特别涉及一种权限控制方法及装置。
背景技术
目前,诸如手机、平板电脑之类的终端设备通常都具备锁屏功能。
锁屏功能即为屏幕锁定功能。当终端设备的屏幕处于锁屏状态时,用户无法对终端设备中安装的应用进行正常操作。当终端设备的屏幕处于锁屏状态时,便会显示锁屏界面,用户在锁屏界面中输入密码(如数字、轨迹、指纹等)之后,如果终端设备验证用户输入的密码正确,则由锁屏状态切换至解锁状态。当终端设备的屏幕处于解锁状态时,用户即可对终端设备中安装的应用进行正常操作。
在相关技术中,终端设备的操作系统提供有关闭锁屏界面的功能,一些应用利用该功能可以使用预设界面替换掉锁屏界面进行显示。
发明内容
本公开实施例提供了一种权限控制方法及装置。所述技术方案如下:
根据本公开实施例的第一方面,提供了一种权限控制方法,所述方法包括:
获取应用发送的禁用锁屏请求;
检测所述应用是否具备禁用锁屏权限;其中,所述禁用锁屏权限是指禁用锁屏界面的权限;
若所述应用不具备所述禁用锁屏权限,则禁止所述应用禁用所述锁屏界面。
可选地,所述检测所述应用是否具备禁用锁屏权限,包括:
调用应用权限管理器的权限检测方法,向所述权限检测方法发送权限检测请求;其中,所述权限检测请求中携带所述应用的标识,所述权限检测方法用于从所述应用权限管理器中查询获取所述应用是否具备所述禁用锁屏权限;
获取所述权限检测方法返回的权限检测结果;其中,所述权限检测结果为: 所述应用具备所述禁用锁屏权限,或者,所述应用不具备所述禁用锁屏权限。
可选地,所述方法还包括:
从所述禁用锁屏请求中获取所述应用的标识;
其中,所述应用的标识包括:所述应用的包名和当前系统所对应的UID(User Identification,用户个人身份识别码)。
可选地,所述获取应用发送的禁用锁屏请求,包括:
获取所述应用发送的关闭锁屏请求,所述关闭锁屏请求用于请求关闭所述锁屏界面;
或者,
获取所述应用发送的隐藏锁屏请求,所述隐藏锁屏请求用于请求隐藏所述锁屏界面。
可选地,所述禁止所述应用禁用所述锁屏界面,包括:
终止执行所述禁用锁屏请求。
可选地,所述方法还包括:
接收云端服务器发送的所述应用的所述禁用锁屏权限的推荐开关设置,所述推荐开关设置由所述云端服务器根据为所述应用开启所述禁用锁屏权限的用户数量和为所述应用关闭所述禁用锁屏权限的用户数量确定;
根据所述推荐开关设置为所述应用开启或关闭所述禁用锁屏权限。
根据本公开实施例的第二方面,提供了一种权限控制装置,所述装置包括:
请求获取模块,被配置为获取应用发送的禁用锁屏请求;
权限检测模块,被配置为检测所述应用是否具备禁用锁屏权限;其中,所述禁用锁屏权限是指禁用锁屏界面的权限;
禁止模块,被配置为当所述应用不具备所述禁用锁屏权限时,禁止所述应用禁用所述锁屏界面。
可选地,所述权限检测模块,包括:
调用子模块,被配置为调用应用权限管理器的权限检测方法,向所述权限检测方法发送权限检测请求;其中,所述权限检测请求中携带所述应用的标识,所述权限检测方法用于从所述应用权限管理器中查询获取所述应用是否具备所述禁用锁屏权限;
获取子模块,被配置为获取所述权限检测方法返回的权限检测结果;其中,所述权限检测结果为:所述应用具备所述禁用锁屏权限,或者,所述应用不具 备所述禁用锁屏权限。
可选地,所述装置还包括:
标识获取模块,被配置为从所述禁用锁屏请求中获取所述应用的标识;
其中,所述应用的标识包括:所述应用的包名和当前系统所对应的UID。
可选地,所述请求获取模块,被配置为:
获取所述应用发送的关闭锁屏请求,所述关闭锁屏请求用于请求关闭所述锁屏界面;
或者,
获取所述应用发送的隐藏锁屏请求,所述隐藏锁屏请求用于请求隐藏所述锁屏界面。
可选地,所述禁止模块,被配置为终止执行所述禁用锁屏请求。
可选地,所述装置还包括:
设置接收模块,被配置为接收云端服务器发送的所述应用的所述禁用锁屏权限的推荐开关设置,所述推荐开关设置由所述云端服务器根据为所述应用开启所述禁用锁屏权限的用户数量和为所述应用关闭所述禁用锁屏权限的用户数量确定;
权限开关模块,被配置为根据所述推荐开关设置为所述应用开启或关闭所述禁用锁屏权限。
根据本公开实施例的第三方面,提供了一种权限控制装置,所述装置包括:
处理器;
用于存储所述处理器的可执行指令的存储器;
其中,所述处理器被配置为:
获取应用发送的禁用锁屏请求;
检测所述应用是否具备禁用锁屏权限;其中,所述禁用锁屏权限是指禁用锁屏界面的权限;
若所述应用不具备所述禁用锁屏权限,则禁止所述应用禁用所述锁屏界面。
本公开实施例提供的技术方案可以包括以下有益效果:
通过在获取到应用发送的禁用锁屏请求之后,检测该应用是否具备禁用锁屏权限,若检测出该应用不具备禁用锁屏权限,则禁止该应用禁用锁屏界面; 由于增加了禁用锁屏权限,仅允许具备该禁用锁屏权限的应用禁用锁屏界面,避免未经允许的应用滥用禁用锁屏界面的功能,避免影响用户操作,提供系统性能。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。
图1是根据一示例性实施例示出的一种权限检测方法的流程图;
图2A是根据一示例性实施例示出的一种权限控制装置的框图;
图2B是根据另一示例性实施例示出的一种权限控制装置的框图;
图3是根据一示例性实施例示出的一种装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
在相关技术中,由于操作系统向应用提供了关闭锁屏界面的功能,但并未对使用该功能的权限进行控制,导致部分应用滥用该功能,影响用户操作及系统性能。例如,某应用可以使用自身的模拟锁屏界面替换掉锁屏界面,并在模拟锁屏界面中添加广告。基于此,本公开实施例提供了一种权限控制方法,和基于这个方法的装置,以解决上述相关技术中存在的问题。本公开实施例提供的技术方案,核心思想是在应用权限管理器(Application Operations Manager)中增加禁用锁屏权限,禁用锁屏权限是指禁用锁屏界面的权限。通过应用权限管理器对终端设备中安装的各个应用是否具备该权限进行管理,仅允许具备该禁用锁屏权限的应用禁用锁屏界面,避免未经允许的应用滥用禁用锁屏界面的功能。
本公开实施例提供的方法,各步骤的执行主体可以是终端设备,如手机、平板电脑、电子书阅读器、多媒体播放设备、PDA(Personal Digital Assistant,个人数字助理)、可穿戴设备等。在本公开实施例中,对终端设备的操作系统的类型不作限定,如Android(安卓)操作系统、iOS操作系统、Windows Phone操作系统等。
图1是根据一示例性实施例示出的一种权限检测方法的流程图。该方法可应用于终端设备中。该方法可以包括如下几个步骤:
在步骤101中,获取应用发送的禁用锁屏请求。
当应用需要禁用锁屏界面时,向系统服务发送禁用锁屏请求,禁用锁屏请求用于请求禁用锁屏界面。在本公开实施例中,对应用的种类不作限定,其可以是终端设备中安装运行的各类应用程序,如社交应用、通话通讯应用、网购支付应用、生活消费类应用、影音播放应用、安全杀毒应用、浏览器等。在本公开实施例中,系统服务可以是窗口管理服务,如Android系统的WindowManagerService,窗口管理服务能够对锁屏界面进行控制且对外提供有锁屏控制的接口。
可选地,禁用锁屏请求包括如下两种可能的情形:
1、获取应用发送的关闭锁屏请求,关闭锁屏请求用于请求关闭锁屏界面;
以Android系统为例,窗口管理服务提供有WindowManagerService.disableKeyguard方法,应用可通过调用该方法向窗口管理服务发送关闭锁屏请求。
2、获取应用发送的隐藏锁屏请求,隐藏锁屏请求用于请求隐藏锁屏界面。
以Android系统为例,窗口管理服务提供有WindowManagerService.dismissKeyguard方法,应用可通过调用该方法向窗口管理服务发送隐藏锁屏请求。
在本公开实施例中,关闭锁屏界面是指不显示锁屏界面;隐藏锁屏界面是指仍然显示锁屏界面,但锁屏界面对于用户来说不可见,例如将锁屏界面的透明度设为全透明。
在步骤102中,检测应用是否具备禁用锁屏权限。
系统服务获取到应用发送的禁用锁屏请求之后,检测该应用是否具备禁用锁屏权限。其中,禁用锁屏权限是指禁用锁屏界面的权限。在一个示例中,禁 用锁屏权限是指关闭锁屏界面的权限。在另一示例中,禁用锁屏权限是指隐藏锁屏界面的权限。在又一示例中,禁用锁屏权限是指关闭或隐藏锁屏界面的权限。
在本公开实施例中,通过预先在应用权限管理器中增加禁用锁屏权限,使得系统能够对禁用锁屏界面的功能进行权限管理。示例性地,禁用锁屏权限的名称为OP_DISMISS_KEYGUARD,禁用锁屏权限的标识(也称为值)为10022,用于唯一标识该权限。在应用权限管理器中,不同的权限所对应的标识也不同。
可选地,本步骤可以包括如下几个子步骤:
1、调用应用权限管理器的权限检测方法,向权限检测方法发送权限检测请求;
其中,权限检测请求中携带应用的标识,应用的标识用于唯一标识一个应用。可选地,应用的标识包括:应用的包名(packagename)和当前系统所对应的UID。应用的包名和当前系统所对应的UID可唯一标识当前系统中的一个应用,即便是终端设备支持多系统,也能够对系统进行区分,准确确定当前系统中发出请求的应用。另外,应用可在禁用锁屏请求中携带应用的标识,相应地,系统服务可从禁用锁屏请求中获取应用的标识。
权限检测方法用于从应用权限管理器中查询获取应用是否具备禁用锁屏权限。以Android系统为例,WindowManagerService可调用AppOpsManager.checkOpNoThrow方法,并向该方法发送携带有应用的标识的权限检测请求。
2、获取权限检测方法返回的权限检测结果;
其中,权限检测结果为:应用具备禁用锁屏权限,或者,应用不具备禁用锁屏权限。仍然以Android系统为例,AppOpsManager.checkOpNoThrow方法被调用之后,根据应用的标识,从应用权限管理器中查询获取应用是否具备禁用锁屏权限。若应用具备禁用锁屏权限,则AppOpsManager.checkOpNoThrow方法向WindowManagerService返回用于指示具备的信息;若应用不具备禁用锁屏权限,则AppOpsManager.checkOpNoThrow方法向WindowManagerService返回用于指示不具备的信息。
在一个示例中,以应用请求关闭锁屏界面为例,用于实现检测应用是否具备禁用锁屏权限的代码示例如下:
Figure PCTCN2016099067-appb-000001
Figure PCTCN2016099067-appb-000002
在步骤103中,若应用不具备禁用锁屏权限,则禁止应用禁用锁屏界面。
若应用不具备禁用锁屏权限,则系统服务禁止应用禁用锁屏界面。也即,系统服务禁止应用关闭或隐藏锁屏界面。
在一个示例中,若应用不具备禁用锁屏权限,则系统服务终止执行禁用锁屏请求,不执行后续关闭或隐藏锁屏界面的逻辑。
另外,若应用具备禁用锁屏权限,则系统服务按照原始的正常处理流程对禁用锁屏请求进行处理,执行后续关闭或隐藏锁屏界面的逻辑。
综上所述,本实施例提供的方法,通过在获取到应用发送的禁用锁屏请求之后,检测该应用是否具备禁用锁屏权限,若检测出该应用不具备禁用锁屏权限,则禁止该应用禁用锁屏界面;由于增加了禁用锁屏权限,仅允许具备该禁用锁屏权限的应用禁用锁屏界面,避免未经允许的应用滥用禁用锁屏界面的功能,避免影响用户操作,提供系统性能。
需要补充说明的是,应用是否具备禁用锁屏权限,可以由系统默认设置,也可由用户自定义设置。
可选地,操作系统所对应的云端服务器中可分别统计为各个应用开启/关闭禁用锁屏权限的用户数量。对于某一应用来说,云端服务器统计为该应用开启 禁用锁屏权限的用户数量和为该应用关闭禁用锁屏权限的用户数量,根据上述统计结果确定该应用的禁用锁屏权限的推荐开关设置。示例性地,云端服务器根据为该应用开启禁用锁屏权限的用户数量和关闭禁用锁屏权限的用户数量的比例,确定该应用的禁用锁屏权限的推荐开关设置。在终端设备安装该应用之后,云端服务器可将该应用的禁用锁屏权限的推荐开关设置发送给终端设备;相应地,终端设备接收云端服务器发送的该应用的禁用锁屏权限的推荐开关设置。推荐开关设置是指推荐开启或关闭禁用锁屏权限。终端设备根据推荐开关设置为应用开启或关闭禁用锁屏权限。在一个示例中,终端设备根据该推荐开关设置自动设置为该应用开启或关闭禁用锁屏权限。例如,若推荐开关设置为开启,则终端设备为应用开启禁用锁屏权限;若推荐开关设置为关闭,则终端设备为应用关闭禁用锁屏权限。在另一示例中,终端设备将该推荐开关设置进行显示,由用户结合该推荐开关设置和自身实际需求设置为该应用开启或关闭禁用锁屏权限,终端设备获取用户设置的权限设置指示,根据用户设置的权限设置指示为应用开启或关闭禁用锁屏权限。另外,云端服务器可在终端设备安装应用之后,向终端设备发送该应用的禁用锁屏权限的推荐开关设置;云端服务器也可每隔预定时间间隔向终端设备发送该应用的禁用锁屏权限的推荐开关设置。
在一个示例中,对于某一应用来说,若为该应用开启禁用锁屏权限的用户数量大于为该应用关闭禁用锁屏权限的用户数量,则云端服务器确定该应用的禁用锁屏权限的推荐开关设置为开启;若为该应用开启禁用锁屏权限的用户数量小于为该应用关闭禁用锁屏权限的用户数量,则云端服务器确定该应用的禁用锁屏权限的推荐开关设置为关闭。
在另一示例中,对于某一应用来说,若为该应用开启禁用锁屏权限的用户数量占用户总数的比例大于第一阈值,则云端服务器确定该应用的禁用锁屏权限的推荐开关设置为开启;若为该应用开启禁用锁屏权限的用户数量占用户总数的比例小于第二阈值,则云端服务器确定该应用的禁用锁屏权限的推荐开关设置为关闭。其中,第一阈值等于第二阈值,或者,第一阈值大于第二阈值。用户总数是指为该应用开启禁用锁屏权限的用户数量与为该应用关闭禁用锁屏权限的用户数量的总和。
另外,为了便于用户调整应用的禁用锁屏权限的开关。终端设备的系统设置中可相应增加各个应用的禁用锁屏权限的开关控件,以便于用户通过该开关 控件进行自定义设置。例如,在设置功能—授权管理功能—应用权限管理功能中增加上述开关控件,用户通过调节开关控件便可为应用开启或关闭禁用锁屏权限。
下述为本公开装置实施例,可以用于执行本公开方法实施例。对于本公开装置实施例中未披露的细节,请参照本公开方法实施例。
图2A是根据一示例性实施例示出的一种权限控制装置的框图。该装置具有实现上述方法示例的功能,所述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置可以包括:请求获取模块210、权限检测模块220和禁止模块230。
请求获取模块210,被配置为获取应用发送的禁用锁屏请求。
权限检测模块220,被配置为检测所述应用是否具备禁用锁屏权限。其中,所述禁用锁屏权限是指禁用锁屏界面的权限。
禁止模块230,被配置为当所述应用不具备所述禁用锁屏权限时,禁止所述应用禁用所述锁屏界面。
综上所述,本实施例提供的装置,通过在获取到应用发送的禁用锁屏请求之后,检测该应用是否具备禁用锁屏权限,若检测出该应用不具备禁用锁屏权限,则禁止该应用禁用锁屏界面;由于增加了禁用锁屏权限,仅允许具备该禁用锁屏权限的应用禁用锁屏界面,避免未经允许的应用滥用禁用锁屏界面的功能,避免影响用户操作,提供系统性能。
在基于图2A所示实施例提供的一个可选实施例中,如图2B所示,所述权限检测模块220,包括:调用子模块220a和获取子模块220b。
调用子模块220a,被配置为调用应用权限管理器的权限检测方法,向所述权限检测方法发送权限检测请求。其中,所述权限检测请求中携带所述应用的标识,所述权限检测方法用于从所述应用权限管理器中查询获取所述应用是否具备所述禁用锁屏权限。
获取子模块220b,被配置为获取所述权限检测方法返回的权限检测结果。其中,所述权限检测结果为:所述应用具备所述禁用锁屏权限,或者,所述应用不具备所述禁用锁屏权限。
在基于图2A所示实施例提供的另一可选实施例中,如图2B所示,所述装置还包括:标识获取模块240。
标识获取模块240,被配置为从所述禁用锁屏请求中获取所述应用的标识。其中,所述应用的标识包括:所述应用的包名和当前系统所对应的UID。
在基于图2A所示实施例提供的另一可选实施例中,如图2B所示,所述请求获取模块210,被配置为:获取所述应用发送的关闭锁屏请求,所述关闭锁屏请求用于请求关闭所述锁屏界面;或者,获取所述应用发送的隐藏锁屏请求,所述隐藏锁屏请求用于请求隐藏所述锁屏界面。
在基于图2A所示实施例提供的另一可选实施例中,如图2B所示,所述禁止模块230,被配置为终止执行所述禁用锁屏请求。
在基于图2A所示实施例提供的另一可选实施例中,所述装置还包括:设置接收模块和权限开关模块。
设置接收模块,被配置为接收云端服务器发送的所述应用的所述禁用锁屏权限的推荐开关设置,所述推荐开关设置由所述云端服务器根据为所述应用开启所述禁用锁屏权限的用户数量和为所述应用关闭所述禁用锁屏权限的用户数量确定。
权限开关模块,被配置为根据所述推荐开关设置为所述应用开启或关闭所述禁用锁屏权限。
需要说明的一点是,上述实施例提供的装置在实现其功能时,仅以上述各个功能模块的划分进行举例说明,实际应用中,可以根据实际需要而将上述功能分配由不同的功能模块完成,即将设备的内容结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
本公开一示例性实施例还提供了一种权限控制装置,能够实现本公开提供的权限控制方法。该装置包括:处理器,以及用于存储处理器的可执行指令的存储器。其中,处理器被配置为:
获取应用发送的禁用锁屏请求;
检测所述应用是否具备禁用锁屏权限;其中,所述禁用锁屏权限是指禁用锁屏界面的权限;
若所述应用不具备所述禁用锁屏权限,则禁止所述应用禁用所述锁屏界 面。
可选地,处理器被配置为:
调用应用权限管理器的权限检测方法,向所述权限检测方法发送权限检测请求;其中,所述权限检测请求中携带所述应用的标识,所述权限检测方法用于从所述应用权限管理器中查询获取所述应用是否具备所述禁用锁屏权限;
获取所述权限检测方法返回的权限检测结果;其中,所述权限检测结果为:所述应用具备所述禁用锁屏权限,或者,所述应用不具备所述禁用锁屏权限。
可选地,处理器还被配置为:
从所述禁用锁屏请求中获取所述应用的标识;
其中,所述应用的标识包括:所述应用的包名和当前系统所对应的UID。
可选地,处理器被配置为:
获取所述应用发送的关闭锁屏请求,所述关闭锁屏请求用于请求关闭所述锁屏界面;
或者,
获取所述应用发送的隐藏锁屏请求,所述隐藏锁屏请求用于请求隐藏所述锁屏界面。
可选地,处理器被配置为:
终止执行所述禁用锁屏请求。
可选地,处理器还被配置为:
接收云端服务器发送的所述应用的所述禁用锁屏权限的推荐开关设置,所述推荐开关设置由所述云端服务器根据为所述应用开启所述禁用锁屏权限的用户数量和为所述应用关闭所述禁用锁屏权限的用户数量确定;
根据所述推荐开关设置为所述应用开启或关闭所述禁用锁屏权限。
图3是根据一示例性实施例示出的一种装置300的框图。例如,装置300可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。
参照图3,装置300可以包括以下一个或多个组件:处理组件302,存储器304,电源组件306,多媒体组件308,音频组件310,输入/输出(I/O)接口312,传感器组件314,以及通信组件316。
处理组件302通常控制装置300的整体操作,诸如与显示,电话呼叫,数 据通信,相机操作和记录操作相关联的操作。处理组件302可以包括一个或多个处理器320来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件302可以包括一个或多个模块,便于处理组件302和其他组件之间的交互。例如,处理组件302可以包括多媒体模块,以方便多媒体组件308和处理组件302之间的交互。
存储器304被配置为存储各种类型的数据以支持在装置300的操作。这些数据的示例包括用于在装置300上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器304可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件306为装置300的各种组件提供电力。电源组件306可以包括电源管理系统,一个或多个电源,及其他与为装置300生成、管理和分配电力相关联的组件。
多媒体组件308包括在所述装置300和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件308包括一个前置摄像头和/或后置摄像头。当装置300处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件310被配置为输出和/或输入音频信号。例如,音频组件310包括一个麦克风(MIC),当装置300处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器304或经由通信组件316发送。在一些实施例中,音频组件310还包括一个扬声器,用于输出音频信号。
I/O接口312为处理组件302和外围接口模块之间提供接口,上述外围接 口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件314包括一个或多个传感器,用于为装置300提供各个方面的状态评估。例如,传感器组件314可以检测到装置300的打开/关闭状态,组件的相对定位,例如所述组件为装置300的显示器和小键盘,传感器组件314还可以检测装置300或装置300一个组件的位置改变,用户与装置300接触的存在或不存在,装置300方位或加速/减速和装置300的温度变化。传感器组件314可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件314还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件314还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件316被配置为便于装置300和其他设备之间有线或无线方式的通信。装置300可以接入基于通信标准的无线网络,如Wi-Fi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件316经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件316还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,装置300可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器304,上述指令可由装置300的处理器320执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
一种非临时性计算机可读存储介质,当所述存储介质中的指令由装置300的处理器执行时,使得装置300能够执行上述方法。
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示: 单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。

Claims (13)

  1. 一种权限控制方法,其特征在于,所述方法包括:
    获取应用发送的禁用锁屏请求;
    检测所述应用是否具备禁用锁屏权限;其中,所述禁用锁屏权限是指禁用锁屏界面的权限;
    若所述应用不具备所述禁用锁屏权限,则禁止所述应用禁用所述锁屏界面。
  2. 根据权利要求1所述的方法,其特征在于,所述检测所述应用是否具备禁用锁屏权限,包括:
    调用应用权限管理器的权限检测方法,向所述权限检测方法发送权限检测请求;其中,所述权限检测请求中携带所述应用的标识,所述权限检测方法用于从所述应用权限管理器中查询获取所述应用是否具备所述禁用锁屏权限;
    获取所述权限检测方法返回的权限检测结果;其中,所述权限检测结果为:所述应用具备所述禁用锁屏权限,或者,所述应用不具备所述禁用锁屏权限。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    从所述禁用锁屏请求中获取所述应用的标识;
    其中,所述应用的标识包括:所述应用的包名和当前系统所对应的用户个人身份识别码UID。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述获取应用发送的禁用锁屏请求,包括:
    获取所述应用发送的关闭锁屏请求,所述关闭锁屏请求用于请求关闭所述锁屏界面;
    或者,
    获取所述应用发送的隐藏锁屏请求,所述隐藏锁屏请求用于请求隐藏所述锁屏界面。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述禁止所述应用禁用所述锁屏界面,包括:
    终止执行所述禁用锁屏请求。
  6. 根据权利要求1至5任一项所述的方法,其特征在于,所述方法还包括:
    接收云端服务器发送的所述应用的所述禁用锁屏权限的推荐开关设置,所述推荐开关设置由所述云端服务器根据为所述应用开启所述禁用锁屏权限的用户数量和为所述应用关闭所述禁用锁屏权限的用户数量确定;
    根据所述推荐开关设置为所述应用开启或关闭所述禁用锁屏权限。
  7. 一种权限控制装置,其特征在于,所述装置包括:
    请求获取模块,被配置为获取应用发送的禁用锁屏请求;
    权限检测模块,被配置为检测所述应用是否具备禁用锁屏权限;其中,所述禁用锁屏权限是指禁用锁屏界面的权限;
    禁止模块,被配置为当所述应用不具备所述禁用锁屏权限时,禁止所述应用禁用所述锁屏界面。
  8. 根据权利要求7所述的装置,其特征在于,所述权限检测模块,包括:
    调用子模块,被配置为调用应用权限管理器的权限检测方法,向所述权限检测方法发送权限检测请求;其中,所述权限检测请求中携带所述应用的标识,所述权限检测方法用于从所述应用权限管理器中查询获取所述应用是否具备所述禁用锁屏权限;
    获取子模块,被配置为获取所述权限检测方法返回的权限检测结果;其中,所述权限检测结果为:所述应用具备所述禁用锁屏权限,或者,所述应用不具备所述禁用锁屏权限。
  9. 根据权利要求8所述的装置,其特征在于,所述装置还包括:
    标识获取模块,被配置为从所述禁用锁屏请求中获取所述应用的标识;
    其中,所述应用的标识包括:所述应用的包名和当前系统所对应的用户个人身份识别码UID。
  10. 根据权利要求7至9任一项所述的装置,其特征在于,所述请求获取模块,被配置为:
    获取所述应用发送的关闭锁屏请求,所述关闭锁屏请求用于请求关闭所述锁屏界面;
    或者,
    获取所述应用发送的隐藏锁屏请求,所述隐藏锁屏请求用于请求隐藏所述锁屏界面。
  11. 根据权利要求7至10任一项所述的装置,其特征在于,
    所述禁止模块,被配置为终止执行所述禁用锁屏请求。
  12. 根据权利要求7至11任一项所述的装置,其特征在于,所述装置还包括:
    设置接收模块,被配置为接收云端服务器发送的所述应用的所述禁用锁屏权限的推荐开关设置,所述推荐开关设置由所述云端服务器根据为所述应用开启所述禁用锁屏权限的用户数量和为所述应用关闭所述禁用锁屏权限的用户数量确定;
    权限开关模块,被配置为根据所述推荐开关设置为所述应用开启或关闭所述禁用锁屏权限。
  13. 一种权限控制装置,其特征在于,所述装置包括:
    处理器;
    用于存储所述处理器的可执行指令的存储器;
    其中,所述处理器被配置为:
    获取应用发送的禁用锁屏请求;
    检测所述应用是否具备禁用锁屏权限;其中,所述禁用锁屏权限是指禁用锁屏界面的权限;
    若所述应用不具备所述禁用锁屏权限,则禁止所述应用禁用所述锁屏界面。
PCT/CN2016/099067 2016-09-14 2016-09-14 权限控制方法及装置 WO2018049611A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201680000873.XA CN106462696A (zh) 2016-09-14 2016-09-14 权限控制方法及装置
PCT/CN2016/099067 WO2018049611A1 (zh) 2016-09-14 2016-09-14 权限控制方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/099067 WO2018049611A1 (zh) 2016-09-14 2016-09-14 权限控制方法及装置

Publications (1)

Publication Number Publication Date
WO2018049611A1 true WO2018049611A1 (zh) 2018-03-22

Family

ID=58215241

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/099067 WO2018049611A1 (zh) 2016-09-14 2016-09-14 权限控制方法及装置

Country Status (2)

Country Link
CN (1) CN106462696A (zh)
WO (1) WO2018049611A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106933633A (zh) * 2017-03-14 2017-07-07 北京奇虎科技有限公司 权限管理方法、装置和移动终端
CN106991319A (zh) * 2017-03-17 2017-07-28 维沃移动通信有限公司 一种应用程序的权限管理方法及移动终端
CN114173004B (zh) * 2021-12-09 2023-05-30 北京安云世纪科技有限公司 智能调控社交应用的方法、系统、存储介质及计算机设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744732A (zh) * 2014-02-14 2014-04-23 贝壳网际(北京)安全技术有限公司 跳过系统锁屏的方法及装置
US20150012859A1 (en) * 2013-07-05 2015-01-08 Samsung Electronics Co., Ltd. Method for disabling a locking screen by using object and electronic device using the method
CN105389503A (zh) * 2014-08-18 2016-03-09 北京壹人壹本信息科技有限公司 一种反锁屏的方法、系统及移动终端
CN105607834A (zh) * 2015-12-22 2016-05-25 小米科技有限责任公司 屏幕控制方法、装置及终端
CN105718786A (zh) * 2016-01-18 2016-06-29 成都中科创达软件有限公司 一种系统锁屏的保护方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150012859A1 (en) * 2013-07-05 2015-01-08 Samsung Electronics Co., Ltd. Method for disabling a locking screen by using object and electronic device using the method
CN103744732A (zh) * 2014-02-14 2014-04-23 贝壳网际(北京)安全技术有限公司 跳过系统锁屏的方法及装置
CN105389503A (zh) * 2014-08-18 2016-03-09 北京壹人壹本信息科技有限公司 一种反锁屏的方法、系统及移动终端
CN105607834A (zh) * 2015-12-22 2016-05-25 小米科技有限责任公司 屏幕控制方法、装置及终端
CN105718786A (zh) * 2016-01-18 2016-06-29 成都中科创达软件有限公司 一种系统锁屏的保护方法及系统

Also Published As

Publication number Publication date
CN106462696A (zh) 2017-02-22

Similar Documents

Publication Publication Date Title
US10129044B2 (en) Method and apparatus for controlling smart device
US10075445B2 (en) Methods and devices for permission management
US9860844B2 (en) Method and apparatus of temperature control
EP3073708B1 (en) A method and a terminal for controlling a smart home device
US8909297B2 (en) Access management
US9875346B2 (en) Setting and terminating restricted mode operation on electronic devices
RU2628258C2 (ru) Способ и устройство для обработки детского режима
US20170289181A1 (en) Payment method, apparatus and medium
WO2016023367A1 (zh) 访问认证方法、装置及系统
EP3151117B1 (en) Method and device for delaying information broadcasting
US20170300260A1 (en) Method, device and computer-readable storage medium for data migration
US10706307B2 (en) Methods and devices for processing fingerprint information
EP3367286A1 (en) Methods, apparatuses, computer program and recording medium for protecting information
WO2018049609A1 (zh) 权限控制方法及装置
WO2018049610A1 (zh) 权限控制方法及装置
WO2018049611A1 (zh) 权限控制方法及装置
WO2018072193A1 (zh) 控制应用自启动的方法及装置
WO2017045314A1 (zh) 短信读取方法及装置
US20190095163A1 (en) Method and device for displaying an input interface and an electronic device
CN106570381B (zh) 一种指纹解锁的方法及装置
CN105760796B (zh) 应用安全处理方法及装置
WO2017211021A1 (zh) 应用触发方法及装置
WO2017201692A1 (zh) 应用加密方法及装置
WO2017035986A1 (zh) 移动支付方法及装置
CN107133531B (zh) 应用锁的使用提醒方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16915996

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16915996

Country of ref document: EP

Kind code of ref document: A1