1900 Commits

Author SHA1 Message Date
Jeff Sharkey
df972232c7 Merge "Teach DCS about cluster packages." 2014-07-03 01:26:58 +00:00
Jeff Sharkey
be520fba1e Teach DCS about cluster packages.
For the time being, DCS is going to still be doing heavy lifting for
some install tasks, so it need to know how to handle both monolithic
and cluster packages.  This change is mostly plumbing work to
eventually handle any various splits APKs that we may encounter.

Bug: 14975160
Change-Id: I39848d5666f9083cb4eca493e5cdaa868f3f99fb
2014-07-05 19:16:53 -07:00
Jeff Sharkey
0c54798aac Start removing ContainerEncryptionParams.
The new PackageInstallerSession APIs will allow installers to deliver
bits directly into system protected storage, so we no longer need
encrypted containers.

Change-Id: I8b598cb149b7dfd1d41e6626c1359610a573edf1
2014-07-05 15:49:07 -07:00
Jeff Sharkey
73767b9d60 Extract native code from split APKs.
In the new split APK world, multiple APKs work together to define a
single package.  This means that native code may be split among those
APKs.  To handle this, extend NativeLibraryHelper to examine all
APKs in a package ordered by splitName.

A package has valid native code as long as one matching ABI is found
inside.  The "best" ABI found across all APKs is picked for the
entire package.  No attempt is made to ensure that every native
library defined is available for the picked ABI; that's the
responsibility of the installer.

Re-introduce PackageLite to represent a lightweight parsing of an
entire package, which may be a single monolithic APK or a cluster
of one or more APKs.

Remove native code extraction from InstallerSession, since it'll be
handled inside PMS for this release.

Bug: 14975160
Change-Id: I4f4db0f82e88a46101c7777499ebc0a11fd911f9
2014-07-04 21:00:33 -07:00
Jeff Sharkey
0fc63f4795 Merge "Start removing ContainerEncryptionParams." 2014-07-02 18:50:12 +00:00
Jeff Sharkey
ece4b655dc Merge "Extract native code from split APKs." 2014-07-02 18:50:12 +00:00
Jinsuk Kim
4ab7606f32 Merge "Removed class HdmiCec" 2014-07-02 19:52:36 +00:00
Jinsuk Kim
c0c20d0522 Removed class HdmiCec
Most of the constants in HdmiCec are internal use only. Moved them
to service, and dispersed the rest to other relevant classes.

Also moved HdmiCecMessage class to service as it doesn't need to be
open ouside the service.

Change-Id: I7b2ce3bf465330aa4d7fcd05f9aefa1e6c8b056a
2014-07-04 17:19:31 +09:00
Jinsuk Kim
96aacd2a2c Merge "Remove the usage of TX_STATUS in HdmiControlService" 2014-07-02 20:35:42 +00:00
Jinsuk Kim
cae6627702 Obtain TV power status correctly in HdmiControlService
Bug: 15845654

Change-Id: I28b97e7ecb462b4fbaf6ac573e4d0fc9fcf724da
2014-07-04 05:00:48 +00:00
Jinsuk Kim
5344cd98e6 Launch routing control in HdmiControlService at boot up
Change-Id: I918c2a0da26a7cda20ee703dfeeacae276ec8373
2014-07-04 13:57:17 +09:00
Jinsuk Kim
ba147582b1 Remove the usage of TX_STATUS in HdmiControlService
Reflects the change to come in CEC HAL

Change-Id: I3a64e19bbdd8067855911ef11653fe64049b8880
2014-07-03 08:26:44 +00:00
Jinsuk Kim
0f94217e90 Merge "Add API setProhibitMode in HdmiControlService" 2014-07-02 19:52:36 +00:00
Jinsuk Kim
4d43d93743 Add API setProhibitMode in HdmiControlService
setProhibitMode sets a flag inside the service that indicates if
input switch request will be processed or not. Sets to true when
TV is doing something for which TV display should be fixed, like
channel scan, software update - collectively called 'prohibit mode'.

