56 Commits

Author SHA1 Message Date
Orion Hodson
187996aea5 Add UnixChannelFactory to preloaded-classes
Bug: 144502743
Test: atest PreloadCheck
Test: cts-tradefed
Change-Id: I623ead2c26bf19a9198d0104e0c6a59242bb6eb1
2020-03-18 18:18:39 +00:00
Chen Xu
7a79194fcb Merge "new TelephonyRegistryManager" 2019-11-04 18:21:51 +00:00
Chen Xu
1f1c25e815 new TelephonyRegistryManager
today telephonyRegistry lives in system process
this is intended to persists all telephony listeners when
phone process crash. Telephony today notify system server by
using AIDL APIs directly. Instead, we are exposing a proper API
surface: telephonyRegistryManager where only phone app and
carrier privileged apps are allowed to use APIs in
TelephonyRegistryManger to notify telephony related status update.

Bug: 140908357
Test: Build & Manaul
Change-Id: I1b750751148925b4a7bd94553318907654012fc1
(cherry picked from commit 288b71c8c11dc25fa1dab4aadc1525d0c576008a)
Merged-in: I1b750751148925b4a7bd94553318907654012fc1
2019-11-01 22:44:36 +00:00
Chen Xu
fba9ca44a2 make CallerInfo as SystemAPI
1. move CallerInfo from telephony.internal to andorid.telephony package
2. expose APIs inside CallerInfo which are consumed by non-telephony
code.

Bug: 140908357
Test: Build
Change-Id: Ie95897c77e97e40f5357c107aede82edfea44d5a
(cherry picked from commit b9a1eefec66e8c2cd5ab9dab512bb729ef2caae8)
Merged-in: Ie95897c77e97e40f5357c107aede82edfea44d5a
2019-10-21 21:39:58 -07:00
Makoto Onuki
a9be33f7cf Fix slow query log.
SQLiteDebug.Const isn't supposed to be preloaded.

Fix: 134176355
Test: "setprop db.log.slow_query_threshold.10045 0" and make sure ...
it works for UID 10045

Change-Id: I06ca1531e968faa2378d0cb7f627e2c6a87cf502
2019-06-03 10:39:30 -07:00
Calin Juravle
787d34d7b9 Update boot image and system server profiles
This is a conservative tuning for the last profile update (commit
5b70220fb5a174a7142ca5403563bf528120a63f) which regressed a few metrics
(b/130553966). The numbers below are quoated relative to the sate before
that update.

=Perf numbers=

The boot image compilation artifacts are 17MiB smaller (art/vdex/oat for
arm and arm64).
System server .art file is 100KiB smaller.

Startup and memory number are within the noise. Startup shows 0.72%
improvement. However that's most likely noise. The tests were run with:

- atest google/perf/app-startup/hermetic-apps/cold-dropcache-lock-test
- atest google/perf/app-startup/non-hermetic-apps/cold-dropcache-lock-test
- atest google/perf/memory/memory-test
- atest
google/perf/app-startup/benchmark-app-hermetic/cold-dropcache-lock-test
- atest
google/perf/app-startup/third-party-apps/cold-dropcache-stable-test

=Profile metrics=

Boot:
- methods and classes used by at least 9% of the sampled (non unique)
applications (see below for more explanations)
- 1.13% of hot methods added, 33.77% removed
- 0.65% of classes added, 21.61% removed
- 29256 hot methods in the profile (vs 43429 in the old one)
- 8681 classes in the profile (vs 10985 in the old one)

Preloaded clases:
- classes used by at least 20% of sampled applications during startup
- 1.5% added, 0.3% removed
- 7601 classes in the profile (vs 7516 in the old one)

System server:
- methods and classes used on at least 5% of sampled devices
- system server is speed compile and the image classes are the most
relevant
- 4% classes added, 23% of classes removed
- 2819 classes in the profile (vs 3418 in the old one)

=Data sample=
- 35000+ (non unique) applications contributed to the final profile
- these were spread across 4000+ (non unique) devices
- 'non unique' means that the same app or the same device (or a
combination of both) could have contributed to the final profile multiple
times

Bug: 122068885
Bug: 130553966
Test: m, build, boot, atest startup-tests

(cherry picked from commit 439305caddf8ad574b230a24cd7523ee6c591364)

Merged-In: Ic61ed2784af034ed4ae4bc8346ed67c6bed04152
Change-Id: I1fc3b301bf80bfc7dda3540c5a204af8321279bf
2019-04-25 17:22:51 -07:00
Calin Juravle
36829e5167 Update boot image and system server profiles
=Perf numbers=

