13026 Commits

Author SHA1 Message Date
Craig Mautner
d9a22881fd Complete removal of Task from DisplayContent.
Moved Tasks into TaskStacks.

Change-Id: I3478dab4eab3a68d4d71a7a5bb2e65ba2394f2d7
2013-03-17 16:19:21 -07:00
Dianne Hackborn
d45bc55fe1 am 6acbd7c6: am bb131f52: Merge "Fix issue #8401553: It\'s possible to startForeground()..." into jb-mr2-dev
* commit '6acbd7c60a53154af3eb43e7219995c653e5fea4':
  Fix issue #8401553: It's possible to startForeground()...
2013-03-17 16:27:59 +00:00
Craig Mautner
a5eed0b8c7 Refactor addWindowToListInOrderLocked for clarity
Break up long method into three orthogonal shorter methods.

Change-Id: Ieeffd6263b84de50956f03e513f80a9264a09e43
2013-03-16 12:41:54 -07:00
Lorenzo Colitti
d9b3d55152 Catch RuntimeException in NMService notifications
Currently, NetworkManagementService only catches RemoteExceptions
when calling the BaseNetworkObserver notification methods (e.g.,
interfaceStatusChanged). However, if the observer is in the same
process, unchecked exceptions can occur as well.

When this happens, finishBroadcast does not get called, and no
further notifications can be sent, because any attempt to do so
fails with a "beginBroadcast() called while already in a
broadcast" exception.

Fix this by catching RuntimeException as well.

Bug: 8397534
Bug: 8276725
Change-Id: Icd6f32128707244978943c48a9ea3a2b952a2957
2013-03-17 03:21:35 +09:00
Craig Mautner
c00204b4d1 Start moving Tasks from DisplayContent to TaskStack
- Create new classes for Stacks on WindowManager.
- Stop using DisplayContent methods and members:
    addAppToken(),
    removeAppToken(),
    setAppTaskId(),
    removeTask(),
    mTaskIdToDisplayContents,
    mTaskIdToTask.
- Start using WindowManagerService.createTask().
- Establish hierarchy of references: AppWindowToken=>Task=>
TaskStack=>StackBox=>DisplayContent.
- Clean up StackBox, TaskStack, and Task.

Change-Id: I798990aa7966784d22f4a43822087d8bb0404dd6
2013-03-15 22:44:29 -07:00
Dianne Hackborn
bb131f52da Merge "Fix issue #8401553: It's possible to startForeground()..." into jb-mr2-dev 2013-03-16 01:59:29 +00:00
Dianne Hackborn
282add7bc3 Fix issue #8401553: It's possible to startForeground()...
...with no visible Notification

Don't allow a 0 icon resource.

Change-Id: I52e93533e6c45c6027ff3c185060cd54d087d077
2013-03-15 18:48:04 -07:00
Craig Mautner
d99b26285d am 20a402e0: am 8dfe99ce: Merge "Catch BadTokenException and continue." into jb-mr2-dev
* commit '20a402e0dc8d3052ac317e6c13afee22a9502c35':
  Catch BadTokenException and continue.
2013-03-15 19:04:20 +00:00
Craig Mautner
8dfe99ce20 Merge "Catch BadTokenException and continue." into jb-mr2-dev 2013-03-15 18:59:51 +00:00
Craig Mautner
e4bbb1cc45 Catch BadTokenException and continue.
BadTokenException is a normal consequence of swapping IMEs while there
is a DO_SHOW_SOFT_INPUT message in the IIMethodWrapper queue. This
race condition cannot be avoided without an unacceptable lock down of
InputMethodManagerService.

Fixes bug 8387663.
Fixes bug 8263462.

Change-Id: I2c21573cf972145ab08e66604cdb9344139a3f31
2013-03-15 11:38:44 -07:00
Lorenzo Colitti
3f8cbf3f61 am aa003546: am e78aa896: Merge "Set routes from stacked links as well." into jb-mr2-dev
* commit 'aa0035464b30d3ad3a758e20b1da7ffd4d4deda5':
  Set routes from stacked links as well.
