1661 Commits

Author SHA1 Message Date
Martin Wallgren
0fbb608110 RRO: Synchronize access to overlays.list
idmap --scan is executed as a part of the pre-loading in ZygoteInit.
The pre loading is executed in parallel for each supported architecture
(32/64 bit). This will cause a race condition in the creation of the
overlays.list file and the idmap files for the system overlays.

Apply flock on overlays.list to prevent the file from being thrown away
and recreated when it is in use by another Zygote.

Cherry-picked from AOSP.

Bug: 28032298
Test: manual
Change-Id: I51d39f121d207b11181340b68b164b60020f0c61
2016-10-12 14:56:31 +00:00
Shunta Sato
4f26cb5a36 Fix: "adb install -s" adaptation for session based install
Internal implementation of "adb install" has been changed to
session install. As a result '-s' option doesn't work.
Size info is required when using '-s' option in session install.
PackageHelper.fitsOnExternal() returns false and moving app to SD is
failed when size info is not set.

So set size info when '-s' option is used.
And change identity on some method because shell doesn't have some
permission to access to asec.

Bug: 29932779
Author: Ryuki Nakamura <ryuki.x.nakamura@sonymobile.com>
Change-Id: I65edcc0f01ceecaaba17792ad329791a9253d603
2016-10-11 06:33:22 -07:00
Geoffrey Pitsch
5b1702e554 Merge "Support multichannel sounds in bootanim" into nyc-mr1-dev 2016-09-13 16:21:22 +00:00
Alan Viverette
df3a7cab8f Change density for the correct user
Bug: 30839993
Change-Id: I5368accddfc4a03b8025a257b4155fcdc6197f11
2016-09-06 17:13:41 -04:00
Geoffrey Pitsch
db90897b5f Support multichannel sounds in bootanim
Manually handle the 1-2 channel cases to avoid the warning
log when 0 is passed as the channelMask.

Bug: 30820152
Change-Id: I4d2c8736ff442fae9a4c5eb16061646fb53151b6
2016-08-24 16:59:16 -04:00
Geoffrey Pitsch
290c4350ed Suppress Boot sound for non-standard scenarios.
Blacklisted bootreasons will not play a sound (e.g. "kernel_panic")
If boot has already completed, assume this is a runtime restart and
skip the sound.

Bug: 30654343
Change-Id: I41b1829a93c0d9a63c69aea2d1614eaa18b72230
2016-08-10 10:52:48 -04:00
Geoffrey Pitsch
305087991d BootAnimation system property to play sound.
Optional system property "persist.sys.bootanim.play_sound"
If nonexistent, default behavior plays the sound.

Bug: 30690353
Change-Id: Ie5ed456d891632be5ec8be255ac7c1193753c741
2016-08-08 16:18:21 -04:00
Eric Laurent
197e47979a bootanimation: fix glitchy playback
Do not use low latency playback mode to be more
robust against scheduling problems during boot phase.

Also:
- remove unused reverb on output mix
- fix WAV file parser.

Bug: 30277818
Change-Id: I1e15d3003a25c93d4995006885b32a754d17343f
2016-07-22 11:31:25 -07:00
Geoffrey Pitsch
5613313533 Play boot sound on the System stream.
Turning down the ring volume will also turn down boot sound.

BUG:30132711
Change-Id: I902e56b20f105c27209dd47f054e98085647ee85
2016-07-15 10:50:04 -04:00
Geoffrey Pitsch
a91a2d7375 Fixes delay when playing first sound in BootAnimation
audioplay is initialized with an example of the type of clip it
will play.
Also remove asserts and debug compile settings from BootAnimation.

BUG:24800792
Change-Id: Icb78489417aee0549c340c746b25e57ccdb3427e
2016-07-13 15:51:24 -04:00
Damien Bargiacchi
4786f6d958 Merge "Don't show times before 2000-01-01" into nyc-mr1-dev 2016-07-13 00:40:07 +00:00
Damien Bargiacchi
9676281c4f Don't show times before 2000-01-01
BUG=27802041

Change-Id: Iaa826e029c3b887e2bda6d12bc7c372d862ed320
2016-07-12 16:03:37 -07:00
Geoffrey Pitsch
859029ff7b Merge "OpenSL-based audio support for BootAnimation" into nyc-mr1-dev 2016-07-12 17:29:56 +00:00
Tim Murray
b646ec13e1 Merge changes from topic 'stune' into nyc-mr1-dev
* changes:
  Put bootanimation in top-app stune group.
  Sets android.ui to be in the fg stune group.
