Commit Graph

15785 Commits

Author SHA1 Message Date
Treehugger Robot
81a705690b Merge "Make TimestampedValue Parcelable" 2019-10-14 18:33:43 +00:00
Neil Fuller
def77b5cd5 Make TimestampedValue Parcelable
Make TimestampedValue Parcelable for simplicity.

TimetampedValue objects are not generally parcelable, depending on the
type of the value held. Previously, TimestampedValue did not implement
Parcelable to avoid committing to a general contract. Developers
parceling TimestampedValue objects were expected to call
TimestampedValue.writeToParcel() / TimestampedValue.readFromParcel()
explicitly when they knew it was safe to do so. This also meant that
TimestampedValues couldn't be used directly via AIDL.

This change makes TimestampedValue parcelable because it's more
familiar / convenient. Attempts to marshall a TimestampedValue that
contains a non-parcelable value will still throw a RuntimeException.

Bug: 140712361
Test: atest android.util.TimestampedValueTest
Change-Id: I8ca9c72f0433b380ce720cd813f650e743b3ddae
2019-10-10 10:16:41 +01:00
Alex Light
7ae1299cdd Merge "Perform agent startup-attach before bind" 2019-10-09 21:25:48 +00:00
Alex Light
2d0691c7e1 Perform agent startup-attach before bind
We were performing agent startup-attach during bind but this was too
late for some agents, as it occurred after Context was created. Change
implementation to make this occur prior to bind.

Test: atest CtsJvmtiAttachingHostTestCases
Bug: 142010970
Change-Id: I5f75e8b3c508116762b7863d9b47251d0e808ea9
2019-10-08 11:09:53 -07:00
Elliott Hughes
e14fa97af9 Remove a user/userdebug difference.
There isn't much users can do to get app developers to care anyway, so
leaving this on just for apps with debuggable="true" should be
sufficient.

Bug: http://b/141754375
Test: treehugger
Change-Id: I3a796f9c4b9358fce499649c3f289e956ee9a97a
2019-10-02 11:40:03 -07:00
atrost
6624ffa207 Refactor ChangeReporter and rate limit stats logging.
Only log once per change-package-state(resets every app launch if used
from within the app process).

Next: reset every app launch for server usage as well.

Test: using the test app.
Bug: 138374585
Change-Id: I5587f7138cf2cd8d144e88cf294e65c14bb32bfb
2019-09-26 12:59:19 +01:00
atrost
e36b1a142f Implement stats logging for Compatibility API.
Add a new atom and log from both the app process API and the system server API
Bug: 136794938
Bug: 138378110
Test: statsd_testdrive 228

Change-Id: I80f07d0beb30c779c4bce70bebf2bb4ab22f6bfe
Merged-In: I80f07d0beb30c779c4bce70bebf2bb4ab22f6bfe
2019-09-16 14:55:53 +01:00
Jiyong Park
bc099b6d59 Revert "Fix: vendor public libraries are accessible via System.loadLibrary"
This reverts commit cfe38cdb1c.

The CL 8f712189dfc02285573337e2b4ab17678011db14 in libcore project avoids
the need for adding the new paths in LoadedApk. With the CL, a classloader
does not give up even when loader.findLibrary() has failed due to some
paths are not added to it. Instead, the classloader converts the given
libname into a filename (e.g. foo -> libfoo.so) then calls dlopen()
with the filename. The classloader reports failure only when the dlopen()
call has failed. Therefore, manually adding these paths to the classloader
is no longer needed and thus removed.