The boot image compilation artifacts are 28MiB smaller (art/vdex/oat for
arm and arm64).
System server .art file is 100KiB smaller.

Startup and memory number are within the noise. Startup shows 0.11%
improvement and memory shows 0.22% improvements. However that's most
likely noise. The tests were run with:

- atest google/perf/app-startup/hermetic-apps/cold-dropcache-lock-test
- atest google/perf/app-startup/non-hermetic-apps/cold-dropcache-lock-test
- atest google/perf/memory/memory-test

=Profile metrics=

Boot:
- methods and classes used by at least 9% of the sampled (non unique)
applications (see below for more explanations)
- 0.6% of hot methods added, 51.31% removed
- 0.3% of classes added, 29.96% removed
- 21403 hot methods in the profile (vs 43429 in the old one)
- 7826 classes in the profile (vs 10985 in the old one)

Preloaded clases:
- classes used by at least 20% of sampled applications during startup
- 1.5% added, 0.3% removed
- 7601 classes in the profile (vs 7516 in the old one)

System server:
- methods and classes used on at least 5% of sampled devices
- system server is speed compile and the image classes are the most
relevant
- 4% classes added, 23% of classes removed
- 2819 classes in the profile (vs 3418 in the old one)

=Data sample=
- 35000+ (non unique) applications contributed to the final profile
- these were spread across 4000+ (non unique) devices
- 'non unique' means that the same app or the same device (or a
combination of both) could have contributed to the final profile multiple
times

Bug: 122460899
Bug: 122068885
Test: m, build, boot, atest startup-tests

(cherry picked from commit 5b70220fb5a174a7142ca5403563bf528120a63f)

Merged-In: Ib3aac3c7efae64af9d2b46e350146e53ba653cbd
Change-Id: Ib42ab29e3d28591817a396407445a6c23e5c9a27
2019-04-25 17:21:53 -07:00
Mathieu Chartier
628626f99f Add two classes to blacklist
Added these classes to prevent initialization of AsyncTask since
initializing AsyncTask may cause memory leaks.

Bug: 130206915
Test: make
Test: look at classes initialized during preloading
Change-Id: I6bacbbdf61d8a782d88debc29d9f0ca29d273888
2019-04-09 10:34:26 -07:00
Po-Chien Hsueh
4e908c24ca API review followup: DynamicAndroidClient
Some API changes per API reivew:
- Move DynamicAndroidClient and ~Manager to android.os.image.
- Rename them to DynamicSystemClient and ~Manager.
- Rename permission MANAGE_DYNAMIC_ANDROID to MANAGE_DYNAMIC_SYSTEM
- Corresponding changes in the installation service.
- Corresponding changes in privapp-permissions-platform.xml.
- Add missing annotations.
- Change setOnStatusChangedListener's parameters order.
- Improve documentations.
- Re-generate api/system-current.txt.

Bug: 126613281
Test: adb shell am
Change-Id: Ia920e9ccf6de1dbbd38c52910cb72cb81b9b5b32
2019-03-21 17:25:59 +08:00
Calin Juravle
00b23d3cb1 Update boot classpath and system server profiles
Boot profile:
- we added 164 methods & classes and remove 2312.
- everything that gets used is in the profile (without filtering).

Preloaded classes:
- we added 1000 classes (we used to have 6563 classes preloaded,
   now we have 7528)
- all the classes that are used on more than 7 devices are
   preloaded.

This is the initial update for Q. More tuning will follow up.
In particular, we have access on how many apps reported a particular
sample, which will provide grounds for more aggressive filtering.

This CL also update the preload blacklist. SystemConfig attempts to parse
OEM properties which is not allowed by SELinux and the PermissionManager
attempts to statically initialize the SystemConfig.

Bug: 122068885
Test: m & boot
Change-Id: I1f929d2c365db23f1c2c15475d59d1006e7c0a66
2019-03-12 02:09:34 +00:00
Christine Franks
41e6a70ddb Remove ColorDisplayController
Bug: 123352608
Test: builds

Change-Id: I7fb6785ba34673869eab8aa8651292dce0436e93
2019-02-14 16:48:16 -08:00
Brian Duddie
cfa5b5b63c Revert "Remove Activity Recognition from the Android Code."
This reverts commit e24f1b095b020382f555c7f34f22ff3fb5005f90.

Reason for revert: b/123172409

