Adapted from change I44ce250e, "Maintain binding to crashed
listeners from NotificationManagerService.":
> This fixes the logic on the death handlers for notification
> listeners, and doesn't unbind from the listener services so
> that the system will bring them back up again.
Bug: 12587702
Change-Id: I41d0c6733046ee9760bcfae4407e754592b805ea
When Intent.FLAG_ACTIVITY_REORDER_TO_FRONT was set the TaskRecord
member frontOfTask was being set true incorrectly for the top
activity. It should only be true for the bottom activity. This fix
ensures that frontOfTask is always set correctly for all activities by
consoldating it into one method.
Fixes bug 12171535.
Change-Id: If982dad3c81b2b816adc5d89e7e0496923098a70
If flag for error after attach is not reinitialized, it may cause
NullPointerException on subsequent onAttachedWindow if error text
was reset to null.
Change-Id: I8976c28a6ca71017e5c4b3f29d4eeeb2eda48c38
Due to an internal rounding in the renderer, the calculations
for the cropping area could be slightly offset, getting out
of the image boundaries. I sanitized the rect by ensuring they
are inside the image.
Bug: 12174629
Change-Id: Icc37790732ddd479631b898b23c05501d2dcd5be
Cherrypick of I0f8d33b0c77129f72581bc43e7f4fdc25469b520
This CL allows the Framework class InputMethodManager to behave
in a more deterministic way, that is to say, with an I/O barrier.
InputMethodManager#setAdditionalInputMethodSubtypes is internally
implemented as a RPC to the corresponding counterpart in
InputMethodManagerService. The problem here is that this RPC is
marked as "oneway". As a consequence, this public API call
returns immediately without waiting the additional subtypes are
actually added. This behavior is also not documented so far
unfortunately.
See the following demo code:
Final InputMethodManager imm = ...;
imm.setAdditionalInputMethodSubtypes(id, subTypes);
Final List<InputMethodInfo> ims = imm.getInputMethodList();
Currently, it is not guaranteed that the InputMethodInfo returned
from #getInputMethodList reflects the result of the previous call
of #setAdditionalInputMethodSubtypes because of its undocumented
asynchronous nature.
With this CL, InputMethodManager#setAdditionalInputMethodSubtypes
behaves as if it has I/O barrier. This change should make it easy
for IME developers to use additional subtype mechanism.
BUG: 13033954
BUG: 13291370
Change-Id: I0455b176bfb3176c533ba3241881f05092b98abc
The value for the TCP initial receive window comes from,
in order,
kernel
/proc/sys/net/ipv4/tcp_default_init_rwnd
init.rc (via properties)
net.tcp.default_init_rwnd
properties
net.tcp.default_init_rwnd
gservices
Settings.Global.TCP_DEFAULT_INIT_RWND
Bug: 12020135
Change-Id: I0e271be19472900fa9f3bab037d53383ec014a9e
setAvrcpAbsoluteVolume is passed wrong unit parameter from AudioManager.
It cause maximize volume in Bluetooth speaker/device.
The volume expected by Bluetooth Avrcp should be from 0 to 15.
But the current volume parameter passed to Bluetooth Avrcp is from 0 to 150.
It is scaled by 10 times than the correct volume.
index = rescaleIndex(index * 10, streamType, streamTypeAlias);
Should divide the volume by 10 before pass to Bluetooth Avrcp.
bug:12495379
Change-Id: I4160588e92ee384e21a75d63036d8bd6ccb30621
When traversing windows save the fact that windows above the topmost
fullscreen window do not hide the lockscreen. If there is such a
window don't show it.
(cherry picked from commit ab55e524b89c13082193940a5bf8480a2c2522d9)
Fixes bug 13225149.
Change-Id: Ib6f33cbcfb2f60d8957a9184729ecdec80c6a236
The activity manager needs to set launchedFromPackage to be that of
the previous package in the case where flow has been redirected
through an intermediate activity.
Change-Id: I678fc2e7d984991ac715251a784ba7d7ccbf9fca
Under certain circumstances, the power manager might continue to
hold the display wakelock long after the display had been turned
off due to the mDisplayReady flag having an incorrect value.
1. An inverted conditional caused DisplayPowerState to incorrectly
signal the screen on ready state.
2. The DisplayPowerController failed to clear the block screen on
flag in the case where the screen was turned off before it became
unblocked from turning on. This could happen when the display was
rapidly turned on-off-on-off.
Bug: 13248135
Change-Id: I8faa3034695c83c8cd35613d81acccf40d22128d
Fixed a bug that cause Context.createPackageContext() to discard
display information. Likewise also fixes issues where the
activity token, override configuration, user handle, and
restriction state might be discarded.
As part of this change, reworked how Contexts are created to make
initialization easier to understand and less error-prone.
The init() methods have been removed and most of the state is
now stored in final variables.
Bug: 12015587
Change-Id: If795851f1cd078bef889b76a52e00d9b3c06ab11
Allow device overlays to override the behavior of the
hasPermanentMenuKey method at build time. This is useful for devices
that do not behave as the usual autodetection mechanism expects.
Device overlays should set config_overrideHasPermanentMenuKey to 1 if
the device DOES have a permanent menu key or 2 if the device DOES NOT
have a permanent menu key.
Bug 11698700
Change-Id: I467b68528cf681b08adcaebc2402d8bdd84f6b5c
We'd otherwise leave the data dirs & native libraries
lying around. This will leave the app permanently broken
because the next install of the app will fail with
INSTALL_FAILED_UID_CHANGED.
Also remove an unnecessary instance variable.
Cherry-pick from master
Bug 13416059
Change-Id: I1e644aab74d5ea519231800915b39c2f55d043ae
Since Kitkat, an app pre-loaded under /system/priv-app/ has
FLAG_PRIVILEGED. However, if the app updated and the device
rebooted, privileged flag is unset from pkgFlags. This patch
fix issue to assign privileged flag when scanning the updated
packages.
Bug: 12640283
Cherrypick from master.
Change-Id: I833d94cd911693c9291e8204f63bd8de945dbba6
SO_BINDTODEVICE is not needed with policy routing.
SO_BINDTODEVICE was also used on the default iface which causes problems
when the default iface is IPv6 only and the socket tries to connect to a
IPv4 address.
Bug: 12940882
Change-Id: I5b2bde0ac5459433fc5749f509072a548532f730