Bug: 109720125
Test: System.loadLibrary("adsprpc") is successful in Pixel (because
libadsprpc.so is in Pixel's vendor public lib list)
Test: atest cts/tests/tests/jni

Merged-In: I1970eba7e732728699042a36b89571915ec81451
(cherry picked from commit 37131e1ee6)
Change-Id: I1970eba7e732728699042a36b89571915ec81451
2019-09-10 12:51:26 +09:00
Martin Stjernholm
ca19446d9a Merge "Update path to the new ART APEX."
am: 0a4cf715f6

Change-Id: I7ab8cd227ce571041293880dfaca4e2ebb68e536
2019-09-02 03:44:58 -07:00
Martin Stjernholm
0a4cf715f6 Merge "Update path to the new ART APEX." 2019-09-02 10:28:30 +00:00
Martin Stjernholm
28f0a76486 Update path to the new ART APEX.
Test: atest CtsJniTestCases
Bug: 135753770
Exempt-From-Owner-Approval: Approved internally
Change-Id: Ica35fc7f6adade19160cbb16adf5647d189ecc45
Merged-In: Ica35fc7f6adade19160cbb16adf5647d189ecc45
2019-08-30 17:47:31 +01:00
Aurimas Liutikas
1da3bde08d Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.

This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi

Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Merged-In: I109260842cfc25f06e40694997fcbb4afa02c867
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
2019-08-30 00:16:24 +00:00
Aurimas Liutikas
00be951a08 Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.

This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi

Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Merged-In: I109260842cfc25f06e40694997fcbb4afa02c867
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
2019-08-30 00:14:44 +00:00
Ian Kasprzak
1a5bb83588 [DO NOT MERGE] Cleanup TEST_MAPPING disables from ag/9285495
- Moved exclude filters to existing stanzas
- Removed new stanzas added w/ filters
- Removed un-needed filters because existing "include-filter"
  already excludes failing tests.

Disabling in preparation for merge to aosp-master (Q release).

Disabling the following tests:
FrameworksCoreTests:android.view.textclassifier.TextClassifierTest#testSuggetsConversationActions_deduplicate
CtsAppTestCases:android.app.cts.ServiceTest#testAppZygoteServices
CtsAppTestCases:android.app.cts.SystemFeaturesTest#testLocationFeatures
CtsProviderTestCases:android.provider.cts.MediaStore_Images_ThumbnailsTest

Test: Forrest
Exempt-From-Owner-Approval: Disabling known failing TEST_MAPPING tests
for AOSP push to Q.

Change-Id: I4dc2408c5bc6d421654f871c5d63d402c1d96d91
2019-08-29 10:38:56 -07:00
Raman Tenneti
f997c75d69 [DO NOT MERGE] Disabled the following tests in TEST_MAPPING:
FrameworksCoreTests:android.view.textclassifier.TextClassifierTest#testSuggetsConversationActions_deduplicate
CtsAppTestCases:android.app.cts.ServiceTest#testAppZygoteServices
CtsAppTestCases:android.app.cts.SystemFeaturesTest#testLocationFeatures
CtsProviderTestCases:android.provider.cts.MediaStore_Images_ThumbnailsTest

Disabling in preparation for merge to aosp-master (Q release).

Test: Forrest (atest)
L55600000358896983, L81400000359164936
BUG: 139704630
BUG: 139535570
BUG: 139536812
BUG: 139535125
BUG: 139305203
Change-Id: I9be2efd464fe031a0269fa5a3913ddb4959ba05d
Exempt-From-Owner-Approval: Disabling known failing TEST_MAPPING tests for AOSP push to Q.
2019-08-28 23:48:13 +00:00
Xin Li
f5defc19a0 DO NOT MERGE - Merge build QP1A.190711.020 into stage-aosp-master
Bug: 139893257
Change-Id: I89559c14cbc17c47f9b43754ec44904b19c73dd3
2019-08-26 18:30:47 +00:00
Alex Light
366a542843 Merge "Add agent startup-attach" into stage-aosp-master 2019-08-20 15:39:48 +00:00
Alex Light
c4caca112f Add agent startup-attach
Add ability to give 'startup-agents' that are automatically loaded
when a (debuggable) app starts. These agents are any files in the
'code_cache/startup_agents' directory. The agents are started with the
apps data_directory as an argument.

Test: Install debuggable apk (here com.antonioleiva.bandhookkotlin)
  walleye:/ $ run-as com.antonioleiva.bandhookkotlin sh
  walleye:/data/data/com.antonioleiva.bandhookkotlin $ mkdir code_cache/startup_agents
  walleye:/data/data/com.antonioleiva.bandhookkotlin $ cp /data/local/tmp/libtifasts32.so code_cache
  walleye:/data/data/com.antonioleiva.bandhookkotlin $ cp /data/local/tmp/libtifasts64.so code_cache
  walleye:/data/data/com.antonioleiva.bandhookkotlin $ cp /data/local/tmp/libchainagentss32.so code_cache/startup_agents/
  walleye:/data/data/com.antonioleiva.bandhookkotlin $ cp /data/local/tmp/libchainagentss64.so code_cache/startup_agents/
  walleye:/data/data/com.antonioleiva.bandhookkotlin $ echo $PWD/code_cache/libtifasts32.so=log,ClassLoad > chain_agents.txt
  walleye:/data/data/com.antonioleiva.bandhookkotlin $ echo $PWD/code_cache/libtifasts64.so=log,ClassLoad >> chain_agents.txt
  Start bandhookkotlin
  Examine logcat

Bug: 135627501

Cherry-picked from commit c0fce111c8b due to merge conflict.

Change-Id: Ib82b27df90c7964a995288d8b2b3d348a11cdd80
Merged-In: Ib82b27df90c7964a995288d8b2b3d348a11cdd80
2019-08-14 21:28:22 +00:00
Xin Li
80860803a4 DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5713463) into stage-aosp-master
Bug: 134405016
Change-Id: I303c0268e8e454b0f0f460eb286812a50c9add88
2019-08-14 12:04:06 -07:00
Alex Light
6e917454f2 Add agent startup-attach
Add ability to give 'startup-agents' that are automatically loaded
when a (debuggable) app starts. These agents are any files in the
'code_cache/startup_agents' directory. The agents are started with the
apps data_directory as an argument.

