Commit Graph

15368 Commits

Author SHA1 Message Date
Steven Moreland
0ec1b0f9de Merge "Revert "Revert "Preload non-bootclasspath Java lib ClassLoaders.""" am: 4b5ca28dfe am: 4e709ea3fd
am: 96724b57ae

Change-Id: I3de2f4b4fb092d0db5001209d68ea217e150b8da
2019-04-01 20:14:55 -07:00
Steven Moreland
4e709ea3fd Merge "Revert "Revert "Preload non-bootclasspath Java lib ClassLoaders."""
am: 4b5ca28dfe

Change-Id: I63fa6d4a8671db24bf9fce898414c27068547ed2
2019-04-01 19:38:43 -07:00
Steven Moreland
4b5ca28dfe Merge "Revert "Revert "Preload non-bootclasspath Java lib ClassLoaders.""" 2019-04-02 02:19:44 +00:00
Mathieu Chartier
eecf228d5d Merge "Pass debug.allocTracker.stackDepth to runtime if it exists" am: 72e80b5b1a am: efeaad3225
am: e58f122e19

Change-Id: I40fc2836471279635acc26c06aa4a18a183947f9
2019-04-01 17:32:46 -07:00
Philip P. Moltmann
8f8cf3430b Merge "Remove dual storage permission model" 2019-04-01 23:45:23 +00:00
Philip P. Moltmann
129a0b0c5e Remove dual storage permission model
- Also remove typed media permissions
- Leave typed media app-ops

Bug: 129716569
Test: Used apps, looked at permissions in the UI
Change-Id: If7714fb1a6955584157e1a60ab72b09e35287827
2019-04-01 16:30:11 -07:00
Mathieu Chartier
efeaad3225 Merge "Pass debug.allocTracker.stackDepth to runtime if it exists"
am: 72e80b5b1a

Change-Id: Iaf05e6a285dbf626854a3b37101bea032af3a7a8
2019-04-01 16:24:14 -07:00
Svetoslav Ganov
8c45f11b79 Merge "Add missing argument and return annotations" 2019-04-01 22:30:03 +00:00
Svetoslav Ganov
51b78e305d Merge "Add missing nullability annotations" 2019-04-01 22:12:35 +00:00
Michael Groover
d18900b937 Merge "Remove unused code and cleanup parameters for DPM dev ID access" 2019-04-01 19:27:42 +00:00
Mathieu Chartier
90aa945df5 Pass debug.allocTracker.stackDepth to runtime if it exists
Since this is no longer called in ART, pass it down in bind application.

Bug: 37291459
Test: test-art-host

Change-Id: I23623e9b8e9ca6261d90cc1ae1c5d8c24cc4eba5
2019-04-01 17:56:56 +00:00
TreeHugger Robot
8ccf6439af Merge "Fix the javadoc of setAutoTimeRequired." 2019-04-01 14:58:32 +00:00
TreeHugger Robot
389dfc89cb Merge "Change javadoc of isManagedKiosk." 2019-04-01 14:51:23 +00:00
Alex Kershaw
fa3b77f27c Fix the javadoc of setAutoTimeRequired.
Fix the javadoc of DevicePolicyManager#setAutoTimeRequired to mention
that PO support is only from O onwards.

Fixes: 126325573
Test: Javadoc change only
Change-Id: Ib415e20a312d2cc454843562bff6cc0eb1e98244
2019-04-01 13:24:54 +01:00
Alex Kershaw
dafcc9dbf9 Change javadoc of isManagedKiosk.
Change the javadoc of isManagedKiosk and isUnattendedManagedKiosk to
reflect feedback from the CDD update process at http://b/124358598.

Bug: 124358598
Fixes: 129458503
Test: Javadoc only
Change-Id: Iad69be116ccd62ff8091d1be412a06afdd714603
2019-04-01 13:12:11 +01:00
Jeff Sharkey
f5e3d6a735 DATA is deprecated, but some apps really want it.
The DATA column points at raw filesystem locations, which aren't
always valid when an app is placed into a sandbox, so apps need to
move away from using them.