Change-Id: Ic5863a8e8b36c8c4d8636cc4c004ad9606a3f523
2019-01-22 18:02:36 +00:00
Ashutosh Joshi
e24f1b095b Remove Activity Recognition from the Android Code.
Removing AR from the Android code base. We had already severed the
connection to the AR HAL in Android Oreo. This change simply removes all
unused references and uses of the stubs.

Test: Build compiles. Ensure that clients that provide AR through other
channels continue to work.

Change-Id: I79d19c0bd2b80962cdecc8ad88065911fd6311ac
2019-01-18 22:31:53 +00:00
Paul Duffin
ecb6124d54 Remove uses of libcore.io DropBox and EventLogger
DropBox and EventLogger provide hooks for use by framework to intercept
messages sent by libcore. However, neither of these mechanisms are
actually used by libcore so there is no point in framework code using
it.

Bug: 119748341
Test: make checkbuild, flash
Change-Id: I9dbd1b6dea92f7441efb6d0a579efd13bc0e5139
2018-12-14 15:27:05 +00:00
Adam He
103e62a19f Merge "Added 8th and 9th argument to pooled lambdas" 2018-11-29 19:32:54 +00:00
Adam He
f1fcd494d2 Added 8th and 9th argument to pooled lambdas
Needed for Autofill Field Classification implementation

Bug: 118681526
Test: atest CtsAutoFillServiceTestCases
Change-Id: I0ecebc391a93928618f349a1fd1af6304ee44006
2018-11-28 14:26:37 -08:00
Neil Fuller
f148c8d7d4 Merge "Track move of timezone classes to libcore.timezone" am: d48dbc9a34 am: f79ecf7c82
am: 402dc485d0

Change-Id: If9c8cfdce9bd0b3bcd460216edca369fd75abdde
2018-11-28 08:24:57 -08:00
Neil Fuller
b8383a10b9 Track move of timezone classes to libcore.timezone
Some time zone related libcore classes are moving from
libcore.util to libcore.timezone.

Bug: 119026403
Test: build only
Change-Id: Ic807977a85276b888362295d1d305effe33076fc
2018-11-27 14:44:59 +00:00
Neil Fuller
f436f5fd73 Merge "Track changes in system/timezone / libcore" am: 80a2e6e628 am: 1015ddf86b
am: ee231b550e

Change-Id: I5cbd74fbee218b5846c813e9657cc7981719c46d
2018-11-19 04:28:27 -08:00
Neil Fuller
0ac8df0e9a Track changes in system/timezone / libcore
The version information about time zone formats is moving
to a new libcore class TzDataSetVersion.

Bug: 119026403
Test: build
Change-Id: I6f80f16f9cd7e37fc04d75c89483497f4f00a6a5
2018-11-18 15:52:02 +00:00
Adam He
84d49aa8c8 Merge "Added 7th argument to pooled lambdas" 2018-11-09 23:56:03 +00:00
John Reck
8785ceb3b9 Refactors and a potential public API for rendering
Split out the View/ViewRootImpl bits from the
hardware rendering bits.

Create a potential public API surface for
hardware rendering

Bug: 112709971
Test: builds & boots

Change-Id: I9e6f44b07a170574a905f42338282c4bb7e95f56
2018-11-08 15:32:35 -08:00
Adam He
c4f03f3a94 Added 7th argument to pooled lambdas
Bug: 118681526
Test: atest CtsAutoFillServiceTestCases
Change-Id: I972e2f4114f3f7c2dd31de3169e0c8216af09892
2018-11-08 10:33:44 -08:00
Siyamed Sinir
8918415f31 Add new text layout classes to preload
Test: build the system, and installed
Test: frameworks/base/libs/hwui/tests/scripts/prep_marlfish.sh
Test: m CorePerfTests
Test: adb install -r $OUT/data/app/CorePerfTests/CorePerfTests.apk
Test: adb shell cmd package compile -m speed -f \
      com.android.perftests.core
Test: adb shell am instrument -w -e class \
      android.text.StaticLayoutPerfTest \
      com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner
Bug: 117888473

Change-Id: I756dff7960db221b587535a7664913cc8bd4d0de
2018-10-29 22:08:22 -07:00
John Reck
8884cfc13e Merge "Rename & package shuffle" 2018-10-23 20:02:00 +00:00
Courtney Goeltzenleuchter
367ed8b190 Update to EGL 1.5
Test: compile
Bug: 80239516
Change-Id: I1c00ac5e55900260b724e1c298edca15f87f3a01
(cherry picked from commit 63584195b9d15daa9973d280381fd619cd7a0f89)
2018-10-16 14:10:20 -06:00
John Reck
32f140aa67 Rename & package shuffle
Rename DisplayListCanvas -> RecordingCanvas
Move RecordingCanvas to android.graphics
Move RenderNode to android.graphics

