Commit Graph

15772 Commits

Author SHA1 Message Date
Alex Light
ca8502a7f5 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-16 16:14:07 +00:00
Prabir Pradhan
d8006ca972 Merge "apply empty transaction in startActivitySync" into qt-dev
am: f928b661d9

Change-Id: Ifcb1ebfee97d26c0ceeddc88f39f54ecee4da85f
2019-08-14 01:39:18 -07:00
Prabir Pradhan
03dde38efc 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
2019-08-07 12:59:01 -07:00
Kevin Hufnagle
410f162645 Merge "docs: Clarified when onRestoreInstanceState() executes" into qt-dev
am: c80fe63001

Change-Id: I3acf4d0a724d252b59a9e56fb1939187d741dcf7
2019-08-06 09:09:56 -07:00
Kevin Hufnagle
4fbcec13a0 docs: Clarified when onRestoreInstanceState() executes
This method executes only after onDestroy() is called.

Change-Id: I4880cc98ea08945f30b16baa7ae400a5bbe3e439
Test: make ds-docs
Bug: 136241777
2019-08-02 15:43:33 +00:00
Mathew Inwood
be2b0a71d7 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 15:50:26 +00:00
Adrian Roos
1b027edda1 Merge "AM: make isHighEndGfx TestApi" into qt-dev
am: 2ac934280c

Change-Id: Ib531628ddd2fe1f4f5231f3892740b5dcbcfaf0d
2019-07-16 09:30:05 -07:00
TreeHugger Robot
2ac934280c Merge "AM: make isHighEndGfx TestApi" into qt-dev 2019-07-16 16:11:19 +00:00
Adrian Roos
5af40871ea AM: make isHighEndGfx TestApi
Bug: 136784434
Test: n/a
Change-Id: Ie26de8dcf64a02b7757d4f705485cdcb7470f511
2019-07-15 12:05:54 +02:00
Brad Ebinger
36cc070c24 Merge "Make RcsMessageStore a top level API" am: bac258f22e
am: 53f6c34039

Change-Id: Id6eba925aef3a1af812039372bf5e2e87fcbb35e
2019-07-12 15:01:58 -07: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
Svet Ganov
f3c177cc86 Merge "Update docs for UID_STATE" into qt-dev
am: 261a2d62e2

Change-Id: I259b70dc290ee1dccfb5768496e362965a75dadf
2019-07-09 11:01:30 -07: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
Makoto Onuki
0e9303f398 Merge "Optionally trigger CG in onTrimMemory()" into qt-dev
am: 71acb72cbd

Change-Id: Ic0db7139716eb45178fef4a44d5da77216306a06
2019-06-19 19:11:02 -07:00
Makoto Onuki
71acb72cbd Merge "Optionally trigger CG in onTrimMemory()" into qt-dev 2019-06-19 23:24:04 +00:00
Makoto Onuki
0a9ee1af2c Optionally trigger CG in onTrimMemory()
Set a trim-level threshold to debug.am.run_gc_trim_level to activate it.

Bug: 135148702
Test: Manual test with "setprop debug.am.run_gc_trim_level 0", run a lot of
heavy apps and take pictures, and check logcat for the "force_gc" event log.
Test: Manual test with "setprop debug.am.run_mallopt_trim_level 0", run a lot of
heavy apps and take pictures, and check logcat for a debug log.

Change-Id: I73b4dc7374e85e9a22c98ab17da53aa6cb25a188
2019-06-19 10:01:55 -07:00
Philip P. Moltmann
21eaef234f Merge "Mark getProfileOwnerAsUser(int) as UnsupportedAppUsage again" into qt-dev
am: 73e04f292a

Change-Id: I3be950a89186909d0f5adc3732907e06dfd6e8c4
2019-06-14 17:42:25 -07:00
Philip P. Moltmann
c073e956dc Mark getProfileOwnerAsUser(int) as UnsupportedAppUsage again
As it was in P. There are no public APIs created, hence there is no
better, _public_, alternative.

Fixes: 135282729
Test: none
Change-Id: I199cfcc125f948b983eb55a199abf673cc58b7e1
2019-06-14 14:09:35 -07:00
Andrew Solovay
6de1a4c375 Merge "docs: Fixing broken HTML" into qt-dev
am: b230dd4fe6

Change-Id: I3d8716ebdc0d58ee33ef1d84e881888bf6c6d956
2019-06-10 11:46:35 -07:00
Andrew Solovay
b230dd4fe6 Merge "docs: Fixing broken HTML" into qt-dev 2019-06-10 18:23:40 +00:00
Eugene Susla
3d5b18aab1 Merge "Add timeout for setPermissionGrantState" into qt-dev
am: 3baa0b34e3

Change-Id: I1a342c7f85a75d6a66296455fabad769a133a89b
2019-06-10 09:45:56 -07:00
Andrew Solovay
7ad2170f4e docs: Fixing broken HTML
A couple of broken </code> tags were messing up the formatting
for the entire page (see b/134696600 , http://screen/aThdcpoDvJo.png )

Staged the fixed doc to:

http://go/dac-stage/reference/android/app/Activity

(The live version of this doc has already been fixed -- I fixed
the HTML by hand in cl/251937759 -- but we need to fix the Java
comment, or the file will revert when we publish beta 5.)

Bug: 134696600
Test: make ds-docs (& staged HTML output)
Exempt-From-Owner-Approval: Docs-only fix
Change-Id: I7e6d11ca358d747cdc6d04741d31c7acd85aa080
2019-06-07 14:14:04 -07:00
Eugene Susla
fa5fb1f661 Add timeout for setPermissionGrantState
Fixes: 134380096
Test: presubmit
Change-Id: Ifff243068eea2637cf8f6391b52a4c53bc544615
2019-06-07 12:56:47 -07:00
Al Sutton
c2fb67f846 Update services/backup OWNERS to be current B&R team
Change-Id: Ic5e0c5a1f5e9a3f87647187f0f63d61a2b7a19b2
Merged-In: I42c27dfc0f3f792c46fe60e0f6807e51a2c3f21e
Merged-In: I03d72ecec447304866d96e2f0908acbc2a1796b6
Merged-In: I69f6419055be4adc974041d78a1517ded7e5c57b
Test: build/make/tools/checkowners.py -c -v OWNERS
Bug: 134730213
2019-06-07 11:20:19 +01:00
Al Sutton
348a282c11 Reconcile the backup OWNERS files with the internal repo.
This CL addresses a specific branch where a merge conflict is happening.

Change-Id: I69f6419055be4adc974041d78a1517ded7e5c57b
Merged-In: I42c27dfc0f3f792c46fe60e0f6807e51a2c3f21e
Test: build/make/tools/checkowners.py -c -v OWNERS
Bug: 134730213
2019-06-07 09:50:19 +01:00
Adam Bookatz
aaa16c0734 Merge "loadUnbadgedItemIcon doesn't crash from getUserIcon" into qt-dev
am: 14a34b9efb

Change-Id: I96167fe68786a5269d2178d74c3bb4ffa1afca1c
2019-06-06 11:05:58 -07:00