2013-03-15 17:20:15 +00:00
Lorenzo Colitti
e78aa89647 Merge "Set routes from stacked links as well." into jb-mr2-dev 2013-03-15 17:14:43 +00:00
Lorenzo Colitti
13c9fdefde Framework changes for 464xlat.
1. Add a Nat464Xlat service that ConnectivityService can use
   to start and stop clat. When clat is started, the service
   waits for the clat interface to come up and then calls
   ConnectivityService to add the appropriate routes.
2. Make ConnectivityService start clat when an IPv6-only mobile
   interface is connected. We only support clat on mobile for
   now.
3. Make tethering use the interface that has the IPv4 default
   route insted of using the base interface of the
   LinkProperties. This allows us to tether to a stacked
   interface, which is needed for tethering with 464xlat.

Bug: 8276725
Change-Id: I24480af69ee280f504399062638af0836a56268e
2013-03-15 14:41:55 +09:00
Lorenzo Colitti
f83d90c667 Set routes from stacked links as well.
Currently, ConnectivityService adds and removes routes to/from
the routing table only based on the LinkProperties's routes.
Make it update routes based on the stacked links as well.

Bug: 8276725
Change-Id: I9a2adf537af5a04de0aaab3780afbcc3bb5c6acb
2013-03-15 14:35:38 +09:00
Wink Saville
5a78ba9984 am 11652313: am 33c5857c: Merge "Revert "Fail fast if somebody is adding default routes"" into jb-mr2-dev
* commit '11652313428403a6409a8120ed404b214def8cb2':
  Revert "Fail fast if somebody is adding default routes"
2013-03-15 05:12:14 +00:00
Wink Saville
33c5857c54 Merge "Revert "Fail fast if somebody is adding default routes"" into jb-mr2-dev 2013-03-15 05:07:41 +00:00
Wink Saville
7b5fd05d4e Revert "Fail fast if somebody is adding default routes"
This reverts commit 6f210bd0191e1936bbc1f036912c6efc4ea69475

Mako wouldn't boot for me, reverting for now.

Change-Id: Ie92d6bf77811e7257e86d65e1e15e1973c027cd7
2013-03-15 05:07:04 +00:00
Robert Greenwalt
654e7a199e am 6ddc39f7: am bb5b7a26: Merge "Fail fast if somebody is adding default routes" into jb-mr2-dev
* commit '6ddc39f7299c4e2494f6852f2c4171fb04230e79':
  Fail fast if somebody is adding default routes
2013-03-14 23:08:38 +00:00
Robert Greenwalt
bb5b7a2649 Merge "Fail fast if somebody is adding default routes" into jb-mr2-dev 2013-03-14 23:02:28 +00:00
Irfan Sheriff
fd5c559d63 am 370d3904: am 11aefad9: Add support for scan always available mode
* commit '370d3904f7f3360f7e2aa637795d197c84924886':
  Add support for scan always available mode
2013-03-14 21:36:33 +00:00
Irfan Sheriff
11aefad94d Add support for scan always available mode
Modify WifiService to add a controller to track the various
desired states and let the WifiStatemachine actually control
the bring up.

Bug: 8141918

Change-Id: I6e98fd5a29b43c3c50c315eff5255cd0a3eaebcd
2013-03-14 13:55:56 -07:00
Robert Greenwalt
6f210bd019 Fail fast if somebody is adding default routes
bug:2655011
Change-Id: I25da940e024825bc6e1d1ac5fe7b0d951609c1c1
2013-03-14 13:16:04 -07:00
Craig Mautner
0317f6db1a am b7ca6804: am 67bea2ef: Merge "Remove WindowManager messages from remote queue." into jb-mr2-dev
* commit 'b7ca680485f90c2507d969d7d64e5bec3acc3c33':
  Remove WindowManager messages from remote queue.
2013-03-14 16:55:12 +00:00
Craig Mautner
67bea2ef32 Merge "Remove WindowManager messages from remote queue." into jb-mr2-dev 2013-03-14 16:48:53 +00:00
Craig Mautner
ca0ac718cb Remove WindowManager messages from remote queue.
When a new IME is attached it is not enough to remove the
WindowManager messages from the local queue, but the ones in
the previous IME queue must also be removed.

Fixes bug 8263462.

