10674 Commits

Author SHA1 Message Date
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
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
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
Christopher Tate
294b512eca DO NOT MERGE - Full backup/restore now handles OBBs sensibly
OBB backup/ restore is no longer handled within the target app
process.  This is done to avoid having to require that OBB-using
apps have full read/write permission for external storage.

The new OBB backup service is a new component running in the
same app as the already-existing shared storage backup agent.
The backup infrastructure delegates backup/restore of apps'
OBB contents to this component (because the system process
may not itself read/write external storage).

From the command line, OBB backup is enabled by using new
-obb / -noobb flags with adb backup.  The default is noobb.

Finally, a couple of nit fixes:

- buffer-size mismatch between the writer and reader of chunked
  file data has been corrected; now the reading side won't be
  issuing an extra pipe read per chunk.

- bu now explicitly closes the transport socket fd after
  adopting it. This was benign but triggered a logged
  warning about leaked fds.

(Cherrypicked)

Change-Id: I471f6348abcccb7bf1e1710b7beda9f23de53e14
2013-03-08 15:08:10 -08:00
Christopher Tate
1ccdf0ee16 am 0de66314: am 6916c6ee: Merge "Do not hang in pm clear on an invalid package name" into jb-mr2-dev
* commit '0de6631450fedca4071513d90cfaa5eec4c57d6c':
  Do not hang in pm clear on an invalid package name
2013-03-08 02:08:50 +00:00
Christopher Tate
aa8a2e46f4 Merge "Full backup/restore now handles OBBs sensibly" 2013-03-08 01:59:40 +00:00
Christopher Tate
a83cab0001 Do not hang in pm clear on an invalid package name
The Activity Manager was not properly informing the observer that
the operation had concluded (unsuccessfully).

Bug 8222595

Change-Id: I8234e32d8edf4112c8c7a5e20e341d0b41e23014
2013-03-07 17:50:11 -08:00
Christopher Tate
46cc43c6fa Full backup/restore now handles OBBs sensibly
OBB backup/ restore is no longer handled within the target app
process.  This is done to avoid having to require that OBB-using
apps have full read/write permission for external storage.

The new OBB backup service is a new component running in the
same app as the already-existing shared storage backup agent.
The backup infrastructure delegates backup/restore of apps'
OBB contents to this component (because the system process
may not itself read/write external storage).

From the command line, OBB backup is enabled by using new
-obb / -noobb flags with adb backup.  The default is noobb.

Finally, a couple of nit fixes:

- buffer-size mismatch between the writer and reader of chunked
  file data has been corrected; now the reading side won't be
  issuing an extra pipe read per chunk.

- bu now explicitly closes the transport socket fd after
  adopting it. This was benign but triggered a logged
  warning about leaked fds.

Bug: 6718844
Change-Id: Ie252494e2327e9ab97cf9ed87c298410a8618492
2013-03-07 13:47:20 -08:00
Daniel Sandler
23d7c70032 Accumulate updates to notifications before archiving.
By only adding notifications to the archive when they are
removed we batch up multiple updates and only store the
final version. Some data is lost in this process, but we
save tons of memory storing otherwise redundant /
uninteresting data (e.g. each step of a download).

Change-Id: I008afefc1242bb7c433d45da2c36fcc626dd3706
2013-03-07 16:32:06 -05:00
Daniel Sandler
603603d22f am 3cf1faf2: am 9f3443c5: Merge "Properly support USER_ALL in notification listener API." into jb-mr2-dev
* commit '3cf1faf296aebc6ea024a363fc7899f4ba5dbac3':
  Properly support USER_ALL in notification listener API.
2013-03-07 20:53:38 +00:00
Daniel Sandler
9f3443c55c Merge "Properly support USER_ALL in notification listener API." into jb-mr2-dev 2013-03-07 20:46:09 +00:00
Daniel Sandler
21ca44d67b Properly support USER_ALL in notification listener API.
Listeners should be notified for any notification if they
register for USER_ALL, or for any notification posted to
USER_ALL.

Bug: 8328357
Change-Id: Ib5024d41287090d1a390539a015d8cb4dfa854a7
2013-03-07 14:01:22 -05:00
Craig Mautner
9eaab2ec07 Merge "Prepare ActivityManagerService for multiple stacks." 2013-03-07 02:01:03 +00:00
Jeff Sharkey
07cd3f3f01 am 768c5c4d: am 18dd9b94: Merge "Use enabled/enabledSetting from PackageParser." into jb-mr2-dev
* commit '768c5c4d9d736c55d7ef580142d602850f47a098':
  Use enabled/enabledSetting from PackageParser.
2013-03-06 23:32:31 +00:00
Jeff Sharkey
94d7ddb4b5 Use enabled/enabledSetting from PackageParser.
PackageParser.updateApplicationInfo() has already interpreted the
various COMPONENT_ENABLED flags for us, no need to clobber them.

Bug: 8331767
Change-Id: If1363c5651a2f0326ee60e92517cfc0e6f256699
2013-03-06 15:10:57 -08:00
Craig Mautner
d2328958de Prepare ActivityManagerService for multiple stacks.
- Replace mMainStack with mFocusedStack and mStacks.
- Remove stack from ActivityRecord.
- Add stack to TaskRecord.