Test: Install debuggable apk (here com.antonioleiva.bandhookkotlin)
  walleye:/ $ run-as com.antonioleiva.bandhookkotlin sh
  walleye:/data/data/com.antonioleiva.bandhookkotlin $ mkdir code_cache/startup_agents
  walleye:/data/data/com.antonioleiva.bandhookkotlin $ cp /data/local/tmp/libtifasts32.so code_cache
  walleye:/data/data/com.antonioleiva.bandhookkotlin $ cp /data/local/tmp/libtifasts64.so code_cache
  walleye:/data/data/com.antonioleiva.bandhookkotlin $ cp /data/local/tmp/libchainagentss32.so code_cache/startup_agents/
  walleye:/data/data/com.antonioleiva.bandhookkotlin $ cp /data/local/tmp/libchainagentss64.so code_cache/startup_agents/
  walleye:/data/data/com.antonioleiva.bandhookkotlin $ echo $PWD/code_cache/libtifasts32.so=log,ClassLoad > chain_agents.txt
  walleye:/data/data/com.antonioleiva.bandhookkotlin $ echo $PWD/code_cache/libtifasts64.so=log,ClassLoad >> chain_agents.txt
  Start bandhookkotlin
  Examine logcat

Bug: 135627501

Change-Id: Ib82b27df90c7964a995288d8b2b3d348a11cdd80
Merged-In: Ib82b27df90c7964a995288d8b2b3d348a11cdd80
2019-08-14 17:15:09 +00:00
Prabir Pradhan
ec177f86e1 apply empty transaction in startActivitySync
Force SurfaceFlinger to update synchronously by applying an empty
transaction. Without this, SurfaceFlinger will only update after the
next vsync, which may only happen after the instrumentation already
starts.

Since InputFlinger will only have the proper InputWindowInfo after
SurfaceFlinger updates, waiting for the vsync caused some
instruemntation tests to be flaky.

Bug: 138263890
Test: atest android.view.cts.HoverTest
Change-Id: I5457ab67ac574530dc1aa84549ca11e7e3f0d714
(cherry picked from commit 03dde38efc)
2019-08-14 00:22:41 +00:00
Christopher Tate
ef7eef60c9 Fix job persistence & re-inflation
We were persisting jobs' battery-not-low constraints but were not
properly restoring that constraint when the job was inflated at boot.
This could result in a runtime bootloop (!) if the job had no other
constraints, requiring a factory reset to restore the device to
usability.

We now:

* properly inflate the battery-not-low constraint;
* persist & inflate the storage-not-low constraint, which previously was
being stripped entirely and could result in a similar crash-at-boot;
* ignore the job rather than crash the system if one is inflated into
a non-viable state; and
* formally test previously-untested constraint persistence