2016-07-11 20:29:40 +00:00
Geoffrey Pitsch
143d48927e Merge "BootAnimation: Use npot textures" into nyc-mr1-dev 2016-07-11 20:12:40 +00:00
Tim Murray
5c52691a48 Put bootanimation in top-app stune group.
bug 29512132

Change-Id: Id39650177b1f3b1ca24edb72b2809ee4ded396a1
2016-07-11 11:41:52 -07:00
Geoffrey Pitsch
2fb30fb68e Wait until end of BootAnimation to free looping textures
glDeleteTextures causes a noticeable framerate hitch when switching to
the outro.  By the time looping is finished, the system has finished
booting, so freeing the textures immediately is less beneficial.

Bug: 29878551
Bug: 30040263
Change-Id: I5a404a6e18cd2cf64d6c94343f82fa5db8dfbab3
2016-07-11 13:02:41 -04:00
Sai Kiran Korwar
271674930a BootAnimation: Use npot textures
If non power of two textures are supported, then use
npot texture for specifying the images supplied by vendor.
This will reduce the memory footprint of the app by a considerable
amount.

Bug: 28865582
Bug: 30040263
Change-Id: I5cef98fb013318d60d8a648041c9665da68c0ff3
2016-07-11 12:54:22 -04:00
Geoffrey Pitsch
d6d9a1d0b9 OpenSL-based audio support for BootAnimation
Respects dnd settings for sound playback.
Basic implementation uses in-memory wavs as buffers.
audioplay::playClip should not be called before previous clip ends.
Updated FORMAT.md to reflect no more audio_conf.txt

Bug: 29055299
Change-Id: Ifc358d7c85f11b8b54ae6446c40643b87bc567f2
2016-07-06 11:13:48 -04:00
Geoffrey Pitsch
656b9db5fb Merge "Support trimmed images in BootAnimation" into nyc-mr1-dev 2016-06-30 18:24:16 +00:00
Geoffrey Pitsch
dd214a796f Support trimmed images in BootAnimation
Each frame directory may optionally contain a `trim.txt` to specify
how the image was trimmed relative to the animation's full size.
See FORMAT.md for more details.

Bug: 29055299
Change-Id: I7a291e9a52b4bbe50a29c519f6a4d0e2cc0389d7
2016-06-29 09:35:21 -04:00
Chong Zhang
2fde939272 Fix off-by-one in am start -R (repeat)
bug: 26028552
Change-Id: I075b378b6f126d124d867282d76a78d865b54178
2016-06-28 18:08:13 -07:00
Amith Yamasani
b75fc2b2b7 Add tron logging for retail demo session counters
Count each demo user creation and time between
first touch (to dismiss the video) and the start
of inactivity timeout.

Fixed an NPE in SysUI when user switcher is missing.

Bug: 29540372
Change-Id: I7bc0e0dde75e7b213a025683c15c9b3e750643a9
2016-06-27 11:15:38 -07:00
Christopher Tate
0754128dc9 Merge \"Let bmgr inspect the set of whitelisted transports\" into nyc-dev
am: 0f101342e1

Change-Id: I5249aed8cf49c0da111324d5c6ab43b46cdb1196
2016-06-20 17:36:58 +00:00
Chris Tate
0f101342e1 Merge "Let bmgr inspect the set of whitelisted transports" into nyc-dev 2016-06-20 17:19:55 +00:00
Sudheer Shanka
a6a99cbb00 Merge \"Add pm operation to set user restrictions.\" into nyc-dev
am: f6824b51cc

Change-Id: I355632fa26c9d85a5d41d18ca298fc704117fc48
2016-06-18 02:15:42 +00:00
Sudheer Shanka
bf0a9a7445 Add pm operation to set user restrictions.
Bug: 29189712
Change-Id: I6fdb3b68dfe3f51119e5ce8008880fc7d9c793df
2016-06-16 09:43:29 -07:00
Christopher Tate
e227ec61c2 Let bmgr inspect the set of whitelisted transports
Needed for compliance testing.

Bug 29072466

