Commit Graph

62290 Commits

Author SHA1 Message Date
Howard Ro
ff5581d498 Merge "Migrate Statsd to the apex" 2020-02-20 01:53:20 +00:00
Hai Zhang
1040a5c143 Merge "Rename permission APIs." 2020-02-20 01:22:52 +00:00
Automerger Merge Worker
cc5a5939a0 Merge "Revert "Revert "[DexLoadReporter] Report classloader contexts di..."" am: 1ee3e70cf3 am: 2cef69cb5f am: a2c3c9fe10
Change-Id: I6d7ba01f4083ed01eea0ec0dda0b69f27a4b1346
2020-02-19 23:19:40 +00:00
Automerger Merge Worker
0bdf785b96 Merge changes from topic "settings-vpn" am: 70f90282ef am: ff39b8ba90 am: 752013f696
Change-Id: Idac6e83bab50b818e2776f28da380f08000e2a42
2020-02-19 23:08:32 +00:00
Automerger Merge Worker
4471500ebe Merge "Add AdbTransportType.aidl. Add AdbWifi internal API stubs." am: c5cb13899d am: 44cf122df0 am: 21e272d52e
Change-Id: Ic09de8f7f6a064ccfa11654f7a5833b1ebfa490a
2020-02-19 23:07:19 +00:00
Automerger Merge Worker
d9aedbc047 Merge "[SP12] Remove the usage of getVtDataUsage" am: cde5e170b0 am: 565f09f97c am: b585c1cc78
Change-Id: I28c84ee96a3a209868769aad16a2d2e596a0c342
2020-02-19 23:02:38 +00:00
Khaled Abdelmohsen
a15d8009fb Merge "Create rule atom for source stamp" 2020-02-19 23:00:54 +00:00
Ytai Ben-tsvi
7855324ee5 Merge "Enforce HAL callbacks" 2020-02-19 22:45:40 +00:00
Julia Reynolds
9d93649bad Merge "Be more strict about what sounds can play in DND" 2020-02-19 22:42:46 +00:00
Khaled Abdelmohsen
41456aa99c Create rule atom for source stamp
Bug: 149200249
Test: atest FrameworksCoreTests:IntegrityFormulaTest
Change-Id: I8a5ca33e8b2b125a8b7bc178557b7689c0eab50d
2020-02-19 22:41:16 +00:00
Feng Cao
6c821f6ea1 Merge "Introduces the Bundle to inline suggestions APIs to encode custom UI styling information." 2020-02-19 22:35:42 +00:00
Automerger Merge Worker
ed67786e6b Merge "Consume health HAL 2.1 values from framework" am: 217aadd0c2 am: 28c43860ea am: 8f9d77ae03
Change-Id: I60f9cee5e0ba74349a0448204b0e31d213151e5f
2020-02-19 22:16:25 +00:00
Winson Chiu
633cd037f7 Merge changes from topics "package-parsing-v2.1", "parsing-parsed-package-split"
* changes:
  Remove AndroidPackageWrite
  Migrate to new ParsedComponents and ParseResult
  Split ParsedComponents
  Add ParseResult infrastructure
  ParsingPackage/ParsedPackage test code migration
  ParsingPackage/ParsedPackage split source migration
  Important migration for new ParsingPackage/ParsedPackage split
  Separate ParsingPackage into core and ParsedPackage into server
2020-02-19 22:16:15 +00:00
Jeffrey Huang
89e09b58d6 Migrate Statsd to the apex
Bug: 145923087
Test: m -j
Change-Id: Ib4ea98aedef629dd9a2a8764cfd91284a38ba596
2020-02-19 14:13:13 -08:00
Igor Murashkin
c4156d8da7 Merge "pinner: Replace camera pinning with iorap prefetching" 2020-02-19 22:10:40 +00:00
TreeHugger Robot
fe446f7f24 Merge "Fixes to GnssAntennaInfo API" 2020-02-19 20:34:29 +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
Eugene Susla
be1e77ed2f Merge "Reduce maps and browser location pre-grants" 2020-02-19 19:59:44 +00:00
Mehdi Alizadeh
f436164eb8 Merge "Overrides permission check in tests to fix failing unit tests" 2020-02-19 19:54:34 +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
Ricky Wai
62048287d9 Merge "Bind mount obb directory in emulated storage." 2020-02-19 19:42:13 +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
Pavel Grafov
fba650eaed Merge "Add "Forgot my password" to start profile in locked state." 2020-02-19 19:09:20 +00:00
Hai Zhang
5ce0b1adcb Rename permission APIs.
According to lint warnings.