Bug: 130012063
Test: atest $ANDROID_BUILD_TOP/frameworks/base/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java
Test: atest CtsJobSchedulerTestCases
Test: JobStoreTest with forced throw in JobInfo.Builder#build()
Change-Id: Ia3ab1eb16aeaa85336409368b4340622cec19f4c
Merged-In: Ia3ab1eb16aeaa85336409368b4340622cec19f4c
2019-07-30 15:18:02 -07:00
Mathew Inwood
3020e050d0 resolve merge conflicts of 9acd72c60b to stage-aosp-master
Bug: None
Test: TH
Merged-In: I2fcf25264c62acc801f9e62967072cd04e4641e7
Change-Id: I5bc6b8c20bda03b3760f13f747b1e2069bfd9ac1
2019-07-22 09:29:24 +00:00
Mathew Inwood
a1b39023d8 Compatibility API implementation for app processes.
Pass the set of disabled changes from the system server into the app in the
bindApplication() call. Use this to instantiate an implementation of
Compatibility.Callbacks() to implement the API.

Test: Manual.
Bug: 135010838
Merged-In: I2fcf25264c62acc801f9e62967072cd04e4641e7
Change-Id: I2fcf25264c62acc801f9e62967072cd04e4641e7
2019-07-18 11:09:29 +01:00
Brad Ebinger
53f6c34039 Merge "Make RcsMessageStore a top level API"
am: bac258f22e

Change-Id: If235ead8a75dc080e1e129d83bf7f24c3c996d8c
2019-07-12 14:53:26 -07:00
Brad Ebinger
bac258f22e Merge "Make RcsMessageStore a top level API" 2019-07-12 21:40:40 +00:00
Treehugger Robot
f0d921c41a Merge "Replace HashMap with ArrayMap for services" 2019-07-11 20:41:31 +00:00
TreeHugger Robot
261a2d62e2 Merge "Update docs for UID_STATE" into qt-dev 2019-07-09 17:25:49 +00:00
Svet Ganov
7922ef60fc Specify the duration time base
am: 6f672a3835

Change-Id: I55a7866ab35c6c652b378ced6cea8c63c1a14016
2019-07-08 19:32:25 -07:00
Svet Ganov
6f672a3835 Specify the duration time base
Test: N/A

Bug: 128316830

Change-Id: Idd8f1aaf1a8e0013c01fdf4d668f9d5e81101559
2019-07-08 16:40:45 -07:00
Svet Ganov
05fcd228b5 Update docs for UID_STATE
Test: N/A

Bug: 128919932

Change-Id: Ibac690db3b58293082f762800bbbff0f832a16b2
2019-07-08 16:30:48 -07:00
Louis Chang
d75d59e276 Merge "Avoid making post state to RESUMED for a PAUSING activity" into qt-dev
am: ae80cf399a

Change-Id: I555a5a142e9edb6b6242a831561754082b750b54
2019-07-03 16:40:13 -07:00
Louis Chang
ea203cdbdf Avoid making post state to RESUMED for a PAUSING activity
Make sure the client post execution lifecycle state to RESUMED
only if the activity was RESUMED while delivering new intent.

Bug: 135715788
Test: making skype calls
Test: atest ActivityThreadTest

Change-Id: I1e3054e1d1611aecf6ddf6d482abf2cb3ebdf9a4
2019-07-03 09:44:12 +08:00
Michael Groover
94672cea7c Add device identifier permission checks to TelephonyPermissions
Bug: 131916175
Fixes: 136305129
Test: atest PhoneSubInfoControllerTest
Change-Id: Icca98347ab76b7c3468b95756a33a758a3abde37
Merged-In: I3c82c53ec89cd17b34a61166ccc9e9747388efac
2019-07-01 17:53:11 +00:00
Mathew Inwood
13ffa87a6d Merge "Restore some greylist entries." into qt-dev
am: f76bdce6e0

Change-Id: I320e33be57b8124ff7c132a67c8981d53802f8f5
2019-06-28 07:43:43 -07:00
TreeHugger Robot
f76bdce6e0 Merge "Restore some greylist entries." into qt-dev 2019-06-28 12:02:43 +00:00
Mathew Inwood
3a75f264a8 Restore some greylist entries.
In Q, these APIs were either:
- removed from the greylist entirely without good reason
- Moved to the restricted greylist without any public alternative
  information added

