Commit Graph

599 Commits

Author SHA1 Message Date
Steven Moreland
bc600d3282 Merge "Implementing support for HIDL native handles in Java" am: 1e1d8d2485 am: 6580802918
am: 4a6566440f

Change-Id: I649a10172d93beae9063ec2170e60aa4967ba0be
2018-08-14 10:16:06 -07:00
Nirav Atre
9850dd9751 Implementing support for HIDL native handles in Java
This change implements the equivalent of the C++ native_handle_t type in
Java. Similar to the C++ type, the NativeHandle class wraps an arraylist
of FileDescriptor objects, along with a raw data stream (integer array).

Bug: 35098567
Test: Ran m, hidl_test (C++ and Java). Functionality tests are included
in a separate CL.

Change-Id: Ic53f9a49ae17ce5708577a586230126ab0e222c7
2018-08-13 14:31:17 -07:00
Seigo Nonaka
88930f1df4 Introduce FontFamily and its builder
This CL is a ground work of the new Typeface construction API and
nobody uses this class except for CTS now.
I'll add new builder in Typeface to be able to create Typeface
from this FontFamily.

Bug: 72665240
Test: atest FontFamilyTest
Test: CtsWidgetTestCases:EditTextTest
    CtsWidgetTestCases:TextViewFadingEdgeTest
    FrameworksCoreTests:TextViewFallbackLineSpacingTest
    FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
    CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
    CtsTextTestCases FrameworksCoreTests:android.text
    CtsWidgetTestCases:TextViewPrecomputedTextTest

Change-Id: I15d412c367037554d911fc9e20c0cfb44aefb89a
2018-08-02 11:04:44 -07:00
Seigo Nonaka
a1b12c82a1 Merge "Introduce Font and its builder class" 2018-07-29 03:16:22 +00:00
Seigo Nonaka
6f11c6e7e2 Extract native methods into isolated classes
StaticLayout/MeasuredParagraph uses native methods which is a pain point
of porting TextView to JetPack.
To make minimize the dependency to the native methods, extract native
methods and put them into a thin wrapper class.

The performance impact is limited:

android.text.StaticLayoutPerfTest:
    PrecomputedText Balanced Hyphenation  :    602 ->    644: ( +42, +7.0%)
    PrecomputedText Balanced NoHyphenation:    457 ->    476: ( +19, +4.2%)
    PrecomputedText Greedy Hyphenation    :    397 ->    412: ( +15, +3.8%)
    PrecomputedText Greedy NoHyphenation  :    397 ->    411: ( +14, +3.5%)
    RandomText Balanced Hyphenation       : 17,594 -> 17,715: (+121, +0.7%)
    RandomText Balanced NoHyphenation     :  7,146 ->  7,236: ( +90, +1.3%)
    RandomText Greedy Hyphenation         :  7,125 ->  7,196: ( +71, +1.0%)
    RandomText Greedy NoHyphenation       :  7,099 ->  7,187: ( +88, +1.2%)
  draw
    PrecomputedText NoStyle               :    614 ->    628: ( +14, +2.3%)
    PrecomputedText Style                 :    778 ->    826: ( +48, +6.2%)
    RandomText NoStyle                    :    537 ->    540: (  +3, +0.6%)
    RandomText Style                      :    786 ->    759: ( -27, -3.4%)

Bug: N/A
Test: atest CtsWidgetTestCases:EditTextTest
    CtsWidgetTestCases:TextViewFadingEdgeTest
    FrameworksCoreTests:TextViewFallbackLineSpacingTest
    FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
    CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
    CtsTextTestCases FrameworksCoreTests:android.text
    CtsWidgetTestCases:TextViewPrecomputedTextTest

Change-Id: I976df4db63be241af395dd30dd94182f76bdae53
2018-07-27 11:08:43 -07:00
Seigo Nonaka
a1c21c0a02 Introduce Font and its builder class
This CL is a ground work of the new Typeface construction API and
nobody uses this class except for CTS.
I'll add FontFamily class to be able to bundle these Font clases
and register to the Typeface.

Bug: 72665240
Test: atest FontTest
Test: atest CtsWidgetTestCases:EditTextTest
    CtsWidgetTestCases:TextViewFadingEdgeTest
    FrameworksCoreTests:TextViewFallbackLineSpacingTest
    FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
    CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
    CtsTextTestCases FrameworksCoreTests:android.text
    CtsWidgetTestCases:TextViewPrecomputedTextTest

Change-Id: I68555a8b4bd6dd770ba7baae72d9a3777b2087a5
2018-07-26 16:38:44 -07:00
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