15011 Commits

Author SHA1 Message Date
Craig Mautner
2b2395f39a Merge "Don't wait for finishing animation when second display is disconnected" into klp-dev 2014-03-25 17:22:55 +00:00
Koji Fukui
9bc5f2f457 Don't wait for finishing animation when second display is disconnected
Basically WindowManagerService wait for finishing animation when
a window is removed. But when second display is disconnected, windows
on second display can't be shown even if animation is waited for.
On the contrary, it keeps on waiting for finishing the animation
in special case.

With this fix windows are immediately removed without waiting for
animation when second display is disconnected.

(Cherry picked from aosp 39f7068ed903f747d6885117dc1bac69f626ae91)

Change-Id: I1354c193c04db394a21a11c174e10c8e7da17a0e

Fixes bug: b/13632129
2014-03-25 17:04:27 +00:00
Craig Mautner
81e094d76b Merge "Move task to top in window manager." into klp-dev 2014-03-25 16:48:38 +00:00
Matthew Williams
bb87ac7f97 DO NOT MERGE: Downgrade expedited to normal on reschedule.
bug: 12033540
Expedited was previously tracked by a redundant internal variable, ostensibly
as an optimisation. This variable could differ from the value in the bundle
depending on how the operation is initialised, which led to confusion. Now an
expedited sync will only be treated as such on its first execution.

Change-Id: Ibfc4e9e49b86c82f2364a6ef55f887705a053eb6
2014-03-24 14:42:06 -07:00
Chad Brubaker
1aad3ad4ec Merge "Fix support for simultaneous VPN tuns" into klp-dev 2014-03-21 20:52:14 +00:00
Chad Brubaker
de4e7b4947 Merge "Include the interface for clearDnsInterfaceForUidRange" into klp-dev 2014-03-21 20:52:05 +00:00
Mike Lockwood
d8be49089f UsbDeviceManager: A better fix for race condition when starting USB accessory mode
On some devices, the USB "set configuration" command is propogated to the framework
after the "start accessory" event is received.  However, on other devices like
the 2011 ADK board, no "set configuration" command is sent at all until we have
reenumerated in acccessory mode.  To fix the original problem without breaking other
devices, we can simply remove assumptions about if or when "set configuration"
will be received.  Now we simply remain switch USB configuration to accessory mode
when we receive the "start accessory" command, and remain there until the existing
10 second timeout expires.

Bug: 13393825

Change-Id: I4c9e3423185bd7252a907e4568d9e3ff06044b7d
2014-03-20 12:36:51 -07:00
Mike Lockwood
205a3ea0e2 Revert "UsbDeviceManager: Fix race condition between accessory start and USB configured uevents"
This reverts commit fbd5521fb5e94fad066e21b9f91f4782afe71660.

This change broke support for the 2011 ADK board, which never sends a "set configuration"
command before "accessory start".  So we revert this change and will replace it with a better fix.

Bug: 13535051
Bug: 13393825

Change-Id: Icd870d7ff6daff1567e04d93907f70f5d7e37884
2014-03-20 12:36:34 -07:00
Craig Mautner
97024321fc Move task to top in window manager.
In certain situations it was possible for a task to move to the top
in activity manager but not in window manager. This resulted in
the task appearing behind the launcher icons.

Fixes bug 13410184.

Change-Id: If0582b395e126a8aff70a0e4c64b731083c6ae8a
2014-03-20 10:08:04 -07:00
Jim Miller
46e631178e DO NOT MERGE - Fix memory leak caused by mismatched linkToDeath() in WindowManagerService
This fixes a bug where an allocated DeathRecipient in WindowManagerService
was holding a reference to keyguard binder interface after a call to
linkToDeath() without a matchin unlinkToDeath().

It was causing the keyguard side of the binder interface to stick around,
which in tern prevented the keyguard side from releasing its references.

The solution is to ensure matching linkToDeath()/unlinkToDeath() calls.

Fixes bug 11982048