Change-Id: I8ac623023210b58b684b9af3ac475a5fe0d09435
2014-07-04 12:36:38 +09:00
Jungshik Jang
65f7c3ff20 Merge "Remove duplicated cec keycode definitions." 2014-07-02 21:09:42 +00:00
Jungshik Jang
210d73df0b Remove duplicated cec keycode definitions.
Remove keycode (ui command) defined and use HdmiCecKeycode one.

Change-Id: I9a7c4be3e5cfd561c7353b9cda715d431c00ff0c
2014-07-04 11:26:45 +09:00
Jinsuk Kim
04fd28046a Update routing control action for HdmiControlService
Added an argument queryDevicePowerStatus on which routing control action flow
should be based.

Bug: 15845652

Change-Id: Ib8a2d31792aad67289308167d07f660c3438be78
2014-07-04 02:25:41 +00:00
Jungshik Jang
517cc7f99e Merge "Remove two TODOs from HotpulgDetectionAction." 2014-07-02 21:09:42 +00:00
Jungshik Jang
26dc71e7fe Remove two TODOs from HotpulgDetectionAction.
Bug: 15844023
Bug: 15841646

Change-Id: I4022c48a9fdb1963f755895ec5ff0370157050c7
2014-07-04 11:00:18 +09:00
Jungshik Jang
40d43b27b4 Merge "Prevent press&hold for non-repeatable keycode." 2014-07-02 21:09:42 +00:00
Jungshik Jang
250cda56d2 Prevent press&hold for non-repeatable keycode.
For non-repeat keys like power or mute key Hdmi-Cec
doesn't support press&hold feature. This change sends
user control pressed immediataly if the given keycode
is non-repeatable key.

Change-Id: Id571e67d94125a8c6a3553135b8e714b721405f3
2014-07-03 10:30:13 +09:00
Jungshik Jang
7d4faa6c86 Merge "Set source address for <Polling Message>" 2014-07-02 21:09:42 +00:00
Jungshik Jang
1de514256f Set source address for <Polling Message>
CEC spec mentions that logical address allocation uses
the same address for source and destination while <Polling Message>
uses device's source address.

Bug: 16045547
Change-Id: Id18f328755501c62a98a1040b287c180cb889c9b
2014-07-03 11:14:26 +09:00
Jungshik Jang
41d974631c Add volume callback for Hdmi-Cec system audio mode.
Hdmi-Cec's system audio mode delegates audio control to
audio receiver from tv. It requires to delegate
volume change including mute to audio receiver
instead of consuming by tv.
In order to do this this change introduces three apis.
One is added to IAudioService, the others are added
to IHdmiControlService as hidden apis.

 1. IAudioService#setHdmiSystemAudioSupported;
    This is to notify system audio mode change to audio
    service so that it determines to notify volume or mute
    change to HdmiControlService.

 2. IHdmiControlService#setSystemAudioVolume;
    This is to notify volume change to HdmiControlService.
    It's called only where system audio mode is on.

 3. IHdmiControlService#setSystemAudioMute;
    This is to notify volume change to HdmiControlService .
    It's called only where system audio mode is on.

Change-Id: I3d8534b37ddf1a812e32012059a8778772044bf0
2014-07-03 10:09:32 +09:00
Jungshik Jang
3a959fca91 Log unhandled message which has specific destination.
Broadcast message is unnecessary to log as broadcast message.

Bug: 16039302
Change-Id: Ifffc09b49bceaaf220ce929206eaecb78146016f
2014-07-03 09:34:05 +09:00
Jinsuk Kim
ea1e84b8ca Merge "Implement some apis for TV Input Framework and HdmiControlService" 2014-07-02 19:52:36 +00:00
Jinsuk Kim
9c37e1f53e Implement some apis for TV Input Framework and HdmiControlService
- setInputChangeListener()
- getInputDevices()