Bug: 112709971
Test: make & boot
Change-Id: Iddeb6a89f8923ea81a1f37bbee4e9b1db8ede238
2018-10-04 16:18:12 -07:00
John Reck
6b1644022b De-couple RenderNode from View package
First step of moving RenderNode to the graphics package

Test: builds
Change-Id: Ife7f5ec6698e32393d1b85ed2bad909ef0210be4
2018-09-26 16:29:32 -07:00
Andreas Gampe
3238164883 Frameworks: Remove AsyncTask from preloaded-classes
Bug: 113624968
Test: m
Change-Id: I77be78138f13fdc6d3a26aea3f59d01ef0e745e8
2018-09-21 10:05:43 -07:00
Steven Moreland
0c697ee37f Revert "preloaded-classes: remove core HIDL libs"
This reverts commit 766b425c27f128d507cc5101c01d7c4bf107dbca.

Appears to be the cause of a 14ms regression in wifi startup time in system server that could be offset here (and potentially other places) by keeping the preload in zygote. A local trial of five showed this revert to take it 111.2ms -> 108ms. The variance is likely too high for this to be significant, however, logically, in the short term, these libraries are being used, and so preloading makes sense. I'll leave further changes to this list to the owners of this list.

Test: boot walleye 5 times w/ and w/o this test, and find small gain in reverting this.
Reason for revert: b/115771598

Change-Id: Ia53dbe8b70900d6f04011b15cbdddf786378fc3b
2018-09-17 18:11:02 +00:00
Steven Moreland
766b425c27 preloaded-classes: remove core HIDL libs
These are being removed from boot jars.

Test: (sanity) boot device, no longer see 'Class not found for preloading'
Bug: 77307025
Change-Id: I854d3397ff362495ff392c2c4ea8594d1b2449bd
2018-09-12 09:17:53 -07:00
Neil Fuller
6f358b1947 Track rename of org.kxml to com.android.org.kxml
Update preloaded-classes to track libcore class renames.

The class renames may have caused a regression in some
performance metrics, though overall boot time was unaffected.
This is probably because the first user is now paying the cost
of the class initialization and that happens to be in the affected
metrics. There's no reason not to update the preloaded-classes.

Metrics affected:
SystemServerTiming_StartUsageService_avg
SystemServerTiming_StartJobScheduler_avg
SystemServerTiming_StartJobScheduler_avg

Test: build only
Bug: 111055375
Bug: 112595254
Change-Id: If1697918046ec7f186c095eaf68864d075989b9c
2018-08-15 10:40:47 +01:00
Chad Brubaker
fd707f670c Do not preload NoPreloadHolder classes
These classes cannot be statically preloaded in Zygote.

Change-Id: I7d9f10e634409bedfdd71f8daa43b8e23516638e
Fixes: 109652611
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testCaCertManagement
2018-06-07 11:51:06 -07:00
Calin Juravle
a9c8b17acf Remove sun.nio.fs.UnixChannelFactory from preloaded-classes
The tests use the preloaded classes to create the core image and
that leads to UnixChannelFactory being initialized despite the
fact that FileDescriptor is not. This manifests with a null pointer
crash in tests.

Bug: 80495283
Test: m test-art-host
Change-Id: I785104e6c69c605b16357a9557b203b489972261
2018-06-06 06:13:39 -07:00
Calin Juravle
4a054198d9 Update the boot image profile and preloaded classes
Data aggregated across 41 dogfood profiles from 10 different
(builds,devices). The threshold for preloaded_classes was 5.

What has changed:
preloaded_classes:  643 added, 1 removed
boot image profile: ~10k  methods and classes added.

Test: m, build & boot
Bug: 73313191
Change-Id: Ic2662255081a5166180f4eb894d75b2e5bd76950
2018-05-30 16:31:01 -07:00
Mathieu Chartier
6ea19ebe05 Update boot image profile and preloaded classes
Data obtained from dogfood device.

Also updated system server profile.

Bug: 73313191
Test: make and flash sailfish