We had hoped to block this access based on an app targeting Q, but
we've received feedback that it's too painful for apps to transition,
so we'll continue returning paths that can be translated.

Also reduce CPU usage by skipping permission checks when not
processing an IPC, such as when called by ModernMediaScanner.

Bug: 128452447, 125725916
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Ibd41d8ddedfaf9807333560b2d8e64e42ea7a1ba
2019-03-31 12:03:50 -06:00
Svet Ganov
8d54bcc1a6 Add missing nullability annotations
Test: manual

bug:126699370

Change-Id: Ie3bcb82ed24a1aa98004d88befe1f14c0c9e658b
2019-03-30 22:13:50 -07:00
Svet Ganov
00a46ef45c Add missing argument and return annotations
Test: manual

bug:128317336

Change-Id: I239b251b15dceb062e7be9ab602f4b0dce446987
2019-03-29 21:13:07 -07:00
TreeHugger Robot
e5e258148d Merge "Adding automatic heap dumping for system server." 2019-03-30 02:35:22 +00:00
Winson Chiu
fbe87233d5 Merge changes from topic "code-paths-and-resources-caching-fix"
* changes:
  Revert ContextImpl LoadedApk packageInfo caching workaround
  Fix AssetManager2 isUpToDate check
  Diff resource dirs when checking LoadedApk packageInfo cache in ActivityThread
  Diff overlays between PackageManagerService and OverlayManagerService
  Propagate base code path and split dir changes to Resources objects
2019-03-29 23:50:02 +00:00
Kweku Adams
fa8256386e Adding automatic heap dumping for system server.
This adds a request to ActivityManager to track the system server's pss heap
and make sure it doesn't go above a predefined limit. If it does, the dump is
generated and a notification is posted.

Bug: 77490269
Test: flash device and test with 100MB and 150MB limits
Change-Id: Ie886cc36860e8557fbd037b3bfd4975d12806a4b
2019-03-29 16:25:06 -07:00
Steven Moreland
bdc2702cdf Revert "Revert "Preload non-bootclasspath Java lib ClassLoaders.""
This reverts commit d3c2bc5a4e.

Reason for revert: reland fix
Bug: 128529256

Change-Id: I0647d4242406e31348a68ebba328e5f8ad750144
2019-03-29 21:52:32 +00:00
TreeHugger Robot
a869ccb1d0 Merge "Grants camera permission to Attention Service." 2019-03-29 21:31:26 +00:00
Winson
710e3ecbe0 Revert ContextImpl LoadedApk packageInfo caching workaround
Reverts changes made for b/120987987 that are no longer necessary
with changes for b/124363683.

Test: manually built, enabled/disabled FontCursiveMonospaceOverlay

Change-Id: Ied18a412d30514b40cc720d9a1af5c0d2053d795
2019-03-29 12:18:18 -07:00
Winson
83708c8258 Diff resource dirs when checking LoadedApk packageInfo cache in ActivityThread
Need to check the overlayDirs with the current appInfo passed into
getPackageInfo, otherwise it's possible to return an old, outdated
LoadedApk which hasn't loaded the correct resource dirs into its
AssetManager.

There is a separate issue with AssetManager2.isUpToDate not being
implemented correctly, but that will be moved to a different
changelist.

Bug: 124363683

Test: manually tested Wellbeing with repro steps in linked bug

Change-Id: Iace6e8aab322bdb7b5b93398a4f5e2c69fccc68e
2019-03-29 12:18:18 -07:00
Michael Groover
9fd02c5027 Remove unused code and cleanup parameters for DPM dev ID access
Fixes: 123684619
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t \
      com.android.cts.devicepolicy.DeviceOwnerTest#testDeviceOwnerCanGetDeviceIdentifiers
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t \
      com.android.cts.devicepolicy.ManagedProfileTest#testProfileOwnerCanGetDeviceIdentifiers
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t \
      com.android.cts.devicepolicy.ManagedProfileTest#testProfileOwnerCannotGetDeviceIdentifiersWithoutPermission
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t \
      com.android.cts.devicepolicy.DeviceOwnerTest#testDeviceOwnerCannotGetDeviceIdentifiersWithoutPermission