Change-Id: I6f7d6d9c7094018e2b6b5ba37f63c8ee5df00e37
2014-07-04 11:22:51 +09:00
Yuncheol Heo
b2596e6182 Merge "Handle the power state change." 2014-07-02 20:35:42 +00:00
Yuncheol Heo
38db629d89 Handle the power state change.
- Add BrocastIntent listener to catch SCREEN_ON/OFF intents.
- Add callbacks onTransitionToStandBy(), onStandBy() in HdmiCecLocalDevice.java.
- When it gets the SCREEN_OFF intent, the state will be TRANSITION_TO_STANDBY,
  then when there is no outstanding actions, the state will be STANDBY.
- When the state is STANDBY, the TV device will broadcast <StandBy>.
- When it gets the SCREEN_ON intent, the state will be TRANSITION_TO_ON,
  then when the initialization is done, the state will be ON.
- When the state is ON and it receives <StandBy> CEC message, it will force
  the system to go to sleep.
- When the state is STANDBY and it receives the cec messages to wake-up the
  system, it will force the system to wake up from sleep.
- Manage the active source state for the playback device.

Change-Id: Ib473219a0b0deb5224df89386db5a83720000411
2014-07-04 10:33:53 +09:00
Kenny Guy
c13053bf1c Add package state to block uninstall.
Add package state to allow profile or device
owners to block uninstall of packages.
Add API to DevicePolicyManager to set/get the
state.

Bug: 14127299
Change-Id: I03528819850b42df7bafa7747bb9e4558d20c4e6
2014-07-04 11:35:17 +00:00
Jeff Sharkey
57dcf5b177 Slow progress towards APK clusters.
Differentiate between "split APKs" and "cluster packages".  A cluster
package is a directory containing zero or more APKs (base+splits),
and a monolithic package is a single APK (base).

PackageSetting will use the directory name as its codePath, so track
the baseCodePath separately.  Clarify documentation in several
places.

Require that all installers provide file:// URIs through existing
hidden APIs; PackageInstaller hasn't been able to read content://
URIs for a long time.

Bug: 14975160
Change-Id: I1c6fed1b55205c2474b09871161a98a26669d22e
2014-07-02 19:03:54 -07:00
Christoph Studer
d5092bcb11 NoMan: Allow notifications to transition !ZEN -> ZEN
Bug: 15979100
Change-Id: Ifd620caf2e00f8cd3d9f1458b93585a454af4b74
2014-07-03 17:53:45 +02:00
Christoph Studer
1cd5add16c Fix 'stuck notification' bug
Apply implied flags before notifying listeners.

Bug: 15589158
Change-Id: Ie1c7374fa562ff62725361fb0dc8b0d1a6725618
2014-07-03 14:00:41 +02:00
Narayan Kamath
4aa03ef621 Merge "Revert "Enforce USB and storage restrictions"" 2014-07-02 19:56:47 +00:00
Narayan Kamath
a35add6882 Revert "Enforce USB and storage restrictions"
This reverts commit 39e53714ede48fcb464733834d7d9ccb868efe8a.

Change-Id: I81199fea8ca4b48516792bb02c1c3e90e5916c1f
2014-07-03 11:45:56 +00:00
Emily Bernier
41497e6827 Merge "Enforce USB and storage restrictions" 2014-07-02 19:53:18 +00:00
Craig Mautner
c0ffce5ddd Use cached thumbnails in Recent tasks.
The thumbnail returned from ActivityManager.getTaskThumbnail() now
contains either a Bitmap or a ParcelFileDescriptor that points to
a file containing a compressed Bitmap. The Recent tasks list is
now responsible for all thumbnail Bitmap caching as the activity
manager keeps only the most recent 5. This also permits low memory
devices to have many more tasks in the Recent tasks list.

As part of this CL the concept of subtasks is removed eliminating
code supporting the TaskAccessInfo and IThumbnailRetriever classes.

Fixes bug 15828934.

Change-Id: I0fd0320a1a04e3c78d79357899b83a2fff97abf2
2014-07-02 16:31:46 -07:00
dcashman
ca76cccb61 Merge "Initial work for key rotation." 2014-07-02 18:22:50 +00:00
dcashman
55b1078e2a Initial work for key rotation.
Introduces the upgrade-keyset tag to AndroidManifest.xml. This specifies a
KeySet by which an apk must be signed in order to update the app. Multiple
upgrade KeySets may be specified, in which case one of them must be used to
sign the updating apk.  If no upgrade-keyset is specified, the current logic
involving signatures is used.

