A kind of call record ordering method of mobile communication terminal
Technical field
The invention belongs to wireless communication technology field, be specifically related to a kind of call record ordering method of mobile communication terminal.
Background technology
In current mobile phone call history, all records all sort by the time, so time record early just comes the back, the time, near record just came the front.
But do not have electricity at battery of mobile phone, change the battery of electricity again after, the system time of mobile phone can revert to the time of making the product of mobile phone, and this time generally certainly wants Zao than the current time.And if the user does not go to reset the time, so just caused the time of the previous message registration of the time ratio of new message registration also to be wanted early, thereby caused the demonstration of message registration incorrect.
Summary of the invention
The object of the present invention is to provide a kind of call record ordering method of mobile communication terminal, mainly solve existing apparatus and carry out record ordering, in case system time changes the technical problem that just causes the record ordering confusion easily by the time.
For realizing the purpose of foregoing invention, technical scheme of the present invention is:
A kind of call record ordering method of mobile communication terminal is characterized in that it comprises the steps:
On the A communication terminal concordance list is set, concordance list comprises index value and comprises the message registration of message registration time, telephone number information;
B carries out initialization operation to concordance list, and this initialization operation mainly is to give index value to existing message registration, this index value from small to large, the value big more expression message registration time near more; Index value is M, represents concordance list also not pass through initialization;
When C need preserve new message registration when mobile communication terminal, travel through concordance list earlier and obtain index value maximum in the concordance list; If maximum index value is M, then first execution in step B; If maximum index value is not M, then is saved in new message registration in the concordance list and gives index value greater than current maximum index value;
D sorts to message registration according to index value again, and send demonstration according to the record after the ordering.
Described index value M is 0.
In addition, if in the concordance list to the limited amount system of telephony recording, and under the full situation of concordance list record, need to store new message registration, the message registration of deletion index value minimum earlier then, the new message registration and give new index value of restoring.
By the foregoing invention method, can overcome with the mobile communication terminal of message registration time as sort by, under the situation that system time changes, the technical problem that the message registration ordering causes confusion easily.
Embodiment
The invention discloses a kind of call record ordering method of mobile communication terminal, this mobile communication terminal comprises mobile phone, beep-pager, intercom etc.This method comprises the steps:
On the memory (as flash, the T card) of A communication terminal (as mobile phone, beep-pager, intercom etc.) concordance list is set, concordance list comprises index value and comprises the message registration of message registration time, telephone number information;
B carries out initialization operation to concordance list, and this initialization operation mainly is to give index value to existing message registration, this index value from small to large, the value big more expression message registration time near more; Index value is M, represents concordance list also not pass through initialization;
When C need preserve new message registration when mobile communication terminal, travel through concordance list earlier and obtain index value maximum in the concordance list; If maximum index value is M, then first execution in step B; If maximum index value is not M, then is saved in new message registration in the concordance list and gives index value greater than current maximum index value;
D sorts to message registration according to index value again, and send demonstration according to the record after the ordering.
Described index value M is 0.
In addition, if in the concordance list to the limited amount system of telephony recording, and under the full situation of concordance list record, need to store new message registration, the message registration of deletion index value minimum earlier then, the new message registration and give new index value of restoring.
Below by the inventive method being described further with concrete mobile phone operation example:
1, current mobile phone call history is:
10:00 13000000001
10:01 13000000002
11:10 13000000006
2, setting up also, initialized concordance list is that this concordance list can be stored three records
Index value |
The message registration time |
Telephone number |
3 |
11:10 |
13000000006 |
2 |
10:01 |
13000000002 |
1 |
10:00 |
13000000001 |
3, behind the replacing mobile phone, increased a message registration again, owing to after changing system time is not set, so this message registration is recited as 9:50 1300000007;
4, preserve this record after, the information of concordance list is:
Index value |
The message registration time |
Telephone number |
4 |
9:50 |
13000000007 |
3 |
11:10 |
13000000006 |
2 |
10:01 |
13000000002 |
After the operation, original index value be 1 record because the record restricted number of concordance list is earlier deleted, adding new record and sorting then according to index value.
Being preferred embodiment of the present invention only in sum, is not to be used for limiting practical range of the present invention.Be that all equivalences of doing according to the content of the present patent application claim change and modification, all should be technology category of the present invention.