SystemServer: Do not start Atlas Service on lowram devices.

Provide an on/off switch to control atlas service at start-up. This
service is disabled by default on lowram devices to save memory.

Atlas service is responsible for pre-loading drawables which
can be shareable among the applications. Found that the probability
of using same drawables in different apps concurrently is very less.
However it allocates fixed size of ion buffer based on config.
So by disabling it this memory overhead can be avoided. We are safe
to disable this service as it does not block any functionality.

Change-Id: I3c73111be71ff6a39f87d711e6dc9382637fd537
Base: Disable proximity sensor when screen goes on in ActiveDisplay/PocketMode.

Active Display (in Pocket Mode) currently only switches off the proximity sensor in some cases.
If the user switches on the screen itself, the sensor is left running. This change
stops the sensor as soon as the screen goes on. Active Display already started the sensor each
time the screen goes off.

Change-Id: Id7afcd858f341ad929606d302c5741efa99a7c6f
Revert "ActivityThread: Throw an exception back to caller when supposed to"

This reverts commit ea642bf86b15705c6bc58258b23c12894d955d56.
Revert "Active Display : permission fix from mokee"

This reverts commit e8ba5fb52875207bf69c989442a670f43a04ecd1.
Revert "fix possible buffer overrun and memory leak"

This reverts commit 0fb0504bb809a95483873cd0addaecc372d16459.