Bug: 136503238
Fixes: 149818284
Test: presubmit
Change-Id: I83e9ac9b65e307bb47d305003ce7adcd2b9c4049
2020-02-19 11:09:01 -08:00
Evan Rosky
2d88183bde Merge "SystemUI Split via TaskOrganizer" 2020-02-19 18:43:36 +00:00
Julia Reynolds
8f5dabdb7d Be more strict about what sounds can play in DND
- Mute all notification usages when DND is on
- Allow packages android and systemui to break through DND so they can
continue to vibrate and play sound (respectively) for exceptions

Test: atest
Fixes: 139961234
Change-Id: Id3c7223311ca8f797a054068f7aed82991975a12
2020-02-19 13:38:12 -05:00
Dan Stoza
a6781c835d Merge "Add PowerManager#getThermalHeadroom" 2020-02-19 18:18:31 +00:00
Vadim Caen
91619830a5 Merge changes I244b3cb8,I194673d6
* changes:
  Fixed rotation: rotate wallpaper
  Fixed rotation: home and recents animation
2020-02-19 18:04:31 +00:00
Vadim Caen
2a9ccc9d2a Fixed rotation: rotate wallpaper
The wallpaper should be rotated if its target WindowState is rotated.

The fixed rotation is applied to the WallpaperWindowToken and
the offsets are computed using the overriden DisplayInfo contained in
the WindowToken.ForcedRotationState.

Test: atest WmTests:RecentsAnimationControllerTest#testWallpaperHasFixedRotationApplied
Bug: 143053092, 148000485, 147999946
Change-Id: I244b3cb81dd29995a1a9181949e4f3f973816825
2020-02-19 19:02:03 +01:00
Feng Cao
36960ee20e Introduces the Bundle to inline suggestions APIs to encode custom UI styling information.
* The bundle will be generated/consumed by the support library.
* More API documentation and example usage will be added later once we have the support library impl ready.
* The old style resource name approach doesn't work due to the potential mismatch in the support library version across the host IME and the platform renderer service, and the non-static nature of the public attribute int id in the support lib.
* The Bundle added to the onCreateInlineSuggestionsRequest() is intended for the platform/ExtServices to communicate the UI versions it supports.
* The Bundle added to the InlinePresentationSpec is intended for the IME to communicate the custom styles for the chosen UI versions.

Test: manual verification, and also atest CtsInputMethodTestCases:InlineSuggestionInfoTest CtsInputMethodTestCases:InlineSuggestionTest CtsInputMethodTestCases:InlineSuggestionsRequestTest CtsInputMethodTestCases:InlineSuggestionsResponseTest
Bug: 146454892

Change-Id: Id7fea32a7550fb924fec811b376790474a7b92eb
2020-02-19 09:42:22 -08:00
Danning Chen
19aae7561a Merge "Add getShareTargets() to ShortcutServiceInternal and get caller's user ID from AppPredictionSessionId" 2020-02-19 17:34:40 +00:00
TreeHugger Robot
817596d92b Merge "Prevent mock location from leaking fudger offsets" 2020-02-19 16:43:16 +00:00
Automerger Merge Worker
27e9268447 Merge "Add vertical type check to prevent non-Automotive Androids from force displaying system bars." into qt-qpr1-dev am: 5a846ed237
Change-Id: Ib251aa6708e958e874a3bf5a5d888f738a5c42bb
2020-02-19 16:37:56 +00:00
Winson
e075629d08 Remove AndroidPackageWrite
Moves all system state out of AndroidPackage and into
PackageStateUnserialized, which lives inside a PackageSetting.

This makes AndroidPackage effectively immutable after it exits
the scan/install process.

Specifically, moves isUpdatedSystemApp, isHiddenUntilInstalled,
seInfoOverride, cpuAbiOverride, PackageUsage,
and sharedLibraryFiles/Infos.

Bug: 135203078

Test: atest com.android.server.pm.parsing

Change-Id: I44baab113f3b6b138472b15a61e0874173bc694f
2020-02-19 08:33:12 -08:00
Winson
f00c755a23 Migrate to new ParsedComponents and ParseResult
Removes the massive old ComponentParseUtils in favor of
the new split classes.

Cleans up the parsing code to be uniform, removing the
String[] outError pattern in favor of ParseInput.

Bug: 135203078

Test: atest com.android.server.pm

Change-Id: I584ed37d4715300453dbe760d45d1eb4759b3dd3
2020-02-19 08:31:48 -08:00
Winson
33eacc6c05 ParsingPackage/ParsedPackage test code migration
Part of the Parsing/ParsedPackage split into core/server.

