1189 Commits

Author SHA1 Message Date
Jeff Sharkey
9a445771f5 Install sessions only inherit APK files.
Also track historical install sessions for debugging purposes.  Hide
signature verification API for now.  Clear code cache only after
killing the app being upgraded.

Bug: 14975160
Change-Id: I52fc7f11d2506f792236d8a365c8cfed21b46c30
2014-07-16 13:38:09 -07:00
RoboErik
8b4bffcac9 Make MediaSession and MediaController constructors public
This makes the MediaSession/Controller constructors public and registers
with the system behind the scenes.

This also adds a bit about needing to call setActive(true) to start receiving
commands in MediaSession's docs.

Change-Id: If882d229b54c36bf0831aca0255052dda667a2bc
2014-07-16 12:03:45 -07:00
Jeff Sharkey
69ea974f17 Merge "Public API for PackageInstaller!" into lmp-dev 2014-07-15 00:41:06 +00:00
Jeff Sharkey
6c833e07a0 Public API for PackageInstaller!
Flesh out documentation and finalize first cut of API.  Also surface
installLocation and splitNames through PackageInfo.

Bug: 14975160, 15348430
Change-Id: Ic27696d20ed06e508aa3526218e9cb20835af6a0
2014-07-14 23:06:52 -07:00
Jeff Sharkey
ad11eb52fe Pass install result message; path selection.
Oops, forgot to include message argument to invoke the new-style
callback.  Also use more robust way of generating cluster APK
directory names, and add more logging details on rename failure.

Change-Id: Ifa8abdd1db58b73e13b9a8077ec126cf20a0d90e
2014-07-14 10:57:04 -07:00
Jeff Brown
01a500ed1c Delete first draft of media routing APIs.
The new APIs will not be as tightly integrated into MediaSession.

Change-Id: I5cfd37d9d8d0c5d46c55edb5cf0772a8f1ef13ab
2014-07-14 04:06:44 -07:00
Jeff Sharkey
a103114347 Package installation listener events.
Flesh out implementation of install session observers.  Carve out 20%
of published install progress for final system operations such as
dexopt, etc.

Add dumpsys output for active install sessions.  Create explicit
fsync() instead of overriding meaning of flush().  Hack to throw
IOExceptions over Binder calls.

Bug: 14975160, 15348430
Change-Id: I874457e40c45d2661bc0a526df9285ffea4bb77c
2014-07-12 21:12:25 -07:00
Jeff Sharkey
bb58067035 Progress toward installer public API: callbacks.
Instead of surfacing all the existing cryptic error codes, we're
going to classify them into broad categories when surfacing through
public API.  This change introduces InstallResultCallback and
UninstallResultCallback, and wires them up to existing AIDL
interfaces.

Also start defining general SessionObserver for apps interested
in general progress details, such as Launcher apps.  Details about
active sessions are returned through new InstallSessionInfo objects.

Bug: 14975160
Change-Id: I068e2b0c30135f6340f59ae0fff93c321047f8f9
2014-07-11 16:54:49 -07:00
Jeff Sharkey
ec55ef0934 Extend pm to support sessions and split APKs.
Separate commands to create an install session, stream files into the
staging area, and then commit the install.  Streaming can accept data
from stdin across adb, avoiding extra copy from push.

Extend FileBridge to support blocking close().  Always destroy
session regardless of result.

Bug: 14975160
Change-Id: Ic3f462e7d1901079b785e210228950cdfa676466
2014-07-09 16:55:56 -07:00
Jeff Sharkey
513a074de6 Clean up IPackageManager install surface area.
Also more removal of encryption support.

Change-Id: If525dc5a8422134515f225a8ac4731e968069468
2014-07-08 17:41:29 -07:00
Mike Reed
42a1d08df7 SkBitmap::Config is deprecated, use SkColorType
Change-Id: Ida181d2aac760072cf2d01409edac37699dea216
2014-07-07 18:11:24 -04:00
Christopher Tate
ab225b301b Add 'fullbackup' to bmgr's usage statement
Also make it handle the list of packages to be backed up as a single
multiple-app argument to fullTransportBackup() rather than N calls
each backing up one app.

