1781 Commits

Author SHA1 Message Date
Jerry Zhang
ca1663a093 Add data unlock argument to set function command.
This allows automated switches into file transfer mode,
which makes automated Mtp testing possible.

Test: adb shell svc setFunction mtp true
Bug: 25596495
Change-Id: I67be58853b002789dc22b75d82af9eb6cfb7a361
2017-02-16 13:14:50 -08:00
Paul Duffin
78a20be77a Merge "Replace com.android.internal.util.Predicate with java.util.function.Predicate" 2017-02-08 18:06:08 +00:00
Paul Duffin
3e5fbca0c5 Replace com.android.internal.util.Predicate with java.util.function.Predicate
Bug: 35089332
Bug: 30188076
Test: make checkbuild
Merged-In: I0a5b4bf520fc39b59d8d790b01e9cff0d54e6d21
Change-Id: I58e4e35e7b7315033d893748f7c79e1ba6732f39
2017-02-07 16:57:54 +00:00
Tyler Gunn
18dfc36012 Add support for wait-on-handlers command.
Add support for wait on handlers adb telecom command.  Used in CTS
tests to ensure work is completed once all Telecom handlers have finished
their current work.

Test: CTS, Manual
Bug: 34159263
Change-Id: I14acc0a04710b445c172629c2327813ee73a5a55
2017-02-06 20:47:04 -08:00
Treehugger Robot
e924640c4b Merge "[Frameworks] Add an 'am' cmd option to enable streaming in profiling." 2017-01-27 18:49:45 +00:00
Shukang Zhou
6ec0b7e21d [Frameworks] Add an 'am' cmd option to enable streaming in profiling.
Add option '--streaming' to 'am start' and 'am profile' commands.
If the option is given, the output of method trace profiling
will be streamed into the specified file, so the output is no
longer limited by the buffer size.

Test: m -j48 test-art-host;
m -j48 ART_TEST_TRACE=true ART_TEST_TRACE_STREAM=true test-art-host;
I also tested manually. Tried all 8 combinations of
    sampling/instrumention
    streaming/non-streaming
    'am start --start-profiler' / 'am profile start'
The output files are all in expected shape.

Bug: 33300765

Merged-In: I8a5136a1c7330c8260b7c6c8da63f42a73aee275

Change-Id: I8a5136a1c7330c8260b7c6c8da63f42a73aee275
2017-01-25 16:53:41 -08:00
Paul Duffin
4190f233f9 Prepare for removal of legacy-test from default targets (Part 2)
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

Bug: 30188076
Test: make checkbuild
Merged-In: If507b641624a2933e722f61e815890fcdf442265
Change-Id: Icdcad50f1cc32e900bc9e882f1db2867ea170fbf
2017-01-24 15:26:42 +00:00
Paul Duffin
ccb0445027 Prepare for removal of legacy-test from default targets
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

(cherry picked from 6387604f9e672ece85e07c4bcbd7be396867f06f)

Bug: 30188076
Test: make checkbuild
Merged-In: I13e88297731253420e4e5f5291d503f13a39a156
Change-Id: I58446eb8c45d8ac2bcdbc9fa40d1321e811bdd4b
2017-01-19 09:43:05 +00:00
Josh Gao
92517e4c03 app_process: don't use PR_SET_NO_NEW_PRIVS.
selinux should provide equivalent protection, and this prevents
transitioning to a helper binary for crash dumping.

Bug: http://b/30705528
Change-Id: I64b05236931d418f268b193418e937ab6b0985e0
2017-01-17 13:55:20 -08:00
Paul Duffin
6ac5293751 Merge "Replace core-junit with junit" 2016-12-07 12:52:03 +00:00
Paul Duffin
9249205d1b Replace core-junit with junit
Bug: 30188076
Test: make checkbuild
Change-Id: I0cb6f89907eb099714b54bac57b51c4be186c3e0
2016-12-06 14:32:41 +00:00
Andreas Gampe
0662cd5de8 Merge "App_process: Merge app_process and app_process__asan"
am: de32925ccd