Change-Id: I025058ab9197f9e2db062bf0074e79f1cd04b443
2016-06-15 17:40:31 -07:00
Allen Hair
f90c5c5f5a Merge "Deprecate shell-based UI Automator." into nyc-dev
am: f298f4a7c7

* commit 'f298f4a7c779588821b744c7247fc896541cae57':
  Deprecate shell-based UI Automator.

Change-Id: Iaea8d67bd6bf9f57b3033eaefcb103d9f2e022dd
2016-05-24 21:34:53 +00:00
Allen Hair
3fb03313e9 Deprecate shell-based UI Automator.
Change-Id: I15aee7a6aba551b737d2c41b4fafd5b0ced9a4b7
2016-05-24 11:10:44 -07:00
Damien Bargiacchi
9cb24e5582 Merge "Check clock accuracy before attempting to display clock" into nyc-mr1-dev 2016-05-19 20:56:52 +00:00
Dianne Hackborn
0c4e6a8da3 Fix issue #27532364: Security Vulnerability in IIntentSender.send
We need to make IIntentSender oneway...  but when the system is
calling that for itself, it needs to be able to return a result code.

Solution: instead of directly calling the interface, we have a new
IPC through the activity manager.  If the thing being used is the
activity manager impl, it can do the synchronous send and return
the result directly in place.  If not, you only get asynchronous
sending and thus never a failure result back (too bad for you!).

Change-Id: I4096e5b00063e8dba66230585a2dfe67e35e8092
2016-05-13 17:37:08 -07:00
Damien Bargiacchi
9748086fe2 Check clock accuracy before attempting to display clock
The RTC may not be set yet, may have been reset, or may have drifted
significantly if the device time hasn't been updated in a long time.

Using the the last_time_change file to determine if the time is known to
be accurate and only display the clock when that is the case.

Bug: 27802041
Change-Id: I845cf9c74fcb4009504f1bab853e04146fa19e1d
2016-05-12 17:01:59 -07:00
Christopher Tate
27d92e4e39 Move the 'pretend idle jobs can run now' broadcast into AMS
It's a protected broadcast, so sending it directly from 'am' is
no longer an option.  This is needed for CTS as well as being
generally useful during app development.

Bug 28406044

Change-Id: I101915a8c6f19454330a8db2079a75023c112582
2016-05-06 11:25:11 -07:00
Dimitry Ivanov
3088ff85a5 zygote: Remove NativeLoader initialization step
This now done by art Runtime::Start()

Bug: http://b/28320913
Change-Id: Icf9b11954b732c9f953e02bba9ae52eb91117457
(cherry picked from commit 6a850b3f11cff546c962fc87ffc961a267973cd4)
2016-04-27 13:40:43 -07:00
Andrii Kulian
a4ab6a0683 Merge "Allow setting fullscreen stack as target via adb shell" into nyc-dev 2016-04-27 02:13:12 +00:00
Todd Kennedy
b107271813 Don't override pre-release target sdk
If a package targets a pre-release SDK [eg a letter version] it should not
be allowed to be upgraded by a release SDK [eg a number version]. If one
absolutely must upgrade to a release SDK, use the "--force-sdk" option
during install.

Bug: 28345311
Change-Id: Ic9fb209968e7c5da2c80c5ca4c0f44f5125f610a
2016-04-26 16:25:43 -07:00
Andrii Kulian
435ce5ff1c Allow setting fullscreen stack as target via adb shell
Bug: 27906038
Change-Id: Ie6feede3f7c412bc51550626a008cb0729e5e0e0
2016-04-26 00:00:01 -07:00
Todd Kennedy
47763629fe Add "do not kill" install option
Passing the "--dont-kill" argument to pm install-create can be used to
install a feature split without killing the contianing application.
Use with caution.

Bug: 27780548
Change-Id: I743ac4f640c9c4251d1b3bc70ddf428bd79e07bf
2016-04-21 15:21:20 -07:00
Kenny Guy
38dcca51a7 Add test method to remove admins.
Add test method to remove admins that declare
FLAG_TEST_APP without informing them.
The method will also remove the device and profile
owner status of the admin.

Bug: 28027468
Change-Id: Idb4d3299a9c6595c94bfb424546cd8a384131835
2016-04-19 20:10:56 +01:00
Narayan Kamath
a09b4d2a61 Remove unnecessary allocation+unboxing of objects.
Transforming String->int can be done with 0 allocations
using Integer.parseInt.