Change-Id: I9fe4d5caca54fafef70ffe9af4c26e3941dc5d26
2014-06-24 16:52:09 -07:00
Mike Reed
b933055cf3 stop using (deprecated) SkBitmap::Config
Change-Id: Ic75b5fc6996578e9d95bd3a220439ec1541d7c3b
2014-06-20 10:28:37 -04:00
RoboErik
d3c8642dae Remove some more old code and fix Media command
Removes some more hidden apis from AudioService/Manager. This also
fixes up Media.java to support commands for the new service to help
with debugging. Also fixes a couple bugs that were found while fixing
up Media.

Change-Id: I68e4aa80a4de430b98236aafc883664b9432c62b
2014-06-19 10:37:00 -07:00
Adam Lesinski
f90f2f8dc3 Support multiple resource tables with same package
In order to support APK split features, the resource
table needs to support loading multiple resource
tables with the same package but potentially new set
of type IDs.

This adds some complexity as the type ID space changes
from dense and ordered to potentially sparse.

A ByteBucketArray is used to store the type IDs in
a memory efficient way that allows for fast retrieval.

In addition, the IDMAP format has changed. We no longer
need random access to the type data, since we store the
types differently. However, random access to entries of
a given type is still required.

Change-Id: If6f5be680b405b368941d9c1f2b5d2ddca964160
2014-06-18 19:20:08 +00:00
Jeff Sharkey
8a4c9721a9 Plumb split APKs into public API.
Introduces new ApplicationInfo fields to surface zero or more split
APKs for an application.  Splice these APKs into both the class
loader and resource system.  Cleaner building of these paths.

Run dexopt() on all split APKs found after a parse, and populate
into ApplicationInfo.

Change-Id: I4a376bf4492d84ea95aafa866e106ea43a43e492
2014-06-17 14:38:44 -07:00
Adam Lesinski
afc00e1c81 Change am get-config command to use ABI string array
There is a list of supported ABIs in android.os.Build which
is ordered by preference. This is a more flexible list to use
instead of 2 fixed ABIs.

Change-Id: I6aa3b39b5ffa888ed83a870b937e18328dd6de39
2014-06-17 20:27:39 +00:00
Adam Lesinski
2c749d2427 New command to get device config
Change-Id: I7172a3a150fd83e2382ca3e4e4a0188758189f14
2014-06-16 23:01:19 +00:00
Christopher Tate
9ff53a7100 Implement full data backup through transport
Currently no timed/scheduled full-data backup operations are
performed by the OS, but the plumbing is now in place and can
be tested using 'adb shell bmgr fullbackup pkg [pkg2 pkg3 ...]'.

The LocalTransport test transport implementation has been augmented
to support the new full-data backup API as well.

In addition, 'adb backup' now takes the -compress/-nocompress
command line options to control whether the resulting archive is
compressed before leaving the device.  Previously the archive was
always compressed.  (The default is still to compress, as it will
usually reduce the archive size considerably.)

Internally, the core implementation of gathering the full backup
data stream from the target application has been refactored into
an "engine" component that is shared by both 'adb backup' and the
transport-oriented full backup task.  The archive file header
generation, encryption, and compression logic are now factored out
of the engine itself instead of being hardwired into the data
handling.

Bug 15329632

Change-Id: I4a044faa4070d684ef457bd3e11771198cdf557c
2014-06-15 17:35:33 -07:00
Dianne Hackborn
439688cf39 am 6d758619: Merge "Implement control of auto power save mode." into lmp-preview-dev
* commit '6d758619d90a0dda7f1136dcd44d0ac02cdada7e':
  Implement control of auto power save mode.
2014-06-12 00:03:55 +00:00
Dianne Hackborn
14272302a8 Implement control of auto power save mode.
Follow the setting for auto power save mode in both
battery service and battery UI.  Default level is 15 when
setting is not set; otherwise it is whatever the setting
gives, with 0 meaning auto battery save is off.

Change how we define the "turn off warn" level to be
an adjustment from the warn level, so we can have a good
value for whatever auto setting is set.

Fix power manager to never go in to power save mode when
plugged in, even if the user has manually turned it on.

Add new delete option to settings command, because I needed
it for testing.

Change-Id: I512b691df84399d50b8e751fd50732c6093ebe85
2014-06-11 10:34:26 -07:00
Narayan Kamath
dad8f819a7 Merge "Add an --abi argument to "pm install"" 2014-06-03 12:01:53 +00:00
Narayan Kamath
116bdbd823 Add an --abi argument to "pm install"
This allows callers to force an install to a particular
ABI. This is intended only for testing (and CTS) and is
not meant for usage by the installer package.