Change-Id: I86aaea459fdc1283a3b7e2f0b035ad26aef98920
2016-12-01 02:48:18 +00:00
Andreas Gampe
2200e09736 App_process: Merge app_process and app_process__asan
Two birds with one stone: simplify the setup (including the modules
required in PRODUCT_PACKAGES) and work around a build system issue
wrt/ sanitized static libraries.

Bug: 33224213
Test: mmma frameworks/base/cmds/app_process && \
      mmma SANITIZE_TARGET=address SANITIZE_LITE=true \
      frameworks/base/cmds/app_process && \
      ls $OUT/system/bin/asanwrapper && \
      readelf -s $OUT/system/bin/app_process32 | grep asan && \
      readelf -s $OUT/system/bin/asan/app_process32 | grep asan && \

Change-Id: Ieff0ea9a2209cf74cf06f813087b55cb0bcc3896
2016-11-30 16:35:32 -08:00
Andreas Gampe
c07a430722 Merge "App_process: Clean up sanitized binaries"
am: 273adb5257

Change-Id: I83ec3dd0ad23844cc9ba3420bc43b9b8deb3d1ca
2016-12-01 00:09:00 +00:00
Glenn Kasten
25889e4d6c Merge "LOCAL_CLANG := true is now the default"
am: 1204e3806f

Change-Id: Id579bdea109bca2056cea6c0359e18b120801bf4
2016-12-01 00:06:49 +00:00
Andreas Gampe
622f511f2f App_process: Clean up sanitized binaries
Clean up the definition of sanitized binaries. Clean up the
Android.mk to share values.

Bug: 33224213
Test: mmma SANITIZE_TARGET=address SANITIZE_LITE=true frameworks/base/cmds/app_process && ls $OUT/system/bin/asan
Change-Id: I70f8d95ff2ec6366fc0a7d252b91dce268186910
2016-11-30 09:46:09 -08:00
Glenn Kasten
827d0d76fb LOCAL_CLANG := true is now the default
Change-Id: I2f6a8c7f32cbf682c968a43d590d773ffb21e909
(cherry picked from commit 3a7510bcf6089d3ef768de7cf805ca783f0aac17)
2016-11-30 09:42:23 -08:00
Jerry Zhang
5cbd151d40 Refactored setCurrentFunction and setUsbDataUnlocked into single method.
am: 935372bfd6

Change-Id: I5436278e092f691c9179f7cc3709c4578b544e74
2016-11-17 00:12:50 +00:00
Jerry Zhang
b37d826204 Merge changes from topic 'usb_bugfixes-mirror-aosp-master'
* changes:
  Refactored setCurrentFunction and setUsbDataUnlocked into single method.
  Clean up persistent usb state on boot.
  Fixed handling of usb state during adb changes.
2016-11-16 23:59:33 +00:00
Jerry Zhang
935372bfd6 Refactored setCurrentFunction and setUsbDataUnlocked into single method.
This gets rid of an extraneous configuration change when going from
adb to adb + file transfer as previously the config would have been
reset once for functions and once for data unlocked.

It also simplifies some of the code.

Test: manually changing usb configurations
Change-Id: Ica10a195338b2189db13113f44657393db110bee
(cherry picked from commit 7a396be6d5ba8914933a54b5bfac25e118db0e9f)
2016-11-15 15:29:45 -08:00
Svetoslav Ganov
6c3032f16b Add WiFi toggle prompts - framework
If permission review is enabled toggling WiFi on or off
results in a user prompt to collect a consent. This applies
only to legacy apps, i.e. ones that don't support runtime
permissions as they target SDK 22.

bug:28715749

