Everything starts with me on a sensation on CM9 with android 4.0
RubberBigPepper @ 10/23/2012, 9:41 PM
Damp and a lot of things from the interface is not completed.
normal interface - nothing superfluous)
There is a garbage that the application does not pick up and does not do -17, although it hangs with a priority of 10-12 ... perhaps because of fast transitions.
RubberBigPepper @ 10/23/2012, 9:41 PM
I listen to criticism
not a criticism. I just wanted to talk about the logic of the application.
Now, as I understand it, every 5 seconds the service checks that the window is open. if the window is different than 5 seconds back, re-assigns -17 to the necessary applications. So?
I will consider 2 situations, I have already stumbled upon both.
1) I sit and read a book for 2 hours. Nothing happens. Why is there a new window every 5 seconds?
2) I went into the application and in the same second I left it. It turns out the service missed this moment ...
I propose the following logic. If the service still does a check every 5 seconds to a new window, then let's better every 10 seconds / minutes it will be stupid to put -17 in all the necessary places.
And the most important thing! Such programs as
В® Pimp My CPUand
В® SetCPUalso tied to launch the application.
I am sure that they do not monitor every n seconds what is on the screen. Why? because the frequency change they do instantly. either they monitor every 0.5 second (then the battery would die quickly, and this is not so), or they wait for some kind of event.
I think that they react to some event - “application launch” / “application change” / / window has changed (I don’t know how to correctly name it). an event occurred, they responded instantly, rather than monitor every n seconds.
Ideally, I present the following program logic. - We made the necessary applications in the program unkillable.
- left the program and started the service
- the service does NOT monitor every n seconds, but waits for the event "application launch" / "application change" / "window has changed"
- As soon as an event has occurred, he changes to -17 in the right places and waits for the next. developments.
- The timer also works once every n minutes (just minutes, this is for the situation with reading a book) forcibly stuffs -17 into the right places, without looking at what is already there.
Please see how the pending event is implemented.
В® Pimp My CPUand
® SetCPUif we manage to implement it in exactly the same way, it would be great, because it seems to me that this is the best implementation, as it doesn’t give you any failures even with a quick transition through the house (long press)
Version 0.1 beta added to the header Post has been editedBlack_BG - 24.10.12, 08:41