Originally postedKibi1
Hi there
I wowould like find an API to discover the current timeouts on the device for the backlight and the screen-saver.
Basically, my application needs to mess with the Inactivity Timer to do its thing, but I still want the user's light to go out when he expects it, and to give way correctly for the screen saver-and I guess I want to update myself if the user messes with his settings.
I am guessing there is information somewhere in the crepository, but if anyone knows where (or knows a simper way) Please tell.
Many thanks
Kibi
Hi,
Assume that the value is stored in a cenrep file, do the following steps,
1. Start the s60 3rd edition fp2 emulator and then enter the "Settings" application.
2. Remember the default value of the power-saver timeout setting (15 s) and then modify it (to 25 s, for example), and then exit the "Settings" Application
3. Search in the 'epoc32' folder for recently changed files, there are several modified. CRE files.
101f87ef. CRES
101f877c. CRES
1000a82b. CRES
Make a copy of them
4. Enter the "Settings" application and then modify the setting again (to 30 s, for example), and then exit the "setting" Application
5. search in the 'epoc32' folder again for recently changed files, still. crecrefiles. compare them to the copies made in step 3, and we can see only the 101f877c. re is changed, and actually only one byte is changed from 0x19 (25 s) to 0x1e (30 s), so it is must be the one we are looking.
6. check the "\ epoc32 \ release \ winscw \ udeb \ Z \ private \ 10202be9 \ 101f877c.txt", the key of the item with default value 15 is 0x8, so I guess it is the key for backlight timeout.
...
0x8 int 16777216 cap_rd = alwayspass cap_wr = writedevicedata
...
You can make a further confirmation by code:
Code:
Tint timeout = 0; crepository * cenrep = crepository: newlc (tuid: UID (0x101f877c); User: leaveiferror (cenrep-> get (0x8, timeout); cleanupstack: popanddestroy (cenrep );
Regards
Ziteng Chen