14682 Commits

Author SHA1 Message Date
Christopher Tate
d159674890 Notify that ASEC containers are being unmounted during upgrades
When an apk is installed on ordinary unmountable media, a broadcast
is sent when the OS wants to unmount it so that interested parties
can cleanly close any files they have open to read that apk's
resources or similar.  We now send that broadcast when we are
about to unmount the ASEC fs container that holds a forward-locked
apk as well, so that e.g. Home knows to release the resources that
it was using for widget hosting or similar.

Bug 7703848

Change-Id: I71aefdb4086c7b73a128f89c15d192a2b92d09a8
2013-10-04 18:05:39 -07:00
Robert Greenwalt
0fb5a4d8ca Merge "Don't redirect dns to an iface without dns servers" into klp-dev 2013-10-04 18:06:13 +00:00
Dianne Hackborn
ae7b22d61d Merge "Fix issue #10901205: Shouldn't send broadcasts (or try to bind services, etc.)..." into klp-dev 2013-10-04 17:47:34 +00:00
Dianne Hackborn
2d94c57345 Merge "Fix issue #11069176: Crash showing process stats" into klp-dev 2013-10-04 16:49:05 +00:00
Dianne Hackborn
9357b11a79 Fix issue #10901205: Shouldn't send broadcasts (or try to bind services, etc.)...
...to crashing processes.

So don't.

Change-Id: I4b4fefb501b430fadaca93405206264318c8b95d
2013-10-03 18:27:48 -07:00
Wink Saville
a48ccdd6fb Merge "Use networkType to display wifi and mobile notification separately." into klp-dev 2013-10-04 00:52:59 +00:00
Vinit Deshapnde
5eb2b0ca76 Merge "Set P2p statemachine's network manager before starting Wifi" into klp-dev 2013-10-04 00:40:32 +00:00
Dianne Hackborn
d94d533b5a Fix issue #11069176: Crash showing process stats
Change-Id: Ie568ebcb9863bed95c775b9b28654a5e2dc464cd
2013-10-03 17:32:19 -07:00
Vinit Deshapnde
04675f6ae9 Set P2p statemachine's network manager before starting Wifi
Wifi statemachine starts P2p statemachine; which uses network management
service to (i.e. netd) to start p2p0 interface. But it only gets a
reference to network management service in conenctivityServiceReady().
Calling that later means there's a chance of a race between this
thread's setting of the network manager, and P2p statemachine thread's
usage of the same.

Bug: 11048296
Change-Id: If151026ed5fbb12db57ee7f9bdd47c67dd7142e5
2013-10-03 16:18:56 -07:00
Michael Wright
cf5b34b0c4 Merge "Ensure WallpaperEngine has correct size information" into klp-dev 2013-10-03 21:51:59 +00:00
Craig Mautner
27b826325c Merge "Retain IME assignment if no windows accept input." into klp-dev 2013-10-03 21:28:38 +00:00
Vinit Deshapnde
3eb6e4b4e4 Merge "Fix EAP-TLS reconnect after reboot issue" into klp-dev 2013-10-03 21:19:52 +00:00
Michael Wright
5203a8b50b Ensure WallpaperEngine has correct size information
Currently it's possible for the WallpaperManagerService to receive a
request to change the desired wallpaper size between when it attaches
to the WallpaperService and when the Engine attaches back to it. This
means that the Engine will be created with the prior dimensions and
won't receive the update. Check to see if we're in this state and
make note to update the Engine once it attaches to ensure that the
Engine always has the correct dimensions.

Bug: 10853302
Change-Id: I8d5cd3371b269dbb4c0ff2d75c68529b69028ae5
2013-10-03 14:16:42 -07:00
Craig Mautner
ae87962e3e Retain IME assignment if no windows accept input.
Was skipping over the default assignment due to new null value for
windows (ag/361266).

Fixes bug 10987178.

Change-Id: I89efd41ab54b42de384eec84c5e937cc2a59d099
2013-10-03 14:07:45 -07:00
Jeff Sharkey
fe5bf7a7c7 Merge "Fix mount path prefix checking." into klp-dev 2013-10-03 17:18:38 +00:00
Marco Nelissen
95867a6524 Merge "Add PowerManager method to assign blame to a single uid" into klp-dev 2013-10-03 16:34:57 +00:00
Jeff Sharkey
5786a278a5 Fix mount path prefix checking.
Uncovered as part of writing CTS tests.

Bug: 10577541
Change-Id: I7832bcd551bedeea0b2ee5d6926aba6ac9bd0fd2
2013-10-03 09:32:01 -07:00
Marco Nelissen
d983ba5cac Add PowerManager method to assign blame to a single uid
Currently used by audioflinger to account for recording wakelocks.
b/10985160

Change-Id: I18fc8487f2a197bf02b5269a4bcae9e75b6c2207
2013-10-03 08:49:36 -07:00
Wink Saville
3ec8e7fb79 Use networkType to display wifi and mobile notification separately.
There are two bugs one is I was clearing the notification in
CaptivePortalTracker when entering the ActivateState. (double check
according to bug 5021626 we should be calling enter)