Current Key Rotation Design Decisions:
-Apps using a shared user id may not rotate keys.
-All acceptable upgrade keysets must be specified, including the key signing
the app.  This enables key rotation in one update, but also 'locks' an app if
an incorrect upgrade keyset is specified.
-Minimal changes to existing KeySet code.

Bug: 6967056
Change-Id: Ib9bb693d4e9ea1aec375291ecdc182554890d29c
2014-07-02 12:51:28 -07:00
Julia Reynolds
3690ea1aa1 Merge "Apply the tethering user restriction to connectivity service." 2014-07-01 16:34:37 +00:00
Julia Reynolds
f5116d01b2 Apply DISALLOW_CONFIG_VPN restriction to VPN.
Bug: 16008760
Change-Id: I299d5f32d9b09c3abcc32f3e889a0187880621df
2014-07-02 17:51:46 +00:00
Julia Reynolds
fc6b2a0be3 Apply the tethering user restriction to connectivity service.
Bug: 15852213
Change-Id: Ib2df696189981ed1b31955257047fac3ee403965
2014-07-02 16:46:54 +00:00
Alexandra Gherghina
1e1f2e8926 Merge "Adds per-user APIs required by the Settings app" 2014-07-02 16:34:47 +00:00
Alexandra Gherghina
cb22807ffc Adds per-user APIs required by the Settings app
Bug: 15466880
Change-Id: Ic99fbf074564901b04d32b08f3a7a38555f330b3
2014-07-02 13:34:14 +01:00
Narayan Kamath
f29131f701 Merge "Fix native crashes when APKs can't be opened." 2014-07-01 19:11:01 +00:00
Narayan Kamath
cef0b39b92 Fix native crashes when APKs can't be opened.
There was lax / incomplete error checking around the
construction of Apk handles. This change changes the ApkHandle
API and makes it throw IOException if the zipfile couldn't
be opened.

Additionally :
- Fix a resource leak in DefaultContainerService
- Report errors correctly during package moves.

bug: 15563874
(cherry picked from commit ec4516470d7ce6e47769591d678c838bd3f6f388)

Change-Id: Ia35b464355467d0d36faf34fae85acbbab3f2896
2014-07-02 12:43:52 +01:00
Jinsuk Kim
160a6e5b99 Add setOption for HdmiControlService
Bug: 15845304
Change-Id: I96b285ae3938aeecdd44b2c08a178def33bd2bf2
2014-07-02 17:16:45 +09:00
Jungshik Jang
ca5be9a8fb Remove SystemAudioAutoInitiationAction when SystemAudioActionFromAvr started.
Bug: 15845309
Change-Id: I1eefeca3aab117f2def08fe9fbbea81987ef11a8
2014-07-02 11:51:21 +09:00
Dianne Hackborn
497175beff Rework network stats to use proc state for fg/bg.
Switch to using the process state to determine whether a
process should be foreground or background, instead of the
boolean foreground given by the activity manager.

This is for battery save mode, where we can now allow more apps
to havenetwork access: everything whose process state is at
least IMPORTANT_FOREGROUND, which allows music playback
and other use-visible things to continue to have network
access.

Note this also impact the traditional background data disabled
state, where now we allow anything top or better to have
network access.  This automatically includes all persistent
processes, the current top activity, and any other processes
hosting the top activity or being used by the top activity.
So it broadens the set of apps that get network access, but I
think this increases it to a reasonable set of things that may
actually be needed for the foreground app to work correctly.

Change-Id: Icb609a2cea280dc3fa3e83417f478ed77f3685aa
2014-07-01 18:34:58 -07:00
Nicolas Prevot
7f7b0c759e Returning badged icons for components of corporate apps.
So, corporate apps in disambiguation dialogs are badged.
And updating the way we show the icon of the personal space to this new design.

BUG: 14377051

Change-Id: Idc707773a64a8feb2d9d4df88c425d5100542636
2014-07-02 12:09:51 +01:00