Change-Id: I6959816b819ba953512c53675162195cbf1e0653
2014-03-20 02:22:38 +00:00
Craig Mautner
d4375b4713 Merge "Fix loop limits." into klp-dev 2014-03-19 21:37:07 +00:00
Craig Mautner
b4998eec3c Fix loop limits.
Fixes bug 12207606.

Change-Id: I9b450d2bc2a72a1f6581147f8930188f34c85299
2014-03-19 14:09:59 -07:00
Robert Greenwalt
5d3d4ee300 Merge "Handle provisioning APN by turning off/on data." into klp-dev 2014-03-19 16:12:01 +00:00
Wink Saville
c8e8e3eba6 Handle provisioning APN by turning off/on data.
This is a start and two tests succeed:

Tested expired AT&T SIM and waiting 15min for alarm to fire.
Tested a provisioned Verizon SIM and works normally.

I've NOT tested AT&T where I've properly completed the provisioning.
I've NOT tested T-Mobile SIM either provisioned or not-provisioned.
I've NOT tested provisioning over WiFi.
I've NOT tested that WiFi <-> Mobile works
I've NOT tested voice calls, SMS, MMS
...

The current bug is below, but it is poorly named either it should be
renamed or a new bug created.

Bug: 13190133
Change-Id: I0a09f642614cd27a8655e9dae764b8999ce485b8
2014-03-18 10:58:40 -07:00
Dan Sandler
4d460833b9 DO NOT MERGE: Maintain binding to crashed listeners.
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
2014-03-17 20:10:50 +00:00
Chad Brubaker
4c5c33e5e6 Fix support for simultaneous VPN tuns
A VPN can once again bring up a new tun interface while the old tun is
running. Once the new tun is set up the routing rules will be removed from the
old tun. It is up to the application to drain the old tun of traffic and
close it.

If the new tun fails to come up the old tun will remain untouched and
can still be used.

To prevent leakage the new rules are added before the old tun is
shutdown. Netd/Dns has been changed to allow multiple rules to exist
at once with the most recently added rule taking priority.

Bug: 12134439
Change-Id: I7e00c7c68cc339d81f09b3d2a33276ffc76985f5
2014-03-15 15:32:39 -07:00
Chad Brubaker
1b66923148 Include the interface for clearDnsInterfaceForUidRange
With netd allowing overlapping rules for uid range rules the interface
name is needed to make sure only the correct rule is removed.

Bug: 12134439
Change-Id: I94f77f154f49ca8d5f6cf49683a4473cc92c3eb7
2014-03-15 15:31:47 -07:00
Craig Mautner
477897ad7b Merge "Fix incorrect setting of TaskRecord.frontOfTask. DO NOT MERGE." into klp-dev 2014-03-14 22:30:04 +00:00
Craig Mautner
fdf28cc4be Fix incorrect setting of TaskRecord.frontOfTask. DO NOT MERGE.
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
2014-03-14 22:28:07 +00:00
Craig Mautner
3217cc6ff2 Merge "Fix activities appearing behind launcher icons" into klp-dev 2014-03-14 00:40:20 +00:00
Mike Lockwood
381374b3cd Merge "UsbDeviceManager: Fix race condition between accessory start and USB configured uevents" into klp-dev 2014-03-13 23:32:17 +00:00
Craig Mautner
e0663591a5 Fix activities appearing behind launcher icons
cherry picked from d5c91ece7bfea74ee7ab2bc86f3cb3f5c531f866