Second is we could have the need to display both icons but can't
because we only allow one.

The solution I'm proposing here is to allow two notifications and
have then controlled separately.

Bug: 10886908
Change-Id: I30e7130bc542535492d175640a4990c592f32806
2013-10-03 08:34:46 -07:00
Craig Mautner
02fa2332ac Merge "Make DimLayer size dependent on stack layout." into klp-dev 2013-10-03 02:49:31 +00:00
John Spurlock
e660ecc436 Merge "Store decor rects per window for transition cropping." into klp-dev 2013-10-03 02:28:58 +00:00
Adam Lesinski
d65825ab1c Merge "Private flags are masked in correct variable" into klp-dev 2013-10-03 01:52:18 +00:00
Svetoslav
9907a109ce Merge "Fix screen magnifier scaling due to ScaleGestureDetector changes." into klp-dev 2013-10-03 01:17:10 +00:00
John Reck
9a93f6f039 Merge "Reduce max recents on lowram" into klp-dev 2013-10-03 01:13:58 +00:00
Svetoslav
1fdbaa100c Fix screen magnifier scaling due to ScaleGestureDetector changes.
The scale gesture detector has a new behavior to make onScale
callbacks during swipe after a double tap. The screen magnification
is triggered after a trippe tap so if the user trippe taps and
holds to do a temporary magnification and tries to change the
zoom level with another finger, erroneous results are obtained.

The ScaleGestureDetector uses an APIs level check for the new
behavior but the ScreenMagnifier is a platform feature. We now
explicitly ask for the old behavior.

bug:11033376

Change-Id: I0dfb14dd3abcaa34ad1f40447c631b4203797378
2013-10-02 17:53:00 -07:00
John Reck
172e87ce51 Reduce max recents on lowram
Bug: 10918599
 Reduce the number of recent tasks to 10 on lowram devices
 Use RGB_565 on low ram devices for thumbnails instead of ARGB_8888
 Combined this saves ~9MB across system_process and systemui

Change-Id: Ieddcb512c7341a90097bc7cbc72d7355a775b416
2013-10-02 17:51:11 -07:00
Vinit Deshapnde
a3038b2b31 Fix EAP-TLS reconnect after reboot issue
After a reboot, KeyStore is locked, and certificates encrypted with user
PIN are not accessible. So statemachines are not able to connect to
EAP-TLS networks. This change makes the problem less severe by

1. Not signing certificates with user PIN on devices with hardware backed
KeyStore.
2. Issuing a reconnect upon first USER_PRESENT event.

This means HH (which has a hardware backed keystore) can connect to
EAP-TLS networks without requiring user intervention and other devices
will automatically connect to those networks after user punches PIN.

Bug: 10325089

Change-Id: I023d60e58d8214152f051bd9ec84b85b702d829a
2013-10-02 17:26:05 -07:00
Craig Mautner
c7b8a10040 Make DimLayer size dependent on stack layout.
Only use the stack bounds for the DimLayer bounds if there is more
than one stack on a layer. Otherwise cover the entire screen (and
more) with the DimLayer. This way there are no exposed regions when
rotating.

Fixes bug 10428085.

Change-Id: I7bfff12b69d59e86610621c498dab35cf0db8eb5
2013-10-02 16:49:52 -07:00
Adam Lesinski
95c42974f7 Private flags are masked in correct variable
Newly added private flags were being masked in the public flag variable
as opposed to the correct privateFlags variable.

bug:11033280
bug:11043194
Change-Id: Idda3a70a083457f3f1b7d4b46d231f4a7e704cf0
2013-10-02 16:18:55 -07:00
Craig Mautner
4aca4c1520 Merge "Don't reorder windows on non-default display." into klp-dev 2013-10-02 22:19:19 +00:00
Craig Mautner
85689b9f48 Don't reorder windows on non-default display.
At least not until we add tasks to those displays.

Fixes bug 10264736.

Change-Id: I3baed4bf324c4a11bbf5b07755218c2992f5af39
2013-10-02 15:13:03 -07:00
John Spurlock
4664623c30 Store decor rects per window for transition cropping.
Instead of keeping a single global system decor rect around
in WindowManagerService, calculate and store policy-defined
system-decor frame for each window.

The per-window decor rect is useful for smooth transitions, since it
determines window cropping during transition animations.

Bug:10938001
Change-Id: Ice6652aa5946027c45c0b7ab4e46473a0f8e3f90
2013-10-02 18:12:16 -04:00
Vinit Deshapnde
e42325c765 Merge "Fix incorrect VPN time" into klp-dev 2013-10-02 19:23:23 +00:00
Vinit Deshapnde
2b862e5e75 Fix incorrect VPN time
First, startTime's default value is -1 and not 0, so use it to test
if the startTime is set. Also, startTime isn't being set when connecting
legacy VPN; this change fixes that too.


