get rid off the MAP_ONCE flag is MemoryHeapBase (as well as it's functionality),
this feature should not be used anymore.
the software renderer was incorrectly using the default ctor which set MAP_ONCE,
causing the leak. the software renderer itself is incorrectly used while coming
back from sleep.
Change-Id: I123621f8d140550b864f352bbcd8a5729db12b57
Cleanup of duplicate code
Caching Ntp data so we don't hit the network as often
Clearing out of MRU data when we switch to a new sim
Sending notification after we reset byte counts
bug:2605277
bug:2605272
bug:2597530
bug:2576057
Change-Id: I3df526bae6374f6ae56fed67b0defad2b4fabefd
The value returned is purely a function of what's passed in, all
following final members.
BUG=2606839
Change-Id: I506fb9b1f3be965576c2b3317a30ff1f990ccda3
Previously, this status icon reflected just the incoming
call behavior:
- gone for audible (with or without vibrate),
- wiggling phone for vibrate,
- silent (speaker + X) for no audible ring or vibrate.
Now that silent mode has changed (see VIBRATE_IN_SILENT),
you can easily get into a state where this icon is
confusing by setting the incoming call ringer to *never*
vibrate but setting the overall device silent state to allow
vibration (VIBRATE_IN_SILENT=true). In this case, rocking
the volume all the way down would show a wiggling phone
(because the device is in vibrate-only mode) but the status
bar would show speaker+X (because the incoming call would
neither ring nor vibrate).
Now these two icons are consistent. This means, however,
that if this special condition is set by the user (device
vibrates in silent mode, but incoming calls should never
vibrate) and the device is in silent mode, the status bar
will show a wiggling phone even though incoming calls will
not vibrate the device. This puts the ringer on a more even
footing with other apps on the device, which may elect not
to vibrate even if VIBRATE_IN_SILENT=true overall.
Bug: 2598014
Change-Id: Ib942f68738d77ab0d9b9da4fac718ae5957c133c
We believe these errors happen when the window
manager has told surface flinger to close the
native window.
If this error happens while we are creating the
EGL surface we exit the render loop (and
therefore exit the render thread.)
If the error happens while swapping the surface
we ignore it.
In either situation, we expect that the
application is about to be shut down by the
window manager, so it should not be necessary
to try and recover from the error.
Use elapsed time not wall time for alarms so users can't play with the
system time to get around things.
Also using NTP servers to pull in an authoritative time - if we the build
is configured with an NTP server we will not advance to the next cycle
without it, but we also will not trottle - rather not throttle users
on an error.
Note that the poll alarm is just relative to the last poll time and real
time doesn't matter.
Defining the time-fetching API's as returning time in the system wallclock
range (correcting if we are using NTP time internally).
bug:2597530
Change-Id: I1c0ac0923314c2f8a04edd0b36c4845352eae99a
In lightSensorChangedLocked we ignore the light sensor if the battery is low.
But in applyButtonState() and applyKeyboardState() we were still using the previous
mLightSensorScreenBrightness value, which resulted in a race condition that could
leave the button lights on after the screen turns off.
Now we ignore the light sensor value and button brightness override if the battery
is low so the low battery behavior is consistent.
Change-Id: I4943f8904299883211a95596ee207df69d1eaea2
BUG: 2570962
Signed-off-by: Mike Lockwood <lockwood@android.com>
The NotificationPlayer sets an OnCompletionListener on the
MediaPlayer it's using to play the notification.
NotificationPlayer relies on the completion event to abandon
audio focus.
The player was started before the listener was set. The theory
about the bug is that the player finished playing before the listener
was called. Therefore the audio focus was never abandonned, and
the music didn't resume.
Change-Id: Ic3baf359ea24de0d832a655dc47e745b25bc3dec
Uses the last used data until the SIM is available (if ever). Supports data from
several SIMs for all the world travelers out there.
bug: 2576057
Change-Id: I70e34a51f1c2ccda41a480652b0233b68ff3f538
Old calc was off by 2x and was affected by the user-settable system clock. The error
came because it was calculating the offset between our clock and the NTP clock and the algebra
had two factors of the offset instead of the desired 1.
bug:2600010
Change-Id: I0856091d32b50e6909e4889fb98df819e0aeabbe
The point of this patch is to deal with the following case:
- A system application exists in the system partition. As such its
native code lies under /system/lib
- An upgrade for it is installed through Market and overrides the
version on the system partition. This places its native libraries
under /data/data/<pkgname>/lib/
- Finally, the system is upgraded through an OTA, with an even more
recent of the system application. We thus must remove the Market
package as well as the native libraries that are in <dataDir>/lib
since the new versions in /system/lib will be more recent.
The patch itself removes the files in <dataDir>/lib when such a
situation is detected. Note that this directory is created by the
PackageManager service and owned by the 'system' userID. The application
cannot create files there so simply erasing the content of the directory
is enough (and avoids reparsing the market package file to list
the installed binaries).
The patch also fixes a different issue which can be reproduced with:
- have system app installed on /system partition
- install an update (e.g. adb install -r Term.apk)
- uninstall the update (e.g. adb uninstall com.android.term)
the logcat shows that the PackageManager will unpack the native libraries
from the original /system/app/Term.apk into <dataDir>/lib, while they
already are in /system/lib. The patch fixes that too.
Change-Id: I5dfe27b91b6b31972e9cd4c196d15c3692732127