CN112749030A - Clipboard control method and device and readable storage medium - Google Patents

Clipboard control method and device and readable storage medium Download PDF

Info

Publication number
CN112749030A
CN112749030A CN202110077417.8A CN202110077417A CN112749030A CN 112749030 A CN112749030 A CN 112749030A CN 202110077417 A CN202110077417 A CN 202110077417A CN 112749030 A CN112749030 A CN 112749030A
Authority
CN
China
Prior art keywords
clipboard
state
target application
permission state
application program
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110077417.8A
Other languages
Chinese (zh)
Inventor
黎子豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Meizu Technology Co Ltd
Original Assignee
Meizu Technology Co Ltd
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 Meizu Technology Co Ltd filed Critical Meizu Technology Co Ltd
Priority to CN202110077417.8A priority Critical patent/CN112749030A/en
Publication of CN112749030A publication Critical patent/CN112749030A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
    • 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/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to a clipboard control method, a clipboard control device and a readable storage medium, wherein the method comprises the following steps: the method comprises the steps that terminal equipment obtains an operation instruction input by a user and obtains a current first authority state of a clipboard corresponding to a target application program according to the operation instruction; if the first authority state is closed, switching the authority state of the clipboard corresponding to the target application program from the first authority state to a second authority state so that the target application program reads data stored in the clipboard; and when the first authority state is closed, the second authority state is opened. According to the method, the reading permission of the clipboard by the target application program is temporarily authorized, so that the target application program can successfully read the data stored in the clipboard aiming at the scene of active operation of a user when the permission state of the clipboard corresponding to the target application program is closed, the flexibility of clipboard control is improved, and the user experience is also improved.

Description

