Commit Graph

16255 Commits

Author SHA1 Message Date
Automerger Merge Worker
8dbd8eaef2 Merge "Introduce system API for ActivityManager.updateMccMncConfiguration for Mainline" am: d301f3fd8e am: b3720cd31c
Change-Id: I73a56d811f4c3ba581298852bbec638b16b510b6
2020-03-10 23:35:25 +00:00
sqian
9799e6e810 Introduce system API for ActivityManager.updateMccMncConfiguration for Mainline
Test: treehugger
Bug: 147381728
Bug: 138545688
Change-Id: Ieef1dbbab3b05fc166c3dbc53ed2507ef45d09d7
Merged-In: Ieef1dbbab3b05fc166c3dbc53ed2507ef45d09d7
(cherry picked from commit b9c9bfa6e8)
2020-03-10 21:29:32 +00:00
Automerger Merge Worker
dc54349a7f Merge "Add command line support for testing tz detection" am: 86fd801bff am: 215eafabf2
Change-Id: I664351b715614c6816e033ea091c5d8b74d09643
2020-03-05 18:41:14 +00:00
Automerger Merge Worker
215eafabf2 Merge "Add command line support for testing tz detection" am: 86fd801bff
Change-Id: Ia1060d6120c3572dc74a47256e1a1735aef08dbd
2020-03-05 18:23:04 +00:00
Bill Yi
020c84a136 Merge stage-aosp-master to aosp-master - DO NOT MERGE
Change-Id: I352ed2cba25df69594ee5861f3a64be63bc18c96
2020-03-05 10:20:17 -08:00
Neil Fuller
86fd801bff Merge "Add command line support for testing tz detection" 2020-03-05 18:07:24 +00:00
Automerger Merge Worker
2ee8512bfa Merge "Start process of next activity with top priority in advance" am: efbcd6752d am: 627bfca085
Change-Id: Ifb4da995dab885689f50dcf9890e64f8082194b0
2020-03-05 00:05:36 +00:00
Automerger Merge Worker
627bfca085 Merge "Start process of next activity with top priority in advance" am: efbcd6752d
Change-Id: I8e8dd0f20cd3a783e49468a7657e571812bca3eb
2020-03-04 23:54:10 +00:00
Treehugger Robot
efbcd6752d Merge "Start process of next activity with top priority in advance" 2020-03-04 23:41:40 +00:00
Riddle Hsu
364f2500e5 Start process of next activity with top priority in advance
In common cases, to resume the next activity we need to wait for the
current one to be paused. Since starting a process for activity is
asynchronous, if we already know the process of next activity has not
started yet, we can start the process earlier so the time waiting for
the pause to complete can be saved.

Also if the launching activity is going to be the top app, we can set
the top schedule group right after its process is started so the start
time before actually launching the activity can be improved.

Although before the current activity is paused, the next top activity
may still change and results some empty processes. That should not be
a common case and the process is still useful when going back the stack,
and the empty background processes are easier to be reclaimed.

Bug: 123043091
Test: AppLaunchTest
Test: Launch calculator from launcher, the event log am_proc_start will
      show "pre-top-activity".
Test: Cold launch a top activity, the system log should not show
      "not expected top priority".
Test: Use startActivities to start serveral activities in a sequence.
      Check "adb shell cat /proc/$pid/task/$pid/cgroup" for each process.
      Only the last one has top-app, others are background.

Change-Id: I9601b66e7cc0855fd7c2b573ded31fcf8d0711ae
Merged-In: I9601b66e7cc0855fd7c2b573ded31fcf8d0711ae
2020-03-03 16:36:46 -08:00
Automerger Merge Worker
954d735153 Merge "Make MmsManager public and @SystemService" am: 01574a30ea am: f6cdbeb470
Change-Id: I1e354ba0456d8826f72ac642d9fe7d8ce6393a01
2020-03-03 21:39:32 +00:00
Automerger Merge Worker
f6cdbeb470 Merge "Make MmsManager public and @SystemService" am: 01574a30ea
Change-Id: I6978fb1377f76308732fb241f04adcef82087b7f
2020-03-03 21:22:33 +00:00
Sarah Chin
01574a30ea Merge "Make MmsManager public and @SystemService" 2020-03-03 21:17:11 +00:00
Automerger Merge Worker
a1b17ae07e Merge "[API Review] Expose sendOrderedBroadcast" am: b0157c3ee3 am: f1124753ed
Change-Id: Ieda3a33090f627f882faecbadb0a29aee7790bf2
2020-03-02 22:09:34 +00:00
Automerger Merge Worker
f1124753ed Merge "[API Review] Expose sendOrderedBroadcast" am: b0157c3ee3
Change-Id: I686308c2af6e31a30c211d25adea416d556e5cd1
2020-03-02 21:59:55 +00:00
Peter Wang
3e227cdfc5 [API Review] Expose sendOrderedBroadcast
with appOp as String and options as Bundle

Bug: 139077993
Bug: 146423958
Test: Build
Change-Id: I5325e08d60016741139251813a5df9b42f2efc82
Merged-In: I5325e08d60016741139251813a5df9b42f2efc82
2020-02-27 14:45:23 -08:00
Neil Fuller
4879487862 Add command line support for testing tz detection
Add support for "adb shell cmd time_zone_detector".

This allows platform developers and future host tests to simulate
clients like telephony / SettingsUI and make changes to the
TimeZoneDetectorService state to mimic various real-world situations.

Example adb shell invocations:

Withdraw a previous telephony suggestion from slot_index=0:

cmd time_zone_detector suggestTelephonyTimeZone --suggestion --slot_index 0 \
    --zone_id "_"

Make a new telephony suggestion from slot_index=0, with a quality of
TelephonyTimeZoneSuggestion.QUALITY_SINGLE_ZONE, and a matchType of
TelephonyTimeZoneSuggestion.MATCH_TYPE_NETWORK_COUNTRY_ONLY:

cmd time_zone_detector suggestTelephonyTimeZone --suggestion --slot_index 0 \
    --zone_id "Europe/London" --quality single --match_type country

Make a manual (user) suggestion as if from SettingsUI:

cmd time_zone_detector suggestManualTimeZone --suggestion --zone_id America/Los_Angeles

Bug: 140712361
Test: Various command line invocations.
Test: atest core/tests/coretests/src/android/app/timezonedetector
Change-Id: I0f16868a526d2ea4b17acbd274cb2359f93166f5
2020-02-25 17:57:42 +00:00
Automerger Merge Worker
0ea7868a9d Merge "Revert "Cache binder calls in CompatChanges"" am: e879968fbf am: 1da820d954
Change-Id: I3bc8bea4eb5dcc7fbda8a3372083e04337e95242
2020-02-21 19:45:41 +00:00
Automerger Merge Worker
1da820d954 Merge "Revert "Cache binder calls in CompatChanges"" am: e879968fbf
Change-Id: I2fd44d5f95c66d57c8cf779a8b18a10b4e2e965c
2020-02-21 19:25:51 +00:00
Anna Trostanetski
9c6ecc90c5 Revert "Cache binder calls in CompatChanges"
Reason for revert: cache needs to be cleared on package install.
This is much simpler to do in internal master with recent changes
(ag/10172190) so I'm reverting the cache from aosp to keep it correct,
and cherrypicking this into internal master.

Change-Id: I71757a5b60fbdba3c69322b95a20527a1e3a66e9
2020-02-21 16:38:32 +00:00
Automerger Merge Worker
a2c3c9fe10 Merge "Revert "Revert "[DexLoadReporter] Report classloader contexts di..."" am: 1ee3e70cf3 am: 2cef69cb5f
Change-Id: I6146cfbbd0a8214e476e50b359ce5474e6d5070c
2020-02-19 20:12:07 +00:00
Automerger Merge Worker
2cef69cb5f Merge "Revert "Revert "[DexLoadReporter] Report classloader contexts di..."" am: 1ee3e70cf3
Change-Id: I5645d6c8f666e2e29e753cad5f216f9d7ab335d2
2020-02-19 19:52:57 +00:00
Calin Juravle
1ee3e70cf3 Merge "Revert "Revert "[DexLoadReporter] Report classloader contexts di..."" 2020-02-19 19:38:35 +00:00
Calin Juravle
c78162f489 Revert "Revert "[DexLoadReporter] Report classloader contexts di..."
Original commit:
[DexLoadReporter] Report classloader contexts directly from classloader

At the moment classloader contexts are incorrectly computed in the
PackageManager for secondary dex files. There are two issues:

(1) The wrong computed classLoaderContext will be reported for a secondary
    dex file if it was loaded at the same time as a primary dex file
    - This is due to the continue statement that doesn't increment
      dexPathIndex
(2) If a secondary dex file was loaded with a shared library then that
    shared library info isn't passed through the dex load reporting
    infrastructure, and thus its classloader context is incorrectly computed
    in PackageManager.

In order to fix the issues described above & prevent further classloader
context computation divergences between the package manager and the
runtime, lets compute the classloader context in the runtime at dex load
time and report the expected classloader context directly to
DexLoadReporter (and thus the package manager).

Notes: This is mostly just a refactor (i.e. there are a lot of line
changes, but functionally speaking this set of CLs doesn't do much
except change where the classloader context is computed)

Addendum: The bugs described above could also be fixed by:
- changing DexLoadReporter to report information about shared libraries that
  the reported classloaders depend on to PackageManager
- Teach DexoptUtils.processContextForDexLoad about shared libraries
- Fix dexPathIndex calculation in DexManager

I opted for this set of changes instead because this reduces the
possibility of context computation divergence between the framework and the
runtime. Additionally it feels more "solid" that the classloader context
is now computed directly when a dex file is loaded, rather than the
context recreated later on in the PackageManager.

Test: atest com.android.server.pm.dex.DexManagerTests
Test: atest com.android.server.pm.PackageManagerServiceTest
Test: Install app depending on shared library & uses secondary dex
files; adb shell pm bg-dexopt-job; launch app and see odex file
successfully loaded (from smaps/no logcat errors)

Bug: 148494302
Exempt-From-Owner-Approval: This is a pure re-revert, previously owner approved.
Reason for revert: Re-land
Reverted Changes:
I295a6e99e:Revert "Fix shared libraries not being reported vi...
Ib58066e8f:Revert "[DexLoadReporter] Report classloader conte...

Change-Id: I8d1af791f93a3f8fa6eca78df50891cd2ebbb4a3
2020-02-19 19:37:05 +00:00
Automerger Merge Worker
893bf3b7f5 Merge "Improve BaseBundle#kindofEquals" am: 42ab50d14b am: 1f82fbb4ac
Change-Id: I0dadb4269692a86cab1c66e1c69d9a95bfddd9a2
2020-02-19 00:53:38 +00:00
Automerger Merge Worker
1f82fbb4ac Merge "Improve BaseBundle#kindofEquals" am: 42ab50d14b
Change-Id: Ic5c2c5bcf979236c77344d0507d071bbb83f624e
2020-02-19 00:33:09 +00:00
Treehugger Robot
42ab50d14b Merge "Improve BaseBundle#kindofEquals" 2020-02-18 23:56:30 +00:00
Andrei-Valentin Onea
309680b57a Merge changes from topic "add-caching-platformcompat" am: 8f269473b2 am: 61e6c86f54
Change-Id: I29bd6489714d3101eef2d8c18a12bd71391ff4ef
2020-02-18 17:39:43 +00:00
Daniel Colascione
9df97ead62 Add property-invalidated cache am: 764ff47f87 am: 7c9f1499bc
Change-Id: Ib917ce8f32bccf91ec2c4d77e445f8afae6d7ad5
2020-02-18 17:39:40 +00:00
Andrei-Valentin Onea
61e6c86f54 Merge changes from topic "add-caching-platformcompat" am: 8f269473b2
Change-Id: If1af69efe644b57c990a85bbb07ea9442edf808e
2020-02-18 17:30:44 +00:00
Daniel Colascione
7c9f1499bc Add property-invalidated cache am: 764ff47f87
Change-Id: I49849de310a637d9d407698a4a0120b5b8aa48aa
2020-02-18 17:30:40 +00:00
Andrei-Valentin Onea
8f269473b2 Merge changes from topic "add-caching-platformcompat"
* changes:
  Cache binder calls in CompatChanges
  Add property-invalidated cache
2020-02-18 17:16:09 +00:00
Nicolas Geoffray
f96a5bf6a0 Merge "Revert "[DexLoadReporter] Report classloader contexts directly f..."" am: ae50e15d59 am: ea12868665
Change-Id: I4faaff1f5227b64028222c5824d70ac0356cf20f
2020-02-15 17:51:03 +00:00
Nicolas Geoffray
ea12868665 Merge "Revert "[DexLoadReporter] Report classloader contexts directly f..."" am: ae50e15d59
Change-Id: Icc45c40ce116ce54a915650ca6f6600b6db08e0e
2020-02-15 17:36:14 +00:00
Nicolas Geoffray
ae50e15d59 Merge "Revert "[DexLoadReporter] Report classloader contexts directly f..."" 2020-02-15 17:14:15 +00:00
Nicolas Geoffray
371fcb7cf2 Revert "[DexLoadReporter] Report classloader contexts directly f..."
Revert "Fix shared libraries not being reported via Reporter"

Revert submission 1198456-slclc

Reason for revert: Fails on luci:
https://ci.chromium.org/p/art/builders/ci/host-x86_64-cdex-fast/3123

Exempt-From-Owner-Approval: pure revert

Bug: 148494302
Reverted Changes:
I46d8d9105: Fix shared libraries not being reported via Report...
I00357cfe0: [DexLoadReporter] Report classloader contexts dire...

Change-Id: Ib58066e8f059642a11d9eaab02ec0b8b3217e487
2020-02-15 17:13:58 +00:00
Junyu Lai
a08cdb380e Merge "[SP16] Address comments on aosp/1172143" am: fc9e4fbc08 am: dfb6a0fdb9
Change-Id: Id6d4be756ec4bd6d3e9c7b8fa1d85b3bdc802a10
2020-02-15 02:51:23 +00:00
Junyu Lai
dfb6a0fdb9 Merge "[SP16] Address comments on aosp/1172143" am: fc9e4fbc08
Change-Id: I9c826c08320e112466dea0d2628f3447ebcb7d02
2020-02-15 02:35:42 +00:00
Junyu Lai
fc9e4fbc08 Merge "[SP16] Address comments on aosp/1172143" 2020-02-15 02:21:30 +00:00
Suprabh Shukla
3b413dd57e Improve BaseBundle#kindofEquals
If both BaseBundles are empty, we can infer that without needing to
unparcel any of them.

Test: atest FrameworksCoreTests:android.os.BundleTest

Bug: 146037505
Change-Id: I04c28cdd1293227d9887b0c17e178f61328c1959
Merged-In: I04c28cdd1293227d9887b0c17e178f61328c1959
2020-02-14 14:05:00 -08:00
Calin Juravle
cb3d0f7ab5 Merge "[DexLoadReporter] Report classloader contexts directly from classloader" am: 5a01991fef am: ce9b12f5bf
Change-Id: I55eb1b61f848b993d17d54e68f0e6403c61e456d
2020-02-14 20:42:33 +00:00
Calin Juravle
ce9b12f5bf Merge "[DexLoadReporter] Report classloader contexts directly from classloader" am: 5a01991fef
Change-Id: Ida294271950c3f330f1acb2150ac3892db88ab64
2020-02-14 20:29:11 +00:00
Calin Juravle
5a01991fef Merge "[DexLoadReporter] Report classloader contexts directly from classloader" 2020-02-14 20:16:24 +00:00
junyulai
7d058ec6b0 [SP16] Address comments on aosp/1172143
Test: atest FrameworksNetTests
Test: atest NetworkPolicyManagerServiceTest
Test: m doc-comment-check-docs
Bug: 130855321
Change-Id: Iccaab09f5b9668ec4a7249737c64a69cecb08d15
2020-02-14 16:53:40 +08:00
Automerger Merge Worker
01bb7cef0e Merge "Update InCallService API docs." am: 11e7b55ea9 am: 040db280fa
Change-Id: Id6df82c6284b2cc027dba1d2b355806888185761
2020-02-13 19:26:10 +00:00
Automerger Merge Worker
040db280fa Merge "Update InCallService API docs." am: 11e7b55ea9
Change-Id: Ica011ce75760d1d7338c3accdf29dc7505fd9949
2020-02-13 19:09:01 +00:00
Tyler Gunn
11e7b55ea9 Merge "Update InCallService API docs." 2020-02-13 18:48:00 +00:00
Andrei Onea
3ef678b58f Cache binder calls in CompatChanges
Cached call values are kept in ChangeIdStateCache (per-process cache).
Use "cache_key.is_compat_change_enabled" system property to
invalidate the cache (i.e. any value different from the last observed
will trigger an invalidation).
Any process can read that property, but only system server can change it.

Bug: 140441727
Test: atest PlatformCompatTest
Test: atest CompatConfigTest
Test: atest CompatChanges
Test: atest PlatformCompatGating

Change-Id: Ibed398ae965b7da2432aaf8d5ffc259f7d228c7e
2020-02-13 17:36:37 +00:00
Dan Zimmerman
a05766e507 [DexLoadReporter] Report classloader contexts directly from classloader
At the moment classloader contexts are incorrectly computed in the
PackageManager for secondary dex files. There are two issues:

(1) The wrong computed classLoaderContext will be reported for a secondary
    dex file if it was loaded at the same time as a primary dex file
    - This is due to the continue statement that doesn't increment
      dexPathIndex
(2) If a secondary dex file was loaded with a shared library then that
    shared library info isn't passed through the dex load reporting
    infrastructure, and thus its classloader context is incorrectly computed
    in PackageManager.

In order to fix the issues described above & prevent further classloader
context computation divergences between the package manager and the
runtime, lets compute the classloader context in the runtime at dex load
time and report the expected classloader context directly to
DexLoadReporter (and thus the package manager).

Notes: This is mostly just a refactor (i.e. there are a lot of line
changes, but functionally speaking this set of CLs doesn't do much
except change where the classloader context is computed)

Addendum: The bugs described above could also be fixed by:
- changing DexLoadReporter to report information about shared libraries that
  the reported classloaders depend on to PackageManager
- Teach DexoptUtils.processContextForDexLoad about shared libraries
- Fix dexPathIndex calculation in DexManager

I opted for this set of changes instead because this reduces the
possibility of context computation divergence between the framework and the
runtime. Additionally it feels more "solid" that the classloader context
is now computed directly when a dex file is loaded, rather than the
context recreated later on in the PackageManager.

Test: atest com.android.server.pm.dex.DexManagerTests
Test: atest com.android.server.pm.PackageManagerServiceTest
Test: Install app depending on shared library & uses secondary dex
files; adb shell pm bg-dexopt-job; launch app and see odex file
successfully loaded (from smaps/no logcat errors)

Bug: 148494302
Change-Id: I00357cfe086ff149f92c1078c6df6daa713c8f7c
2020-02-13 04:31:55 -08:00
Daniel Colascione
764ff47f87 Add property-invalidated cache
The PropertyInvalidatedCache class provides a framework for caching
frequently-read, seldom-written information between processes.

Test: caching CLs
Test: atest FrameworksCoreSystemPropertiesTests
Bug: 140788621

(cherry picked from commit 06e9a4e01b)
Merged-In: I2d650129389e9567e4982b3a613fb8d1cbc97f4b
Change-Id: Ia03c2e6ab0ba0388ac729e5872795e25d06ee322
2020-02-12 12:28:48 +00:00