Original-Change-Id: I020601e208c0736005bcabc7b7b77b96eee45b03
Change-Id: I3fdc2b02abecaf3166614b0cb9fac3553cb7ab88
(cherry picked from commit d3663c04a721e0848dd3e9179c84ba585d91839d)
2016-11-14 18:34:40 -08:00
Svetoslav Ganov
0efa843e72 Add WiFi toggle prompts - framework
If permission review is enabled toggling WiFi on or off
results in a user prompt to collect a consent. This applies
only to legacy apps, i.e. ones that don't support runtime
permissions as they target SDK 22.

Bug: 28715749
Test: Unit Tests

Change-Id: I020601e208c0736005bcabc7b7b77b96eee45b03
Merged-In: I020601e208c0736005bcabc7b7b77b96eee45b03
2016-11-14 10:26:52 -08:00
Igor Murashkin
d0d99d8a3d Merge "app_process: Forward -cp/-classpath to ART."
am: 4a4a8f1555

Change-Id: If7773d6bae3f4f13aa7f0c883b1c20319d85c747
2016-10-28 17:48:15 +00:00
Treehugger Robot
4a4a8f1555 Merge "app_process: Forward -cp/-classpath to ART." 2016-10-28 17:34:47 +00:00
Robert Sesek
f80fab010a Merge "Create the WebViewZygote and implement WebViewZygoteInit."
am: 8be2850546

Change-Id: I608ea53be52cb91f0e8cf73998de4578b39e099a
2016-10-22 03:12:18 +00:00
Treehugger Robot
8be2850546 Merge "Create the WebViewZygote and implement WebViewZygoteInit." 2016-10-22 03:03:10 +00:00
Martin Wallgren
3970c44547 RRO: Synchronize access to overlays.list am: 0fbb608110
am: dce79f10ba

Change-Id: Idc121ffe64f1bc7b5bdcb1a800305165f27f1c0a
2016-10-12 21:09:42 +00:00
Martin Wallgren
dce79f10ba RRO: Synchronize access to overlays.list
am: 0fbb608110

Change-Id: I44a716df3954b6d2d58d7c9784f8b55cf041b10b
2016-10-12 21:03:11 +00:00
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
Adam Lesinski
78382db820 Merge "RRO: Synchronize access to overlays.list" 2016-10-12 14:52:49 +00:00
Martin Wallgren
f12af5e907 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.

Bug: 28032298

Change-Id: I51d39f121d207b11181340b68b164b60020f0c61
2016-10-12 15:42:04 +09:00
Shunta Sato
4549426d6e Fix: "adb install -s" adaptation for session based install am: 4f26cb5a36
am: 55bcb9f422

Change-Id: Id9dcfdd12f190744fe84136c0a53e2cfb6638516
2016-10-11 16:57:34 +00:00
Shunta Sato
55bcb9f422 Fix: "adb install -s" adaptation for session based install
am: 4f26cb5a36

Change-Id: I65d94a002a382c2a2b91d6b8348c003b9e6ab859
2016-10-11 16:52:33 +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
Elliott Hughes
437b8c95a8 Merge "Rely on the platform -std default." am: 66f15cc01b am: 5a989a504a
am: 39ad1b92fa

Change-Id: Iec4bca8e96c776d61c5da5540a74acc6773c2bce
2016-10-08 22:03:56 +00:00
Elliott Hughes
39ad1b92fa Merge "Rely on the platform -std default." am: 66f15cc01b
am: 5a989a504a

Change-Id: I1e8593f68eaafb254c92f004c2694ca4145c910a
2016-10-08 21:58:52 +00:00
Elliott Hughes
c08e32e0be Rely on the platform -std default.
Bug: http://b/32019064
Test: builds
Change-Id: I7180f1eb539ff8cbe33832d010775f053a922946
2016-10-07 15:57:17 -07:00
Robert Sesek
ded2098436 Create the WebViewZygote and implement WebViewZygoteInit.
This adds a new init-spawned daemon, webview_zygote, that starts a JVM and
acts as a zygote process for WebView isolated_app services.

