[2/2] Add option to change size of QS ribbon bar

PS2: Use narrow for 2nd size and decrease margins for smaller tiles
PS3: Remove trailing WS + rebase
PS4: Rebase and fix unchanged dimen use
PS5: Fix renamed dimen missing
PS6: Change narrow to automatic and move applying of settings down
PS7: Make small be narrow instead. "Small" is actually Auto (Narrow)
PS8: Use measuredWidth and modify HorScrollView, otherwise layout changes will be ignored
     (Orientation switches were a big problem)

Change-Id: I6dbe2d165398a8142e024db827208dc778003431
ActivityManagerService: Fix heavy games kill during incoming call

Force heavy apps penalisation only to large "cached" apps. Donot
include "previous" app in this category. This ensures large apps
are not killed during special incoming alerts like incall, sms.

Change-Id: I51b4a238415efad63ef36f7e0cd056823a72a47d
Prevent killing of process during service bringup

ActivityManagerService sometimes kills the process whose service
is being brought up during bindService.
This happens when the process starts hitting some Pss threashold.
Specifically this is causing InCallUI process to be killed during
bind request from Phone app.

CRs-Fixed: 681329

Change-Id: Id548a22d7e7ce3aa0b0511763078f813fafd6e16
Telephony: Get SIM card capacity count of SMS.

Add one API:
- getSmsCapacityOnIcc: get the capacity of stored SMS on ICC card.

CRs-Fixed: 645022
Change-Id: I8064d694d35c4200074a24ee4159d09ecb2a779c
Don't check for null references.

The address of a reference will never be null in well formed C++ code.
The function returning the value being checked simply returns a
dereferenced pointer (which is just going to segfault if it is null!).

Change-Id: I3a4eb6adfc003c63ebf21b81d46088d52154d99d
Revert "Add support for allow-permission extension."

This is not currently in use and can be replaced by a better solution.

This reverts commit 33110a0b2f4cdfd2ee6911a479d1fbbcd14bc389.

Change-Id: I672381398c8d09275226a0ef4ead408e2ccbd040
Allow granting permissions based on signature in <allow-permission/>

This patch allows us to either specify a sharedUserId or a package
signature to use when granting the specific permission.

Change-Id: I8aed78d40316e0e94ac1bfefc7c4a3016a2a9a6b
Fixed display of '2147483647' on statusbar

For telephony  network signal strength text view
for some invalid signal values instead of displaying
Integer max use -∞.

Change-Id: I93a16a3b16df7a18cc805356904ab9027e7d0aee
[HWUI]: Bind wrong VBO when drawing text

Symptom:
We should not set mDrawn to true if we have no GL draw call.

Root Cause:
In some case, issueDrawCommand may executed without GL draw call.
It may miss the unbindMeshBuffer in the next issueDrawCommand and the status of VBO of FontRenderer will incorrect.

Solution:
Add condition to check if have draw call.

Change-Id: I9e96cd0334c515172b0ed6c25b101c81cf6d2e6f
Themes: Load correct common resources

In order to support theming separate packages we need to make sure
we load that theme's common resources.  We were currently loading
the system wide theme's common resources which is incorrect for
package level theming.

Change-Id: Ie594458be9b6b3f4a25c56c9c5c9ba5bd8cf063a
Themes: Update provider with components that were applied

There may be times when one or more components do not get applied
so we should remove them from the component map and then update
the provider after all changes have been made.

Change-Id: I75d2a674d84c6a0de3f0b613d1dfc50654c2d181
Merge remote-tracking branch 'upstream/android-4.4' into android-4.4