Change-Id: I22e9ba34b12c2bd90806b14aafe063d5a2fe66ae
2013-03-06 13:57:26 -08:00
Craig Mautner
3f0bc9af04 am db6c556d: am cc947fdc: Merge "Add window leak check and possible recovery." into jb-mr2-dev
* commit 'db6c556daea9fcf8aaeea8cacb5d8c29d0b406e7':
  Add window leak check and possible recovery.
2013-03-06 18:46:21 +00:00
Craig Mautner
cc947fdc2d Merge "Add window leak check and possible recovery." into jb-mr2-dev 2013-03-06 18:40:48 +00:00
Amith Yamasani
adb8e146a5 am 3eb3774f: am 67df64b3: Shared accounts and sharing of apps
* commit '3eb3774f8e54a6f43dcf4f27e1b7a62676791ff6':
  Shared accounts and sharing of apps
2013-03-06 18:37:32 +00:00
Craig Mautner
a99764e597 Add window leak check and possible recovery.
Search output for "!!! LEAK !!!"

For bug 8322020.

Change-Id: I6db572a1c7fe0e6b386ccb0dba08bc376659a75a
2013-03-06 10:22:16 -08:00
Amith Yamasani
67df64b3a4 Shared accounts and sharing of apps
API and preliminary implementation for sharing primary user accounts with a secondary user.
AbstractAccountAuthenticator has new methods to retrieve and apply a bundle of credentials
to clone an account from the primary to a restricted secondary user. The AccountManagerService
initiates the account clone when it starts up the user and detects that the user has
a shared account registered that hasn't been converted to a real account.

AccountManager also has new hidden APIs to add/remove/get shared accounts. There might be
further improvements to this API to make shared accounts hidden/visible to select apps.

AccountManagerService has a new table to store the shared account information.

Added ability in PackageManager to install and uninstall packages for a secondary user. This
is required when the primary user selects a few apps to share with a restricted user.

Remove shared accounts from secondary users when primary user removes the account.

Change-Id: I9378ed0d8c1cc66baf150a4bec0ede56f6f8b06b
2013-03-06 09:49:44 -08:00
Mathias Agopian
3205ebf67b am 563c374f: am f4d6f153: Merge "remove suppor for SurfaceControl.FX_SURFACE_SCREENSHOT" into jb-mr2-dev
* commit '563c374faf2c9e2741e0c73edff22237aa0562e5':
  remove suppor for SurfaceControl.FX_SURFACE_SCREENSHOT
2013-03-06 16:53:51 +00:00
Mathias Agopian
f4d6f153e6 Merge "remove suppor for SurfaceControl.FX_SURFACE_SCREENSHOT" into jb-mr2-dev 2013-03-06 03:52:50 +00:00
Mathias Agopian
11e7d88d14 remove suppor for SurfaceControl.FX_SURFACE_SCREENSHOT
the window manager can now use the SurfaceControl.screenshot
API with a "regular" surface.

Change-Id: I76bed81d5e7b078ea1b3e8f96814aba32e9d5405
2013-03-05 14:14:55 -08:00
Irfan Sheriff
9cad79bb0b am 4a1b9089: am c7ede61f: Merge "Fix client tracking" into jb-mr2-dev
* commit '4a1b9089791fea4393f70d81f342bd1cf08bc70c':
  Fix client tracking
2013-03-05 21:08:19 +00:00
Dianne Hackborn
ee61a7fb95 am 530b2b1c: am a5513616: Merge "Add new WindowId for cross-process monitoring of focus." into jb-mr2-dev
* commit '530b2b1c98e3a3d86fd90cd91a08005370b8aa49':
  Add new WindowId for cross-process monitoring of focus.
2013-03-05 21:08:13 +00:00
Craig Mautner
3e708d280b Merge "Remove all vestiges of mHistory." 2013-03-05 20:48:24 +00:00
Irfan Sheriff
c7ede61f59 Merge "Fix client tracking" into jb-mr2-dev 2013-03-05 18:13:59 +00:00
Irfan Sheriff
c808a1955f Fix client tracking
Bug: 8311559
Change-Id: I167fcdd5c3da4d46b7d99e18041036023c8c60f7
2013-03-05 09:46:36 -08:00
Dianne Hackborn
a55136169e Merge "Add new WindowId for cross-process monitoring of focus." into jb-mr2-dev 2013-03-05 17:37:43 +00:00
Dianne Hackborn
e3f23a36d8 Add new WindowId for cross-process monitoring of focus.
This is a class representing a window and providing limited
interaction with it, which can be handed across processes.

Change-Id: I22885f2064a9cc8c68d690a5858c2e28bbb6a0f3
2013-03-05 09:33:48 -08:00
Craig Mautner
d088baa2a1 Merge "Fix activity to task bugs" 2013-03-05 17:06:47 +00:00
Craig Mautner
5854780df9 Remove all vestiges of mHistory.
Change-Id: I3e9140bcf57f2437d7611419477c410d487f29c1
2013-03-05 08:23:53 -08:00