Test: m
Test: angler boots
Test: Turn on Settings>Developer>Multiprocess Webview. webview_zygote32 or
      webview_zygote64 start (requires dependent CLs).

Bug: 21643067
Change-Id: Ida98bd04b4d77736b672b03af651c4eb97ce88c1
2016-10-07 12:38:04 -04:00
Igor Murashkin
4f66cb3f53 app_process: Forward -cp/-classpath to ART.
* No new functionality was added, this was already possible via
  -Djava.class.path=classpath
* However, this makes it a bit more compatible with other tools
  that use -cp to invoke the main class.
* Also update the benchmarks README for correct up-to-date vogar
  instructions.

Test: vogar --mode app_process --benchmark frameworks/base/core/tests/benchmarks/src/android/os/ParcelBenchmark.java
Bug: 31807538
Change-Id: Idb04600fed3dd955437ccac832617dcfd1b52b63
2016-10-03 11:08:42 -07:00
Eric Laurent
322f13a8ff DO NOT MERGE - fix truncated boot sound
am: 75bf3fd73b

Change-Id: I3394cdfc5878e1b3396a2858a40d4ddb0cda5b5c
2016-09-27 01:35:43 +00:00
Eric Laurent
75bf3fd73b DO NOT MERGE - fix truncated boot sound
Wait for audioserver service initialization to complete
before playing the sound

Bug: 31651778
Change-Id: I988de549d20468a090c939a1c624ee47d4036cd3
2016-09-23 21:23:27 +00:00
Narayan Kamath
c7cafbaa41 Merge "app_main: failure to PR_SET_NO_NEW_PRIVS is always fatal." am: 796578f9a9 am: 2b283bd24f
am: c9f86e1256

Change-Id: Iedf414184b8fefa3eb329f32ec8a15a2865c658f
2016-09-14 13:26:54 +00:00
Narayan Kamath
5638991c82 app_main: failure to PR_SET_NO_NEW_PRIVS is always fatal.
Don't make allowances for older kernels. Kernels must handle this
properly since it is now a CTS requirement.

Also remove some unreachable return statements.

Change-Id: I280c4ed5e461d37672236747b5dbb7d1e97ecfec
2016-09-14 10:24:20 +01:00
Geoffrey Pitsch
57374aa735 Support multichannel sounds in bootanim am: db90897b5f
am: 023a9185a4

Change-Id: I5543cefe87ec93f6c319337e0a2c692d28ec893a
2016-09-13 16:35:26 +00:00
Geoffrey Pitsch
023a9185a4 Support multichannel sounds in bootanim
am: db90897b5f

Change-Id: Ied6b429e05d5d77c76e9bbf34a7f13104be8bb8e
2016-09-13 16:27:14 +00:00
Geoffrey Pitsch
5b1702e554 Merge "Support multichannel sounds in bootanim" into nyc-mr1-dev 2016-09-13 16:21:22 +00:00
Alan Viverette
48818fa811 Change density for the correct user am: df3a7cab8f
am: 55768028fd

Change-Id: I7d4eff0c732f0e3e83adc0044ab7ab015da74993
2016-09-08 21:19:24 +00:00
Alan Viverette
55768028fd Change density for the correct user
am: df3a7cab8f

Change-Id: I4f4dfaa8f9035cdd4939d1d40e66ebac51811f73
2016-09-08 21:13:39 +00:00
Damien Bargiacchi
6574d9ca46 Allow custom fonts in the boot animaiton zip file
am: 0e3d2ab6d2

Change-Id: I13d1e6a707ad941a267b89483e6dc029398a2d82
2016-09-08 02:19:57 +00:00
Alan Viverette
df3a7cab8f Change density for the correct user
Bug: 30839993
Change-Id: I5368accddfc4a03b8025a257b4155fcdc6197f11
2016-09-06 17:13:41 -04:00