WO2018049609A1 - Permission control method and device - Google Patents

Permission control method and device Download PDF

Info

Publication number
WO2018049609A1
WO2018049609A1 PCT/CN2016/099065 CN2016099065W WO2018049609A1 WO 2018049609 A1 WO2018049609 A1 WO 2018049609A1 CN 2016099065 W CN2016099065 W CN 2016099065W WO 2018049609 A1 WO2018049609 A1 WO 2018049609A1
Authority
WO
WIPO (PCT)
Prior art keywords
window
display
application
lock screen
permission
Prior art date
Application number
PCT/CN2016/099065
Other languages
French (fr)
Chinese (zh)
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 PCT/CN2016/099065 priority Critical patent/WO2018049609A1/en
Priority to CN201680000874.4A priority patent/CN106471513B/en
Publication of WO2018049609A1 publication Critical patent/WO2018049609A1/en

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/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance

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 some terminal devices provides a function of displaying a window on the lock screen interface, and some applications can display a setting window on the lock screen interface by using the function, such as a charging screen saver window, an advertisement window, and a notification push window. Wait.
  • Embodiments of the present disclosure provide a method and apparatus for controlling rights.
  • the technical solution is as follows:
  • an access control method comprising:
  • window display request is used to request to display a window on the lock screen interface, detecting whether the application has a display permission on the lock screen; wherein the display screen display permission refers to the lock screen interface Display window permissions;
  • the window of the application is prohibited from being displayed on the lock screen interface.
  • the window display request carries a flag bit, and the flag bit is used to indicate whether a window is displayed on the lock screen interface.
  • the detecting whether the window display request is used to request to display a window on a lock screen interface comprises:
  • the window for prohibiting the application is displayed on the lock screen interface, including:
  • the first value is used to indicate that the window is displayed on the lock screen interface
  • the second value is used to indicate that the window is not displayed on the lock screen interface
  • the detecting whether the application has the display permission on the lock screen comprises:
  • the middle query obtains whether the application has the display permission on the lock screen;
  • 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.
  • 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 a window display request sent by the application includes:
  • the method further includes:
  • an authority control apparatus comprising:
  • the request acquisition module is configured to obtain a window display request sent by the application
  • a request detection module configured to detect whether the window display request is used to request to display a window on a lock screen interface
  • the permission detecting module is configured to: when the window display request is used to request to display a window on the lock screen interface, detecting whether the application has a display permission on a lock screen; wherein the display permission on the lock screen refers to Displaying the permissions of the window on the lock screen interface;
  • the display module is prohibited from being 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.
  • the window display request carries a flag bit, and the flag bit is used to indicate whether a window is displayed on the lock screen interface.
  • the request detection module includes:
  • Reading a submodule configured to read the flag bit carried in the window display request
  • the determining submodule is configured to determine, based on the value of the flag bit, whether the window display request is for requesting to display a window on the lock screen interface.
  • the forbidden display module is configured to modify a value of the flag bit from a first value to a second value
  • the first value is used to indicate that the window is displayed on the lock screen interface
  • the second value is used to indicate that the window is not displayed on the lock screen interface
  • 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 display permission on the 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 has the display permission on the lock screen, or the application does not have the lock
  • the permissions are displayed on the screen.
  • the device further includes:
  • An identifier obtaining module configured to obtain an identifier of the application from the window display 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 device further includes:
  • a receiving module configured to receive a recommended switch setting for displaying permission on the lock screen of the application sent by the cloud server, where the recommended switch setting is started by the cloud server according to the application for opening the lock screen The number of users of the permission and the number of users who have turned off the display permission on the lock screen for the application;
  • the permission switch module is configured to enable or disable the display permission on the lock screen according to the recommended switch setting.
  • an authority control apparatus comprising:
  • a memory for storing executable instructions of the processor
  • processor is configured to:
  • window display request is used to request to display a window on the lock screen interface, detecting whether the application has a display permission on the lock screen; wherein the display screen display permission refers to the lock screen interface Display window permissions;
  • the window of the application is prohibited from being displayed on the lock screen interface.
  • the detection window displays whether the 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, and if not, the window of the application is prohibited from being locked. Displayed on the screen interface; due to the increased display permission on the lock screen, only the application having the display permission on the lock screen is allowed to display the window on the lock screen interface, thereby preventing the unauthorized application from abusing the function of displaying the window on the lock screen interface. Avoid affecting user operations and improve 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 increase the display permission on the lock screen in the Application Operations Manager, and the display permission on the lock screen refers to the permission to display the window on the lock screen interface.
  • the application rights manager manages whether each application installed in the terminal device has the permission, and only the application having the display permission on the lock screen is allowed to display the window on the lock screen interface, thereby preventing the unauthorized application from being abused in the lock screen interface.
  • the function of the window is displayed.
  • 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 a window display request sent by the application is obtained.
  • the window display request is sent to the system service, and the window display request is used to request the display window.
  • 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 window of the application is the user interface (UI) of the application, which may also be referred to as an interface.
  • the system service may be a window management service, such as the WindowManagerService of the Android system, and the window management service is used to manage all windows in the system.
  • the window display request carries a flag bit, and the flag bit is used to indicate whether the window is displayed on the lock screen interface.
  • the window display request carries a layout parameter WindowManager.LayoutParams, and the layout parameter includes a flag bit flag, and the flag bit FLAG_SHOW_WHEN_LOCKED in the flag parameter flag is used to indicate whether the window is displayed on the lock screen interface.
  • the flag bit is the first value (such as 1)
  • the value of the flag bit is the second value (such as 0)
  • the application can set the value of the flag bit to 1 in the window display request.
  • the window display request includes the following two possible scenarios:
  • the window management service provides a WindowManagerService.addWindow method, and the application can send an add window request to the window management service by calling this method.
  • the window management service provides a WindowManagerService.relayoutWindow method, and the application can send a re-layout window request to the window management service by calling the method.
  • step 102 the detection window displays whether the request is used to request that the window be displayed on the lock screen interface.
  • the request is parsed to detect whether the request is used to request to display the window on the lock screen interface.
  • the system service read window displays the flag bits carried in the request; based on the value of the flag bit, determines whether the window display request is used to request that the window be displayed on the lock screen interface. For example, when the value of the flag bit is the first value, the system service determination window display request is used to request to display the window on the lock screen interface; when the value of the flag bit is the second value, the system service determination window display request is not used for Request to display the window on the lock screen.
  • the window of the application is displayed on the lock screen interface, which means that the window of the application (that is, the interface) is superimposed on the upper layer of the lock screen interface for display.
  • step 103 if the window display request is used to request to display the window on the lock screen interface, it is detected whether the application has the display permission on the lock screen.
  • the system service When the system service detects that the window display request is used to request 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.
  • the display permission on the lock screen refers to the permission to display the window on the lock screen interface.
  • the system can perform rights management on the function of displaying the window on the lock screen interface.
  • the name of the display permission on the lock screen is OP_SHOW_WHEN_LOCKED
  • the identifier (also referred to as a value) of the display permission on the lock screen is 10020, which is used to uniquely identify the permission.
  • 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 may carry the identifier of the application in the window display request, and accordingly, the system service may obtain the identifier of the application from the window display request.
  • the permission detection method is used to query whether the application has the display permission on the lock screen from the application permission 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 display permission on the lock screen, or the application does not have the display permission on the lock screen.
  • the application permission manager queries whether the application has the display permission on the lock screen. If the application has the display permission on the lock screen, the AppOpsManager.checkOpNoThrow method returns AppOpsManager.MODE_ALLOWED to the WindowManagerService, indicating that the application has the display permission on the lock screen; if the application does not have the display permission on the lock screen, the AppOpsManager.checkOpNoThrow method returns the AppOpsManager to the WindowManagerService. MODE_IGNORE, indicating that the application does not have display permission on the lock screen.
  • an example of code for implementing detection of whether an application has display permission on a lock screen is as follows:
  • the system service processes the window display request according to the original normal processing flow.
  • step 104 if the application does not have the display permission on the lock screen, the window of the application is prohibited from being displayed on the lock screen interface.
  • the system service prohibits the window requested by the application from being displayed on the lock screen interface.
  • the system service modifies the value of the flag bit carried in the window display request from the first value to the 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 The window is not displayed on the lock screen.
  • the system service changes the value of the flag bit FLAG_SHOW_WHEN_LOCKED carried in the window display request from 1 to 0.
  • the system service then processes the modified window display request in accordance with the original normal processing flow. Since the value of the flag bit for indicating whether to request the display of the window on the lock screen interface has been changed from the first value to the second value, the window for which the application request is displayed is not displayed on the lock screen interface.
  • 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.
  • the method provided in this embodiment obtains a window display request sent by an application, and detects whether the window display request is used to request to display a window on the lock screen interface, and if yes, continues to detect whether the application has the display permission on the lock screen. If it is not available, the application window is prohibited from being displayed on the lock screen interface; since the display permission on the lock screen is increased, only the application having the display permission on the lock screen is allowed to display the window on the lock screen interface, thereby avoiding unauthorized permission.
  • Application abuse displays the function of the window on the lock screen to avoid affecting user operations and improving system performance.
  • the application has the display permission on the lock screen, which can be set by the system default or by the user.
  • the number of users that open/close the display permission on the lock screen for each application may be separately counted in the cloud server corresponding to the operating system.
  • the cloud server collects the number of users who have displayed the permission on the lock screen for the application and the number of users who have turned off the display permission on the lock screen for the application, and determines the display permission on the lock screen of the application according to the above statistical result.
  • Recommended switch settings Illustratively, the cloud server displays the number of users who have the display permission on the lock screen for the application and turns off the display right on the lock screen. The ratio of the number of restricted users determines the recommended switch settings for display permissions on the lock screen of the application.
  • the cloud server may 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 for displaying the permission on the lock screen of the application sent by the cloud server.
  • the recommended switch setting refers to the recommendation to enable or disable the display permission on the lock screen.
  • the terminal device sets the permission to open or close the lock screen according to the recommended switch setting.
  • the terminal device automatically sets the display permission on the lock screen 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 opens the display permission on the lock screen for the application; if the recommended switch is set to off, the terminal device displays the permission on the lock screen for the application.
  • the terminal device displays the recommended switch setting, and the user sets the permission setting on the lock screen to be turned on or off by the user in combination with the recommended switch setting and the actual requirement of the user, and the terminal device acquires the permission setting indication set by the user.
  • the display permission on the lock screen is turned on or off for the application according to the permission setting indication set by the user.
  • the cloud server may send the recommended switch setting for displaying the permission on the lock screen of the application to the terminal device; the cloud server may also send the display permission on the lock screen of the application to the terminal device every predetermined time interval. Recommended switch settings.
  • the cloud server determines that the lock screen of the application is displayed.
  • the recommendation switch of the permission is set to be enabled; if the number of users for displaying the permission on the lock screen for the application is less than the number of users for displaying the permission on the lock screen for the application, the cloud server determines the recommended switch for displaying the permission on the lock screen of the application. Set to off.
  • the cloud server determines the recommendation of the permission displayed on the lock screen of the application.
  • the switch is set to be on; if the ratio of the number of users displaying the permission on the lock screen to the total number of users is less than the second threshold, the cloud server determines that the recommended switch for displaying the permission on the lock screen 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 refers to the sum of the number of users who have displayed permission on the lock screen for the application and the number of users who have turned off the display permission on the lock screen for the application.
  • the switch control for displaying the permission on the lock screen of each application can be correspondingly increased, so that the user can customize the setting through the switch control.
  • the above-mentioned switch control is added, and the user can turn on or off the display permission on the lock screen 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 request detection module 220, a rights detection module 230, and a forbidden display module 240.
  • the request obtaining module 210 is configured to acquire a window display request sent by the application.
  • the request detection module 220 is configured to detect whether the window display request is used to request to display a window on the lock screen interface.
  • the permission detecting module 230 is configured to detect whether the application has the display permission on the lock screen when the window display request is used to request to display the window on the lock screen interface.
  • the display permission on the lock screen refers to the permission to display the window on the lock screen interface.
  • the display inhibiting 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.
  • the device obtains a window display request sent by an application, and detects whether the window display request is used to request to display a window on the lock screen interface, and if yes, continues to detect whether the application has the display permission on the lock screen. If it is not available, the application window is prohibited from being displayed on the lock screen interface; since the display permission on the lock screen is increased, only the application having the display permission on the lock screen is allowed to display the window on the lock screen interface, thereby avoiding unauthorized permission.
  • Application abuse displays the function of the window on the lock screen to avoid affecting user operations and improving system performance.
  • the window display request carries a flag bit for indicating whether to display a window on the lock screen interface.
  • the request detecting module 220 includes: a reading submodule 220a and a determining submodule 220b.
  • the read sub-module 220a is configured to read the flag bit carried in the window display request.
  • the determining sub-module 220b is configured to determine, based on the value of the flag bit, whether the window display request is for requesting to display a window on the lock screen interface.
  • the forbidden display module 240 is configured to modify the value of the flag bit from a first value to a second value.
  • the first value is used to indicate that the window is displayed on the lock screen interface
  • the second value is used to indicate that the window is not displayed on the lock screen interface.
  • the rights detection module 230 includes: a calling submodule 230a and an obtaining submodule 230b.
  • the calling submodule 230a 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 display permission on the lock screen.
  • the obtaining submodule 230b 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 display permission on the lock screen, or the application does not have the display permission on the lock screen.
  • the apparatus further includes: an identifier acquisition module 250.
  • the identity obtaining module 250 is configured to obtain an identifier of the application from the window display 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 an add window request sent by the application, and add the window request. Used to request to add a window; or, to obtain a re-layout window request sent by the application, the re-layout window request is used to request a re-layout window.
  • the apparatus further includes: a setting receiving module and a rights switch module.
  • Setting a receiving module, configured to receive a recommended switch setting for displaying permission on the lock screen of the application sent by the cloud server, where the recommended switch setting is started by the cloud server according to the application for opening the lock screen The number of users of the rights and the number of users who have turned off the display permissions on the lock screen for the application.
  • the permission switch module is configured to enable or disable the display permission on the lock screen according to the recommended switch setting.
  • 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:
  • window display request is used to request to display a window on the lock screen interface, detecting whether the application has a display permission on the lock screen; wherein the display screen display permission refers to the lock screen interface Display window permissions;
  • the window of the application is prohibited from being displayed on the lock screen interface.
  • the window display request carries a flag bit, and the flag bit is used to indicate whether a window is displayed on the lock screen interface.
  • the processor is configured to:
  • the processor is configured to:
  • the first value is used to indicate that the window is displayed on the lock screen interface
  • the second value is used to indicate that the window is not displayed on the lock screen interface
  • the processor is configured to:
  • the middle query obtains whether the application has the display permission on the lock screen;
  • 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.
  • 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 processor is further configured to:
  • 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 operations associated with display, telephone calls, data communications, camera operations, and recording 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. Programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, Flash memory, disk or CD.
  • 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, which may be a keyboard, a click wheel, a button, or 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” describing the association relationship of the associated objects, indicating that there may be three relationships, for example, A and/or B, which may indicate that there are three cases where A exists separately, A and B exist at the same time, and B exists separately.
  • the character "/" generally indicates that the contextual object is an "or" relationship.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