Change-Id: I9cf059f177a10e940e7cda1d12a8ed7429019c3c
2018-05-13 23:56:35 -07: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
Christine Franks
5397f0353a Rename NightDisplayController and -Service
Bug: 68258004
Test: make -j100 && runtest -x
frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/AutoTileManagerTest.java
&& runtest -c com.android.server.ColorDisplayServiceTest
frameworks-services
Change-Id: I2b89942bd412e4d6958e65b62bc345fb1e60176f
2017-11-08 10:29:01 -08:00
Kurt Nelson
1bb93bf77c Structure StrictMode violations as Throwables
All violations of StrictMode now inherit from one central Violation
class. This unlocks adding penaltyCallback(Violation).
Parsing strings is no longer required to infer what type of violation
something is.
Violation classes have no need to be loaded in Zygote as only developers
opt-in to this feature and will see violations.

Cross-binder thread violation perf test:
before
2872331
2574093
2481208
after
1938227
1742714
2654538

Bug: 64258734
Test: cts-tradefed run cts-dev --module CtsOsTestCases --test
android.os.cts.StrictModeTest
Change-Id: I1971feb03ff77cf297c940cacee62fadb5b8422c
2017-11-03 11:14:30 -07:00
Andreas Gampe
6e7768a274 Merge "Frameworks: Move Log holder to be preloaded" into oc-mr1-dev am: 1a17bfa25c
am: fd31b789f9

Change-Id: Ie6e2671e6ecd53e24cf8a2438ce032ecb0af012b
2017-09-28 15:33:25 +00:00
Andreas Gampe
fd31b789f9 Merge "Frameworks: Move Log holder to be preloaded" into oc-mr1-dev
am: 1a17bfa25c

Change-Id: I108472693a5ce73cec529b354e65b1eeed6ee151
2017-09-28 15:25:50 +00:00
Andreas Gampe
61a3e8c23a Frameworks: Move Log holder to be preloaded
To avoid issues with late initialization, let the holder be
initialized in the zygote.

Bug: 65927416
Test: m
Change-Id: I6f454df46d4c64d295e1f2510793d5087b74fb74
2017-09-27 15:34:01 -07:00
Sunny Goyal
5b15392c9a Simplifying writeToParcel for various actions
> Using helper methods when writing and reading typed objects
> Moving the tag write outside the action, as it is read outside
  the action as well
> Removing usused tags

Test: am instrument -w -e class android.widget.RemoteViewsTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Bug: 65574108
Change-Id: Iaf51cae6ef9f82b70dc1f19c2f019af40c4424a2
2017-09-27 08:52:30 -07:00
Victor Chang
e98252d2d7 Merge "Remove StructGroupSourceReq" into oc-mr1-dev-plus-aosp
am: ea8a114743

Change-Id: Ie44da7ca28665a0769da7a1d7231d02cf4942c5d
2017-09-21 01:43:19 +00:00
Victor Chang
ea8a114743 Merge "Remove StructGroupSourceReq" into oc-mr1-dev-plus-aosp 2017-09-20 09:33:23 +00:00
Christine Franks
0321346f38 Handle night display state when timezone changes
Bug: 64458884
Test: runtest -c com.android.server.NightDisplayServiceTest \
frameworks-services and manually tested Hawaii and London

Change-Id: I052034a4c64eb73c42672215e8847c11e00efeb5
(cherry picked from commit 2ce862c3ed3739c4bb794794fb57e00fe233a3d5)
2017-09-20 03:35:49 +00:00
Christine Franks
1276f357d3 Merge "Handle night display state when timezone changes" into oc-mr1-dev 2017-09-20 00:23:28 +00:00
Christine Franks
2ce862c3ed Handle night display state when timezone changes
Bug: 64458884
Test: runtest -c com.android.server.NightDisplayServiceTest \
frameworks-services and manually tested Hawaii and London

Change-Id: I052034a4c64eb73c42672215e8847c11e00efeb5
2017-09-19 14:37:26 -07:00
Victor Chang
ed707d9cf1 Remove StructGroupSourceReq
- Remove the class as part of removing setsockoptGroupSourceReq from
Os.java
- CtsLibcoreTestCases and CtsLibcoreOjTestCases pass on aosp/master

Bug: 32071916
Test: m
Change-Id: I132190f47cea9f56ec56a824763f7e2b2cfde893
2017-09-19 19:41:46 +01:00
Kurt Nelson
7d5c07a561 Improve StrictMode CTS Testing
* Pass a full object instead of just a string. I will be adding more
detailed assertions making sure cross-binder violations work.
* AOSP format the test class.
* Update to modern junit.
* Lambda-fy.
* Load ViolationLogger in Zygote.

Bug: 62458734
Test: Test improvments.
Change-Id: I2ddc489f845928154269cad449cbdc7b15dabe8e
2017-09-12 17:40:04 -07:00