bug: 28078871
Change-Id: I8d9f322d7154728849dde61ef282046032858d60
2016-04-18 09:55:59 +01:00
Jeff Sharkey
33dd156ed0 Give users and devices control over sdcardfs.
Instead of relying only on kernel support for sdcardfs, give each
device the ability to quickly toggle between sdcardfs and FUSE.  Also
add the ability to users to explicitly enable/disable the behavior
for testing and debugging purposes.

Bug: 27991427
Change-Id: Ia57f12f6ead888ab85101004bdd8c8003537b116
2016-04-07 11:30:55 -06:00
Philip P. Moltmann
01ee1b7eb6 Allow to provide only a component name prefix to 'am instrument'
Bug: 27831862
Change-Id: I1d57e416c47fc7d9ea212f0002986932663081b8
2016-04-04 16:37:37 -07:00
Jeff Sharkey
b5e89c6deb Support direct-boot tests.
Add shell commands to check on current FBE status and system ready
status.  Mark variables without first-class locking as volatile.

Fix bug where UI automation would crash while device was locked by
marking it as forced direct-boot aware.

Bug: 26498834
Change-Id: Ib4dfb9350925e5413f93a09baacf84c62f2ba0ea
2016-04-02 19:31:19 -06:00
Fyodor Kupolov
4d709f998d Fixed arguments order for addSharedAccountsFromParentUser
Bug: 27900775
Change-Id: I8c48fabddb778bfd94333d4dcdd296fef87cb59a
2016-03-29 11:20:19 -07:00
Jeff Sharkey
bd91e2f3f6 Update PRE_BOOT_COMPLETED for FBE.
Now that CE data isn't available until after a user is unlocked, we
need to delay the PRE_BOOT_COMPLETED broadcasts.  This is done by
adding a new RUNNING_UNLOCKING user state to the UserController
lifecycle.

We now track the last fingerprint a user was logged in under, and we
dispatch PRE_BOOT receivers when that fingerprint changes.  To work
around battery pull issues, we only persist the updated fingerprint
once all PRE_BOOT receivers have finished.  This is less granular
than the original solution, but it's still correct.  We only consider
a user as "logged in" once it transitions into the RUNNING_UNLOCKED
state.

When starting a process, track if the user was "unlocked" when
started, so that we only spin up unaware providers in processes
started before user unlock.

Add generic IProgressListener to communicate PRE_BOOT progress and
strings up to lock screen.  For now, LockSettingsService just blocks
until finished, but it could display these strings in the future.

Bug: 27220885
Change-Id: I349439776b885acd32f6a578d8951ffd95640be2
2016-03-27 10:56:48 -06:00
Andriy Naborskyy
815e51d76c resolve merge conflicts of 0c7535b to nyc-dev
Change-Id: I49fa42e0d78aeaa8127cefc5cc5122cf37fce878
2016-03-24 17:14:52 -07:00
Andriy Naborskyy
39218ba26d bootanimation: implement split packaging of animation
Animation package zip can be separated into OEM and SYSTEM
OEM desc.txt can use new command "$SYSTEM" to invoke animation
from SYSTEM package

Changes to animation structure:
1. animation can refer other animation
2. animation contains zip file reference
3. BootAnimation has name of root of animation Zip; processing desc.txt we
need filename of container zip and we can't access it from ZipFileRO instance

movie() changes:
1. Split movie() into loading Zip and playing part
2. load parses desc.txt and if needed referred Zip
3. play can descend animations tree

Change-Id: I600d02c84d537df7b3e32a84f84a294b26e319e0
Signed-off-by: Andriy Naborskyy <andriyn@google.com>
2016-03-22 20:18:11 -07:00
Wale Ogunwale
e75a9adfbd Added support to specify animation duration when resizing stack
Needed for sys-ui to control the duration of various Pip transitions.

Bug: 27674339
Change-Id: I7bad27aaa19755a73c594e88b88b56db033e1a45
2016-03-21 11:17:19 -07:00
Dimitry Ivanov
bf1082e9a1 Renamed the function initialing nativeloader
Bug: http://b/27546414
Change-Id: Ia0b65540772ca4bd1cdab391973325b18cd278a0
2016-03-16 14:15:11 -07:00