Quote: Originally Posted by
god_of_cpu 
You don't. The way to modify system modules is through making a new skin. If you want to add functionality to a module, the only way to do it is to make an overlay that is restricted to a particular module.
I got my problem solved yesterday, but only through a series of hacks which probably are not the proper way of solving them. I (and am sure others here, too) would appreciate if you could comment on the approach I used to solve my problem. We can all learn from some criticism of the 'correct' approach.
-
Problem: After coming back from hibernate the radio doesn't work on T3.
- '
Workaround': Create a 'Restart SD' button on Radio System module
-
Procedure of my ghetto solution due to my ignorance of the SD API:
1.- Skin the radio system module and add a button captioned "RestartSD Radio".
2.-
Hack #1: Since I couldn't find a way to register for an 'OnClick' of the button, I wrote a C# adding that created a custom 'exit module'; Since I can listen for an event that does the transition in, I can fire my "restart" code that way.
3.-
Hack #2:
Since there is not way to tell SD to
restart, I wrote a C++ app that monitor SD by process id every half a second and restarts it once it has shutdown. This app doesn't always run. The way it works is that once someone enters my 'exit module', the C# code will spawn the C++ app that does the monitoring, and then the C# code will trigger the shutdown of SD. The C++ app goes away once it has already restarted SD.
So now, everytime my radio doesn't work, I just press the restart sd button and everything works fine once again.
Did I take the long route?