Change-Id: I76d20398e71c1be4accfaed6b0791674197b4fb0
2014-03-13 16:16:20 -07:00
JP Abgrall
7baa7c8045 Merge "ConnectivityService: add support to set TCP initial rwnd" into klp-dev 2014-03-13 20:33:44 +00:00
Chad Brubaker
8e240af51d Merge "Remove SO_BINDTODEVICE from VPN protect" into klp-dev 2014-03-13 18:09:58 +00:00
JP Abgrall
3f7f3221df ConnectivityService: add support to set TCP initial rwnd
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
2014-03-12 20:22:47 -07:00
Dianne Hackborn
a796168da0 Merge "Fix issue #11965706: Calls using IntentChooser are now Broken in 4.3 and 4.4" into klp-dev 2014-03-13 01:12:13 +00:00
Dianne Hackborn
3026d0bf0a Fix issue #11965706: Calls using IntentChooser are now Broken in 4.3 and 4.4
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
2014-03-12 11:16:29 -07:00
Jeff Brown
15258ac86b Fix power manager display wake lock bugs. (DO NOT MERGE)
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
2014-03-11 23:28:22 -07:00
Narayan Kamath
52af2ca919 DO NOT MERGE - Remove data dirs if a new install fails dexopt.
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
2014-03-11 14:06:55 -07:00
Naofumi Harada
68c0346b22 DO NOT MERGE - FLAG_PRIVILEGED disappears if privileged app is updated and rebooted
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
2014-03-11 12:26:21 -07:00
Chad Brubaker
a1d7c74449 Remove SO_BINDTODEVICE from VPN protect
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
2014-03-11 10:58:19 -07:00
Chad Brubaker
674f85af4c Merge "Only allow System apps to make VPN exempt routes" into klp-dev 2014-03-11 17:51:50 +00:00
Chad Brubaker
decfd7079b Merge "Add the calling package name to requestRouteToHost" into klp-dev 2014-03-11 17:51:45 +00:00
Christopher Tate
4bda43777c DO NOT MERGE - Don't hang installs if the transport disappears
Bug 12991308

Cherry-pick from master.

Change-Id: Id1abedd77be7207e67d7ca11591973d33125459c
2014-03-10 18:07:12 -07:00
Mike Lockwood
fbd5521fb5 UsbDeviceManager: Fix race condition between accessory start and USB configured uevents
Bug: 13393825
Change-Id: Ice0ce47b4bd65e453771d44b17352982335e9ebd
2014-03-10 15:58:11 -07:00
Robert Greenwalt
6d9ed0c353 Merge "DO NOT MERGE Debounce wifi country code Info" into klp-dev 2014-03-10 20:04:10 +00:00
Vinit Deshapnde
5243a76045 Merge "DO NOT MERGE - Fix Airplane Mode + reboot interaction for Wifi" into klp-dev 2014-03-10 17:51:19 +00:00
Robert Greenwalt
fcbced38a6 DO NOT MERGE Debounce wifi country code Info
We're getting signals from the radio and it sometimes drops out for
a while.  This change will delay applying an empty country code
for 15sec but apply non-empty country codes immediately.  It uses a
sequence number so we only apply the most recent change, even if
it's delayed.

Also secures the wifi call to set the country code as we can't
allow apps to set it willy-nilly.

bug:11062898
Change-Id: I610039a833e26d4c5c8b7b9ac1b7546f3c83446a
2014-03-07 16:54:58 -08:00
Dianne Hackborn
52f610d248 Fix issue #13199860: PRE_BOOT_COMPLETED intent is...
...broadcasted repeatedly at every boot time

Remember the last done pre-boot receivers, so that if we have
a new pre boot receiver appearing (without the platform version
changing), when we re-write the file of done receivers it will
contain all of them, not just the new one.

Change-Id: I4ed3478edc549d4b023ec4b3719111bc4d970ae4
2014-03-06 10:52:05 -08:00
Dianne Hackborn
76c59a89e9 Fix issue #11536426 DO NOT MERGE
Permission denied when trying to launch an activity from a notification

We don't remove pending intents when updating an app, which is necessary
to keep app widgets and other things working.  However, when uninstalling
an app, we should clear out all of its pending intents.

Change-Id: I95067b31098115b5a7b127766fd093750063bbb8
2014-03-06 10:12:57 -08:00
Vinit Deshapnde
31727f8456 DO NOT MERGE - Fix Airplane Mode + reboot interaction for Wifi
This change fixes two problems - first, if you rebooted phone after
turning on Airplane mode, Wifi controller goes to ScanOnly mode which
may end up in Wifi radio transmissions. Secondly, because of this
incorrect state, the state machine doesn't turn on Wifi once Airplane
mode is turned off.