Bug: 10985174
Change-Id: Ibf52b8f489b18c96efba501b76aa73e9a9e0e3e8
2013-10-02 11:50:39 -07:00
Craig Mautner
93cb8f6b78 Merge "Create new window-side task on demand." into klp-dev 2013-10-02 17:45:47 +00:00
Craig Mautner
31482a7fe1 Create new window-side task on demand.
The activity manager can create a new task under certain
circumstances in resetTargetTaskIfNeededLocked(). In that case the
window manager was not told to create a new task. This fix creates the
task in window manager when it recognizes that there is a new task
required.

Fixes bug 10412588.

Change-Id: Ife9ecfeb7f53f9df5950322c9359c836adc258a2
2013-10-02 10:35:17 -07:00
Craig Mautner
09be37b2d3 Merge "Add debuggging for 10858941." into klp-dev 2013-10-02 05:04:07 +00:00
Craig Mautner
323f78001d Add debuggging for 10858941.
Change-Id: I0517ccd9a83ef19a9002d61dbebf36d0120e1f63
2013-10-01 21:16:22 -07:00
Dianne Hackborn
164371fb75 Fix issue #11005453: [SUW] G+ profile creation for new user broken
The main problem here was a mistake when turning a single process
structure to a multi-package-process structure with a common
process.  When we cloned the original process state, if there were
any services already created for the process for that package, they
would be left with their process pointer still referencing the
original now common process instead of the package-specific process,
allowing the active counts to get bad.  Now we switch any of those
processes over to the new package-specific process.

There was also another smaller issue with how ServiceRecord is
associated with a ServiceState -- we could be waiting for an
old ServiceRecord to be destroyed while at the same time creating
a new ServiceRecord for that same service class.  These would share
the same ServiceState, so when the old record finally finished
destroying itself it would trample over whatever the new service
is doing.

This is fixed by changing the model to instead of using an "active"
reference count, we have an object identifying the current owner
of the ServiceState.  Then when the old ServiceRecord is cleaning
up, we know if it is still the owner at that point.

Also some other small things along the way -- new Log.wtfStack()
method that is convenient, new suite of Slog.wtf methods, fixed
some services to use Slog.wtf when catching exceptions being
returned to the caller so that we actually know about them.

Change-Id: I75674ce38050b6423fd3c6f43d1be172b470741f
2013-10-01 20:51:12 -07:00
Adam Lesinski
42e9b63100 Merge "Make room for new public flags" into klp-dev 2013-10-02 01:55:09 +00:00
Adam Lesinski
6a591f5859 Make room for new public flags
Moved two hidden flags to private

bug:11033280
Change-Id: Icca867b073aff643eefdaf84df68de86bb6b05ac
2013-10-01 18:48:20 -07:00
Jeff Brown
42544cf843 Merge "Track wireless charger detector timeout explicitly." into klp-dev 2013-10-02 01:47:55 +00:00
Jeff Brown
dbcc8a22de Track wireless charger detector timeout explicitly.
Previously we relied on having a continue stream of sensor
events from which to detect whether the device is moving or
at rest.  However, if the sensor HAL is broken in some way
then we might not receive enough sensor events to actually
finish the detection process.  When this happens, we'll
just sit there holding a wakelock indefinitely.

Instead of relying on the sensor event stream, post a delayed
message to explicitly finish detection.

Bug: 10769163
Change-Id: Ia2ed66fe5e7c41a8832df76da9104c13554e1398
2013-10-01 16:42:16 -07:00
Amith Yamasani
86519dd5bb Merge "Use correct method for sparsearray lookup" into klp-dev 2013-10-01 23:35:21 +00:00
Craig Mautner
66de7f4fa0 Merge "Fixes to handleAppDiedLocked." into klp-dev 2013-10-01 21:44:13 +00:00
Svetoslav Ganov
b1cd745fd2 Merge "Fail print jobs targeted to unavailable services." into klp-dev 2013-10-01 21:30:53 +00:00
Craig Mautner
51277a8521 Fixes to handleAppDiedLocked.
- Call in all circumstances but only set launchHomeTaskNext for
  focused stack. Previous version didn't call handleAppDiedLocked for
  non-focused stack.

- Rearrange logic to run down the top task and make sure that all
  remaining activities belong to the dying app. Previous version just
  looked at the top non-finishing activity and based its behavior on
  that.

Fixes bug 11029560.

Change-Id: Ic3a7c873c4c975577d6b390a8955ff41729bdfde
2013-10-01 14:28:23 -07:00
Amith Yamasani
540b659304 Use correct method for sparsearray lookup
Should fix the array index out of bounds. valueAt() is when we have the
index, not the key.

Bug: 11014210
Change-Id: Icb53fe763782befbd5de1b3df6630b87cda72e84
2013-10-01 13:45:58 -07:00
Craig Mautner
3c98926bf2 Merge "Add a timeout for removing starting windows." into klp-dev 2013-10-01 20:35:01 +00:00
Craig Mautner
68cc241e8d Add a timeout for removing starting windows.
If two activities are started at the same time the first activity can
add a starting window but never start. In that case there is no event
that will clear the starting window. This change adds a 10 second
timeout for the starting window to be cleared after which it will
clear the starting window automatically.

Fixes bug 10797865.

Change-Id: I1d59c3058c63367ff688d426474e8a6f006b2e0d
2013-10-01 10:39:43 -07:00