Clipboard control method and device and readable storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a clipboard control method and apparatus, and a readable storage medium.
Background
Clipboards are a common tool provided by terminal devices through which information can be passed and shared between different applications. At present, the access switch controls the access of the application program to the clipboard. Specifically, when the power switch is in an on state, the data stored in the clipboard can be read no matter the application program is in the foreground or the background; when the authority is in a closed state, no matter the application is in a foreground or a background, the data stored in the clipboard cannot be read.
The clipboard control mode has lower flexibility.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the present disclosure provides a clipboard control method, apparatus, and readable storage medium.
In a first aspect, the present disclosure provides a clipboard control method, including:
the terminal equipment acquires an operation instruction input by a user;
acquiring a current first authority state of a clipboard corresponding to a target application program according to the operation instruction;
if the first permission state is closed, switching the permission state of the clipboard corresponding to the target application program from the first permission state to a second permission state so that the target application program reads data stored in the clipboard;
and when the first authority state is closed, the second authority state is opened.
In some possible designs, after the target application reads the data stored in the clipboard, the method further comprises:
and switching the authority state of the clipboard corresponding to the target application program from the second authority state to the first authority state.
In some possible designs, before the obtaining the current first permission state of the clipboard corresponding to the target application according to the operation instruction, the method further includes:
determining whether the control targeted by the operation instruction is a target type control;
the obtaining of the current first permission state of the clipboard corresponding to the target application according to the operation instruction includes:
and if the control targeted by the operation instruction is a target type control, acquiring a current first permission state of a clipboard corresponding to the target application.
In some possible designs, the target type control is an input box control.
In some possible designs, if the first permission state is off, switching the permission state of the clipboard from the first permission state to a second permission state, so that the target application reads data stored in the clipboard, includes:
if the first authority state is closed, the terminal device calls an Application Programming Interface (API) to modify the value corresponding to the authority state of the clipboard from the value corresponding to the first authority state to the value corresponding to the second authority state, so that the target application program reads data stored in the clipboard.
In some possible designs, the operation instruction is generated by the terminal device according to a pressing operation of a user on a touch screen of the terminal device; or the operation instruction is generated by the terminal device according to a keyboard and mouse operation input by a user through an input device of the terminal device.
In a second aspect, the present disclosure also provides a clipboard control device, including:
the acquisition module is used for acquiring an operation instruction input by a user;
the processing module is used for acquiring the current first authority state of the clipboard corresponding to the target application program according to the operation instruction; and for determining whether the first permission status is off;
the processing module is further configured to switch the permission state of the clipboard from the first permission state to a second permission state if the first permission state is closed, so that the target application program reads data stored in the clipboard;
and when the first authority state is closed, the second authority state is opened.
In some possible designs, the processing module is further configured to switch the permission state of the clipboard corresponding to the target application from the second permission state to the first permission state.
In a third aspect, the present disclosure also provides an electronic device, including: memory, processor, and computer program instructions;
the memory configured to store the computer program instructions;
the processor configured to execute the computer program instructions, the processor executing the computer program instructions to perform the clipboard control method of any one of the first aspects.
In a fourth aspect, the present disclosure also provides a readable storage medium comprising: computer program instructions;
the computer program instructions, when executed by a processor, perform a clipboard control method as defined in any one of the first aspects.
The disclosure provides a clipboard control method, a clipboard control device and a readable storage medium, wherein the method comprises the following steps: the method comprises the steps that terminal equipment obtains an operation instruction input by a user and obtains a current first authority state of a clipboard corresponding to a target application program according to the operation instruction; if the first authority state is closed, switching the authority state of the clipboard corresponding to the target application program from the first authority state to a second authority state so that the target application program reads data stored in the clipboard; and when the first authority state is closed, the second authority state is opened.
According to the clipboard control method provided by the disclosure, the reading permission of the clipboard is temporarily authorized by the target application program, so that the target application program can successfully read the data stored in the clipboard aiming at the scene of active operation of a user when the permission state of the clipboard corresponding to the target application program is closed, the flexibility of clipboard control is improved, and the user experience is also improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a clipboard control method according to an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a clipboard control method according to another embodiment of the present disclosure;
fig. 3 is a flowchart illustrating a clipboard control method according to another embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a clipboard control device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
A clipboard (clipboard) is an area in the memory of a terminal device that can be used to store copied or pasted data, through which information can be transferred and shared between different applications. At present, the authority control scheme of the clipboard is controlled by an authority switch, and when the authority switch is turned on, no matter an application program is in a foreground or a background, the application program can read data stored in the clipboard; when the power switch is turned off, no matter the application program is in the foreground or the background, the application program cannot read the data stored in the clipboard.
In practical applications, after the permission switch is turned off, a user may actively perform a paste operation, and since the permission switch of the clipboard is turned off, data stored in the clipboard cannot be successfully read. That is to say, the flexibility of the clipboard control method is low, and the user demand cannot be met, resulting in poor user experience.
Therefore, how to improve the flexibility of clipboard control so that the use of a clipboard can better meet the user's needs is a problem that needs to be solved urgently at present.
Based on the above problem, the present disclosure provides a clipboard control method, which temporarily authorizes an access right of a target application program to a clipboard, so that when an authority state of the clipboard corresponding to the target application program is closed, the target application program can successfully read data stored in the clipboard for a scene of active operation of a user, thereby improving flexibility of clipboard control and user experience.
The clipboard control method provided by the present disclosure is described in detail below with several embodiments.
Fig. 1 is a flowchart illustrating a clipboard control method according to an embodiment of the present disclosure. The execution main body of the clipboard control method provided by the embodiment of the disclosure is the clipboard control device provided by the disclosure, and the device can be realized in any software and/or hardware mode. Illustratively, the clipboard control device may be a computer, a laptop, a smartphone, a smart wearable device, a personal digital assistant, and so forth.
As shown in fig. 1, the method of the present embodiment includes:
s101, the terminal equipment acquires an operation instruction input by a user.
In the scheme, the operation instruction acquired by the terminal device is actively input by the user, and the operation instruction is used for instructing the terminal device to read the data in the clipboard and paste the read data in the currently used target application program. It should be noted that the target application referred to herein is an application currently being operated by the user, and the target application may be an application carried by an operating system of the terminal device itself or another application installed by the user in a customized manner, which is not limited in this disclosure.
Alternatively, the operation instruction acquired by the terminal device may be generated by the terminal device according to a pressing operation of a user through a touch screen of the terminal device. For example, when the terminal device detects that the duration of long pressing of the touch screen of the terminal device by the user exceeds a preset duration, a paste option menu pops up, and then the terminal generates an operation instruction based on a paste option selected in the paste option menu by the user.
Alternatively, the operation instruction acquired by the terminal device may be generated by the terminal device according to a keyboard and mouse operation input by a user through an input device of the terminal device. For example, when the input device of the terminal device is a keyboard, and the shortcut key for the paste operation is "Ctrl + v", when the terminal device detects that the user inputs "Ctrl + v" through the keyboard, an operation instruction is generated. For another example, when the input device of the terminal device includes a mouse, the paste operation may call up a menu bar by clicking a right button of the mouse, and select a paste option in the menu bar for input; and when the terminal equipment detects that the user clicks a right mouse button and selects a paste option in the menu bar by clicking the right mouse button, generating an operation instruction.
In some cases, in order to ensure the security of the data stored in the clipboard, the terminal device may also determine whether the operation instruction is input by the user through some other means.
Optionally, the terminal device may be monitored by a camera to determine whether the user is currently using the terminal device.
Specifically, if the terminal device determines that the user is currently using the terminal device according to the camera monitoring, and the terminal device receives an operation instruction for the current user interface, the terminal device determines that the operation instruction is input by the user, and the terminal device can execute the operation instruction.
If the terminal equipment determines that no user uses the terminal equipment currently according to the monitoring of the camera, but the terminal equipment receives an operation instruction aiming at the current user interface, the terminal equipment determines that the operation instruction is not input by the user. For such a case, the terminal device may intercept the operation instruction.
Optionally, the terminal device may further determine whether the user is currently using the terminal device by determining whether the current user interface has an input method displayed thereon.
Specifically, if the current user interface of the terminal device has the input method displayed thereon, and the edit box of the current user interface is in the focus obtaining state, and the terminal device receives the operation instruction for the edit box of the current user interface, the terminal device determines that the operation instruction is input by the user, and the terminal device can execute the operation instruction.
Specifically, if the input method is displayed on the current user interface of the terminal device, and the edit box of the current user interface is not in the focus obtaining state, but the terminal device receives an operation instruction for the edit box of the current user interface, the terminal device determines that the operation instruction is not input by the user. For such a case, the terminal device may intercept the operation instruction.
It should be noted that, in some cases, the mode of determining whether the user uses the terminal device by monitoring through the camera and judging whether the current user interface has an input method display may be used independently or in combination, which is not limited in this disclosure.
In addition, the specific implementation manners of the terminal device acquiring the operation instruction input by the user and determining whether the operation instruction is input by the user are not limited to the above several implementation manners, and the embodiment of the present disclosure does not limit this.
And S102, acquiring the current first authority state of the clipboard corresponding to the target application program according to the operation instruction.
The purpose of this step is: and acquiring the current first authority state of the clipboard corresponding to the target application program to determine whether the temporary authorization of the clipboard authority is needed. It should be noted that the first permission state in this step is a reading permission state of the clipboard by the target application in the current state. The first privilege state is open or closed.
In one possible implementation manner, the terminal device obtains a first permission state by reading a value corresponding to a clipboard permission switch corresponding to a target application program; the corresponding value of the clipboard permission switch corresponding to the target application program when the clipboard permission switch is turned on is different from the corresponding value of the clipboard permission switch corresponding to the target application program when the clipboard permission switch is turned off.
Illustratively, the value of the clipboard permission switch corresponding to the target application is 1 when the clipboard permission switch is turned on, and the value of the clipboard permission switch corresponding to the target application is 0 when the clipboard permission switch is turned off. If the user pre-configures the clipboard permission switch corresponding to the target application program to be closed, the terminal device reads the value 0 of the clipboard permission switch corresponding to the target application program, and determines that the first permission state is closed according to the read value 0 corresponding to the permission switch; if the user configures the clipboard permission switch corresponding to the target application program to be turned on in advance, the terminal device reads the value 1 of the clipboard permission switch corresponding to the target application program, and determines that the first permission state is turned on according to the read value 1. In other cases, the corresponding value when the authority switch is turned on may be 0, and the corresponding value when the authority switch is turned off may be 1, and the process flow of acquiring the first authority state is similar to the foregoing process flow.
In practical applications, the value of the clipboard permission switch corresponding to the target application program may be set according to practical requirements, which is not limited in the embodiments of the present disclosure.
If the operating system of the terminal device is the Android system, the first authority state can be read by calling an unsafe checkOp method of AppOpsManager of the Android native system. And then, the terminal device can temporarily store the read value corresponding to the first permission state in the memory, so that the permission state of the clipboard corresponding to the target application program is switched from the second permission state to the first permission state subsequently.
The unsafecCheckOp method is a method for acquiring a value corresponding to the current authority state.
It should be noted that, if the operation instruction is generated by the terminal device according to a pressing operation of the user through the touch screen of the terminal device, the terminal device may acquire the first permission state when popping up the paste option menu.
If the operation instruction is generated by the terminal device according to the key and mouse operation input by the user through the input device of the terminal device, the terminal device can acquire the first authority state when detecting that the user inputs the corresponding key and mouse operation.
S103, if the first permission state is closed, switching the permission state of the clipboard corresponding to the target application program from the first permission state to a second permission state so that the target application program reads data stored in the clipboard; and when the first authority state is closed, the second authority state is opened.
The purpose of this step is: and when the first permission state is determined to be closed, temporarily authorizing the reading permission of the clipboard corresponding to the target application program.
According to a possible implementation manner, the terminal device can modify the value of the permission switch of the clipboard corresponding to the target application program by calling the API, so that the permission state of the clipboard corresponding to the target application program is switched from the first permission state to the second permission state.
Exemplarily, when the operating system of the terminal device is an Android system, the permission state of the clipboard corresponding to the target application program can be switched from a first permission state (i.e., closed) to a second permission state (i.e., open) by calling a setUidMode method of appopmanager of the Android native system, where the setUidMode method is a method for setting and changing a value corresponding to the permission state.
In the clipboard control method provided by this embodiment, a terminal device obtains an operation instruction input by a user, and obtains a current first permission state of a clipboard corresponding to a target application program according to the operation instruction; if the first authority state is closed, switching the authority state of the clipboard corresponding to the target application program from the first authority state to a second authority state so that the target application program reads data stored in the clipboard; and when the first authority state is closed, the second authority state is opened. According to the clipboard control method provided by the embodiment, the reading permission of the clipboard by the target application program is temporarily authorized, so that the target application program can successfully read the data stored in the clipboard according to the scene of active operation of the user when the permission state of the clipboard corresponding to the target application program is closed, the flexibility of clipboard control is improved, and the user experience is also improved.
Fig. 2 is a flowchart illustrating a clipboard control method according to another embodiment of the present disclosure. On the basis of the embodiment shown in fig. 1, the clipboard control method provided in this embodiment further includes, after S103:
and S104, switching the authority state of the clipboard corresponding to the target application program from the second authority state to the first authority state.
According to a possible implementation manner, the terminal device calls an Application Program Interface (API) to modify a value corresponding to the permission state of the clipboard from a value corresponding to the second permission state to a value corresponding to the first permission state.
Illustratively, if the value corresponding to the clipboard permission switch corresponding to the target application program is 1 when the clipboard permission switch is turned on, and the value corresponding to the permission switch is 0 when the clipboard permission switch is turned off. The terminal device can change the value corresponding to the permission state of the clipboard from 1 to 0 by calling the API, so that the permission state of the clipboard is switched from the second permission state to the first permission state.
If the operating system of the terminal device is the Android system, the permission state of the clipboard corresponding to the target application program can be switched from the second permission state (namely, open) to the first permission state (namely, closed) by calling the setUidMode method of the AppopManager of the Android native system.
According to the clipboard control method provided by the embodiment, the permission state of the clipboard corresponding to the target application program is switched from open to closed, so that the reading permission logic of the clipboard corresponding to the target application program is consistent before and after temporary authorization, and the data stored in the clipboard can be effectively prevented from being read by other operations except the user active operation, so that the security of the data stored in the clipboard is improved.
Fig. 3 is a flowchart illustrating a clipboard control method according to another embodiment of the present disclosure. As shown in fig. 3, the method of the present embodiment includes the following steps:
s201, the terminal equipment acquires an operation instruction input by a user.
This step is similar to S101 in the embodiment shown in fig. 1, and can refer to the detailed description of S101 in fig. 1, which is not repeated herein.
S202, determining whether the control targeted by the operation instruction is a target type control.
In the clipboard control method provided by this embodiment, to further determine that the operation instruction is actively input by the user, when the paste operation is performed, it may be determined whether the control targeted by the operation instruction is the target type control by determining the type of the control targeted by the operation instruction.
Specifically, if it is determined that the control targeted by the operation instruction is the target type control, it indicates that the operation instruction is actively input by the user, and S203 is executed; and if the control to which the operation instruction is directed is determined not to be the target type control, indicating that the operation instruction is not actively input by the user, and ending the process.
Optionally, the target type control is an input box control (exit text).
S203, acquiring the current first authority state of the clipboard corresponding to the target application program.
S204, if the first permission state is closed, switching the permission state of the clipboard corresponding to the target application program from the first permission state to a second permission state so that the target application program reads data stored in the clipboard; and when the first authority state is closed, the second authority state is opened.
In this embodiment, S203 and S204 are similar to S102 and S103 in the embodiment shown in fig. 1, and reference may be made to the detailed description in fig. 1, which is not repeated herein.
According to the clipboard control method provided by the embodiment, whether the operation instruction is actively operated by the user is judged, so that the subsequent temporary authorization is ensured to be directed at the situation that the user actively inputs the operation instruction, and the safety of data stored in the clipboard is further ensured.
Optionally, on the basis of the embodiment shown in fig. 3, after S204, the authority state of the clipboard corresponding to the target application may be further switched from the second authority state to the first authority state. The implementation manner is similar to that of the foregoing S104, and reference may be made to the description in the foregoing embodiments, which is not repeated herein.
Fig. 4 is a schematic structural diagram of a clipboard control device according to an embodiment of the present disclosure. As shown in fig. 4, the clipboard control apparatus 400 provided in the present embodiment includes: an acquisition module 401 and a processing module 402.
The obtaining module 401 is configured to obtain an operation instruction input by a user.
The processing module 402 is configured to obtain a current first permission state of a clipboard corresponding to a target application according to the operation instruction; and for determining whether the first permission status is off;
the processing module 402 is further configured to switch the permission state of the clipboard from the first permission state to a second permission state if the first permission state is closed, so that the target application program reads data stored in the clipboard;
and when the first authority state is closed, the second authority state is opened.
In some possible designs, the processing module 402 is further configured to switch the permission state of the clipboard corresponding to the target application from the second permission state to the first permission state.
In some possible designs, the processing module 402 is further configured to determine whether the control targeted by the operation instruction is the target type control. Accordingly, the processing module 402 is specifically configured to, when it is determined that the control targeted by the operation instruction is the target type control, obtain a current first permission state of the clipboard corresponding to the target application.
In some possible designs, if the first permission state is closed, the processing module 402 is specifically configured to invoke an API to modify the value corresponding to the permission state of the clipboard from the value corresponding to the first permission state to the value corresponding to the second permission state, so that the target application program reads data stored in the clipboard.
In some possible designs, the operation instruction is generated by the terminal device according to a pressing operation of a user on a touch screen of the terminal device; or the operation instruction is generated by the terminal device according to a keyboard and mouse operation input by a user through an input device of the terminal device.
It should be noted that reference is made to the description of the method embodiments for details which are not disclosed in the device embodiments.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 5, the electronic device 500 provided in the present embodiment includes: a memory 501 and a processor 502.
The memory 501 may be a separate physical unit, and may be connected to the processor 502 via a bus 503. The memory 501 and the processor 502 may also be integrated, implemented by hardware, and the like.
The memory 501 is used for storing program instructions, which are called by the processor 502 to perform the operations of any one of the method embodiments of fig. 1 to 3 above.
Alternatively, when part or all of the method of the above embodiment is implemented by software, the electronic device 500 may only include the processor 502. A memory 501 for storing programs is located outside the electronic device 500 and a processor 502 is connected to the memory by means of circuits/wires for reading and executing the programs stored in the memory.
Processor 502 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP.
The processor 502 may further include a hardware chip. The hardware chip may be an Application-Specific Integrated Circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a Field-Programmable Gate Array (FPGA), General Array Logic (GAL), or any combination thereof.
The Memory 501 may include a Volatile Memory (Volatile Memory), such as a Random-Access Memory (RAM); the Memory may also include a Non-volatile Memory (Non-volatile Memory), such as a Flash Memory (Flash Memory), a Hard Disk Drive (HDD) or a Solid-state Drive (SSD); the memory may also comprise a combination of memories of the kind described above.
The present invention also provides a computer readable storage medium including computer program instructions therein, which when executed by a processor, perform the method of any of the above embodiments of fig. 1 to 3.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A clipboard control method, comprising:
the terminal equipment acquires an operation instruction input by a user;
acquiring a current first authority state of a clipboard corresponding to a target application program according to the operation instruction;
if the first permission state is closed, switching the permission state of the clipboard corresponding to the target application program from the first permission state to a second permission state so that the target application program reads data stored in the clipboard;
and when the first authority state is closed, the second authority state is opened.
2. The clipboard control method of claim 1, wherein after the target application reads data stored in the clipboard, the method further comprises:
and switching the authority state of the clipboard corresponding to the target application program from the second authority state to the first authority state.
3. The method according to claim 1, wherein before the obtaining the current first permission state of the clipboard corresponding to the target application according to the operation instruction, the method further comprises:
determining whether the control targeted by the operation instruction is a target type control;
the obtaining of the current first permission state of the clipboard corresponding to the target application according to the operation instruction includes:
and if the control targeted by the operation instruction is a target type control, acquiring a current first permission state of a clipboard corresponding to the target application.
4. The clipboard control method of claim 3, wherein the target type control is an input box control.
5. The method of any one of claims 1 to 4, wherein if the first permission state is off, switching the permission state of the clipboard from the first permission state to a second permission state, so that the target application reads data stored in the clipboard, comprises:
if the first permission state is closed, the terminal device calls an Application Program Interface (API) to modify the value corresponding to the permission state of the clipboard from the value corresponding to the first permission state to the value corresponding to the second permission state, so that the target application program reads data stored in the clipboard.
6. The clipboard control method according to any one of claims 1 to 4, wherein the operation instruction is generated by the terminal device according to a pressing operation of a user on a touch screen of the terminal device; or the operation instruction is generated by the terminal device according to a keyboard and mouse operation input by a user through an input device of the terminal device.
7. A clipboard control apparatus, comprising:
the acquisition module is used for acquiring an operation instruction input by a user;
the processing module is used for acquiring the current first authority state of the clipboard corresponding to the target application program according to the operation instruction; and for determining whether the first permission status is off;
the processing module is further configured to switch the permission state of the clipboard from the first permission state to a second permission state if the first permission state is closed, so that the target application program reads data stored in the clipboard;
and when the first authority state is closed, the second authority state is opened.
8. The clipboard control apparatus of claim 7, wherein the processing module is further configured to switch the permission state of the clipboard corresponding to the target application from the second permission state to the first permission state.
9. An electronic device, comprising: memory, processor, and computer program instructions;
the memory configured to store the computer program instructions;
the processor configured to execute the computer program instructions, the processor executing the computer program instructions to perform the clipboard control method of any of claims 1 to 6.
10. A readable storage medium, comprising: computer program instructions;
the computer program instructions, when executed by a processor, perform a clipboard control method as defined in any one of claims 1 to 6.
CN202110077417.8A 2021-01-20 2021-01-20 Clipboard control method and device and readable storage medium Pending CN112749030A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110077417.8A CN112749030A (en) 2021-01-20 2021-01-20 Clipboard control method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110077417.8A CN112749030A (en) 2021-01-20 2021-01-20 Clipboard control method and device and readable storage medium