bug: 11409692
Change-Id: I55b4a5352a72a9c783e1b9891dd5363434585fb0
2014-03-05 17:14:49 -08:00
Chad Brubaker
fb5800ed9c Only allow System apps to make VPN exempt routes
requestRouteToHost will only allow system applications to make routes
exempt from the VPN's routing rules.

If a VPN is currently running and a non-system app requests a route it
will only succeed if that host is currently covered by a VPN exempt
routing rule. Otherwise it will fail.

For example, if a VPN is running and the MMS network is brought online
those routes will be added as VPN exempt. If an application then tries
to request a route to a MMS endpoint it will succeed because the routes
already exist. If an application tries to request a route to a host
covered by the VPN the call will fail.

Bug: 12937545
Change-Id: If7bcec91bbb96c62c8fb69748c975847e6c00b6f
2014-03-05 13:35:36 -08:00
Chad Brubaker
18dd015e6e Add the calling package name to requestRouteToHost
The calling package name will be used to check if an application is a
system application when deciding if a route should be exempt from VPN
routing rules.

Bug: 12937545
Change-Id: I2c09c875fe9bb9685871a0a801ddcbb32fc17405
2014-03-05 13:35:20 -08:00
Dianne Hackborn
40a2600481 Issue #13308712: Add --checkin to package manager dump.
Change-Id: I50a559ea4bded47a792e1b5b319a5bbed41b4233
2014-03-05 11:00:54 -08:00
Robert Greenwalt
2d1e8c4958 Merge "Only apply tcp buffer sizes for default net" into klp-dev 2014-03-05 18:23:56 +00:00
Christopher Tate
1d13f13dea Merge "Adapt to underlying changes in the PBKDF2 implementation" into klp-dev 2014-03-05 00:51:33 +00:00
Robert Greenwalt
30a2bc87d4 Only apply tcp buffer sizes for default net
This may mean that secondary networks have bad network settings,
but currently default settings are overriden by secondary nets
which seems worse.

bug:13211589
Change-Id: I08d56e618208781bf6b21a88663c2b8503a4f226
2014-03-04 09:56:05 -08:00
Christopher Tate
28c8cfd762 Adapt to underlying changes in the PBKDF2 implementation
We need to specify "PBKDF2WithHmacSHA1And8bit" now in order to get precisely
the same output as was previously generated with "PBKDF2WithHmacSHA1".  We
also now try both when it's ambiguous which was used to generate the archive
checksums.

Bug 12494407

Cherry-pick from master.

Change-Id: I2d6081dd62f50f7d493045150b327ed120de7abd
2014-03-03 17:49:30 -08:00
Christopher Tate
88c908323a Update PackageMonitor to recognize new 'replacing' semantics
The ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE broadcast now uses the
EXTRA_REPLACING intent extra when it is sent as part of an upgrade operation
on a forward-locked application.  Update PackageMonitor to recognize this
new information and express it appropriately to the observer.

Bug 11988313

Cherry-pick from master.

Change-Id: Iecea1876ffc918f23f9fa5845f1f89ed8d740dd5
2014-03-03 17:40:41 -08:00
Mike Lockwood
c62f918e0e UsbDeviceManager: Fix race condition entering USB accessory mode
When switching USB modes there are often spurious connect and disconnect events
that occur before reenumeration is complete.  There is currently a 1000ms timer
to "debounce" the disconnect events. But with some USB accessories, this timeout
is not long enough, which results in an endless cycle of attempts to enter
USB accessory mode when the phone is connected.

To fix this, we now wait up to 10 seconds for the host to successfully configure
the device when entering USB accessory mode before giving up.
This is separate from the existing debounce timer, so the behavior of the
USB state change broadcasts are not affected.

Bug: 12877769
Change-Id: I7aa61f8a618546d749a7ddfc97bf103029a73d03
2014-02-19 11:23:19 -08:00