Disclosed are a permission control method and device, belonging to the technical field of computers. The method comprises: obtaining a window display request sent by an application; detecting whether the window display request is used for requesting that a window is displayed on a screen lock interface; if the window display request is used for requesting that a window is displayed on the screen lock interface, detecting whether the application has a screen lock display permission, the screen lock display permission referring to a permission for displaying a window on the screen lock interface; if the application does not have the screen lock display permission, prohibiting the application from displaying a window on the screen lock interface. The screen lock display permission only permits applications which have the screen lock display permission to display a window on the screen lock interface, thereby preventing unpermitted applications from misusing the function of displaying a window on the screen lock interface, preventing user operations from being affected, and increasing system performance.

Description

权限控制方法及装置Authority control method and device 技术领域Technical field
本公开涉及计算机技术领域,特别涉及一种权限控制方法及装置。The present disclosure relates to the field of computer technologies, and in particular, to a rights control method and apparatus.
背景技术Background technique
目前,诸如手机、平板电脑之类的终端设备通常都具备锁屏功能。At present, terminal devices such as mobile phones and tablet computers usually have a lock screen function.
锁屏功能即为屏幕锁定功能。当终端设备的屏幕处于锁屏状态时,用户无法对终端设备中安装的应用进行正常操作。当终端设备的屏幕处于锁屏状态时,便会显示锁屏界面,用户在锁屏界面中输入密码(如数字、轨迹、指纹等)之后,如果终端设备验证用户输入的密码正确,则由锁屏状态切换至解锁状态。当终端设备的屏幕处于解锁状态时,用户即可对终端设备中安装的应用进行正常操作。The lock screen function is the screen lock function. When the screen of the terminal device is in the lock screen state, the user cannot perform normal operations on the application installed in the terminal device. When the screen of the terminal device is in the lock screen state, the lock screen interface is displayed. After the user inputs a password (such as a number, a track, a fingerprint, etc.) in the lock screen interface, if 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. When 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.
在相关技术中,部分终端设备的操作***提供有在锁屏界面上显示窗口的功能,一些应用通过该功能可在锁屏界面上显示设定窗口,如充电屏保窗口、广告窗口、通知推送窗口等。In the related art, the operating system of some terminal devices provides a function of displaying a window on the lock screen interface, and some applications can display a setting window on the lock screen interface by using the function, such as a charging screen saver window, an advertisement window, and a notification push window. Wait.
发明内容Summary of the invention
本公开实施例提供了一种权限控制方法及装置。所述技术方案如下:Embodiments of the present disclosure provide a method and apparatus for controlling rights. The technical solution is as follows:
根据本公开实施例的第一方面,提供了一种权限控制方法,所述方法包括:According to a first aspect of an embodiment of the present disclosure, there is provided an access control method, the method comprising:
获取应用发送的窗口显示请求;Get the window display request sent by the application;
检测所述窗口显示请求是否用于请求在锁屏界面上显示窗口;Detecting whether the window display request is used to request to display a window on a lock screen interface;
若所述窗口显示请求用于请求在所述锁屏界面上显示窗口,则检测所述应用是否具备锁屏上显示权限;其中,所述锁屏上显示权限是指在所述锁屏界面上显示窗口的权限;If the window display request is used to request to display a window on the lock screen interface, detecting whether the application has a display permission on the lock screen; wherein the display screen display permission refers to the lock screen interface Display window permissions;
若所述应用不具备所述锁屏上显示权限,则禁止所述应用的窗口在所述锁屏界面上显示。If the application does not have the display permission on the lock screen, the window of the application is prohibited from being displayed on the lock screen interface.
可选地,所述窗口显示请求中携带标志位,所述标志位用于指示是否在所述锁屏界面上显示窗口。 Optionally, the window display request carries a flag bit, and the flag bit is used to indicate whether a window is displayed on the lock screen interface.
可选地,所述检测所述窗口显示请求是否用于请求在锁屏界面上显示窗口,包括:Optionally, the detecting whether the window display request is used to request to display a window on a lock screen interface comprises:
读取所述窗口显示请求中携带的所述标志位;Reading the window to display the flag bit carried in the request;
根据所述标志位的值,确定所述窗口显示请求是否用于请求在所述锁屏界面上显示窗口。And determining, according to the value of the flag bit, whether the window display request is used to request to display a window on the lock screen interface.
可选地,所述禁止所述应用的窗口在所述锁屏界面上显示,包括:Optionally, the window for prohibiting the application is displayed on the lock screen interface, including:
将所述标志位的值由第一值修改为第二值;Changing the value of the flag bit from the first value to the second value;
其中,所述第一值用于指示在所述锁屏界面上显示窗口,所述第二值用于指示不在所述锁屏界面上显示窗口。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 that the window is not displayed on the lock screen interface.
可选地,所述检测所述应用是否具备锁屏上显示权限,包括:Optionally, the detecting whether the application has the display permission on the lock screen comprises:
调用应用权限管理器的权限检测方法,向所述权限检测方法发送权限检测请求;其中,所述权限检测请求中携带所述应用的标识,所述权限检测方法用于从所述应用权限管理器中查询获取所述应用是否具备所述锁屏上显示权限;Calling the permission detection method of the application rights manager, and sending the 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 use the application permission manager The middle query obtains whether the application has the display permission on the lock screen;
获取所述权限检测方法返回的权限检测结果;其中,所述权限检测结果为:所述应用具备所述锁屏上显示权限,或者,所述应用不具备所述锁屏上显示权限。Obtaining 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 display permission on the lock screen.
可选地,所述方法还包括:Optionally, the method further includes:
从所述窗口显示请求中获取所述应用的标识;Obtaining an identifier of the application from the window display request;
其中,所述应用的标识包括:所述应用的包名和当前***所对应的UID(User Identification,用户个人身份识别码)。The identifier of the application includes: a package name of the application and a UID (User Identification) corresponding to the current system.
可选地,所述获取应用发送的窗口显示请求,包括:Optionally, the obtaining a window display request sent by the application includes:
获取所述应用发送的添加窗口请求,所述添加窗口请求用于请求添加窗口;Obtaining an add window request sent by the application, where the add window request is used to request to add a window;
或者,or,
获取所述应用发送的重新布局窗口请求,所述重新布局窗口请求用于请求重新布局窗口。Acquiring a re-layout window request sent by the application, the re-layout window requesting for requesting a re-layout window.
可选地,所述方法还包括:Optionally, the method further includes:
接收云端服务器发送的所述应用的所述锁屏上显示权限的推荐开关设置,所述推荐开关设置由所述云端服务器根据为所述应用开启所述锁屏上显示权限的用户数量和为所述应用关闭所述锁屏上显示权限的用户数量确定;Receiving, by the cloud server, a recommended switch setting for displaying permission on the lock screen of the application sent by the cloud server, where the recommendation switch is set by the cloud server according to the number of users that open the display permission on the lock screen for the application Determining, by the application, the number of users who display the permission on the lock screen;
根据所述推荐开关设置为所述应用开启或关闭所述锁屏上显示权限。 Setting the permission on the lock screen to be turned on or off according to the recommended switch setting.
根据本公开实施例的第二方面,提供了一种权限控制装置,所述装置包括:According to a second aspect of the embodiments of the present disclosure, there is provided an authority control apparatus, the apparatus comprising:
请求获取模块,被配置为获取应用发送的窗口显示请求;The request acquisition module is configured to obtain a window display request sent by the application;
请求检测模块,被配置为检测所述窗口显示请求是否用于请求在锁屏界面上显示窗口;a request detection module configured to detect whether the window display request is used to request to display a window on a lock screen interface;
权限检测模块,被配置为当所述窗口显示请求用于请求在所述锁屏界面上显示窗口时,检测所述应用是否具备锁屏上显示权限;其中,所述锁屏上显示权限是指在所述锁屏界面上显示窗口的权限;The permission detecting module is configured to: when the window display request is used to request to display a window on the lock screen interface, detecting whether the application has a display permission on a lock screen; wherein the display permission on the lock screen refers to Displaying the permissions of the window on the lock screen interface;
禁止显示模块,被配置为当所述应用不具备所述锁屏上显示权限时,禁止所述应用的窗口在所述锁屏界面上显示。The display module is prohibited from being 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.
可选地,所述窗口显示请求中携带标志位,所述标志位用于指示是否在所述锁屏界面上显示窗口。Optionally, the window display request carries a flag bit, and the flag bit is used to indicate whether a window is displayed on the lock screen interface.
可选地,所述请求检测模块,包括:Optionally, the request detection module includes:
读取子模块,被配置为读取所述窗口显示请求中携带的所述标志位;Reading a submodule configured to read the flag bit carried in the window display request;
确定子模块,被配置为根据所述标志位的值,确定所述窗口显示请求是否用于请求在所述锁屏界面上显示窗口。The determining submodule is configured to determine, based on the value of the flag bit, whether the window display request is for requesting to display a window on the lock screen interface.
可选地,所述禁止显示模块,被配置为将所述标志位的值由第一值修改为第二值;Optionally, the forbidden display module is configured to modify a value of the flag bit from a first value to a second value;
其中,所述第一值用于指示在所述锁屏界面上显示窗口,所述第二值用于指示不在所述锁屏界面上显示窗口。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 that the window is not displayed on the lock screen interface.
可选地,所述权限检测模块,包括:Optionally, the permission detection module includes:
调用子模块,被配置为调用应用权限管理器的权限检测方法,向所述权限检测方法发送权限检测请求;其中,所述权限检测请求中携带所述应用的标识,所述权限检测方法用于从所述应用权限管理器中查询获取所述应用是否具备所述锁屏上显示权限;Calling 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 display permission on the 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 has the display permission on the lock screen, or the application does not have the lock The permissions are displayed on the screen.
可选地,所述装置还包括:Optionally, the device further includes:
标识获取模块,被配置为从所述窗口显示请求中获取所述应用的标识;An identifier obtaining module configured to obtain an identifier of the application from the window display request;
其中,所述应用的标识包括:所述应用的包名和当前***所对应的UID。The identifier of the application includes: a package name of the application and a UID corresponding to the current system.
可选地,所述请求获取模块,被配置为: Optionally, the request obtaining module is configured to:
获取所述应用发送的添加窗口请求,所述添加窗口请求用于请求添加窗口;Obtaining an add window request sent by the application, where the add window request is used to request to add a window;
或者,or,
获取所述应用发送的重新布局窗口请求,所述重新布局窗口请求用于请求重新布局窗口。Acquiring a re-layout window request sent by the application, the re-layout window requesting for requesting a re-layout window.
可选地,所述装置还包括:Optionally, the device further includes:
设置接收模块,被配置为接收云端服务器发送的所述应用的所述锁屏上显示权限的推荐开关设置,所述推荐开关设置由所述云端服务器根据为所述应用开启所述锁屏上显示权限的用户数量和为所述应用关闭所述锁屏上显示权限的用户数量确定;Setting a receiving module, configured to receive a recommended switch setting for displaying permission on the lock screen of the application sent by the cloud server, where the recommended switch setting is started by the cloud server according to the application for opening the lock screen The number of users of the permission and the number of users who have turned off the display permission on the lock screen for the application;
权限开关模块,被配置为根据所述推荐开关设置为所述应用开启或关闭所述锁屏上显示权限。The permission switch module is configured to enable or disable the display permission on the lock screen according to the recommended switch setting.
根据本公开实施例的第三方面,提供了一种权限控制装置,所述装置包括:According to a third aspect of the embodiments of the present disclosure, there is provided an authority control apparatus, the apparatus comprising:
处理器;processor;
用于存储所述处理器的可执行指令的存储器;a memory for storing executable instructions of the processor;
其中,所述处理器被配置为:Wherein the processor is configured to:
获取应用发送的窗口显示请求;Get the window display request sent by the application;
检测所述窗口显示请求是否用于请求在锁屏界面上显示窗口;Detecting whether the window display request is used to request to display a window on a lock screen interface;
若所述窗口显示请求用于请求在所述锁屏界面上显示窗口,则检测所述应用是否具备锁屏上显示权限;其中,所述锁屏上显示权限是指在所述锁屏界面上显示窗口的权限;If the window display request is used to request to display a window on the lock screen interface, detecting whether the application has a display permission on the lock screen; wherein the display screen display permission refers to the lock screen interface Display window permissions;
若所述应用不具备所述锁屏上显示权限,则禁止所述应用的窗口在所述锁屏界面上显示。If the application does not have the display permission on the lock screen, the window of the application is prohibited 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 a window display request sent by the application, the detection window displays whether the 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, and if not, the window of the application is prohibited from being locked. Displayed on the screen interface; due to the increased display permission on the lock screen, only the application having the display permission on the lock screen is allowed to display the window on the lock screen interface, thereby preventing the unauthorized application from abusing the function of displaying the window on the lock screen interface. Avoid affecting user operations and improve system performance.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性 的,并不能限制本公开。It should be understood that the above general description and the following detailed description are merely exemplary and explanatory. It does not limit the disclosure.
附图说明DRAWINGS
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in the specification
图1是根据一示例性实施例示出的一种权限检测方法的流程图;FIG. 1 is a flowchart of a method for detecting rights according to an exemplary embodiment;
图2A是根据一示例性实施例示出的一种权限控制装置的框图;2A is a block diagram of an authority control apparatus according to an exemplary embodiment;
图2B是根据另一示例性实施例示出的一种权限控制装置的框图;2B is a block diagram of an authority control apparatus according to another exemplary embodiment;
图3是根据一示例性实施例示出的一种装置的框图。FIG. 3 is a block diagram of an apparatus, according to an exemplary embodiment.
具体实施方式detailed description
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. The following description refers to the same or similar elements in the different figures unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with aspects of the present disclosure as detailed in the appended claims.
在相关技术中,由于操作***向应用提供了在锁屏界面上显示窗口的功能,但并未对使用该功能的权限进行控制,导致部分应用滥用该功能,影响用户操作及***性能。基于此,本公开实施例提供了一种权限控制方法,和基于这个方法的装置,以解决上述相关技术中存在的问题。本公开实施例提供的技术方案,核心思想是在应用权限管理器(Application Operations Manager)中增加锁屏上显示权限,锁屏上显示权限是指在锁屏界面上显示窗口的权限。通过应用权限管理器对终端设备中安装的各个应用是否具备该权限进行管理,仅允许具备该锁屏上显示权限的应用在锁屏界面上显示窗口,避免未经允许的应用滥用在锁屏界面上显示窗口的功能。In the related art, since the operating system provides the application with the function of displaying the window on the lock screen interface, the right to use the function is not controlled, which causes some applications to abuse the function, affecting user operation and system performance. Based on this, 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 increase the display permission on the lock screen in the Application Operations Manager, and the display permission on the lock screen refers to the permission to display the window on the lock screen interface. The application rights manager manages whether each application installed in the terminal device has the permission, and only the application having the display permission on the lock screen is allowed to display the window on the lock screen interface, thereby preventing the unauthorized application from being abused in the lock screen interface. The function of the window is displayed.
本公开实施例提供的方法,各步骤的执行主体可以是终端设备,如手机、平板电脑、电子书阅读器、多媒体播放设备、PDA(Personal Digital Assistant,个人数字助理)、可穿戴设备等。在本公开实施例中,对终端设备的操作***的类型不作限定,如Android(安卓)操作***、iOS操作***、Windows Phone操作***等。 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. In the embodiment of the present disclosure, 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.
图1是根据一示例性实施例示出的一种权限检测方法的流程图。该方法可应用于终端设备中。该方法可以包括如下几个步骤: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:
在步骤101中,获取应用发送的窗口显示请求。In step 101, a window display request sent by the application is obtained.
当应用需要显示窗口时,向***服务发送窗口显示请求,窗口显示请求用于请求显示窗口。在本公开实施例中,对应用的种类不作限定,其可以是终端设备中安装运行的各类应用程序,如社交应用、通话通讯应用、网购支付应用、生活消费类应用、影音播放应用、安全杀毒应用、浏览器等。在本公开实施例中,应用的窗口(window)即为应用的用户界面(User Interface,UI),也可称为界面。在本公开实施例中,***服务可以是窗口管理服务,如Android***的WindowManagerService,窗口管理服务用于对***中所有的窗口进行管理。When the application needs to display the window, a window display request is sent to the system service, and the window display request is used to request the display window. In the embodiment of the present disclosure, 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. In the embodiment of the present disclosure, the window of the application is the 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 the 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 bit, and the flag bit is used to indicate whether the window is displayed on the lock screen interface. Exemplarily, the window display request carries a layout parameter WindowManager.LayoutParams, and the layout parameter includes a flag bit flag, and the flag bit FLAG_SHOW_WHEN_LOCKED in the flag parameter flag is used to indicate whether the window is displayed 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 screen is not in the lock screen interface. The window is displayed. If the application wants to display a window on the lock screen, 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 scenarios:
1,获取应用发送的添加窗口请求,添加窗口请求用于请求添加窗口;1. Obtain an add window request sent by the application, and add a window request for requesting to add a window;
以Android***为例,窗口管理服务提供有WindowManagerService.addWindow方法,应用可通过调用该方法向窗口管理服务发送添加窗口请求。Taking the Android system as an example, the window management service provides a WindowManagerService.addWindow method, and the application can send an add window request to the window management service by calling this method.
2、获取应用发送的重新布局窗口请求,重新布局窗口请求用于请求重新布局窗口。2. Get the re-layout window request sent by the application, and the re-layout window request is used to request the re-layout window.
以Android***为例,窗口管理服务提供有WindowManagerService.relayoutWindow方法,应用可通过调用该方法向窗口管理服务发送重新布局窗口请求。Taking the Android system as an example, the window management service provides a WindowManagerService.relayoutWindow method, and the application can send a re-layout window request to the window management service by calling the method.
在步骤102中,检测窗口显示请求是否用于请求在锁屏界面上显示窗口。 In step 102, the detection window displays whether the request is used to request that the window be displayed on the lock screen interface.
***服务获取到应用发送的窗口显示请求之后,对该请求进行解析,检测该请求是否用于请求在锁屏界面上显示窗口。在一个示例中,***服务读取窗口显示请求中携带的标志位;根据标志位的值,确定窗口显示请求是否用于请求在锁屏界面上显示窗口。例如,当标志位的值为第一值时,***服务确定窗口显示请求用于请求在锁屏界面上显示窗口;当标志位的值为第二值时,***服务确定窗口显示请求并非用于请求在锁屏界面上显示窗口。After the system service obtains the window display request sent by the application, the request is parsed to detect whether the request is used to request to display the window on the lock screen interface. In one example, the system service read window displays the flag bits carried in the request; based on the value of the flag bit, determines whether the window display request is used to request that the window be displayed on the lock screen interface. For example, when the value of the flag bit is the first value, the system service determination window display request is used to request to display the window on the lock screen interface; when the value of the flag bit is the second value, the system service determination window display request is not used for Request to display the window on the lock screen.
另外,在本公开实施例中,应用的窗口在锁屏界面上显示,是指应用的窗口(也即界面)叠加在锁屏界面的上层进行显示。In addition, in the embodiment of the present disclosure, the window of the application is displayed on the lock screen interface, which means that the window of the application (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 used to request to display the window on the lock screen interface, it is detected 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 used to request 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. Among them, 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 adding the display permission on the lock screen in the application rights manager in advance, the system can perform rights management on the function of displaying the window on the lock screen interface. Illustratively, 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 is used to uniquely identify the permission. In the application rights manager, the identifiers corresponding to different permissions are also different.
可选地,本步骤可以包括如下几个子步骤:Optionally, this step may include the following sub-steps:
1,调用应用权限管理器的权限检测方法,向权限检测方法发送权限检测请求;1. Calling the permission detection method of the application rights manager, and sending a permission detection request to the permission detection method;
其中,权限检测请求中携带应用的标识,应用的标识用于唯一标识一个应用。可选地,应用的标识包括:应用的包名(packagename)和当前***所对应的UID。应用的包名和当前***所对应的UID可唯一标识当前***中的一个应用,即便是终端设备支持多***,也能够对***进行区分,准确确定当前***中发出请求的应用。另外,应用可在窗口显示请求中携带应用的标识,相应地,***服务可从窗口显示请求中获取应用的标识。The permission detection request carries an identifier of the application, and the identifier of the application is used to uniquely identify an application. Optionally, 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. In addition, the application may carry the identifier of the application in the window display request, and accordingly, the system service may obtain the identifier of the application from the window display request.
权限检测方法用于从应用权限管理器中查询获取应用是否具备锁屏上显示权限。以Android***为例,WindowManagerService可调用AppOpsManager.checkOpNoThrow方法,并向该方法发送携带有应用的标识的权限检测请求。The permission detection method is used to query whether the application has the display permission on the lock screen from the application permission manager. Taking the Android system as an example, WindowManagerService can call the AppOpsManager.checkOpNoThrow method, and send a permission detection request carrying the identifier of the application to the 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,表示应用不具备锁屏上显示权限。Among them, 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 identifier of the application, the application permission manager queries whether the application has the display permission on the lock screen. If the application has the display permission on the lock screen, the AppOpsManager.checkOpNoThrow method returns AppOpsManager.MODE_ALLOWED to the WindowManagerService, indicating that the application has the display permission on the lock screen; if the application does not have the display permission on the lock screen, the AppOpsManager.checkOpNoThrow method returns the AppOpsManager to the WindowManagerService. MODE_IGNORE, indicating that the application does not have display permission on the lock screen.
在一个示例中,以应用请求添加窗口为例,用于实现检测应用是否具备锁屏上显示权限的代码示例如下:In one example, taking the application request to add a window as an example, an example of code for implementing detection of whether an application has display permission on a lock screen is as follows:
Figure PCTCN2016099065-appb-000001
Figure PCTCN2016099065-appb-000001
Figure PCTCN2016099065-appb-000002
Figure PCTCN2016099065-appb-000002
另外,若窗口显示请求并非用于请求在锁屏界面上显示窗口,则***服务按照原始的正常处理流程对窗口显示请求进行处理。In addition, if the window display request is not for requesting to display the 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 display permission 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 the 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 The window is not displayed 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 changes the value of the flag bit FLAG_SHOW_WHEN_LOCKED carried in the window display request from 1 to 0. The system service then processes the modified window display request in accordance with the original normal processing flow. Since the value of the flag bit for indicating whether to request the display of the window on the lock screen interface has been changed from the first value to the second value, the window for which the application request is displayed is not displayed on the lock screen interface.
另外,若应用具备锁屏上显示权限,则***服务不对窗口显示请求的参数进行修改,按照原始的正常处理流程对窗口显示请求进行处理。In addition, if the application has the display permission 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.
综上所述,本实施例提供的方法,通过获取应用发送的窗口显示请求,检测窗口显示请求是否用于请求在锁屏界面上显示窗口,若是则继续检测该应用是否具备锁屏上显示权限,若不具备则禁止该应用的窗口在锁屏界面上显示;由于增加了锁屏上显示权限,仅允许具备该锁屏上显示权限的应用在锁屏界面上显示窗口,避免未经允许的应用滥用在锁屏界面上显示窗口的功能,避免影响用户操作,提高***性能。In summary, the method provided in this embodiment obtains a window display request sent by an application, and detects whether the window display request is used to request to display a window on the lock screen interface, and if yes, continues to detect whether the application has the display permission on the lock screen. If it is not available, the application window is prohibited from being displayed on the lock screen interface; since the display permission on the lock screen is increased, only the application having the display permission on the lock screen is allowed to display the window on the lock screen interface, thereby avoiding unauthorized permission. Application abuse displays the function of the window on the lock screen to avoid affecting user operations and improving system performance.
需要补充说明的是,应用是否具备锁屏上显示权限,可以由***默认设置,也可由用户自定义设置。It should be added that the application has the display permission on the lock screen, which can be set by the system default or by the user.
可选地,操作***所对应的云端服务器中可分别统计为各个应用开启/关闭锁屏上显示权限的用户数量。对于某一应用来说,云端服务器统计为该应用开启锁屏上显示权限的用户数量和为该应用关闭锁屏上显示权限的用户数量,根据上述统计结果确定该应用的锁屏上显示权限的推荐开关设置。示例性地,云端服务器根据为该应用开启锁屏上显示权限的用户数量和关闭锁屏上显示权 限的用户数量的比例,确定该应用的锁屏上显示权限的推荐开关设置。在终端设备安装该应用之后,云端服务器可将该应用的锁屏上显示权限的推荐开关设置发送给终端设备;相应地,终端设备接收云端服务器发送的该应用的锁屏上显示权限的推荐开关设置。推荐开关设置是指推荐开启或关闭锁屏上显示权限。终端设备根据推荐开关设置为应用开启或关闭锁屏上显示权限。在一个示例中,终端设备根据该推荐开关设置自动设置为该应用开启或关闭锁屏上显示权限。例如,若推荐开关设置为开启,则终端设备为应用开启锁屏上显示权限;若推荐开关设置为关闭,则终端设备为应用关闭锁屏上显示权限。在另一示例中,终端设备将该推荐开关设置进行显示,由用户结合该推荐开关设置和自身实际需求设置为该应用开启或关闭锁屏上显示权限,终端设备获取用户设置的权限设置指示,根据用户设置的权限设置指示为应用开启或关闭锁屏上显示权限。另外,云端服务器可在终端设备安装应用之后,向终端设备发送该应用的锁屏上显示权限的推荐开关设置;云端服务器也可每隔预定时间间隔向终端设备发送该应用的锁屏上显示权限的推荐开关设置。Optionally, the number of users that open/close the display permission on the lock screen for each application may be separately counted in the cloud server corresponding to the operating system. For an application, the cloud server collects the number of users who have displayed the permission on the lock screen for the application and the number of users who have turned off the display permission on the lock screen for the application, and determines the display permission on the lock screen of the application according to the above statistical result. Recommended switch settings. Illustratively, the cloud server displays the number of users who have the display permission on the lock screen for the application and turns off the display right on the lock screen. The ratio of the number of restricted users determines the recommended switch settings for display permissions on the lock screen of the application. After the terminal device installs the application, the cloud server may 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 for displaying the permission on the lock screen of the application sent by the cloud server. Settings. The recommended switch setting refers to the recommendation to enable or disable the display permission on the lock screen. The terminal device sets the permission to open or close the lock screen according to the recommended switch setting. In one example, the terminal device automatically sets the display permission on the lock screen 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 opens the display permission on the lock screen for the application; if the recommended switch is set to off, the terminal device displays the permission on the lock screen for the application. In another example, the terminal device displays the recommended switch setting, and the user sets the permission setting on the lock screen to be turned on or off by the user in combination with the recommended switch setting and the actual requirement of the user, and the terminal device acquires the permission setting indication set by the user. The display permission on the lock screen is turned on or off for the application according to the permission setting indication set by the user. In addition, after the terminal device installs the application, the cloud server may send the recommended switch setting for displaying the permission on the lock screen of the application to the terminal device; the cloud server may also send the display permission on the lock screen of the application to the terminal device every predetermined time interval. Recommended switch settings.
在一个示例中,对于某一应用来说,若为该应用开启锁屏上显示权限的用户数量大于为该应用关闭锁屏上显示权限的用户数量,则云端服务器确定该应用的锁屏上显示权限的推荐开关设置为开启;若为该应用开启锁屏上显示权限的用户数量小于为该应用关闭锁屏上显示权限的用户数量,则云端服务器确定该应用的锁屏上显示权限的推荐开关设置为关闭。In an example, for an application, if the number of users who open the display permission on the lock screen for the application is greater than the number of users who turn off the display permission on the lock screen for the application, the cloud server determines that the lock screen of the application is displayed. The recommendation switch of the permission is set to be enabled; if the number of users for displaying the permission on the lock screen for the application is less than the number of users for displaying the permission on the lock screen for the application, the cloud server determines the recommended switch for displaying the permission on the lock screen of the application. Set to off.
在另一示例中,对于某一应用来说,若为该应用开启锁屏上显示权限的用户数量占用户总数的比例大于第一阈值,则云端服务器确定该应用的锁屏上显示权限的推荐开关设置为开启;若为该应用开启锁屏上显示权限的用户数量占用户总数的比例小于第二阈值,则云端服务器确定该应用的锁屏上显示权限的推荐开关设置为关闭。其中,第一阈值等于第二阈值,或者,第一阈值大于第二阈值。用户总数是指为该应用开启锁屏上显示权限的用户数量与为该应用关闭锁屏上显示权限的用户数量的总和。In another example, for an application, if the ratio of the number of users displaying the permission on the lock screen to the total number of users is greater than the first threshold, the cloud server determines the recommendation of the permission displayed on the lock screen of the application. The switch is set to be on; if the ratio of the number of users displaying the permission on the lock screen to the total number of users is less than the second threshold, the cloud server determines that the recommended switch for displaying the permission on the lock screen 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 refers to the sum of the number of users who have displayed permission on the lock screen for the application and the number of users who have turned off the display permission on the lock screen for the application.
另外,为了便于用户调整应用的锁屏上显示权限的开关。终端设备的***设置中可相应增加各个应用的锁屏上显示权限的开关控件,以便于用户通过该开关控件进行自定义设置。例如,在设置功能—授权管理功能—应用权限管理功能中增加上述开关控件,用户通过调节开关控件便可为应用开启或关闭锁屏上显示权限。 In addition, in order to facilitate the user to adjust the switch of the display permission on the lock screen of the application. In the system setting of the terminal device, the switch control for displaying the permission on the lock screen of each application can be correspondingly increased, so that the user can customize the setting through the switch control. 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 on or off the display permission on the lock screen for the application by adjusting the switch control.
下述为本公开装置实施例,可以用于执行本公开方法实施例。对于本公开装置实施例中未披露的细节,请参照本公开方法实施例。The following is an apparatus embodiment of the present disclosure, which may be used to implement the method embodiments of the present disclosure. For details not disclosed in the disclosed device embodiments, please refer to the method embodiments of the present disclosure.
图2A是根据一示例性实施例示出的一种权限控制装置的框图。该装置具有实现上述方法示例的功能,所述功能可以由硬件实现,也可以由硬件执行相应的软件实现。该装置可以包括:请求获取模块210、请求检测模块220、权限检测模块230和禁止显示模块240。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 request detection module 220, a rights detection module 230, and a forbidden display module 240.
请求获取模块210,被配置为获取应用发送的窗口显示请求。The request obtaining module 210 is configured to acquire a window display request sent by the application.
请求检测模块220,被配置为检测所述窗口显示请求是否用于请求在锁屏界面上显示窗口。The request detection module 220 is configured to detect whether the window display request is used to request to display a window on the lock screen interface.
权限检测模块230,被配置为当所述窗口显示请求用于请求在所述锁屏界面上显示窗口时,检测所述应用是否具备锁屏上显示权限。其中,所述锁屏上显示权限是指在所述锁屏界面上显示窗口的权限。The permission detecting module 230 is configured to detect whether the application has the display permission on the lock screen when the window display request is used to request to display the window on the lock screen interface. The display permission on the lock screen refers to the permission to display the window on the lock screen interface.
禁止显示模块240,被配置为当所述应用不具备所述锁屏上显示权限时,禁止所述应用的窗口在所述锁屏界面上显示。The display inhibiting 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.
综上所述,本实施例提供的装置,通过获取应用发送的窗口显示请求,检测窗口显示请求是否用于请求在锁屏界面上显示窗口,若是则继续检测该应用是否具备锁屏上显示权限,若不具备则禁止该应用的窗口在锁屏界面上显示;由于增加了锁屏上显示权限,仅允许具备该锁屏上显示权限的应用在锁屏界面上显示窗口,避免未经允许的应用滥用在锁屏界面上显示窗口的功能,避免影响用户操作,提高***性能。In summary, the device provided in this embodiment obtains a window display request sent by an application, and detects whether the window display request is used to request to display a window on the lock screen interface, and if yes, continues to detect whether the application has the display permission on the lock screen. If it is not available, the application window is prohibited from being displayed on the lock screen interface; since the display permission on the lock screen is increased, only the application having the display permission on the lock screen is allowed to display the window on the lock screen interface, thereby avoiding unauthorized permission. Application abuse displays the function of the window on the lock screen to avoid affecting user operations and improving system performance.
在基于图2A所示实施例提供的一个可选实施例中,所述窗口显示请求中携带标志位,所述标志位用于指示是否在所述锁屏界面上显示窗口。In an optional embodiment provided based on the embodiment shown in FIG. 2A, the window display request carries a flag bit for indicating whether to display a window on the lock screen interface.
可选地,如图2B所示,所述请求检测模块220,包括:读取子模块220a和确定子模块220b。Optionally, as shown in FIG. 2B, the request detecting module 220 includes: a reading submodule 220a and a determining submodule 220b.
读取子模块220a,被配置为读取所述窗口显示请求中携带的所述标志位。The read sub-module 220a is configured to read the flag bit carried in the window display request.
确定子模块220b,被配置为根据所述标志位的值,确定所述窗口显示请求是否用于请求在所述锁屏界面上显示窗口。The determining sub-module 220b is configured to determine, based on the value of the flag bit, whether the window display request is for requesting to display a window on the lock screen interface.
可选地,所述禁止显示模块240,被配置为将所述标志位的值由第一值修改为第二值。其中,所述第一值用于指示在所述锁屏界面上显示窗口,所述第二值用于指示不在所述锁屏界面上显示窗口。 Optionally, the forbidden display module 240 is configured to modify the value of the flag bit from a first value to a second value. 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 that the window is not displayed 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 rights detection module 230 includes: a calling submodule 230a and an obtaining submodule 230b.
调用子模块230a,被配置为调用应用权限管理器的权限检测方法,向所述权限检测方法发送权限检测请求。其中,所述权限检测请求中携带所述应用的标识,所述权限检测方法用于从所述应用权限管理器中查询获取所述应用是否具备所述锁屏上显示权限。The calling submodule 230a 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 display permission on the lock screen.
获取子模块230b,被配置为获取所述权限检测方法返回的权限检测结果。其中,所述权限检测结果为:所述应用具备所述锁屏上显示权限,或者,所述应用不具备所述锁屏上显示权限。The obtaining submodule 230b 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 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 apparatus further includes: an identifier acquisition module 250.
标识获取模块250,被配置为从所述窗口显示请求中获取所述应用的标识。其中,所述应用的标识包括:所述应用的包名和当前***所对应的UID。The identity obtaining module 250 is configured to obtain an identifier of the application from the window display request. The identifier of the application includes: a package name of the application and a 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 obtaining module 210 is configured to: acquire an add window request sent by the application, and add the window request. Used to request to add a window; or, to obtain a re-layout window request sent by the application, the re-layout window request is used to request a re-layout window.
在基于图2A所示实施例提供的另一可选实施例中,所述装置还包括:设置接收模块和权限开关模块。In another optional embodiment provided based on the embodiment shown in FIG. 2A, the apparatus further includes: a setting receiving module and a rights switch module.
设置接收模块,被配置为接收云端服务器发送的所述应用的所述锁屏上显示权限的推荐开关设置,所述推荐开关设置由所述云端服务器根据为所述应用开启所述锁屏上显示权限的用户数量和为所述应用关闭所述锁屏上显示权限的用户数量确定。Setting a receiving module, configured to receive a recommended switch setting for displaying permission on the lock screen of the application sent by the cloud server, where the recommended switch setting is started by the cloud server according to the application for opening the lock screen The number of users of the rights and the number of users who have turned off the display permissions on the lock screen for the application.
权限开关模块,被配置为根据所述推荐开关设置为所述应用开启或关闭所述锁屏上显示权限。The permission switch module is configured to enable or disable the display permission on the lock screen according to the recommended switch setting.
需要说明的一点是,上述实施例提供的装置在实现其功能时,仅以上述各个功能模块的划分进行举例说明,实际应用中,可以根据实际需要而将上述功能分配由不同的功能模块完成,即将设备的内容结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。It should be noted that, when the device provided by the foregoing embodiment implements its function, only the division of each functional module described above is illustrated. In actual applications, the function distribution may be completed by different functional modules according to actual needs. The content structure of the device is divided into different functional modules to complete all or part of the functions described above.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关 该方法的实施例中进行了详细描述,此处将不做详细阐述说明。With regard to the apparatus in the above embodiment, the specific manner in which each module performs an operation has been related The method is described in detail in the embodiment, and will not be explained in detail herein.
本公开一示例性实施例还提供了一种权限控制装置,能够实现本公开提供的权限控制方法。该装置包括:处理器,以及用于存储处理器的可执行指令的存储器。其中,处理器被配置为: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. Wherein the processor is configured to:
获取应用发送的窗口显示请求;Get the window display request sent by the application;
检测所述窗口显示请求是否用于请求在锁屏界面上显示窗口;Detecting whether the window display request is used to request to display a window on a lock screen interface;
若所述窗口显示请求用于请求在所述锁屏界面上显示窗口,则检测所述应用是否具备锁屏上显示权限;其中,所述锁屏上显示权限是指在所述锁屏界面上显示窗口的权限;If the window display request is used to request to display a window on the lock screen interface, detecting whether the application has a display permission on the lock screen; wherein the display screen display permission refers to the lock screen interface Display window permissions;
若所述应用不具备所述锁屏上显示权限,则禁止所述应用的窗口在所述锁屏界面上显示。If the application does not have the display permission on the lock screen, the window of the application is prohibited from being displayed on the lock screen interface.
可选地,所述窗口显示请求中携带标志位,所述标志位用于指示是否在所述锁屏界面上显示窗口。Optionally, the window display request carries a flag bit, and the flag bit is used to indicate whether a window is displayed on the lock screen interface.
可选地,处理器被配置为:Optionally, the processor is configured to:
读取所述窗口显示请求中携带的所述标志位;Reading the window to display the flag bit carried in the request;
根据所述标志位的值,确定所述窗口显示请求是否用于请求在所述锁屏界面上显示窗口。And determining, according to the value of the flag bit, whether the window display request is used to request to display a window on the lock screen interface.
可选地,处理器被配置为:Optionally, the processor is configured to:
将所述标志位的值由第一值修改为第二值;Changing the value of the flag bit from the first value to the second value;
其中,所述第一值用于指示在所述锁屏界面上显示窗口,所述第二值用于指示不在所述锁屏界面上显示窗口。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 that the window is not displayed on the lock screen interface.
可选地,处理器被配置为:Optionally, the processor is configured to:
调用应用权限管理器的权限检测方法,向所述权限检测方法发送权限检测请求;其中,所述权限检测请求中携带所述应用的标识,所述权限检测方法用于从所述应用权限管理器中查询获取所述应用是否具备所述锁屏上显示权限;Calling the permission detection method of the application rights manager, and sending the 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 use the application permission manager The middle query obtains whether the application has the display permission on the lock screen;
获取所述权限检测方法返回的权限检测结果;其中,所述权限检测结果为:所述应用具备所述锁屏上显示权限,或者,所述应用不具备所述锁屏上显示权限。Obtaining 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 display permission on the lock screen.
可选地,处理器还被配置为:Optionally, the processor is further configured to:
从所述窗口显示请求中获取所述应用的标识; Obtaining an identifier of the application from the window display request;
其中,所述应用的标识包括:所述应用的包名和当前***所对应的UID。The identifier of the application includes: a package name of the application and a UID corresponding to the current system.
可选地,处理器被配置为:Optionally, the processor is configured to:
获取所述应用发送的添加窗口请求,所述添加窗口请求用于请求添加窗口;Obtaining an add window request sent by the application, where the add window request is used to request to add a window;
或者,or,
获取所述应用发送的重新布局窗口请求,所述重新布局窗口请求用于请求重新布局窗口。Acquiring a re-layout window request sent by the application, the re-layout window requesting for requesting a re-layout window.
可选地,处理器还被配置为:Optionally, the processor is further configured to:
接收云端服务器发送的所述应用的所述锁屏上显示权限的推荐开关设置,所述推荐开关设置由所述云端服务器根据为所述应用开启所述锁屏上显示权限的用户数量和为所述应用关闭所述锁屏上显示权限的用户数量确定;Receiving, by the cloud server, a recommended switch setting for displaying permission on the lock screen of the application sent by the cloud server, where the recommendation switch is set by the cloud server according to the number of users that open the display permission on the lock screen for the application Determining, by the application, the number of users who display the permission on the lock screen;
根据所述推荐开关设置为所述应用开启或关闭所述锁屏上显示权限。Setting the permission on the lock screen to be turned on or off according to the recommended switch setting.
图3是根据一示例性实施例示出的一种装置300的框图。例如,装置300可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。FIG. 3 is a block diagram of an apparatus 300, according to an exemplary embodiment. For example, 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.
参照图3,装置300可以包括以下一个或多个组件:处理组件302,存储器304,电源组件306,多媒体组件308,音频组件310,输入/输出(I/O)接口312,传感器组件314,以及通信组件316。Referring to FIG. 3, 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.
处理组件302通常控制装置300的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件302可以包括一个或多个处理器320来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件302可以包括一个或多个模块,便于处理组件302和其他组件之间的交互。例如,处理组件302可以包括多媒体模块,以方便多媒体组件308和处理组件302之间的交互。 Processing component 302 typically controls the overall operation of device 300, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. Processing component 302 can include one or more processors 320 to execute instructions to perform all or part of the steps described above. Moreover, processing component 302 can include one or more modules to facilitate interaction between component 302 and other components. For example, processing component 302 can include a multimedia module to facilitate interaction between multimedia component 308 and processing component 302.
存储器304被配置为存储各种类型的数据以支持在装置300的操作。这些数据的示例包括用于在装置300上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器304可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器, 快闪存储器,磁盘或光盘。 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. Programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, Flash memory, disk or CD.
电源组件306为装置300的各种组件提供电力。电源组件306可以包括电源管理***,一个或多个电源,及其他与为装置300生成、管理和分配电力相关联的组件。 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.
多媒体组件308包括在所述装置300和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件308包括一个前置摄像头和/或后置摄像头。当装置300处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜***或具有焦距和光学变焦能力。The multimedia component 308 includes a screen between the device 300 and the user that provides an output interface. In some embodiments, 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. 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 and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
音频组件310被配置为输出和/或输入音频信号。例如,音频组件310包括一个麦克风(MIC),当装置300处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器304或经由通信组件316发送。在一些实施例中,音频组件310还包括一个扬声器,用于输出音频信号。The audio component 310 is configured to output and/or input an audio signal. For example, 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. In some embodiments, audio component 310 also includes a speaker for outputting an audio signal.
I/O接口312为处理组件302和***接口模块之间提供接口,上述***接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 312 provides an interface between the processing component 302 and the peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a 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 status assessment of various aspects to device 300. For example, 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. In some embodiments, the sensor assembly 314 can also include an acceleration sensor, a gyro 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)技术和其他技术来实现。 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. In an exemplary embodiment, communication component 316 receives broadcast signals or broadcast associated 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 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.
在示例性实施例中,装置300可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, 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.
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器304,上述指令可由装置300的处理器320执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a 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. For example, 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.
一种非临时性计算机可读存储介质,当所述存储介质中的指令由装置300的处理器执行时,使得装置300能够执行上述方法。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和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。It should be understood that "a plurality" as referred to herein means two or more. "and/or", describing the association relationship of the associated objects, indicating that there may be three relationships, for example, A and/or B, which may indicate that there are three cases where A exists separately, A and B exist at the same time, and B exists separately. The character "/" generally indicates that the contextual object is an "or" relationship.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will be apparent to those skilled in the <RTIgt; The present application is intended to cover any variations, uses, or adaptations of the present disclosure, which are in accordance with the general principles of the disclosure and include common general knowledge or common technical means in the art that are not disclosed in the present disclosure. . The specification and examples are to be regarded as illustrative only,
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。 It is to be understood that the invention is not limited to the details of the details and The scope of the disclosure is to be limited only by the appended claims.

