Method, apparatus and terminal device for obtaining call log
Abstract
Examples of the present disclosure provide a method, apparatus and terminal device for obtaining a call log of a terminal device. The method includes: when requesting for call log data of a terminal device, determining whether the terminal device is already in jailbreak; when the terminal device is not in jailbreak, from a call log database corresponding to an application program with a call function, obtaining call log data corresponding to the application program, and displaying the call log data through a User Interface (UI); and when the terminal device is in jailbreak, obtaining a full amount of call log data of the terminal device by a service program running background or a hook system interface, and displaying the full amount of call log data through a UI. According to the present disclosure, obtaining the call log data compatible with both the non jailbreak terminal device and the jailbreak terminal device is achieved.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A method for obtaining a call log of a terminal device, comprising:
requesting call log data of a terminal device from an adaptation layer by a UI layer calling an Application Programming Interface (API) provided by the adaptation layer;
in response to requesting the call log data of the terminal device, determining from the adaptation layer if the terminal device is in jailbreak;
if the terminal device is not in jailbreak, obtaining call log data corresponding to the application program from a call log database corresponding to an application program with a call function, and displaying the call log data through a User Interface (UI); and
if the terminal device is in jailbreak, obtaining a full amount of call log data of the terminal device by a service program running background or a hook system interface, and displaying the full amount of call log data stored in the database through a UI;
wherein the full amount of call log data of the terminal device is stored in and obtained from the call log database corresponding to the application program with the call function;
wherein after obtaining the call log data corresponding to the application program, obtaining the full amount of call log data of the terminal device by the adaptation layer using the service program running background or the hook system interface; and
wherein displaying the full amount of call log data through a UI comprises
displaying the call log data stored in the call log database through a UI.
2. The method according to claim 1 , wherein obtaining the full amount of call log data of the terminal device by the adaptation layer using the service program running background comprises:
sending by the adaptation layer a request for obtaining call log data to the service program running background; wherein the request includes a timestamp corresponding to a previous request;
if a current timestamp of the service program running background is the same as the timestamp corresponding to the previous request, returning to the adaptation layer an indicator of call log data being unchanged; and
if a current timestamp of the service program running background is different from the timestamp corresponding to the previous request, obtaining the full amount of call log data, and returning the current timestamp to the adaptation layer.
3. The method according to claim 2 , wherein storing the full amount of call log data in the call log database comprises:
determining by the adaptation layer whether the full amount of call log data is changed compared with a full amount of call log data obtained previously; and
if the full amount of call log data is changed, storing the full amount of call log data in the call log database.
4. An apparatus for obtaining a call log of a terminal device, comprising:
a jailbreak determining module configured to, in response to requesting for call log data of a terminal device, determine whether the terminal device is in jailbreak;
a first obtaining and displaying module configured to, if the terminal device is not in jailbreak, obtain call log data corresponding to an application program from a call log database using a call function, and display the call log data through a User Interface (UI); and;
a second obtaining and displaying module configured to, if the terminal device is in jailbreak, obtain a full amount of call log data of the terminal device using a service program running background or a hook system interface, and display the full amount of call log data through a UI;
wherein the jailbreak determining module comprises:
a call request unit configured to request the call log data from an adaptation layer by a UI layer calling an Application Programming Interface (API) provided by the adaptation layer; and
a jailbreak determining unit configured to determine by the adaptation layer whether the terminal device is in jailbreak; and
wherein the second obtaining and displaying module comprises:
a first data obtaining unit configured to obtain by the adaptation layer the call log data corresponding the application program from the call log database corresponding to the application program with the call function;
a second data obtaining unit configured to, after obtaining the call log data corresponding to the application program, obtain the full amount of call log data of the terminal device by the adaptation layer using the service program running background or the hook system interface;
a storing unit configured to store the full amount of call log data in the call log database; and;
a displaying unit configured to display the call log data stored in the call log database through a UI.
5. The apparatus according to claim 4 , wherein the second data obtaining unit comprises:
a data request sub-unit configured to send by the adaptation layer a request for obtaining call log data to a service program running background, wherein the request includes a timestamp corresponding to a previous request;
a first returning unit configured to, if a current timestamp of the service program running background is the same as the timestamp corresponding to the previous request, return to the adaptation layer an indicator of call log data being unchanged; and
a second returning unit, configured to, if a current timestamp of the service program running background is different from the timestamp corresponding to the previous request, obtain the full amount of call log data, and return the current timestamp to the adaptation layer.
6. The apparatus according to claim 4 , wherein the storing unit comprises:
a data change determining sub-unit configured to determine by the adaptation layer whether the obtained full amount of call log data is different from a full amount of call log data obtained previously;
a data storing sub-unit configured to, if the full amount of call log data is different, store the full amount of call log data in the call log database.Join the waitlist — get patent alerts
Track US9742901B2 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.