bug: 14453227

(cherry picked from commit 6431d11cd420536aaa9d93ae510a3151ccc4df1d)

Change-Id: I85d4f8785deea02a6a4d3cb0b05e6ef8bf64826b
2014-06-03 11:35:49 +01:00
Jeff Sharkey
d8e9050e22 Merge "Read data from stdin/stdout to follow adb change." 2014-06-02 17:44:47 +00:00
Narayan Kamath
dfed4bc99f am f7871c31: am b9b31f4b: am bd4d3203: Merge "Support an ABI flag for instrumentation."
* commit 'f7871c31469c6245c1b232a15104704f7481103c':
  Support an ABI flag for instrumentation.
2014-05-30 11:51:03 +00:00
Narayan Kamath
f7871c3146 am b9b31f4b: am bd4d3203: Merge "Support an ABI flag for instrumentation."
* commit 'b9b31f4b8eda123e7b544d1a0fa886576064adca':
  Support an ABI flag for instrumentation.
2014-05-30 10:49:00 +00:00
Narayan Kamath
b9b31f4b8e am bd4d3203: Merge "Support an ABI flag for instrumentation."
* commit 'bd4d320344833ce67dad3a4e10a61d0502a81d0e':
  Support an ABI flag for instrumentation.
2014-05-30 10:41:24 +00:00
Jeff Sharkey
a312c03fd8 Read data from stdin/stdout to follow adb change.
Change-Id: I29ee5e05a538c6836f18b9cc9331c74f41936b29
2014-05-29 18:03:22 -07:00
Dan Stoza
00f535845b Merge "SurfaceFlinger: Add sourceCrop to screenshot" 2014-05-28 18:31:38 +00:00
Kenny Guy
1bdbd4be02 Add ability to uninstall per user to adb shell pm.
Default is still uninstall for all users, but if --user
is passed in it will just uninstall for that user.
For system apps if --user is supplied it will uninstall
rather than revert to the current system version.

Change-Id: If1be0f78f01391f7ac6b53150dfeeccd0c002899
2014-05-23 18:37:34 +01:00
Dan Stoza
9890e341bf SurfaceFlinger: Add sourceCrop to screenshot
Adds a sourceCrop Rect parameter to screenshot commands, which allows
clients to capture only a portion of the screen instead of the whole
screen.

Bug: 15137922
Change-Id: I629447573cd34ffb96334cde7ba02490b9ea06d8
2014-05-23 09:19:02 -07:00
Narayan Kamath
8dcfefd652 Support an ABI flag for instrumentation.
Allows us to choose what ABI a process uses when
launching it with "adb shell am instrument", for eg.

adb shell am instrument --abi arm64-v8a component/runner

Note that we only perform very basic validation of the
ABI. In general, there is no guarantee that the app will
launch with the instruction set we choose, for eg. if it
has native libraries that are for a different ABI.

bug: 14453227

Change-Id: Ifb7e89b53675080dc87941091ee5ac360f218d7f
2014-05-16 10:30:00 +01:00
Narayan Kamath
72a194e6d5 am 1810927a: am eabc93db: am c4c08803: Merge "app_process: change app_process a symlink of primary version"
* commit '1810927a9b8f6d2597d18c0e77389b4a6fcb5118':
  app_process: change app_process a symlink of primary version
2014-05-15 10:34:43 +00:00
Narayan Kamath
1810927a9b am eabc93db: am c4c08803: Merge "app_process: change app_process a symlink of primary version"
* commit 'eabc93db1020be4b71f0db7d5b5d3a7991f3c264':
  app_process: change app_process a symlink of primary version
2014-05-15 09:45:33 +00:00
Narayan Kamath
eabc93db10 am c4c08803: Merge "app_process: change app_process a symlink of primary version"
* commit 'c4c08803a8cc090aa27720e97df342231e8433af':
  app_process: change app_process a symlink of primary version
2014-05-15 09:41:40 +00:00
Yongqin Liu
559484ed6a app_process: change app_process a symlink of primary version
Change app_process to be a symlink to the primary version
and have app_process32/app_process64 be the 32-bit/64-bit
versions respectively.