Claims (17)

  1. 一种权限控制方法,其特征在于,所述方法包括:A method for controlling rights, characterized in that the method comprises:
    获取应用发送的窗口显示请求;Get the window display request sent by the application;
    检测所述窗口显示请求是否用于请求在锁屏界面上显示窗口;Detecting whether the window display request is used to request to display a window on a lock screen interface;
    若所述窗口显示请求用于请求在所述锁屏界面上显示窗口,则检测所述应用是否具备锁屏上显示权限;其中,所述锁屏上显示权限是指在所述锁屏界面上显示窗口的权限;If the window display request is used to request to display a window on the lock screen interface, detecting whether the application has a display permission on the lock screen; wherein the display screen display permission refers to the lock screen interface Display window permissions;
    若所述应用不具备所述锁屏上显示权限,则禁止所述应用的窗口在所述锁屏界面上显示。If the application does not have the display permission on the lock screen, the window of the application is prohibited from being displayed on the lock screen interface.
  2. 根据权利要求1所述的方法,其特征在于,所述窗口显示请求中携带标志位,所述标志位用于指示是否在所述锁屏界面上显示窗口。The method according to claim 1, wherein the window display request carries a flag bit, and the flag bit is used to indicate whether a window is displayed on the lock screen interface.
  3. 根据权利要求2所述的方法,其特征在于,所述检测所述窗口显示请求是否用于请求在锁屏界面上显示窗口,包括:The method according to claim 2, wherein the detecting whether the window display request is used to request to display a window on a lock screen interface comprises:
    读取所述窗口显示请求中携带的所述标志位;Reading the window to display the flag bit carried in the request;
    根据所述标志位的值,确定所述窗口显示请求是否用于请求在所述锁屏界面上显示窗口。And determining, according to the value of the flag bit, whether the window display request is used to request to display a window on the lock screen interface.
  4. 根据权利要求2所述的方法,其特征在于,所述禁止所述应用的窗口在所述锁屏界面上显示,包括:The method according to claim 2, wherein the prohibiting the window of the application from being displayed on the lock screen interface comprises:
    将所述标志位的值由第一值修改为第二值;Changing the value of the flag bit from the first value to the second value;
    其中,所述第一值用于指示在所述锁屏界面上显示窗口,所述第二值用于指示不在所述锁屏界面上显示窗口。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 that the window is not displayed on the lock screen interface.
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述检测所述应用是否具备锁屏上显示权限,包括:The method according to any one of claims 1 to 4, wherein the detecting whether the application has a display permission on a lock screen comprises:
    调用应用权限管理器的权限检测方法,向所述权限检测方法发送权限检测请求;其中,所述权限检测请求中携带所述应用的标识,所述权限检测方法用于从所述应用权限管理器中查询获取所述应用是否具备所述锁屏上显示权限; Calling the permission detection method of the application rights manager, and sending the 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 use the application permission manager The middle query obtains whether the application has the display permission on the lock screen;
    获取所述权限检测方法返回的权限检测结果;其中,所述权限检测结果为:所述应用具备所述锁屏上显示权限,或者,所述应用不具备所述锁屏上显示权限。Obtaining 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 display permission on the lock screen.
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:The method of claim 5, wherein the method further comprises:
    从所述窗口显示请求中获取所述应用的标识;Obtaining an identifier of the application from the window display request;
    其中,所述应用的标识包括:所述应用的包名和当前***所对应的用户个人身份识别码UID。The identifier of the application includes: a package name of the application and a user personal identification code UID corresponding to the current system.
  7. 根据权利要求1至6任一项所述的方法,其特征在于,所述获取应用发送的窗口显示请求,包括:The method according to any one of claims 1 to 6, wherein the obtaining a window display request sent by the application comprises:
    获取所述应用发送的添加窗口请求,所述添加窗口请求用于请求添加窗口;Obtaining an add window request sent by the application, where the add window request is used to request to add a window;
    或者,or,
    获取所述应用发送的重新布局窗口请求,所述重新布局窗口请求用于请求重新布局窗口。Acquiring a re-layout window request sent by the application, the re-layout window requesting for requesting a re-layout window.
  8. 根据权利要求1至7任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 7, wherein the method further comprises:
    接收云端服务器发送的所述应用的所述锁屏上显示权限的推荐开关设置,所述推荐开关设置由所述云端服务器根据为所述应用开启所述锁屏上显示权限的用户数量和为所述应用关闭所述锁屏上显示权限的用户数量确定;Receiving, by the cloud server, a recommended switch setting for displaying permission on the lock screen of the application sent by the cloud server, where the recommendation switch is set by the cloud server according to the number of users that open the display permission on the lock screen for the application Determining, by the application, the number of users who display the permission on the lock screen;
    根据所述推荐开关设置为所述应用开启或关闭所述锁屏上显示权限。Setting the permission on the lock screen to be turned on or off according to the recommended switch setting.
  9. 一种权限控制装置,其特征在于,所述装置包括:A permission control device, characterized in that the device comprises:
    请求获取模块,被配置为获取应用发送的窗口显示请求;The request acquisition module is configured to obtain a window display request sent by the application;
    请求检测模块,被配置为检测所述窗口显示请求是否用于请求在锁屏界面上显示窗口;a request detection module configured to detect whether the window display request is used to request to display a window on a lock screen interface;
    权限检测模块,被配置为当所述窗口显示请求用于请求在所述锁屏界面上显示窗口时,检测所述应用是否具备锁屏上显示权限;其中,所述锁屏上显示权限是指在所述锁屏界面上显示窗口的权限;The permission detecting module is configured to: when the window display request is used to request to display a window on the lock screen interface, detecting whether the application has a display permission on a lock screen; wherein the display permission on the lock screen refers to Displaying the permissions of the window on the lock screen interface;
    禁止显示模块,被配置为当所述应用不具备所述锁屏上显示权限时,禁止所述应用的窗口在所述锁屏界面上显示。 The display module is prohibited from being 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.
  10. 根据权利要求9所述的装置,其特征在于,所述窗口显示请求中携带标志位,所述标志位用于指示是否在所述锁屏界面上显示窗口。The apparatus according to claim 9, wherein said window display request carries a flag bit for indicating whether to display a window on said lock screen interface.
  11. 根据权利要求10所述的装置,其特征在于,所述请求检测模块,包括:The device according to claim 10, wherein the request detecting module comprises:
    读取子模块,被配置为读取所述窗口显示请求中携带的所述标志位;Reading a submodule configured to read the flag bit carried in the window display request;
    确定子模块,被配置为根据所述标志位的值,确定所述窗口显示请求是否用于请求在所述锁屏界面上显示窗口。The determining submodule is configured to determine, based on the value of the flag bit, whether the window display request is for requesting to display a window on the lock screen interface.
  12. 根据权利要求10所述的装置,其特征在于,The device of claim 10 wherein:
    所述禁止显示模块,被配置为将所述标志位的值由第一值修改为第二值;The inhibit display module is configured to modify a value of the flag bit from a first value to a second value;
    其中,所述第一值用于指示在所述锁屏界面上显示窗口,所述第二值用于指示不在所述锁屏界面上显示窗口。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 that the window is not displayed on the lock screen interface.
  13. 根据权利要求9至12任一项所述的装置,其特征在于,所述权限检测模块,包括:The device according to any one of claims 9 to 12, wherein the authority detecting module comprises:
    调用子模块,被配置为调用应用权限管理器的权限检测方法,向所述权限检测方法发送权限检测请求;其中,所述权限检测请求中携带所述应用的标识,所述权限检测方法用于从所述应用权限管理器中查询获取所述应用是否具备所述锁屏上显示权限;Calling 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 display permission on the 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 has the display permission on the lock screen, or the application does not have the lock The permissions are displayed on the screen.
  14. 根据权利要求13所述的装置,其特征在于,所述装置还包括:The device according to claim 13, wherein the device further comprises:
    标识获取模块,被配置为从所述窗口显示请求中获取所述应用的标识;An identifier obtaining module configured to obtain an identifier of the application from the window display request;
    其中,所述应用的标识包括:所述应用的包名和当前***所对应的用户个人身份识别码UID。The identifier of the application includes: a package name of the application and a user personal identification code UID corresponding to the current system.
  15. 根据权利要求9至14任一项所述的装置,其特征在于,所述请求获取模块,被配置为: The device according to any one of claims 9 to 14, wherein the request acquisition module is configured to:
    获取所述应用发送的添加窗口请求,所述添加窗口请求用于请求添加窗口;Obtaining an add window request sent by the application, where the add window request is used to request to add a window;
    或者,or,
    获取所述应用发送的重新布局窗口请求,所述重新布局窗口请求用于请求重新布局窗口。Acquiring a re-layout window request sent by the application, the re-layout window requesting for requesting a re-layout window.
  16. 根据权利要求9至15任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 9 to 15, wherein the device further comprises:
    设置接收模块,被配置为接收云端服务器发送的所述应用的所述锁屏上显示权限的推荐开关设置,所述推荐开关设置由所述云端服务器根据为所述应用开启所述锁屏上显示权限的用户数量和为所述应用关闭所述锁屏上显示权限的用户数量确定;Setting a receiving module, configured to receive a recommended switch setting for displaying permission on the lock screen of the application sent by the cloud server, where the recommended switch setting is started by the cloud server according to the application for opening the lock screen The number of users of the permission and the number of users who have turned off the display permission on the lock screen for the application;
    权限开关模块,被配置为根据所述推荐开关设置为所述应用开启或关闭所述锁屏上显示权限。The permission switch module is configured to enable or disable the display permission on the lock screen according to the recommended switch setting.
  17. 一种权限控制装置,其特征在于,所述装置包括:A permission control device, characterized in that the device comprises:
    处理器;processor;
    用于存储所述处理器的可执行指令的存储器;a memory for storing executable instructions of the processor;
    其中,所述处理器被配置为:Wherein the processor is configured to:
    获取应用发送的窗口显示请求;Get the window display request sent by the application;
    检测所述窗口显示请求是否用于请求在锁屏界面上显示窗口;Detecting whether the window display request is used to request to display a window on a lock screen interface;
    若所述窗口显示请求用于请求在所述锁屏界面上显示窗口,则检测所述应用是否具备锁屏上显示权限;其中,所述锁屏上显示权限是指在所述锁屏界面上显示窗口的权限;If the window display request is used to request to display a window on the lock screen interface, detecting whether the application has a display permission on the lock screen; wherein the display screen display permission refers to the lock screen interface Display window permissions;
    若所述应用不具备所述锁屏上显示权限,则禁止所述应用的窗口在所述锁屏界面上显示。 If the application does not have the display permission on the lock screen, the window of the application is prohibited from being displayed on the lock screen interface.
