Start MountService before performBootDexOpt

This change is to start Mountservice before starting
performBootDexOpt, as in one case, in performBootDexOpt
when system upgrade happens, StorageManager will be started to
get the low threshold of DataDir. But, at this point, as
Mountservice is still not up, StorageManager will end up
having a null object of Mountservice.

Change-Id: If2b5e1b58e7d2a72c6313f196e98a68738295ec6
Be increasingly aggressive about fstrim if it isn't being run

The current heuristics depend on devices being alive at midnight+ in
order to run periodic background fstrim operations.  This unfortunately
means that people who routinely turn their devices off overnight wind
up with their devices *never* running fstrim, and this causes major
performance and disk-life problems.

We now backstop this very-friendly schedule with an increasingly
aggressive one.  If the device goes a defined time without a background
fstrim, we then force the fstrim at the next reboot.  Once the
device hits the midnight+ idle fstrim request time, then we already
aggressively attempt to fstrim at the first available moment
thereafter, even if it's days/weeks later without a reboot.

'Available' here means charging + device idle.  If the device never
becomes idle then we can't do much without rendering an in-use device
inoperable for some number of minutes -- but we have no evidence of
devices ever failing to run fstrim due to this usage pattern.

A new Settings.Global element (type 'long', called
"fstrim_mandatory_interval") is the source of the backstop time.  If
this element is zero or negative, no mandatory boot-time fstrim will
ever be performed.  If the element is not supplied on a given device,
the default backstop is 3 days.

Adds a new string to display in the upgrading dialog when doing
the fstrim.  Note it is too late for this to be localized, but since
this operation can take a long time it is probably better to have
it show *something* even if not localized, rather than just sit there.

Bug 18486922

Change-Id: I5b265ca0a65570fb8931251aa1ac37b530635a2c
Properly recognize repeating wakeup alarms

cherry-pick from lmp-mr1-dev

The code in place was inappropriately treating all recurring alarms
as non-wakeup for purposes of deferral.  Worse, it was overriding the
"this deliverable batch of alarms includes a wakeup alarm" bookkeeping,
so could potentially cause inappropriate deferral of even standalone
wakeup alarms.

Bug 18591317

Change-Id: I2a62ed4badcaeb549c1ac4f086014aa829e45427
(cherry picked from commit 864d42eb96a9127b7d2f10ad11e709c24b4b4304)
Tune delivery and batching of alarms

cherry-pick from lmp-mr1-dev

* Inexact alarms no longer coalesce with exact alarms.  The motivation here
is that exact alarms are far more likely to be wall-clock aligned, and in
general pulling all alarms toward wall-clock alignment is a bad idea.

* Wakeup times are now fuzzed within the target batch's allowed window
rather than being hard pinned at the start of the window.

Bug 18631821

Change-Id: Iefaf34eee3f2a6546abefc27e177ee2fdcff935f
(cherry picked from commit 81f9882b5aadd6a2289c9f521a06a7af5f35ebf0)
make switch to last app animation snappier

Change-Id: Ia253a3db45109da7dd4f7a2467184d81c04918b4
core: Fix typos in AOSP EN resources

Change-Id: I40220888c2fbe87629d17fc52046e554388de3ee
input: add workaround for broken hardware keyboard support

* add workaround var for devices with broken kernels

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: I98b04c6906a0e7a1ad893b25d0377bf6df97f30c
Fix bad alarm delivery

The man bent over his hourglass,
A programmer of sorts. The day was green.

They said, "You have a blue hourglass,
You do not fire alarms when they're asked."

The man replied, "Alarms as they're asked
are changed within the blue hourglass."

And they said then, "But fire, you must
Alarms beyond us, yet themselves,

Alarms within the blue hourglass
That trigger exactly when they're asked."

 ---

Fix the delivery-fuzzing semantics that had been introduced in
81f9882b5aadd6a2289c9f521a06a7af5f35ebf0.  That patch turned out
to be incomplete; in particular, alarms scheduled later might require
the validity of an already-scheduled kernel alarm even if they did
not affect the head alarm batch directly, and this was not being
addressed.  For now, roll back the fuzzed delivery logic entirely.
(This is not a full revert because that patch also caused exact alarms
to be considered standalone for batching purposes, and we need to
preserve that new policy.)

Bug 18726690
Bug 18765436

This is a 'git revert' of 81f9882b5aadd6a2289c9f521a06a7af5f35ebf0
*except* that this CL preserves the "exact alarms are treated as
standalone" portion of the original patch.

Change-Id: I54c763775877de5b6eeb5617544aa6100bb17526
KeyGuard: fixed strings warnings

Change-Id: I53047334512de40e64b01f1824861fb3c804eedd
frameworks: disable loading notification groups in System profiles

While the functionality of groups was left in the ProfileManager
backend, the front end no longer exists, and there were default
notification groups still being loaded. Remove the default ones and do
not load any that may have been persisted.

Change-Id: I4e4102607f1380d6fc5f6be7746d06bebf3c006b
Signed-off-by: Roman Birg <roman@cyngn.com>
SystemUI: Silence verbose NetworkController logging

Change-Id: I2f9ef2804b83d31fe6745e1db4ed9b905d83cb56
SystemUI: add Weather display to status bar header

Change-Id: Ic2fea861c36f405d8a0e64cc9224f47088ac6351
Signed-off-by: Roman Birg <roman@cyngn.com>
Settings: Forward Port Volume Long Press Skip Tracks (1/2)

Bring Forward Volume Rocker Track Change

Requires Settings Change
http://review.cyanogenmod.org/#/c/82222/

Change-Id: I70b00e08fe48707110725dd1daa56b1e48d15a03
National roaming info for yesss! in Austria

Change-Id: I0f8eaf3e83df4886fa24a9af95087a20ebb10a3f
frameworks: fix make updateapi for weather setting

Change-Id: I3a23cd432138e63e037b427ceaf62a87627dfde6
Signed-off-by: Roman Birg <roman@cyngn.com>
Forward port Samsung STK support (frameworks/base)

[pawitp: port to Lollipop]

Change-Id: I08d169bc466df290fca838b09f6b0fbea2ac82a8
Feature : Volume adjust sound preference 1/2

This patch allows the users to choose if they want the audible tone when adjusting the volume

The new preference is in
Settings | Sound
    Volume adjust sound
        Play sound when adjusting volume with hard keys
The Checkbox is defaulted to ON (1 in defaults.xml)

Look for 2/2 for the Settings, Sound Panel Change

[mikeioannina]: Update for L

Change-Id: I705c23065706317760ba60efc1a71f3ba6082bbd
Forward port battery icon options [1/2]

Bring forward the various battery icon options.
Portrait, Landscape, Circle, Text.

Still retains new options for where to display battery percentage text.

Change-Id: Icfc14d989eebde9014538291c24aa76d328df234
SystemUI: Update WiFi indicator drawable sizes

Resize both the activity arrows and the signal strength indicators so
that both are properly centered and overlay correctly for all screen
densities.

Change-Id: I7e95adcdc110995504534a58eb0df42ba132bc97
Bluetooth-Wipower: Enable dynamic logging for A4WP

This helps to enable wipower dynamic parameters intercepted
at host to be logged via adb/command line.

Change-Id: Ibd79f4d56c99a43eab1146f4ae20155ac439cd8f
CRs=fixed: 754356