Commit Graph

593 Commits

Author SHA1 Message Date
Andreas Gampe
eb4e1736e3 Merge "Framework: Disable native-bridge for non-zygote" am: 05c09faad2 am: 5b2e5d32d6
am: 779378fab0

Change-Id: I4a3363b247b934b06fe794bbf0a9a3382202b6ce
2018-06-11 09:36:14 -07:00
Andreas Gampe
5b2e5d32d6 Merge "Framework: Disable native-bridge for non-zygote"
am: 05c09faad2

Change-Id: I2aea1bd9c520ca6bb42bf80bd445da0e86db8136
2018-06-11 09:11:28 -07:00
Andreas Gampe
14a1cd9e35 Framework: Disable native-bridge for non-zygote
Non-zygotes may not have the permissions/capabilities to run a
bridge and may abort attempts to load a bridge because of seccomp
rules. So don't tell the runtime to load a bridge when starting
a non-zygote.

Bug: 77878177
Bug: 80118963
Test: m
Test: cts-tradefed run commandAndExit cts-dev -m CtsWrapWrapDebugTestCases
Change-Id: I7894b89feec79e4bd478f649c004ad29fc46597e
2018-06-07 11:10:26 -07:00
Nicolas Geoffray
bfa4a608e8 Merge "Add a new dalvik.vm.jitpthreadpriority option." am: d27a9f4465 am: 8223390490
am: 20e63f961d

Change-Id: Ie7f93d2307be9a261e49e93e9bf8b86f6d3ca4f5
2018-05-17 10:46:07 -07:00
Nicolas Geoffray
20e63f961d Merge "Add a new dalvik.vm.jitpthreadpriority option." am: d27a9f4465
am: 8223390490

Change-Id: I2cf8166748f7eb6384ecff6ae711b61df165beaa
2018-05-17 10:35:44 -07:00
Nicolas Geoffray
24934a9c33 Add a new dalvik.vm.jitpthreadpriority option.
To dynamically play with JIT thread priorities.

bug: 79570024
Test: m
Change-Id: I84c691fb57b37e699429b9f511b2e235259d718a
2018-05-16 17:22:37 +01:00
Paul McLean
84b49130ff Moving native MIDI JNI init to AndroidRuntime.cpp.
Remove (non-working) lazy init in midi.cpp

Bug: 79464070
Test: Verify function with NativeMidiTestbed app.
Change-Id: I30182d19d205b4ab952d622824f1a63ab1fef72e
2018-05-11 09:10:38 -07:00
Calin Juravle
135445abe7 Merge "Process "dalvik.vm.profilebootimage" system property" am: dc3fe53d4f
am: 46940a604c

Change-Id: I67ca970bc51f8be39806183ecb55528768eff9b7
2018-05-08 20:49:12 -07:00
Calin Juravle
dc3fe53d4f Merge "Process "dalvik.vm.profilebootimage" system property" 2018-05-09 01:55:51 +00:00
Calin Juravle
62cd4bbcaa Process "dalvik.vm.profilebootimage" system property
Read the profile boot image property and pass the appropriate flags to the
android runtime.

Test: build, flash and check properties
Bug: 73313191
Change-Id: Ie972e2eb693678d268e707b9e892c97dd7dd061b
2018-05-08 12:42:30 -07:00
Andreas Gampe
921b846b80 Merge "Framework: Remove ART tombstoned config" am: 95c5e5c1fd
am: 3c942f040c

Change-Id: I8f5d13a2e9916e82b0e756c1c5002558898d6b99
2018-05-04 17:00:36 -07:00
Andreas Gampe
4b4287f072 Framework: Remove ART tombstoned config
The explicit option is no longer supported.

Bug: 77288304
Test: m
Test: device boots
Test: ANR dumps work
Change-Id: I1ffcf0593e1f6591d1b33882edf79381e59c2121
2018-05-03 14:25:14 -07:00
Andreas Gampe
42f4090f85 Merge "Revert "Frameworks/base: Compiled-classes support"" am: 087bae3ffe
am: f6786aeb64