Change-Id: I9e916c6052a83dc7691bcba0b6ab8328b9b7cc36
2013-03-14 09:43:02 -07:00
Mathias Agopian
9904be3570 am f2362ceb: am b1fa4f92: Merge "fix CloseGuard usage in Surface" into jb-mr2-dev
* commit 'f2362ceb50209dfb72899f9ab1b839e9238ef9a6':
  fix CloseGuard usage in Surface
2013-03-14 02:36:55 +00:00
Craig Mautner
a59d0c81d5 am 35d45010: am dc50ba18: Merge "Put debug back in for b/b8263462." into jb-mr2-dev
* commit '35d450107716d5ea950a19ffe09065ad4cb8b1fc':
  Put debug back in for b/b8263462.
2013-03-14 02:34:00 +00:00
Mathias Agopian
86e1bc7305 fix CloseGuard usage in Surface
Bug: 8375415
Change-Id: I03e9f318c2ad586f4bd93b280557ada66121d275
2013-03-13 18:21:11 -07:00
Craig Mautner
6efb4c746f Put debug back in for b/b8263462.
Previous CL did not fix.

Change-Id: Ief9e8f519480fa41248d53e5b0187c9657f00b79
2013-03-13 11:12:26 -07:00
Dianne Hackborn
dc37c5f2e3 am 0c42b580: am 53149acf: Merge "Implement limited shared libraries in apks." into jb-mr2-dev
* commit '0c42b58041dc0ede9865335fa48637fb6b677cd3':
  Implement limited shared libraries in apks.
2013-03-12 23:10:38 +00:00
Dianne Hackborn
53149acf7b Merge "Implement limited shared libraries in apks." into jb-mr2-dev 2013-03-12 23:03:59 +00:00
Craig Mautner
274323ce8f Remove old show/hide messages on new ime (DO NOT MERGE)
The previous show/hide messages in the queue were still trying
to be honored even after a new ime was attached.

Fixes bug 8263462.

Change-Id: Iee60dbd1d58542f73aedeac5ccb54cddeb5d5dfe
2013-03-12 14:44:59 -07:00
Dianne Hackborn
c895be7bc6 Implement limited shared libraries in apks.
You can now declare shared libraries in apks that are
on the system image.  This is like the existing mechanism
of using raw jar files as shared libraries, but since they
are contained in an apk the library can actually be updated
from the Play Store.  And this even (mostly) works.

There are some deliberate limitations on this feature.  A
new shared library *must* be declared by an apk on the system
image.  Installing an update to a system image apk does not
allow you to add new shared libraries; they must be defined
by everything on the base system image.  This allows us to
get rid of a lot of ugly edge cases (shared libraries that were
there disappearing after an update is uninstalled for example)
and give some brakes on apps that happen to be pre-installed
on devices from being able to throw in new shared libraries
after the fact.

In working on this, I ran into a recently introduced bug where
uninstalling updated to system apps would fail.  This was done
to allow for the new restricted users that don't have all
system apps, but conflicts with the existing semantics for
uninstalling system apps.  To fix this I added a new uninstall
flag that lets you switch on the new mode if desired.

Also to implement the desired logic for limitations on declaring
new shared libraries in app updates, I needed to slightly tweak
the initial boot to keep the Package object for hidden system
packages associated with their PackageSetting, so we can look at
it to determine which shared libraries are allowed.  I think
this is probably more right than it was before -- we already
need to parse the package anyway, so we have it, and when you
install an update to a system app we are in this same state
until you reboot anyway.

And having this fixed also allowed me to fix another bug where
we wouldn't grant a new permission to an updated app if its
system image version is updated to request the permission but
its version is still older than whatever is currently installed
as an update.  So that's good.

Also add new sample code showing the implementation of an apk
shared library and a client app using it.

Change-Id: I8ccca8f3c3bffd036c5968e22bd7f8a73e69be22
2013-03-12 12:51:38 -07:00
Craig Mautner
b11b1f2679 Remove old show/hide messages on new ime
The previous show/hide messages in the queue were still trying
to be honored even after a new ime was attached.

Fixes bug 8263462.

Change-Id: Ie85369346cd3f843389a8e7837f5d97b56885309
2013-03-12 11:25:54 -07:00
Daniel Sandler
91c08eeeeb am 9a3ad590: am 1d280ee9: Merge "Accumulate updates to notifications before archiving." into jb-mr2-dev
* commit '9a3ad59050656f8c732d93f1d925e4bdf9535484':
  Accumulate updates to notifications before archiving.