This will make it possible to use the primary zygote for
am/pm commands and other scripts that use app_process and
don't need a specific zygote.

Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Change-Id: Ibef545994eb95ddc82101c95df613ad1d06345e6
2014-05-14 18:48:42 +01:00
Robert Greenwalt
7b81602f3c Enabling internal msg apis
NetworkFactory and NetworkAgent.  First trying with wifi and
getting rid of WifiStateTracker.

Conflicts:
	api/current.txt
	services/core/java/com/android/server/ConnectivityService.java

Change-Id: I7f0ec13d7d8988b32f3c6dc71f72012f3349fe02
2014-05-14 03:56:34 -07:00
Narayan Kamath
b6c04899e1 am c8a045d4: am 41f40581: Merge "Fix x86 build in app_process."
* commit 'c8a045d451522adab5226b0063f3a15d34542bf7':
  Fix x86 build in app_process.
2014-05-01 10:43:23 +00:00
Narayan Kamath
fd30a0e7b7 am ff34f6fa: am 27b03e62: Merge "Create arch specific cache dirs during zygote startup."
* commit 'ff34f6faaad21f5f72decc0b6a0bbde8dab68e29':
  Create arch specific cache dirs during zygote startup.
2014-05-01 10:43:19 +00:00
Narayan Kamath
c8a045d451 am 41f40581: Merge "Fix x86 build in app_process."
* commit '41f40581ee0284660d30be8ef28f6bf721c4ce10':
  Fix x86 build in app_process.
2014-05-01 10:39:55 +00:00
Narayan Kamath
ff34f6faaa am 27b03e62: Merge "Create arch specific cache dirs during zygote startup."
* commit '27b03e6272479ed82762a4a5d6e4be4f26c1ed58':
  Create arch specific cache dirs during zygote startup.
2014-05-01 10:39:52 +00:00
Narayan Kamath
d6183204e4 Fix x86 build in app_process.
Look for __i386__ and not __x86__.

(cherry picked from commit 47d526217b3fd0d17ba751c66d25cfaf1c6ed7cd)

Change-Id: I848ba351c378e59ab6744ca1983ae4463ae75ba4
2014-05-01 11:27:49 +01:00
Narayan Kamath
973cdeed8e Create arch specific cache dirs during zygote startup.
The runtime expects them to exist before it's launched.
The boot image / art files are created during the first
zygote launch.

(cherry picked from commit da738713e4e2120a324e8ab6fd11aa0e54a3c66e)

Change-Id: I7472aa25c16a1cf95791af2bdf80ed0d73123872
2014-05-01 11:26:49 +01:00
Narayan Kamath
52adfdaafd am 516130cc: am dbbf431b: am d0f7f418: Merge "Freeing frame map"
* commit '516130ccb1841afb6ef154c28269d91594925429':
  Freeing frame map
2014-04-30 17:36:10 +00:00
Narayan Kamath
6eb1b2611c Fix x86 build in app_process.
Look for __i386__ and not __x86__.

Change-Id: Iffa3709f9d0c96cce17f3183a6f036a78eccc787
2014-04-30 16:45:07 +01:00
Narayan Kamath
516130ccb1 am dbbf431b: am d0f7f418: Merge "Freeing frame map"
* commit 'dbbf431b289bb7a01b43db3412ecab00abe18362':
  Freeing frame map
2014-04-30 15:37:44 +00:00
Narayan Kamath
dbbf431b28 am d0f7f418: Merge "Freeing frame map"
* commit 'd0f7f41828493b0679e908f7bb3ed3b8e838c463':
  Freeing frame map
2014-04-30 15:12:58 +00:00
Mykola Kondratenko
0c1eeb3c8a Freeing frame map
FileMap memory is never released until application exit

Release it now as the texture is already loaded and the memory
used for the packed resource can be released.

Change-Id: Id08a1e466337b3a0179684eb6a444e18147ee343
2014-04-30 10:58:20 +00:00
Narayan Kamath
dfacf855fd Merge "Create arch specific cache dirs during zygote startup." 2014-04-30 08:34:56 +00:00
Narayan Kamath
d1e127e141 Create arch specific cache dirs during zygote startup.
The runtime expects them to exist before it's launched.
The boot image / art files are created during the first
zygote launch.

Change-Id: I5ed0ad4854dc7785246344c8f6eaf54e560feb7d
2014-04-30 09:26:05 +01:00