Change-Id: I52f22c3df2a0a8d99d7be0d68fbf11eec2de8024
2018-04-16 11:21:20 -07:00
Andreas Gampe
5d18eef165 Revert "Frameworks/base: Compiled-classes support"
This reverts commit ca775941f3.

Bug: 76145463
Test: m
Change-Id: I5a368cd01812e16869352ec219eae095df4919c4
2018-04-13 13:07:56 -07:00
Bo Zhu
d4cc378400 Merge "Expose the JNI scrypt function in a standalone Java class so we can use it in RecoverableKeyStore as well" into pi-dev
am: 1364455fd7

Change-Id: I6fc53616ec67bbb2770541958745d10f766f8b3d
2018-04-02 20:36:36 -07:00
Bo Zhu
09856135e3 Expose the JNI scrypt function in a standalone Java class so we can
use it in RecoverableKeyStore as well

Bug: 77325751
Test: It builds. No caller code yet.

Change-Id: I6ff847cff2efbd023612e51fe35be980f27f162d
2018-04-02 15:47:08 -07:00
Elliott Hughes
85b6c0032a Remove non-tombstoned ANR path.
Bug: http://b/73140330
Test: boots with ANR
Change-Id: Ib58724a0a6b831c05cb59d053520a4169ea591fd
Merged-In: Ib58724a0a6b831c05cb59d053520a4169ea591fd
2018-03-28 17:54:26 +00:00
Elliott Hughes
4e4caa7757 Remove non-tombstoned ANR path.
Bug: http://b/73140330
Test: boots with ANR
Change-Id: Ib58724a0a6b831c05cb59d053520a4169ea591fd
(cherry picked from commit 10a30bd9e8)
2018-03-27 20:44:29 +00:00
Elliott Hughes
c4b9320961 Merge "Use ABI_STRING." am: ca7ce49ecc
am: da01ce155f

Change-Id: I410e2e8b4aec29c004e32001f04c8560eef470cd
2018-03-23 21:28:16 +00:00
Elliott Hughes
a1194cb636 Use ABI_STRING.
Bug: N/A
Test: builds
Change-Id: I5a9d2a6604887f1f0e9583086e012a086042b7df
2018-03-23 11:27:04 -07:00
Adam Lesinski
bebfcc46a2 Refactor AssetManager
Bug: 64071469
Test: atest CtsContentTestCases
Change-Id: Ia6856157e8813856268fba003e1e591d690cb26e
2018-02-28 19:06:48 -08:00
John Reck
9d8d99de97 Rename HardwareLayer -> TextureLayer
Update name to reflect meaning/usage

Change-Id: Iddb3621cbca147f96faa83380867baa49c382aab
Fixes: 20461288
Test: builds & boots
2018-02-21 15:55:58 -08:00
Adam Lesinski
bde1df21ad Revert "Replace AssetManager with AssetManager2 implementation"
This reverts commit 1187590da3.

