Specific embodiment
As shown in Figure 1, a kind of hot plug multibard data control method, comprising steps of
S200: hot drawing card event is listened to.
Hot plug " plugs ", and hardware can be plugged or pull out when computer operates by referring to.Hot plug can not have to
Be inserted into or pull out the peripheral equipment for supporting hot plug in the case where closing power supply, not will lead to host or peripheral equipment burn and
It being capable of detecting real-time and the new equipment of use.Herein, the hot drawing card event in the hot plug time is mainly listened to, it is double with double card
For smart phone, step S200 be listen to whether in smart phone open state whether its main card or vice card are pulled out
Operation.
S400: when the triggering of hot drawing card event, dcTracker object is obtained.
DcTracker is the core for being responsible for data service in system framework, when the triggering of hot drawing card event, system framework sense
Know that hot drawing card event triggers, obtains the kernel object (dcTracker object) for being responsible for data service in system framework at this time.
S600: when default data connection has been activated in dcTracker object, having held for network request is removed
Row status indication.
It is analyzed for dcTracker object, judges that default data connection is swashed in dcTracker object
It is living, when default data connection has been activated, show that there is also the network requests executed in multi-card terminal, this has been held
Capable network request may be incorrect network request, need to be removed, i.e., removes the execution shape of network request at this time
State label.
Hot plug multibard data control method of the present invention listens to hot drawing card event, when the triggering of hot drawing card event, obtains
DcTracker object removes having held for network request when default data connection has been activated in dcTracker object
Row status indication.In whole process, according to hot plug events, removes incorrect network request and executed status indication, avoid
Again after plug-in card, do not change because network request executes state, cause terminal that cannot initiate data dial, cannot normally surf the Internet
Problem improves hot plug stability and user experience, realizes that hot plug multibard data rationally controls.
Specifically, hot drawing card event being listened in above-mentioned steps S200 can be realized by hardware mode, such as can be incited somebody to action
Card slot and power supply form the circuit of a closure, and when the card in card slot is pulled out, this closed circuit is disconnected, at terminal built-in
Reason device detects this event, i.e., accurately listens to hot plug card event.
Step S400 includes: in one of the embodiments,
Step 1: when the triggering of hot drawing card event, identify whether the card being pulled out is to be attached with ps domain data industry in more cards
The card of business.
Step 2: when the card being pulled out is to be attached with the card of ps domain data service in more cards, dcTracker pairs is obtained
As.
The card for being attached with ps domain data service is data card, and multi-card terminal could allow to surf the Internet by data card.Identification
Whether the card being pulled out is to be attached with whether the card card that i.e. judgement is pulled out of ps domain data service is data card in more cards.More cards
Data in terminal card is also known as main card, and multi-card terminal is surfed the Internet by main card, herein, needs to know the card of extraction
Not, judge whether the card extracted is main card, when for main card, will affect multi-card terminal and currently normally surfs the Internet, need to carry out subsequent step
Rapid S600;When the card of extraction is not main card (for example, vice card), no influence of currently surfing the Internet on multi-card terminal, after carrying out
Continuous step S600, is directly entered the operation for the SIM card that response user is newly inserted into.By taking double card double standby mobile phone as an example, identification is pulled out
Card whether be main card, when for main card, obtain dcTracker object, when for vice card, termination subsequent operation.Judge to be pulled out
Whether card out is identity identification (such as subId) that main card can extract card by identification, according to the subId of record and
The data card subId of default judges whether the card being pulled out is main card (data card).In the present embodiment, it sticks into being pulled out
Row identification, judges whether it is main card (data card), and subsequent operation is just carried out when for main card, when not being main card without rear
Continuous operation, effectively avoids maloperation, it is ensured that multi-card terminal can normally surf the Internet, and bring good user experience.
As shown in Fig. 2, step S400 includes: in one of the embodiments,
S420: when card is pulled out, the identity identification of each card in more cards is obtained.
S440: according to the identity identification of each card in more cards, the Universal Integrated Circuit Card object of each card is obtained.
S460: it when the Universal Integrated Circuit Card object characterization arbitrarily individually blocked in more cards has pulled out card-like state, obtains
DcTracker object.
When step S200, which listens to card, is pulled out card slot, more cards are directly obtained eventually by system framework (framework)
The identity identification of each card in end, specifically the identity identification can be subId, each card based on acquisition
Identity identification obtains the Universal Integrated Circuit Card object of each card, detects the generic set in more cards with the presence or absence of some card
At circuit card object characterization be pulled out card-like state (ABSENT state), when have some block Universal Integrated Circuit Card object characterization
When pulling out card-like state, dcTracker object is obtained.
As shown in Fig. 2, in one of the embodiments, after step S600 further include:
S700: when listen to reinsert card when, to the card reinserted carry out inspection card with lead card operate.
S800: data card setting operation and network mode setting operation are re-started to more cards, initiate data dial.
For the card reinserted, needs to carry out it inspection card and lead card operation, so that the card being newly inserted into can activate simultaneously
And with other device co-ordinations in multi-card terminal.When the card activation reinserted is completed, to the card in entire multi-card terminal
Data card setting operation and network mode setting operation are re-started according to pre-set programs, initiates data dial.With double-card dual-standby
For smart phone, when reinserting main card, inspection card is carried out to the main card being newly inserted into and leads card operation, whether detection main card is complete
Whether whether full activation, main card suit completely with the double-card dual-standby intelligent terminal, when these operations are completed, to the double-card dual-standby
Intelligent terminal re-starts preset data card setting operation and network mode setting operation, and double-card dual-standby intelligent terminal initiates number
According to dialing, request data business is attempted, when requesting successfully, double-card dual-standby intelligent terminal has connected mobile communications network, Yong Huke
To be surfed the Internet by the double-card dual-standby intelligent terminal.
In one of the embodiments, when default data connection has been activated in dcTracker object, remove
The step of status indication of execution of network request includes:
When default data connection has been activated in dcTracker object, starting deactivate DDS network request into
Network request has been executed status indication function and has been revised as false by journey.
In the present embodiment, come convenient removing by way of having executed status indication function to network request and having modified
The execution status indication of network request.
It, below will be with double in order to further explain in detail the technical solution of hot plug multibard data control method of the present invention
It is illustrated for card double-standby intelligent terminal.
Step 1: user extracts the card in dual-card dual-standby terminal, is operated by the card that pulls out that modem listens to user.
Step 2: system framework (Framework) identifies the card of extraction, obtains two cards in dual-card dual-standby terminal
SubId judge whether the card being pulled out is main card according to the data card subId of the subId of record and default, when for main card
Shi Jinhang subsequent operation terminates subsequent operation when or not main card (for vice card).
Step 3: the subId blocked according to two obtains UiccCard object card, judges whether card is ABSENT state
(having pulled out card-like state)
Step 4: dcTracker object is obtained, wherein whether default connection has been activated for judgement, if swashed
Living, starting deactivates the process of DDS network request, if un-activation, the process of DDS network request is deactivated with regard to it goes without doing.It goes
In the process implementation procedure for activating DDS network request, the status indication of the execution executed of network request can be removed.
Step 5: user is inserted into SIM card, and modem starting inspection card leads card process.
Step 6: data card setting procedure and network mode setting procedure.
Step 7: data dial is initiated, after data dial success, user surfs the Internet.
As shown in figure 3, a kind of hot plug multibard data control system, comprising steps of
Module 200 is listened to, for listening to hot drawing card event;
First processing module 400, for obtaining dcTracker object when the triggering of hot drawing card event;
Second processing module 600, for removing when default data connection has been activated in dcTracker object
The execution status indication of network request.
Hot plug multibard data control system of the present invention listens to module 200 and listens to hot drawing card event, when hot drawing card event is touched
When hair, first processing module 400 obtain dcTracker object, when in dcTracker object default data connection by
When activation, Second processing module 600 removes the execution status indication of network request.In whole process, according to hot plug events,
It removes incorrect network request and has executed status indication, after avoiding plug-in card again, do not change because network request executes state,
The problem of causing terminal that cannot initiate data dial, cannot normally surfing the Internet, improves hot plug stability and user experience, realizes heat
Plug multibard data rationally controls.
First processing module 400 includes: in one of the embodiments,
Recognition unit, for when the triggering of hot drawing card event, identifying whether the card being pulled out is to be attached with ps domain in more cards
The card of data service.
Processing unit, for obtaining when the card being pulled out is to be attached with the card of ps domain data service in more cards
DcTracker object.
The card for being attached with ps domain data service is data card, and multi-card terminal could allow to surf the Internet by data card.Identification
Whether the card being pulled out is to be attached with whether the card card that i.e. judgement is pulled out of ps domain data service is data card in more cards.More cards
Data in terminal card is also known as main card, and multi-card terminal is surfed the Internet by main card, herein, identifies, sentences to the card of extraction
Whether the disconnected card extracted is main card, when for main card, will affect multi-card terminal and currently normally surfs the Internet, need to control Second processing module
600 carry out corresponding operating;When the card of extraction is not main card (for example, vice card), no influence of currently surfing the Internet on multi-card terminal,
Without starting Second processing module 600, it is directly entered the operation for the SIM card that response user is newly inserted into.It is with double card double standby mobile phone
Example, identifies whether the card being pulled out is main card, when for main card, obtains dcTracker object, when for vice card, terminates subsequent
Operation.
As shown in figure 4, first processing module 400 includes:
Identity identification acquiring unit 420, for when card is pulled out, obtaining the identification mark of each card in more cards
Know.
Universal Integrated Circuit Card object acquisition unit 440 is obtained for the identity identification according to each card in more cards
The Universal Integrated Circuit Card object of each card.
DcTracker object acquisition unit 460, the Universal Integrated Circuit Card Object table for arbitrarily individually blocking in ought more blocking
When sign has pulled out card-like state, dcTracker object is obtained.
When listening to card and being pulled out card slot, identity identification acquiring unit 420 directly passes through system framework
(framework) identity identification of each card in multi-card terminal is obtained, specifically the identity identification can be
SubId, the identity identification of each card of the Universal Integrated Circuit Card object acquisition unit 440 based on acquisition, obtains each card
Universal Integrated Circuit Card object, detecting Universal Integrated Circuit Card object characterization in more cards with the presence or absence of some card is to have pulled out card
State (ABSENT state), when the Universal Integrated Circuit Card object characterization for having some to block has pulled out card-like state, dcTracker object
Acquiring unit 460 obtains dcTracker object.
As shown in figure 4, hot plug multibard data control system in one of the embodiments, further include:
Inspection card with lead card module 700, for when listen to reinsert card when, to the card reinserted carry out inspection card and lead
Card operation.
Setup module 800 initiates number for re-starting data card setting operation and network mode setting operation to more cards
According to dialing.
For the card reinserted, examines card and lead card module 700 and it is carried out to examine and block and lead card operation, so as to what is be newly inserted into
Card can activate and with other device co-ordinations in multi-card terminal.When the card activation reinserted is completed, setup module
Card in 800 pairs of entire multi-card terminals re-starts data card setting operation and network mode setting operation according to pre-set programs,
Initiate data dial.By taking double-card dual-standby smart phone as an example, when reinserting main card, to the main card being newly inserted into carry out inspection card with
Card operation is led, whether detection main card activates completely, and whether main card suit completely with the double-card dual-standby intelligent terminal, when these
When operation is completed, preset data card setting operation and network mode setting behaviour are re-started to the double-card dual-standby intelligent terminal
Make, double-card dual-standby intelligent terminal initiates data dial, attempts request data business, and when requesting successfully, intelligent terminal has connected shifting
Dynamic communication network, user can be surfed the Internet by the double-card dual-standby intelligent terminal.
Second processing module 600 is specifically used for when default number in dcTracker object in one of the embodiments,
When being activated according to connection, starting deactivates DDS network request process, and network request has been executed the modification of status indication function
For false.
Only several embodiments of the present invention are expressed for above embodiments, and the description thereof is more specific and detailed, but can not
Therefore it is construed as limiting the scope of the patent.It should be pointed out that for those of ordinary skill in the art,
Under the premise of not departing from present inventive concept, various modifications and improvements can be made, and these are all within the scope of protection of the present invention.
Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.