2013-03-12 15:59:02 +00:00
Daniel Sandler
1d280ee958 Merge "Accumulate updates to notifications before archiving." into jb-mr2-dev 2013-03-12 15:53:45 +00:00
Michael Wright
607dcedaa6 am 63530ed8: am b13eb3e7: Merge changes I674b9804,If2d2e37b into jb-mr2-dev
* commit '63530ed8dad1ca77d5f9d20f2af7317611cdd175':
  Add touch navigation input source
  Add InputDevice#isFromSource convenience method
2013-03-12 01:09:01 +00:00
Michael Wright
b13eb3e789 Merge changes I674b9804,If2d2e37b into jb-mr2-dev
* changes:
  Add touch navigation input source
  Add InputDevice#isFromSource convenience method
2013-03-12 01:03:23 +00:00
Michael Wright
e7a9ae8ba0 Add touch navigation input source
Bug: 8276741
Change-Id: I674b9804bf9ae76d694ae7073b54a7d43474a43c
2013-03-11 17:58:22 -07:00
Lorenzo Colitti
8ad30d81a0 am 36141361: am 0f316e84: Merge "Remove redundant parameter to modifyRoute" into jb-mr2-dev
* commit '361413613cf2c2815141423b8094a1366e686c28':
  Remove redundant parameter to modifyRoute
2013-03-12 00:12:16 +00:00
Lorenzo Colitti
2adea7ff3b Remove redundant parameter to modifyRoute
modifyRoute takes both an interface name and a LinkProperties.
This is redundant because all callers get the interface name
from the LinkProperties. Make modifyRoute get the interface
name from the LinkProperties instead.

Change-Id: I41ba8e0a10241c2f1107204fcaca2be74556042b
2013-03-12 07:39:59 +09:00
Craig Mautner
d8b070ccc1 Merge "Add ActivityStack to PendingActivityLaunch" 2013-03-11 19:42:06 +00:00
Craig Mautner
68811a4521 Add debug for b/8263462.
Look for race condition in soft input method attach.

For bug 8263462.

Change-Id: Id0609a743d57ab685c036372100ddd33819bff03
2013-03-11 12:39:20 -07:00
Craig Mautner
64f2b1738a Add ActivityStack to PendingActivityLaunch
The task used by doPendingActivityLaunches is not known at the
time that the PendingActivityLaunch is created. Leading to an NPE.
Adding the ActivityStack to the PAL fixes this.

Fixes bug 8351149.

Change-Id: I64539b8f2e608128ef9d795c0739ef1de7a246d0
2013-03-11 11:40:31 -07:00
Lorenzo Colitti
5aae35d8e4 am 13d1c27e: am de965891: Merge "Always specify an interface for host routes." into jb-mr2-dev
* commit '13d1c27eda1465eeb09823eb9e82fccf67dfb15e':
  Always specify an interface for host routes.
2013-03-11 17:27:11 +00:00
Lorenzo Colitti
de96589113 Merge "Always specify an interface for host routes." into jb-mr2-dev 2013-03-11 17:22:25 +00:00
Geremy Condra
12c1838198 Add check for UID reuse.
The goal here is to make sure that we aren't allocating a UID that
could have been in use since the last time the device booted.

Bug: 8256571

(cherry picked from commit af70d15543c89a53f064492f4e3d17c446e00039)

Change-Id: I8b11811df8d5a8ad1aa064abb43db020aceb29e3
2013-03-08 17:34:04 -08:00
Lorenzo Colitti
e167135976 Always specify an interface for host routes.
Change-Id: I05b4d87e7d7e8237c6f4a70f1fedae00f416f581
2013-03-08 16:41:25 -08:00
Jim Miller
12c536fd2b Merge "Add "database" upgrader for widget hosts." 2013-03-08 23:37:19 +00:00
Jim Miller
39d129e59a Add "database" upgrader for widget hosts.
When keyguard moved to a new process, the package name changed which
caused the old widgets to be lost.

This change migrates the old widget host for keyguard and adds a
mechanism to perform future upgrades.

Updated after review.

Change-Id: I78a616501ddc71e3b1e86622d353eb82528f9eff
2013-03-08 15:18:06 -08:00