Bug: 73134570
Change-Id: I59b4d714e447478ea124f086356f127f42251fb7
2018-02-09 12:43:24 -08:00
Adam Lesinski
1187590da3 Replace AssetManager with AssetManager2 implementation
Test: atest CtsContentTestCases:android.content.res.cts
Test: make libandroidfw_tests
Change-Id: I2bb6d7656d2516d371e83e541ed02f91405f6d94
2018-02-05 18:38:49 -08:00
Android Build Merger (Role)
c1aa80ab44 Merge "Merge "Revert "Revert "Make AndroidRuntime only start the debugger for zygote forked apps.""" am: 3b50dc3d34 am: 98568f57ad" into oc-mr1-dev-plus-aosp
am: e8626dee42

Change-Id: Ia800a77c6c172770726e4fd2a132137ae209eb45
2018-02-01 04:03:42 +00:00
TreeHugger Robot
490d323003 Merge "Add support for getting all available microphones characteristics." 2018-01-31 22:20:25 +00:00
Alex Light
c50928b763 Revert "Revert "Make AndroidRuntime only start the debugger for zygote forked apps.""
This reverts commit ff5d60b268.

Reason for revert: Fixed issue breaking go/art-build.

Bug: 72400560
Test: Build
Change-Id: Ie8943068302bec02d149917ccf738c0d935f8fe0
2018-01-31 17:03:20 +00:00
David Brazdil
cb6ae3a1f8 Merge "Revert "Make AndroidRuntime only start the debugger for zygote forked apps."" am: b3cef78e8d am: e49f4ef9fa
am: 434bee350b

Change-Id: I4dbbda8510ccaaacd07c6748586a1e76e3c1531b
2018-01-31 13:37:44 +00:00
David Brazdil
ff5d60b268 Revert "Make AndroidRuntime only start the debugger for zygote forked apps."
This reverts commit daf17d415c.

Reason for revert: Topic broke go/art-build. Reverting as ART Sheriff. 

Change-Id: I913dcb82532d448116b0c60d98a91b9b7442d5c9
2018-01-31 10:43:17 +00:00
Alex Light
c3ad975aa2 Merge "Make AndroidRuntime only start the debugger for zygote forked apps." am: 5cdf28f38b am: 710b7c6626
am: b65fecd875

Change-Id: Iddea47fca8954f435c81a63695efdbd18aa30a66
2018-01-30 22:05:48 +00:00
Alex Light
daf17d415c Make AndroidRuntime only start the debugger for zygote forked apps.
This got changed unintentionally in commit fffb273. Restore the
original behavior where JDWP will not be enabled for non-zygote apps.

Bug: 72400560
Test: atest CtsJdwpSecurityHostTestCases
Change-Id: I364a9d8b6e87efc1604741a7e5dd68221ed8e491
2018-01-29 23:50:45 +00:00
jiabin
c0f4944038 Add support for getting all available microphones characteristics.
Add MicrophoneInfo to represent the microphone characteristics which
including location, orientation, frequency response, sensitivity,
channel mapping and other useful information.
Add a new API in AudioManager to query all current available
microphones.

Bug: 64038649
Test: Run test and check the print log.
Change-Id: Ie0dbfeeb84b88db426518b93c7bb83c8913bca85
2018-01-26 17:16:45 -08:00
David Srbecky
4ce53a04d3 Merge "Add dalvik.vm.minidebuginfo property for ART" am: 418a96457c am: 637814eebf
am: 8d4f8127e1

Change-Id: Ia4869cc2012ec7e7409c6ebb42a2d8291ed08bbf
2018-01-26 14:13:45 +00:00
Adam Lesinski
f7d01dd7e1 Revert "Replace AssetManager with AssetManager2 implementation"
This reverts commit dcb3c6559b.

Bug:72511998
Change-Id: I665966ca109f66f85d8665db388c71ea2303c3b8
2018-01-25 17:39:40 -08:00
Adam Lesinski
dcb3c6559b Replace AssetManager with AssetManager2 implementation
Test: atest CtsContentTestCases:android.content.res.cts
Test: make libandroidfw_tests
Change-Id: I572eb13c6a4372c7f656f5912821cececd5bf3d4
2018-01-24 15:19:04 -08:00
David Srbecky
3bb32503d4 Add dalvik.vm.minidebuginfo property for ART
The property enables generation of mini-debug-info for JIT.

Change-Id: I1cfce8b1b463d9e45bbe823c285c1639653bb1b5
2018-01-24 15:54:27 +00:00
Adam Lesinski
7fb3831136 Revert "Replace AssetManager with AssetManager2 implementation"
This reverts commit b20a0ce59f.
2018-01-23 03:17:26 -08:00
Adam Lesinski
1f62f7c72e Merge changes from topic "assetmanager-refactor"
* changes:
  libandroidfw: Improve performance of AssetManager2
  libandroidfw: Add ApplyStyle and SetConfiguration benchmark
  Make idiomatic use of ApkAssets and AssetManager
  Replace AssetManager with AssetManager2 implementation
2018-01-23 05:28:11 +00:00
TreeHugger Robot
4ef6684925 Merge changes Ie2ec98d9,I81ce2bef
* changes:
  Make ImageDecoder return animated Drawables
  Ensure that PostProcess Canvas is released
2018-01-18 15:34:28 +00:00
Victor Hsieh
217682248b Merge "Reland: Move zygote's seccomp setup to post-fork" am: 7839672e22 am: 4249466562
am: dec688691d

Change-Id: Ibcf5eeef74b69112f568ebb1f146c2990ffed30a
2018-01-18 01:31:09 +00:00
Leon Scroggins III
671cce2605 Make ImageDecoder return animated Drawables
Bug: 63909536
Bug: 63908092
Test: TODO

If ImageDecoder.decodeDrawable is called with an animated image Source
(currently GIF or WebP), return an object of a new (hidden) Drawable
subclass. The new Drawable animates, and it implements Animatable (TODO:
implement Animatable2) so users have some control over the animation.

In addition to the normal features of Drawable, this new one supports
many of the features of ImageDecoder, including scaling, cropping and
PostProcess, which enables circle masks/rounded corners and other
arbitrary after-effects. It does *not* support decoding directly to a
Hardware Bitmap, since it cycles through frames and reuses the same
bitmap memory. But it could be made to use shared memory (TODO?).

TODO: Use a better number for the native allocation registry
TODO: Use the RenderThread to drive the animation, and remove decoding
on the UI thread.
TODO: Add support for modifying the loop count

Android.bp:
- build new AnimatedImageDrawable.cpp

AndroidRuntime.cpp:
- register new native methods

AnimatedImageDrawable.java
AnimatedImageDrawable.cpp:
- new Drawable that handles animated images

Canvas.h, SkiaCanvas.h/.cpp
- New virtual method and implementation for drawing SkAnimatedImages

RecordingCanvas.h/.cpp
- Stub implementation of drawing SkAnimatedImages

ImageDecoder.h/cpp
- Allow code sharing with AnimatedImageDrawable.cpp
  - postProcess
  - access the ImageDecoder struct

Depends on https://skia-review.googlesource.com/c/skia/+/94660 in Skia.

Change-Id: Ie2ec98d9c52deda4d439c6ef8e5dea2861bb93a3
2018-01-17 17:06:57 -05:00
Victor Hsieh
c8176efe2e Reland: Move zygote's seccomp setup to post-fork
Before this change, seccomp filter setup is as early as in zygote's main
function.  To make it possible to split app and system server's filter,
this postpone the setup to after fork.  It also starts to call app
specific and system server specific setup function.

The filter setup is done in Zygote's ForkAndSpecializeCommon.  This is
because adding a seccomp filter must be done when either the caller has
CAP_SYS_ADMIN or after the PR_SET_NO_NEW_PRIVS bit is set.  Given that
setting PR_SET_NO_NEW_PRIVS breaks SELinux domain transition
(b/71859146), this must be done after Zygote forks but before
CAP_SYS_ADMIN is droppped.

Test: (cts) -m CtsSecurityTestCases -t android.security.cts.SeccompTest
Test: no selinux denial flood in dmesg with selinux enforced
Test: debuggerd -b `pidof com.android.phone`  # logcat shows tombstoned
      received crash request
Bug: 63944145
Bug: 71859146

Change-Id: I8215c8530d3d0de504a270488f8e29635805e8b0
2018-01-17 09:30:44 -08:00
Seigo Nonaka
9d3bd08eba Rename PremeasuredText to MeasuredText
There is already MeasuredText, so renamed existing MeasuredText to
MeasuredParagraph, then renamed PremeasuredText to MeasuredText.

Bug: 67504091
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsTextTestCases:*
Change-Id: Ie20bea9501b18fabb36f64d388a7851c4643d4c3
2018-01-11 11:33:32 -08:00
Adam Lesinski
b20a0ce59f Replace AssetManager with AssetManager2 implementation
Test: Existing CTS tests pass
Test: make libandroidfw_tests
Change-Id: I858f7e1d909c08273b096601136e3f28e15eb5d4
2018-01-09 16:28:58 -08:00
Chenbo Feng
71436b32e9 Merge "Use NetworkStatsService to get stats for apps" am: 693d8a2ab1 am: fa7f4015fc
am: 09a81e4da1

Change-Id: I90ce68a72afbf596e28d987e925795709d24dd52
2017-12-21 19:49:25 +00:00
Treehugger Robot
693d8a2ab1 Merge "Use NetworkStatsService to get stats for apps" 2017-12-20 20:30:54 +00:00
Alex Light
3ee64f8d50 Merge "Add support for selecting alternate JDWP implementations" am: cbeea23861 am: f5ec7f2e26
am: b24c17efa3

Change-Id: I200e5430fd9696affa37f6330999379173837f2b
2017-12-20 15:31:14 +00:00
Chenbo Feng
d3d9c4ed9b Use NetworkStatsService to get stats for apps
Move the native implementation of TrafficStats to NetworkStatsService
and apps need to get the NetworkStatsService binder interface from
system_server in order to get the network usage stats since boot. This
implementation can hide the detail of retrieving network traffic
information from apps and the NetworkStatsService can choose which
methoed it use to get the data depending on the kernel version of the
device.

Bug: 30950746
Test: CtsNetTestCases -t android.net.cts.TrafficStatsTest
Change-Id: I53bbefd19aa0b783b9b4b42ea4d76db3e9ec07a3
2017-12-19 19:57:44 -08:00
Leon Scroggins III
0c01dbf8f2 ImageDecoder (BitmapFactory 2.0)
Bug: 63909536
Bug: 63908092

Test: CTS: I0f36ce34c968fd7fae4d8edebabea3a421859615

One-pager:
https://docs.google.com/document/d/1IWSdXb5O9lu-Zbj7SaNWo5pS7-FHlonFnqazjnecozM/
Design doc:
https://docs.google.com/document/d/15S6DSAV4EwOuJLv29UC_9cdSGdPg3KvOJVn2EHoP3fw/

ImageDecoder is designed to streamline certain patterns of BitmapFactory
use:
- choosing sample size based on actual dimensions
- choosing a specific output size
- post-processing (e.g. for rounded corners)
- copying to HARDWARE
- decode directly to ashmem
- creating a Drawable
- use as an alpha mask
- save RAM (e.g. use RGB_565)

In addition, it will include new features:
- animated drawables (TODO)
- report failures *and* optionally create a partial image
- crop

Add PostProcess to handle post-processing. It is separate from
ImageDecoder so that it may be used in the future by other commands that
might want something similar (e.g. capturing a View).

Consolidate NinePatch code for sharing between BitmapFactory and
ImageDecoder.

Some features left out of this CL:
- Create from ContentResolver + URI
- animation
- report more info in ImageInfo
- more overloads (e.g. null OnHeaderDecodedListener)

Change-Id: Icf011dc1b97b492788e47cf51fcf8abe8e9c7b88
2017-12-19 20:22:17 +00:00
Alex Light
fffb273aff Add support for selecting alternate JDWP implementations
Change the '-Xagentlib:jdwp=...' option to instead use the new
'-XjdwpOptions:...' syntax and remove the explicit transport-lib.

Add a '-XjdwpProvider:...' option. Set it to 'default' by default and
get its value from the 'dalvik.vm.jdwp-provider' property.

Test: Boots. Can debug apps
Test: Set dalvik.vm.jdwp-provider=adbconnection, stop, start, debug

Bug: 62821960
Change-Id: I1605030b94b38676c18885fcf2fa3490bccd3e0d
2017-12-14 13:49:26 -08:00