Moves core tests that are should now be in services,
and cleans up/migrates test code. Import changes, moving
classes into the server, and general small cleanup.

This is the final commit in the Parsing/ParsedPackage split.

Bug: 135203078

Test: enumerated in first commit of change ID
		Ib4fe51d729a56bfb0ea1316e577358ba0dfceccf

Change-Id: I694da372feda070815e05b450807a18d71ec9b9d
2020-02-19 08:22:50 -08:00
Youngjun Kwak
5a846ed237 Merge "Add vertical type check to prevent non-Automotive Androids from force displaying system bars." into qt-qpr1-dev 2020-02-19 16:19:48 +00:00
TreeHugger Robot
9d0c343e1b Merge "Add HDMI hotplug events to dumpsys hdmi_control" 2020-02-19 14:56:12 +00:00
TreeHugger Robot
78c2b7a44f Merge "DeviceProductInfo API." 2020-02-19 14:52:48 +00:00
TreeHugger Robot
9b01e486fd Merge "Log more cross-profile metrics" 2020-02-19 14:14:07 +00:00
Chalard Jean
d68b7e75f2 Merge changes I56109847,I7d815f87,Ic9a3d336
* changes:
  [NS D07] Use the unmodified legacy score
  [NS D06] Implement more policies
  [NS D05] Rework how to tear down networks
2020-02-19 14:07:09 +00:00
Martijn Coenen
961709fbab Merge "Fixup OBB directories correctly after package install." 2020-02-19 14:02:25 +00:00
Alan Stokes
7e5c966482 Merge "Don't destroy ART profiles after package move." 2020-02-19 13:45:27 +00:00
Chalard Jean
ff83b0e467 [NS D07] Use the unmodified legacy score
Ranking used to make use of the various adjustments in
ConnectivityService. These are now implemented in policy.

Test: ConnectivityServiceTest

Change-Id: I56109847678ea5cda1752511123ba652c0f4fe36
2020-02-19 22:17:13 +09:00
Chalard Jean
e9fd5a7229 [NS D06] Implement more policies
Namely :
• Explicitly selected policy
• VPN policy
• Validated policy

These go together to avoid breaking any test, because multiple
tests rely on all of these working.

Test: ConnectivityServiceTest

Change-Id: I7d815f87320c2becbfc93a60a3c54346ff4f47c9
2020-02-19 22:17:12 +09:00
TreeHugger Robot
69ae2cc335 Merge "Fix NPE happened in the constructor of SystemMediaRoute2Provider" 2020-02-19 13:00:34 +00:00
Pavel Grafov
4513e24323 Add "Forgot my password" to start profile in locked state.
Feature is disabled on non-FBE devices since the profile user will
end up in RUNNING_UNLOCKED state.

Bug: 143516540
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Test: manual
Change-Id: Ib87492577b4e5153a8108036af89c547e4bb76ee
2020-02-19 12:44:12 +00:00
Ricky Wai
e5088d92df Bind mount obb directory in emulated storage.
- Create obb directories for packages when zygote starts.

- During zygote fork, bind all visible obb package directories
for an app.

- If app data isolation is not enabled for that process, bind
mount the whole obb directory instead.

Bug: 148049767
Bug: 137890172
Test: atest android.appsecurity.cts.AdoptableHostTest
Change-Id: I841e98c120d447b148c22cfd809d738427b04f2e
2020-02-19 12:37:23 +00:00
Chalard Jean
ea0cf5084c [NS D05] Rework how to tear down networks
Networks are torn down if they don't satisfy requests but only if
they are found unable to ever do so. This is important because
general-purpose networks typically turn up unvalidated, which
means they would get torn down immediately in the presence of
some worse network that is already validated.

Note that functionally it's the same as before for the existing
scores, except that
• An exiting network that doesn't satisfy any request is always
  torn down immediately – this is WAI
• An unmetered network is never torn down when compared to a
  metered network – this is a bugfix (previously the platform
  would tear down an unmetered cellular on grounds that it
  could not beat the performance of a metered Ethernet, but
  that's wrong ; the bug was never realized because Android
  always thinks Ethernet is unmetered)
• An unvalidated network will not be torn down if the current
  satisfier is also unvalidated, even if the satisfier is much
  faster. This is the reason for the change in the test. It's
  wrong to tear down in this case because even if much slower
  the slower network should win if it validates and the other
  doesn't.

Test: ConnectivityServiceTest
Change-Id: Ic9a3d336306a25d1272976ce467aa7c908af7bef
2020-02-19 21:27:22 +09:00