So they are being moved back to the greylist for Q.

Test: Treehugger
Bug: 136102585
Change-Id: I5ac8b8b9b23c3789d80239cf456072cc7dfa1203
2019-06-28 10:15:37 +01:00
David Nelloms
17dccf5418 Merge "Notify on task display change." into qt-dev
am: 22a5e4e5d9

Change-Id: Ia0ae853122ff3acb755abfebb88dda863ee61080
2019-06-27 18:24:54 -07:00
David Nelloms
22a5e4e5d9 Merge "Notify on task display change." into qt-dev 2019-06-28 00:12:49 +00:00
Hai Zhang
6c162a4e36 Merge "Add link to AndroidX Role library in RoleManager documentation." into qt-dev
am: bde371beb6

Change-Id: I846b027bd1970ebc10a1720e5cc601bf633954f6
2019-06-27 17:04:26 -07:00
davidln
a06b4b2fa5 Notify on task display change.
This is a targeted fix for not receiving a task stack change callback
when a task with a resumed Activity is reparented to another display.

Bug: 128932906

Test: manual - launch activity from virtual display onto default display
  in a new task, verify callback notified. atest WmTests
Change-Id: Idabad8379cded664bcf302d5c6fb69564d158eb7
Merged-In: Idabad8379cded664bcf302d5c6fb69564d158eb7
2019-06-27 18:54:00 +00:00
Hai Zhang
bae001170b Add link to AndroidX Role library in RoleManager documentation.
Fixes: 136119951
Test: presubmit
Change-Id: Iab4c8617983555b04d7c49b7f9583cf2132d57c8
2019-06-27 00:14:44 +00:00
Ioannis Ilkos
689148acc6 Merge "Add anon RSS + swap metric" into qt-dev
am: 9af8d15783

Change-Id: I00f58e98bb7c162032bf381348a63be4bd77ac0f
2019-06-24 08:16:21 -07:00
Ioannis Ilkos
9af8d15783 Merge "Add anon RSS + swap metric" into qt-dev 2019-06-24 08:46:40 +00:00
Antoan Angelov
9e3a59f51a Merge "Update docs for EXTRA_PROVISIONING_SKIP_EDUCATION_SCREENS." into qt-dev
am: ab34f61c3b

Change-Id: I49e43ed171d4ff45cf400ac9fc009ef78a2c8eef
2019-06-21 11:22:50 -07:00
Antoan Angelov
ab34f61c3b Merge "Update docs for EXTRA_PROVISIONING_SKIP_EDUCATION_SCREENS." into qt-dev 2019-06-21 18:07:22 +00:00
Ioannis Ilkos
466ad6c3e0 Add anon RSS + swap metric
We are planning to use this metric to detect leaks.

This CL also decouples the actual memory sampling from AM. This means:
- Less time locking the pid list (we used to lock and then read proc)
- Less serialization / deserialization for the parcel
- Simpler to evolve (e.g. removed the HWM-specific method in AM)

Change-Id: I87a7243156dd8c88cfa85038e7e6cf4963e271e1
Test: manual, MemoryStatUtilTest, UidAtomTests
Bug: b/135418017
2019-06-21 11:10:19 +01:00
Brad Ebinger
d1cb346d4f Make RcsMessageStore a top level API
RcsManager was handling both DB APIs and RcsFeature logic, which
made it confusing. Instead, make RcsMessageStore->RcsMessageManager,
which is a top level API.

Test: Manual
Change-Id: I9b9f96154d0705797cedade3d6cee27719897164
2019-06-20 23:28:43 +00:00
Robert Benea
360b2c4434 Replace HashMap with ArrayMap for services
The number of services is pretty limited (100ish), use the more
memory efficient Map.

Test: tested on android go
Merged-In: I092c6816afba77fde4195c68a211804d4a561b77
Change-Id: I092c6816afba77fde4195c68a211804d4a561b77
2019-06-20 23:27:59 +00:00
arangelov
bb2a802a23 Update docs for EXTRA_PROVISIONING_SKIP_EDUCATION_SCREENS.
Bug: Fixes: 134391678
Test: manual
Change-Id: I993af4f4a741283294b1754dfc0adc7c6f6f849e
2019-06-20 16:31:10 +01:00