cpu: add voltage control

Easy voltage control is easy. I am not using the preference handler
here since its not enough flexible to solve this particular task.

Also notice the set on boot functionality is not implemented with this,
as usual.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
helpers: make the preference handler a bit smarter

The current PreferenceHandler worked very well for a dictionary
wich contained some files(parameters).
It couldn't handled single paths/files for some settings very well.

This problem should now be fixed, since it can either use
genPrefFromFiles() or genPrefFromDictionary() to build preferences
either from files or dictionaries. It makes it much easier to work
with and also a bit more flexible.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
cpu: fix a NPE during min/max frequency change

If the object from the preference returns something
like "Unavailable" we would end up in a NullPointerException.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
helpers: allow to change the font for each prefence

I am not sure yet how i will use this properly, but giving
an option to change the font on the fly is really nice.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
helpers: allow preference handler to use new font-system

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
activity: bring in some kitkat flavor

Kitkat based devices will benefit a lot from it.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
voltage: add proper kitkat layout changes

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
voltage: fix out of array issue

Also disabling the onBindView() since it currently has
zero usage and just breaks the compatbility.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
shell: add a small workqueue api

When the users applies a profile in the profiles panel
or when the user has activated the set on boot functionality
setRootInfo() would be called a few times. While this makes
no problems on powerful devices, it can create small UI lags
on low end devices.

This patch introduces some sort of global workqueue where
all commands can be stored and executed in one row, which
means the su-process is called just ones and not serval times,
thus improving peformance.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
cpu: set the right catch condition

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
profiles: rework the profile presentation

Reworking this a bit by adding cleaner fonts and adding
a second button for a future feature. Each profile line
can now have a title and a small summary.
Also fixing a few bugs here and there.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
tutorial: make room for tutorial screens

If the element was not visible during screen creation, the
tutorial code can't init correctly and just shows a "Ok" Button.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
aero: calculate the right value for actionBar

If a device is on kitkat but has no softkeys the layout would get screwed.
Fix this by checking correctly on which device we are running.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
shell: don't ever return null

getInfoArray() could return null, if the file was not found on the
device and thus could lead to a potential crash.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
showcase: fix button alignment on kitkat devices

When softkeys enabled the tutorial "Ok" Button would be
displayed to low, fixing that.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
per-app: add the backbone of per-app profiles (1/3)

This adds the backbone componentes for the per-app profiles.
perAppHelper creates for each available profile a new per-app
profile. This contains the selected applications as well as
system states (should system apps are visible or not).

PerAppService is the actual service behind all this. During app
changes it scans the foreground app and checks if there is
any profile out there which contains a match. If so, it will
set the new settings with help of the settingsHelper (future commit).
It also handles the default case handling (returning to previous state).

PerAppServiceHelper manages the service itself and starts it during
app start up. It can also cleanup everything if the user decides to
disable per-app profiles.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
profiles: add per-app profile selection (2/3)

This adds the per-app backbone code to the actual profile panel.
During creation each profile gets a new per-app profile with its
own settings.
Later a mapping to the saved date will be executed to get the
right settings for each profile.
Besides a visual update to the profiles this commit contains also
many cleanups and bug fixes. Deleting/Renaming profiles should be
much faster now, since it no longer requires root.

Although this changes and touches many things, there should be still
a backwards compatibility to "older" versions of Aero Control.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
aero: add per-app handling into main process (3/3)

This adds the service handling into the main aero control
process. During startup it checks if the user wants to use
per-app profiles and starts the according service.
If changed later in the app settings it cleans up everything
set by itself.
This commit also contains the main "default" profile after
the system returns to a normal state.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
settings: save default profile only in per-app mode

Fix also the IO-Scheduler here, which was broken.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
shell: fix NPE in workqueues

If no parameters were set, we could get a null pointer.
Just echo once should helping here out.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>