Publications (1)

Publication Number Publication Date
CN112749030A true CN112749030A (en) 2021-05-04

Family

ID=75652678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110077417.8A Pending CN112749030A (en) 2021-01-20 2021-01-20 Clipboard control method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN112749030A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342390A (en) * 2021-07-01 2021-09-03 统信软件技术有限公司 Authority management method and system for application program
CN113835769A (en) * 2021-11-29 2021-12-24 深圳雷柏科技股份有限公司 Method, device and related assembly for cross-computer control and file sharing of HID (human interface device)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342390A (en) * 2021-07-01 2021-09-03 统信软件技术有限公司 Authority management method and system for application program
CN113342390B (en) * 2021-07-01 2024-06-04 统信软件技术有限公司 Authority management method and system for application program
CN113835769A (en) * 2021-11-29 2021-12-24 深圳雷柏科技股份有限公司 Method, device and related assembly for cross-computer control and file sharing of HID (human interface device)
CN113835769B (en) * 2021-11-29 2022-02-22 深圳雷柏科技股份有限公司 Method, device and related assembly for cross-computer control and file sharing of HID (human interface device)

Similar Documents

Publication Publication Date Title
RU2600979C2 (en) Method for quickly processing files of smartphone and smart phone
CN106095022B (en) Control method and electronic equipment
US9204027B2 (en) Method for photographing processing and terminal device
US20210192022A1 (en) Permission management system, permission management method, and electronic device
US20130268853A1 (en) Mobile terminal comprising a man/machine interface
CN112749030A (en) Clipboard control method and device and readable storage medium
CN107329659B (en) Permission setting method and device, electronic equipment and storage medium
CN109491731B (en) Control method and device for suspension button and storage medium
KR20190089069A (en) Method and Apparatus for Authorized Login
US20150199058A1 (en) Information processing method and electronic device
CN104750523A (en) Information processing method and electronic equipment
CN111460428B (en) Authority management method and device of android system and readable medium
US11790344B2 (en) Method and apparatus for displaying identification code of application
CN110581921B (en) Control method and device for folding screen equipment
CN111753270A (en) Application program login verification method, device, equipment and storage medium
CN104796782A (en) Method and device for controlling smart television
WO2019018998A1 (en) Fingerprint recognition method and apparatus
CN105022633A (en) Solving method of hotkey conflict and terminal
WO2015100545A1 (en) Method and device for rights management
CN108958859A (en) RTL layout adaptation method, device, storage medium and electronic equipment based on Android
US20200081597A1 (en) Application program management method and apparatus
WO2017155681A1 (en) Method and device for deleting a system resource
CN106066967A (en) Permission setting method and device
CN113126982B (en) Application program generation and operation method and device
CN114691157A (en) Cloud-based FPGA management control system and method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination