Commit Graph

16278 Commits

Author SHA1 Message Date
Automerger Merge Worker
99a5a61c51 Merge "Add OWNERS file for role." am: 5f00139706 am: 0958898aaf
Change-Id: If14c81641f0233835bb36c5f5f71de94881b64b9
2020-03-16 23:25:50 +00:00
Hai Zhang
5f00139706 Merge "Add OWNERS file for role." 2020-03-16 22:55:07 +00:00
Hai Zhang
9173da8f8a Add OWNERS file for role.
Test: build
Change-Id: Ib22925c0bdb97ea97964ad9fb08222ca27facbab
2020-03-16 11:03:12 -07:00
Automerger Merge Worker
c822c1d807 Merge "Add some comments in isAlwaysOnVpnLockdownEnabled" am: 4db4933c81 am: 288837ff3d
Change-Id: I0a4f3553330651ab274ff3521e404d3408450678
2020-03-16 10:36:19 +00:00
Lucas Lin
4db4933c81 Merge "Add some comments in isAlwaysOnVpnLockdownEnabled" 2020-03-16 10:08:51 +00:00
Automerger Merge Worker
34e03cc8ad [SP21] Address comments for API council review about aosp/1172143 am: 393e10d4cd am: c13c880914
Change-Id: Ia5e64eb524a852539850f46df87a6b28d4910cbc
2020-03-16 03:13:45 +00:00
Automerger Merge Worker
c13c880914 [SP21] Address comments for API council review about aosp/1172143 am: 393e10d4cd
Change-Id: I8634d6f6ed65ec6b10009a90b147881fe1fc4530
2020-03-16 03:03:51 +00:00
Junyu Lai
240f5bb4e9 Merge "[SP21] Address comments for API council review about aosp/1172143" 2020-03-16 02:41:19 +00:00
lucaslin
86e560c749 Add some comments in isAlwaysOnVpnLockdownEnabled
Bug: 141621373
Test: Build pass.
Change-Id: Ib9df71192937164ff95ce564195d5d68508ec69d
2020-03-16 09:40:01 +08:00
Automerger Merge Worker
54c7cff5b5 Merge "Add @RequiresPemission compat framework APIs." am: 9a3446e067 am: e58704e2be
Change-Id: Ia935f69038e648bbc7b92b3e5c25ba16d9855a31
2020-03-13 19:50:59 +00:00
Treehugger Robot
9a3446e067 Merge "Add @RequiresPemission compat framework APIs." 2020-03-13 19:10:21 +00:00
junyulai
393e10d4cd [SP21] Address comments for API council review about aosp/1172143
Test: atest FrameworksNetTests ImsPhoneCallTrackerTest
Test: atest TetheringTests NetworkStackTests
Test: m doc-comment-check-docs
Fix: 148552904

Change-Id: I141393f229e772d2eb9f7c156849e379bd71b845
2020-03-12 21:34:17 +08:00
Automerger Merge Worker
913397e796 Merge changes from topic "sp20-stats-provider-permission" am: 0fa3b9e2e4 am: 344ecb4200
Change-Id: I765831bcb6059fa95cf59967becde4b9340cde39
2020-03-12 09:00:20 +00:00
Junyu Lai
0fa3b9e2e4 Merge changes from topic "sp20-stats-provider-permission"
* changes:
  [SP20] Check signature permission when accessing network stats provider
  Add permission check functions to NetworkStatsService
2020-03-12 08:19:24 +00:00
Automerger Merge Worker
2646c4a4ff RESTRICT AUTOMERGE am: 60a6583adf am: 20cd95a7f6
Change-Id: I7458a6f6a8178f31060e5a0150cddf5d20cc1fdb
2020-03-12 04:35:43 +00:00
Automerger Merge Worker
7c329bcefa Add updateMccMncConfiguration as @TestApi for CTS am: a14185aad4 am: bd96ea2511
Change-Id: Iab9b9df58da7080671b240f0e91ae88deade6fe8
2020-03-11 20:33:36 +00:00
Automerger Merge Worker
20cd95a7f6 RESTRICT AUTOMERGE am: 60a6583adf
Change-Id: I387d6fcf719b56132baeff486aebce875d76f602
2020-03-11 20:05:08 +00:00
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
a14185aad4 Add updateMccMncConfiguration as @TestApi for CTS
Test: cts; https://paste.googleplex.com/5930499648258048
Bug: 147897445
Change-Id: I63288be1acd9e898548ced345799ac1ae69ce427
Merged-In: I63288be1acd9e898548ced345799ac1ae69ce427
(cherry picked from commit 3d873cf7d0)
2020-03-10 22:57:43 +00:00
Christopher Tate
45a53e6cb8 DO NOT MERGE - Kill apps outright for API contract violations
...rather than relying on in-app code to perform the shutdown.

Bug: 128649910
Bug: 140108616
Test: manual
Test: atest OsHostTests#testForegroundServiceBadNotification
Change-Id: I94d9de50bb03c33666471e3dbd9c721e9278f7cb
Merged-In: I94d9de50bb03c33666471e3dbd9c721e9278f7cb
2020-03-10 22:32:13 +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
Linus Tufvesson
60a6583adf RESTRICT AUTOMERGE
Block TYPE_PRESENTATION windows on default display

... and any other display that isn't considered a public presentation
display, as per Display.isPublicPresentation()

Bug: 141745510
Test: cts-tradefed run cts -m CtsWindowManagerDeviceTestCases -t android.server.wm.PresentationTest
Change-Id: I2aaab1903dee54190338f7b6e49888aa51437108
2020-03-04 10:01:09 -08: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
atrost
e8e97c0aab Add @RequiresPemission compat framework APIs.
The permission check is already implemented server side.

Test: m
Bug: 150471082
Change-Id: I63d807be84bccb237f69562cdbce22f99a964d1a
Merged-In: I63d807be84bccb237f69562cdbce22f99a964d1a
2020-03-02 13:30:44 +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
junyulai
ddbbe58863 [SP20] Check signature permission when accessing network stats provider
Currently, registerNetworkStatsProvider requires the
UPDATE_DEVICE_STATS permission. This is a privileged permission
so it can be granted to preinstalled apps. Thus, apps like
GmsCore, or preinstalled apps will be able to update network stats.

This change checks for a new permission that would only allow
signature apps to declare that. Also check
MAINLINE_NETWORK_STACK permission to allow NetworkStack process
to use it.

Test: adb shell dumpsys netstats
Test: atest FrameworksNetTests
Bug: 149652079
Change-Id: Idfebd0a1988c3dcfd812d87e30f6a2034d6fbf6b
2020-02-24 20:22:48 +08: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