PCT/CN2016/099065 2016-09-14 2016-09-14 Permission control method and device WO2018049609A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2016/099065 WO2018049609A1 (en) 2016-09-14 2016-09-14 Permission control method and device
CN201680000874.4A CN106471513B (en) 2016-09-14 2016-09-14 Authority control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/099065 WO2018049609A1 (en) 2016-09-14 2016-09-14 Permission control method and device

Publications (1)

Publication Number Publication Date
WO2018049609A1 true WO2018049609A1 (en) 2018-03-22

Family

ID=58230943

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/099065 WO2018049609A1 (en) 2016-09-14 2016-09-14 Permission control method and device

Country Status (2)

Country Link
CN (1) CN106471513B (en)
WO (1) WO2018049609A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
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 equipment
CN111782126A (en) * 2020-06-28 2020-10-16 掌阅科技股份有限公司 Screen saver display method for reading application, computing equipment and computer storage medium

Citations (4)

* Cited by examiner, † Cited by third party
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
CN105117139A (en) * 2015-09-29 2015-12-02 北京金山安全软件有限公司 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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577594A (en) * 2013-11-13 2014-02-12 广州市久邦数码科技有限公司 Lock screen interface information pushing system and method
CN103761201B (en) * 2014-02-14 2017-10-10 北京猎豹移动科技有限公司 Terminal applies event-handling method and device
CN104615350B (en) * 2015-01-14 2017-12-22 小米科技有限责任公司 The method and device of information is shown on locking screen interface

