CN110806867A - Handle management method, storage medium, electronic device and system - Google Patents

Handle management method, storage medium, electronic device and system Download PDF

Info

Publication number
CN110806867A
CN110806867A CN201810886141.6A CN201810886141A CN110806867A CN 110806867 A CN110806867 A CN 110806867A CN 201810886141 A CN201810886141 A CN 201810886141A CN 110806867 A CN110806867 A CN 110806867A
Authority
CN
China
Prior art keywords
handle
class
subclass
creating
request
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.)
Granted
Application number
CN201810886141.6A
Other languages
Chinese (zh)
Other versions
CN110806867B (en
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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810886141.6A priority Critical patent/CN110806867B/en
Publication of CN110806867A publication Critical patent/CN110806867A/en
Application granted granted Critical
Publication of CN110806867B publication Critical patent/CN110806867B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse

Landscapes

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

Abstract

The invention discloses a Handle management method, a storage medium, electronic equipment and a system, and relates to the field of program optimization, wherein the method comprises the following steps of S1: and creating a template class of the Android-based factory model, wherein parameters of the template class and the subclass of the template class comprise a process of a current class of a request Handle, the Handle and a corresponding relation of the process. S2: acquiring each request Handle command in the Android system, acquiring a process of the class of the request Handle according to the class of the request Handle, if no subclass is created in the current Android system, entering step S4, otherwise, searching whether the process is contained in the created subclass, if yes, entering step S3, and if not, entering step S4. S3: and checking that the searched parameters of the subclasses have handles corresponding to the processes, if so, returning to the handles, and if not, returning to the step S4. S4: creating a unique Handle for the class of the request Handle and creating a subclass according to the template class.

Description

Handle management method, storage medium, electronic device and system
Technical Field
The invention relates to the field of program optimization, in particular to a Handle management method, a storage medium, electronic equipment and a system.
Background
In the Android system, the ui process cannot be directly updated, and the most fundamental reason is to deal with the problem of concurrence of multiple processes. If there are multiple processes within an activity to update the ui operation and there is no mechanism to lock, then interface upsets and process jams may occur.
People generally use Handle to provide a set of mechanisms for updating the UI for Android, and the set of mechanisms is also an information processing mechanism, and can send messages and process the messages through the information processing mechanism. In particular, the Handle mechanism provides a set of mechanisms for solving the concurrency problem, and provides a Handle and a Looper to satisfy the communication among the processes. Handle first-in first-out principle. The Looper class is used to manage the exchange of messages between objects within a particular process (Messageexchange). Therefore, when programs of the Android system are written, a Handle mechanism provided by the Android is often used for processing communication problems.
However, the use of the Handle greatly depends on the capability of programmers and project experience, developers with insufficient experience generally abuse the mechanism, and even developers with high experience easily neglect the Handle mechanism when bugs appear in the program and need frequent change and change. Therefore, the problems of memory leakage or abnormal crash caused by the Handle are often difficult to timely and effectively check, and the development of the program is very unfavorable. While using a new system requires a longer learning period, and more effort. Creating a set of rules based on addrod requires the developer to spend a long time learning and adapting to the rules, and the above problems may still occur during adaptation.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a Handle management method, a storage medium, electronic equipment and a system, which can save the learning and adaptation time of developers and can be used for the direct use period.
In a first aspect, the present invention provides a Handle management method, which is applied to management of a Handle function on Android, and is characterized in that the method includes the following steps:
s1: establishing a template class of an Android-based factory model, wherein parameters of the template class and the subclass of the template class comprise a process of a current class of a request Handle, the Handle and a corresponding relation of the process;
s2: acquiring each request Handle command in the Android system, acquiring a process of the class of the request Handle according to the class of the request Handle, if no subclass is created in the current Android system, entering step S4, otherwise, searching whether the process is contained in the created subclass, if yes, entering step S3, and if not, entering step S4;
s3: checking that the searched subclass has a Handle corresponding to the process in the searched parameters of the subclass, if so, returning to the Handle, and if not, turning to the step S4;
s4: creating a unique Handle for the class of the request Handle and creating a subclass according to the template class.
Preferably, after step S4, the method further includes:
s5: and corresponding to each process, creating a trigger function, and triggering and releasing the Handle in the process when the process is finished running by the trigger function.
Preferably, the Handle name is saved after the unique Handle is created, and the trigger function releases the Handle according to the saved Handle name.
Preferably, step S1 specifically includes the following steps:
the method comprises the steps of creating a first class in an Android factory mode, wherein the first class comprises a process name and a second class corresponding to the process name, and the second class comprises the process name and a Handle corresponding to the process name.
Preferably, the step S2 of searching for whether the created subclass includes the process specifically includes:
looking up whether the process is contained in the first class.
Preferably, the step S3 of checking that there is a Handle corresponding to the process in the searched parameters of the subclass specifically includes:
and checking whether a second class in the first class contains a Handle corresponding to the process name or not according to the searched first class.
Preferably, the creating a unique Handle for the class of the request Handle in step S4, and the creating a subclass according to the template class specifically includes:
and creating a unique corresponding Handle for the process, and creating a subclass of the first class according to the corresponding relation.
In a second aspect, the present invention further provides a Handle management system, which includes a creating module, a determining module, and a corresponding module:
the system comprises a creating module, a processing module and a processing module, wherein the creating module is used for creating a template class of an Android-based factory model, and parameters of the template class and the subclass of the template class comprise a process where a current class of a request Handle is located, the Handle and a corresponding relation of the process;
the judging module is used for acquiring each request Handle command in the Android system, acquiring a process of the class of the request Handle according to the class of the request Handle, calling the corresponding module if the subclass is not established in the current Android system, otherwise, searching whether the process is contained in the established subclass, calling the corresponding module if the process is not contained in the established subclass, checking that the process is contained in the searched parameters of the subclass if the process is contained in the searched parameters, returning the Handle if the process is contained in the searched parameters, and corresponding the module if the process is not contained in the searched parameters of the subclass;
and the corresponding module is used for creating a unique Handle for the class of the request Handle and creating a subclass according to the template class.
In a third aspect, an embodiment of the present invention further provides a storage medium, where a computer program is stored on the storage medium, and when being executed by a processor, the computer program implements the method in the embodiment of the first aspect.
In a fourth aspect, an embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program running on the processor, and the processor executes the computer program to implement the method in the first aspect.
Compared with the prior art, the invention has the advantages that:
according to the method, the class in the factory mode is created based on the Android, and openers can directly acquire the corresponding Handle from the factory mode: for the created Handle, subclasses corresponding to the factory classes are created, and developers do not need to manage; for classes of which the handles are not created, the method can create a new Handle return, meanwhile, the method has a corresponding relation to store the corresponding relation, and automatic management of the handles is achieved. Developers do not need to worry about which handles are created for which processes, manual management is not needed, and learning cost is saved. Meanwhile, after the use is finished, the method can release the Handle, developers do not need to spend much energy on maintaining the Handle, leakage is prevented, namely the Handle is released by braking after the life cycle of the process is finished, development of own manual compiling of releasing codes is not needed, and compiling is more efficient and safer.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings corresponding to the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flow diagram illustrating a Handle management method according to the present invention.
Fig. 2 is a schematic structural diagram of a Handle management system according to the present invention.
In the figure: 1-creating module, 2-judging module and 3-corresponding module.
Detailed Description
Embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
Referring to fig. 1, embodiments of the present invention provide a Handle management method, a storage medium, an electronic device, and a system, which can save management of a developer on a Handle and debugging time and procedures after an application error by implementing automatic management on the Handle, so that development and compilation of an Android program are more efficient and safer.
In order to achieve the technical effects, the general idea of the application is as follows:
s1: establishing a template class of an Android-based factory model, wherein parameters of the template class and the subclass of the template class comprise a process of a current class of a request Handle, the Handle and a corresponding relation of the process;
s2: acquiring each request Handle command in the Android system, acquiring a process of the class of the request Handle according to the class of the request Handle, if no subclass is created in the current Android system, entering step S4, otherwise, searching whether the process is contained in the created subclass, if yes, entering step S3, and if not, entering step S4;
s3: checking that the searched subclass has a Handle corresponding to the process in the searched parameters of the subclass, if so, returning to the Handle, and if not, turning to the step S4;
s4: creating a unique Handle for the class of the request Handle and creating a subclass according to the template class.
In summary, the method records the command of creating or requiring the Handle in the Android system each time, and simultaneously judges whether the current process in the Android system already contains the Handle, if not, the Handle is created, and if yes, the Handle is directly returned.
For processes without a Handle, this method can help the process to uniquely create a corresponding Handle, becoming a process containing a Handle.
For the process with the Handle, the method helps the process with the Handle to establish the corresponding relation, and facilitates direct calling of subsequent program development.
For a programmer, the method is called only when the programmer needs to use the Handle, then the programmer is bound to return the Handle corresponding to the process, the programmer does not need to remember which Handle is used by the process any more, adaptation is not needed according to rules aiming at the Handle, the method is very convenient and fast, and mental labor of developers is reduced.
In order to better understand the technical solution, the following detailed description is made with reference to specific embodiments.
Example one
As shown in fig. 1, the present invention provides a Handle management method applied to management of a Handle function on Android, which is characterized by comprising the following steps:
s1: establishing a template class of an Android-based factory model, wherein parameters of the template class and the subclass of the template class comprise a process of a current class of a request Handle, the Handle and a corresponding relation of the process;
creating a class in a factory mode, wherein the class uses a plurality of parameters, the parameters comprise a process of a current class of a request Handle, the Handle and a corresponding relation of the process, which is equivalent to making a rule in an Android system, and storing the process and a process-Handle relation table in a unified way.
Every time when a Handle needs to be recorded, the relation can be recorded by creating the subclasses in batch through the class in the factory mode, and meanwhile, because the rules of the class are specified, the created subclasses, namely the subclasses, are always in accordance with the rules, so that the corresponding Handle is conveniently searched in the follow-up process.
S2: acquiring each request Handle command in the Android system, acquiring a process of the class of the request Handle according to the class of the request Handle, if no subclass is created in the current Android system, entering step S4, otherwise, searching whether the process is contained in the created subclass, if yes, entering step S3, and if not, entering step S4;
since the Handle exists in the process, is used by the corresponding process, and is not specific to a specific class, when a certain class in the Android requires the Handle, the process needs to be searched according to the process, so that the process where the request class is located needs to be acquired.
In step S1, a rule for managing handles has been specified, after the current process is obtained, it is necessary to search whether a class created by the template class exists, and if not, it indicates that the current method has not created a corresponding Handle for the process and also has not created a corresponding subclass, so that it is necessary to go to the step of creating a Handle, and if it indicates that the method has created a corresponding relationship for the process, it may go to the next process.
S4: checking whether the subclasses contain handles corresponding to the processes according to the searched subclasses, returning to the handles if the subclasses contain the handles corresponding to the processes, and turning to the step S5 if the subclasses do not contain the handles corresponding to the processes;
after finding out the process in which the class requesting to create the Handle currently is recorded, since in step S1, a format of the parent class about storing the relationship between the process and the Handle is formulated, the subclass of the parent class must meet the rule, at this time, it is only necessary to further find out whether the Handle corresponding to the process is stored in the subclass, if so, it is only necessary to return to the Handle, and if not, it is necessary to enter the process of creating the Handle.
S4: creating a unique Handle for the class of the request Handle and creating a subclass according to the template class.
Step S4 is a step of creating a Handle in the method, and for a case where the Handle cannot be found or the corresponding process relationship of the Handle cannot be found, the Handle corresponding to the process needs to be created while the corresponding relationship between the process and the Handle is stored, so that the method can be directly used in the next call.
Further, after step S4, the method further includes:
s5: and corresponding to each process, creating a trigger function, and triggering and releasing the Handle in the process when the process is finished running by the trigger function.
For developers, calling and creating a Handle are very important in an Android system, and after a process in the Android system is finished, if the Handle is not released in time, problems of program bug, crash, security leakage and the like can be caused.
Therefore, after the process is ended, it is also important to release the Handle for the process, and since the corresponding relationship between the process and the Handle is already created in the above steps S1 to S5, after the process is ended, it is only necessary to search for the Handle corresponding to the process that is ended after the process is ended according to the corresponding relationship, and then release the Handle, that is, in step S6, the Handle is released according to the saved Handle name.
After the process is finished, the process cannot run the corresponding function, so a trigger function is needed, and after the process is finished, the trigger function releases Handle.
Specifically, the trigger function is a subfunction of an actionydestroyed function under application.
Further, step S1 specifically includes the following steps:
the method comprises the steps that a first class is established in an Android factory mode, the class comprises a process name and a second class corresponding to the process name, the second class comprises the process name and a Handle corresponding to the process name, and the subclass is a subclass of the first class.
Specifically, a factory class DYMagicHandle factory that manages DYMagicHandle is created:
HashMap < Integer, HashMap < Integer, DYMagcHandle > > wherein Integer corresponds to process name, DYMagcHandle is Handle name. The first type is HashMap < Integer, HashMap < Integer, DYMagcHandle > >, and the second type is HashMap < Integer, DYMagcHandle >.
The subclass/subclass created from this template class will contain the process name and Handle name.
For example, the subclass/subclass name created according to HashMap < Integer, HashMap < Integer, DYMagicHandle > > is mHandleMaps.
As a preferred scheme, the specific DYMagicHandle method is as follows:
and acquiring the process of the class of the current request Handle.
According to whether the process has the corresponding subclass in mHandleMaps < Integer, HashMap < Integer, DYMaxiHandle >.
And if not, creating a Handle of the corresponding process, and saving the subclass mHandleMaps < Integer, HashMap < Integer, DYMagcHandle > >, according to the template class HashMap < Integer, HashMap < Integer, DYMagcHandle > >.
If the process exists, further searching whether the HashMap < Integer and DYMagcHandle > in the found subclass mHandleMaps < Integer, HashMap < Integer and DYMagcHandle > further finds whether the DYMagcHandle corresponding to the process exists, if so, returning to the Handle, if not, creating a Handle and saving the subclass mHandleMap < Integer, HashMap < Integer and DYMagcHandle > according to the template class HashMap < Integer, HashMap < Integer and DYMagcHandle >.
After the template class is set and the searching mechanism is established, the rule is formulated in the Android system, developers do not need to learn relevant regulations appointed by the Handle any more, the learning cost is saved, and the creation and maintenance can be completed only by calling the method. The workload of the developer is reduced.
Based on the same inventive concept, the present application provides the second embodiment.
Example two
As shown in fig. 2, the present invention also provides a Handle management system, which comprises
The system comprises a creating module, a processing module and a processing module, wherein the creating module is used for creating a template class of an Android-based factory model, and parameters of the template class and the subclass of the template class comprise a process where a current class of a request Handle is located, the Handle and a corresponding relation of the process;
the judging module is used for acquiring each request Handle command in the Android system, acquiring a process of the class of the request Handle according to the class of the request Handle, calling the corresponding module if the subclass is not established in the current Android system, otherwise, searching whether the process is contained in the established subclass, calling the corresponding module if the process is not contained in the established subclass, checking that the process is contained in the searched parameters of the subclass if the process is contained in the searched parameters, returning the Handle if the process is contained in the searched parameters, and corresponding the module if the process is not contained in the searched parameters of the subclass;
and the corresponding module is used for creating a unique Handle for the class of the request Handle and creating a subclass according to the template class.
Various modifications and specific examples in the foregoing method embodiments are also applicable to the system of the present embodiment, and the detailed description of the method is clear to those skilled in the art, so that the detailed description is omitted here for the sake of brevity.
Based on the same inventive concept, the present application provides the third embodiment.
EXAMPLE III
A third embodiment of the invention provides a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out all or part of the method steps of the first embodiment.
The present invention can implement all or part of the flow in the method of the first embodiment, and can also be implemented by using a computer program to instruct related hardware, where the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments can be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
Based on the same inventive concept, the present application provides the fourth embodiment.
Example four
The fourth embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program running on the processor, and the processor executes the computer program to implement all or part of the method steps in the first embodiment.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like which is the control center for the computer device and which connects the various parts of the overall computer device using various interfaces and lines.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the computer device by running or executing the computer programs and/or modules stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, video data, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Generally, according to the Handle management method, the storage medium, the electronic device and the system provided by the embodiment of the invention, classes in an Android system factory mode are created, and a new Handle is searched and returned or created according to a command for creating the Handle, compared with the traditional technology and the like, developers do not need to manually manage the Handle corresponding to each process, the workload of the developers can be reduced, and the development is more efficient, accurate and safe.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A Handle management method is applied to management of Handle functions on Android and is characterized by comprising the following steps:
s1: establishing a template class of an Android-based factory model, wherein parameters of the template class and the subclass of the template class comprise a process of a current class of a request Handle, the Handle and a corresponding relation of the process;
s2: acquiring each request Handle command in the Android system, acquiring a process of the class of the request Handle according to the class of the request Handle, if no subclass is created in the current Android system, entering step S4, otherwise, searching whether the process is contained in the created subclass, if yes, entering step S3, and if not, entering step S4;
s3: checking that the searched subclass has a Handle corresponding to the process in the searched parameters of the subclass, if so, returning to the Handle, and if not, turning to the step S4;
s4: creating a unique Handle for the class of the request Handle and creating a subclass according to the template class.
2. The Handle management method of claim 1, wherein the step S4 is further followed by:
s5: and corresponding to each process, creating a trigger function, and triggering and releasing the Handle in the process when the process is finished running by the trigger function.
3. A Handle management method according to claim 2, wherein:
and storing the Handle name after the unique Handle is created every time, and releasing the Handle by the trigger function according to the stored Handle name.
4. A Handle management method according to claim 1, wherein: step S1 specifically includes the following steps:
the method comprises the steps of creating a first class in an Android factory mode, wherein the first class comprises a process name and a second class corresponding to the process name, and the second class comprises the process name and a Handle corresponding to the process name.
5. A Handle management method according to claim 4, wherein: in step S2, the step of searching whether the created subclass contains the process specifically includes:
looking up whether the process is contained in the first class.
6. The Handle management method of claim 5, wherein the step S3 of checking the parameters of the searched subclasses that the Handle corresponding to the process exists is specifically as follows:
and checking whether a second class in the first class contains a Handle corresponding to the process name or not according to the searched first class.
7. The Handle management method of claim 6, wherein the step S4 is to create a unique Handle for the class of the request Handle, and the creating of the subclasses according to the template class specifically includes:
and creating a unique corresponding Handle for the process, and creating a subclass of the first class according to the corresponding relation.
8. A storage medium having a computer program stored thereon, characterized in that: the computer program, when executed by a processor, implements the method of any one of claims 1 to 7.
9. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program that runs on the processor, characterized in that: the processor, when executing the computer program, implements the method of any of claims 1 to 7.
10. A Handle management system is characterized by comprising a creating module, a judging module and a corresponding module:
the system comprises a creating module, a processing module and a processing module, wherein the creating module is used for creating a template class of an Android-based factory model, and parameters of the template class and the subclass of the template class comprise a process where a current class of a request Handle is located, the Handle and a corresponding relation of the process;
the judging module is used for acquiring each request Handle command in the Android system, acquiring a process of the class of the request Handle according to the class of the request Handle, calling the corresponding module if the subclass is not established in the current Android system, otherwise, searching whether the process is contained in the established subclass, calling the corresponding module if the process is not contained in the established subclass, checking that the process is contained in the searched parameters of the subclass if the process is contained in the searched parameters, returning the Handle if the process is contained in the searched parameters, and corresponding the module if the process is not contained in the searched parameters of the subclass;
and the corresponding module is used for creating a unique Handle for the class of the request Handle and creating a subclass according to the template class.
CN201810886141.6A 2018-08-06 2018-08-06 Handle management method, storage medium, electronic device and system Active CN110806867B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810886141.6A CN110806867B (en) 2018-08-06 2018-08-06 Handle management method, storage medium, electronic device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810886141.6A CN110806867B (en) 2018-08-06 2018-08-06 Handle management method, storage medium, electronic device and system

Publications (2)

Publication Number Publication Date
CN110806867A true CN110806867A (en) 2020-02-18
CN110806867B CN110806867B (en) 2022-06-17

Family

ID=69487134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810886141.6A Active CN110806867B (en) 2018-08-06 2018-08-06 Handle management method, storage medium, electronic device and system

Country Status (1)

Country Link
CN (1) CN110806867B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030110200A1 (en) * 2001-11-28 2003-06-12 Insignia Solutions, Plc Inter-method control transfer for execution engines with memory constraints
US20030110416A1 (en) * 2001-06-01 2003-06-12 Microsoft Corporation Methods and systems for creating and communicating with computer processes
US20100088187A1 (en) * 2008-09-24 2010-04-08 Chris Courtney System and method for localized and/or topic-driven content distribution for mobile devices
CN103729188A (en) * 2013-12-31 2014-04-16 福建三元达软件有限公司 Android system application program development method, Android system application program running method and Android system application program running device
CN105159690A (en) * 2015-10-26 2015-12-16 深圳云之家网络有限公司 Method and device for automatically synchronizing user interface (UI) threads
CN106598725A (en) * 2016-10-31 2017-04-26 武汉斗鱼网络科技有限公司 Android-based Handler memory leakage prevention device and method
CN106775699A (en) * 2016-12-09 2017-05-31 武汉斗鱼网络科技有限公司 The method that UI is updated in asynchronous thread
CN107479981A (en) * 2017-06-30 2017-12-15 武汉斗鱼网络科技有限公司 A kind of processing method and processing device that synchronization call is realized based on asynchronous call
CN107515792A (en) * 2017-07-27 2017-12-26 北京五八信息技术有限公司 The method and apparatus that function class carries out Message Processing using Handler
CN108008950A (en) * 2017-11-24 2018-05-08 武汉斗鱼网络科技有限公司 The implementation method and device of a kind of user interface updating

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030110416A1 (en) * 2001-06-01 2003-06-12 Microsoft Corporation Methods and systems for creating and communicating with computer processes
US20030110200A1 (en) * 2001-11-28 2003-06-12 Insignia Solutions, Plc Inter-method control transfer for execution engines with memory constraints
US20100088187A1 (en) * 2008-09-24 2010-04-08 Chris Courtney System and method for localized and/or topic-driven content distribution for mobile devices
CN103729188A (en) * 2013-12-31 2014-04-16 福建三元达软件有限公司 Android system application program development method, Android system application program running method and Android system application program running device
CN105159690A (en) * 2015-10-26 2015-12-16 深圳云之家网络有限公司 Method and device for automatically synchronizing user interface (UI) threads
CN106598725A (en) * 2016-10-31 2017-04-26 武汉斗鱼网络科技有限公司 Android-based Handler memory leakage prevention device and method
CN106775699A (en) * 2016-12-09 2017-05-31 武汉斗鱼网络科技有限公司 The method that UI is updated in asynchronous thread
CN107479981A (en) * 2017-06-30 2017-12-15 武汉斗鱼网络科技有限公司 A kind of processing method and processing device that synchronization call is realized based on asynchronous call
CN107515792A (en) * 2017-07-27 2017-12-26 北京五八信息技术有限公司 The method and apparatus that function class carries out Message Processing using Handler
CN108008950A (en) * 2017-11-24 2018-05-08 武汉斗鱼网络科技有限公司 The implementation method and device of a kind of user interface updating

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JINGLONG.CHA: "Android中handle机制", 《CSDN》 *

Also Published As

Publication number Publication date
CN110806867B (en) 2022-06-17

Similar Documents

Publication Publication Date Title
US20160004516A1 (en) Code Generation Framework for Application Program Interface for Model
CN104407973A (en) Automatic unit test realizing method and device
CN110673853B (en) Compiling method, device and system
US20220317997A1 (en) Online Upgrade Method for Household Appliance Multi-MCU System, Electronic Device and Medium
CN103207797A (en) Capsule type custom-made updating method based on unified extensible firmware interface firmware system
CN110990019B (en) Java class analysis method and device, storage medium and electronic equipment
US10564955B2 (en) Method to manage multiple versions of parts of a software application and to retire older versions in a dynamically updatable software system
CN110569250B (en) Management method and device for analysis library of Internet of things network element
CN105242962A (en) Quick lightweight thread triggering method based on heterogeneous many-core
US10275234B2 (en) Selective bypass of code flows in software program
CN112463123A (en) Task compiling method, device, network node, system and storage medium
Johnson Deriving specification from requirements
CN110727482B (en) Interface updating method and device
CN112604273B (en) Data-driven game system function loading method, device and storage medium
CN110806867B (en) Handle management method, storage medium, electronic device and system
CN110837446A (en) Equipment management method and device applied to embedded system, medium and embedded equipment
CN111880804A (en) Application program code processing method and device
CN110968339A (en) Method and device for front-end construction tool and electronic equipment
CN102707956B (en) Probabilistic method is returned results for the treatment of trigger
CN112988277B (en) Rule file loading method, device, server and medium
CN109492057A (en) A kind of educational system is used for Hive offline computing method and electronic equipment
CN111580938A (en) Transaction processing method, device, equipment and medium for work unit
US9720803B2 (en) Methods and apparatus for debugging of remote systems
WO2019134286A1 (en) Path detection method, electronic device, and readable storage medium
CN113326048B (en) Floating point number calculation precision processing method, system, medium and device

Legal Events

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