Change-Id: Ibc647847a47911c0c32cf5cf33bd3187dc3aebd2
2019-03-29 11:31:44 -07:00
Julia Reynolds
cb64a683fb Merge "Noti importance from certain Roles cannot be modified" 2019-03-29 15:25:58 +00:00
Julia Reynolds
0c24500a2f Noti importance from certain Roles cannot be modified
by the notification assistant or user, like the default
phone app.

Fixes: 129358763
Test: atest
Change-Id: I40ef7ff403e2b0d81abe09f15c8804c2d3d2fb8a
2019-03-29 08:35:47 -04:00
Tiger Huang
c2bd56a30a Merge "Reduce the window tap exclude region for child above it" 2019-03-29 09:53:06 +00:00
Mady Mellor
d146a074db Merge "Introduce FLAG_BUBBLE & mark notifs allowed to bubble with it" 2019-03-28 22:04:22 +00:00
Mady Mellor
7eb18efce4 Introduce FLAG_BUBBLE & mark notifs allowed to bubble with it
- It's a hidden flag
- This just marks the notifs but doesn't actually do anything else
- Tests that the flag is added appropriately

Bug: 128459529
Test: atest NotificationManagerServiceTest
Change-Id: I291911ead540a9c6e7f99716d0730b1faaf5533b
2019-03-28 13:07:17 -07:00
Jeff Hamilton
38d503fe46 Merge "Add an API to read experiment IDs." 2019-03-28 11:44:52 +00:00
Nicolas Geoffray
b44f61e98f Merge "Revert "Preload non-bootclasspath Java lib ClassLoaders."" am: d08c3b655b am: 7561d4667c
am: f2c49988c3

Change-Id: If2f2b20b1269f9750d3f56c392fa7ae7f29c86ff
2019-03-28 03:09:39 -07:00
Nicolas Geoffray
7561d4667c Merge "Revert "Preload non-bootclasspath Java lib ClassLoaders.""
am: d08c3b655b

Change-Id: Id04898d99862cc1fff248fc9ba466faf55e30eb7
2019-03-28 02:39:21 -07:00
Nicolas Geoffray
d3c2bc5a4e Revert "Preload non-bootclasspath Java lib ClassLoaders."
This reverts commit 1b11aaaf9b.

Bug: 128529256
Bug: 127406460

Reason for revert: Breaks FSI

Change-Id: Ie9775779cda7b376c36493f3ce3246eafc672c59
2019-03-28 09:25:11 +00:00
Tiger Huang
2b210c234c Reduce the window tap exclude region for child above it
For letting touches directly go to the embedded display, we've opened a
tap exclude region for the ActivityView. However, if there is a view on
top of the region, the view cannot be touched within the region.

In this CL, we reduce the tap exclude region if there is a can-receive-
pointer-event view on top of the region.

Bug: 128517544
Test: atest CtsActivityManagerDeviceTestCases:ActivityViewTest
Test: atest FrameworksCoreTests:ViewGroupTest
Test: Menual test with ActivityViewTest and Bubbles
Change-Id: I68e2a9fe9d0891801b533ab8d25074f64bef5a79
2019-03-28 16:53:20 +08:00
TreeHugger Robot
3c4d3948e9 Merge "API Feedback on setActiveConfigsChangedOperation" 2019-03-28 00:22:06 +00:00
Steven Moreland
03da80555c Merge "Preload non-bootclasspath Java lib ClassLoaders." am: 213812ba28 am: 625d63ed64
am: 62814d83bd

Change-Id: Id36423644efdfdda452d08fc9824320c7c4dee31
2019-03-27 16:49:42 -07:00
Steven Moreland
625d63ed64 Merge "Preload non-bootclasspath Java lib ClassLoaders."
am: 213812ba28