Patent Citations (4)

* Cited by examiner, † Cited by third party
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
CN105117139A (en) * 2015-09-29 2015-12-02 北京金山安全软件有限公司 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

Also Published As

Publication number Publication date
CN106471513B (en) 2019-09-13
CN106471513A (en) 2017-03-01

Similar Documents

Publication Publication Date Title
US11727093B2 (en) Setting and terminating restricted mode operation on electronic devices
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
RU2628258C2 (en) Method and device for child mode processing
WO2016023367A1 (en) Method, apparatus and system for access verification
US10021543B2 (en) Short message service reading method and device
US8909297B2 (en) Access management
US20170300260A1 (en) Method, device and computer-readable storage medium for data migration
RU2636686C2 (en) Method and device for sending information in voice service
WO2018049609A1 (en) Permission control method and device
WO2018000710A1 (en) Method and device for displaying wifi signal icon and mobile terminal
KR101668209B1 (en) Traffic control method and device for mobile router
WO2018049610A1 (en) Permission control method and device
WO2018072193A1 (en) Method and device for controlling application to start automatically
CN107423146B (en) Method, device and system for controlling mutual calling of application programs
US10027629B2 (en) Short message service reading method and device
WO2018049611A1 (en) Permission control method and device
CN105760796B (en) Application security processing method and device
WO2017166461A1 (en) Method and apparatus for managing application program call
WO2017201692A1 (en) Application encryption method and device
CN112163192A (en) root authority acquisition method, root authority acquisition device, root authority acquisition medium and electronic equipment
US9674768B2 (en) Method and device for accessing wireless network
CN106980454B (en) Unlocking method and device
CN107133531B (en) Application lock use reminding method and device

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: 16915994

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: 16915994

Country of ref document: EP

Kind code of ref document: A1