Change-Id: Ie16e82383bab53b5f92258289bf50ba9d7a897cd
2019-03-27 16:18:22 -07:00
TreeHugger Robot
005984015c Merge "Minor fixes to IntervalStats" 2019-03-27 19:41:11 +00:00
Jeff Hamilton
fa2f91c2fe Add an API to read experiment IDs.
Change the file format to store the
experiment IDs direclty so we don't
need to parse the proto when reading
the values out.

Bug: 129099771
Test: bit statsd_test:* && adb shell cmd stats pull-source 10051
Change-Id: I0dc1fd118f4d9ba597c2f0959648136bbafb5aab
2019-03-27 14:24:49 -04:00
TreeHugger Robot
8f9239810d Merge "Update desired heights docs based on feedback from CL after it was submitted" 2019-03-27 14:02:41 +00:00
TreeHugger Robot
b494421edb Merge "Add ability to take on demand system heap dumps." 2019-03-27 12:05:16 +00:00
Steven Moreland
1b11aaaf9b Preload non-bootclasspath Java lib ClassLoaders.
This is specifically for HIDL but is applicable to other libs.

Classes on the bootclasspath are implicitly used by apps. For this
reason, many classes should not go there. However, there are some
libraries which are used by many apps/processes which are still
nice to preload the ClassLoaders of.

Now, cacheNonBootclasspathSystemLibs in ApplciationLoaders keeps
a map of jar -> ClassLoader in zygote to be retrieved by child
processes.

Bug: 128529256
Bug: 127406460
Test: boot Pixel 2, verify libs are preloaded and used, try apps that
    use these libraries.
Test: grep for ClassLoaderContext errors, for instance:
 - ClassLoaderContext shared library size mismatch
 - ClassLoaderContext classpath element mismatch
Test: showmap on various processes which use the preloaded libs.

Change-Id: I351bf1679e9a928c10dca860b6cd6cb414c3bb8e
2019-03-27 01:40:05 -07:00
TreeHugger Robot
0c49254583 Merge "Fixing wrong target check" 2019-03-27 04:18:35 +00:00
Sunny Goyal
08738184ee Fixing wrong target check
Test: compiled framework
Change-Id: Ia6fb1d8920fc0df066509c4c15a123e4459d2285
2019-03-26 18:18:00 -07:00
Kweku Adams
a3513f0598 Add ability to take on demand system heap dumps.
With this, users with userdebug/eng builds will be able to initiate a
system heap dump from developer options.

Bug: 77490269
Test: manual
Change-Id: I0f4efec621e0d63b87c2d655a5f0434572cb92ac
2019-03-26 17:12:23 -07:00
Winson
d605e2d665 Propagate base code path and split dir changes to Resources objects
When split APK loading is deferred, like a dynamic feature module
or delayed install, the ResourcesImpl for old Resources objects
weren't being updated.

This is because the stable key used was "mResDir", which
corresponds to a path with a random hash ID suffixed to the end
of the APKs, like com.example.android-RANDOMHASH/base.apk.

Because RANDOMHASH changes every time a package is updated
(like installing a split), the stable key is no longer valid for
old Resources objects. That means they would never get notified
that the package resource directories could have changed.

There was a partial solution added 2 years ago to solve this case
for refreshing overlays. This extends the solution to replace base
code paths and split dirs, as well as force updates to Resources
with the old code paths.

The original breakage started from P, but I was unable to narrow
down what caused it. This bug should've existed in O, but maybe
a separate, unrelated resources behavior allowed it to work. And
given that, I don't know of a workaround for current instant apps.

Bug: 112392906
Bug: 116167993

Test: manual test Dotloop IA in b/112392906
Test: manual test Hollar IA in b/116167993

Change-Id: I73491fa2b9397a489765ddac8f0a07a797f02028
2019-03-26 17:09:01 -07:00
TreeHugger Robot
1f8d933b32 Merge "Add NonNull/Nullable annotations" 2019-03-26 20:26:35 +00:00
TreeHugger Robot
a967066a1e Merge "Modify AbstractRemoteService#mBindInstantServiceAllowed to #mBindingFlags in order to support multiple binding flags" 2019-03-26 17:16:05 +00:00