Commit Graph

16222 Commits

Author SHA1 Message Date
Mark Renouf
2aece3dc1c Merge "Removes strong ref to Activity from RequestFinishCallback" into qt-qpr1-dev am: 0b1782d6b4
am: 717220d6a6

Change-Id: Iab1eb2d64cb9a6cfd8695466574afd579aca336a
2019-09-10 16:51:58 -07:00
Mark Renouf
717220d6a6 Merge "Removes strong ref to Activity from RequestFinishCallback" into qt-qpr1-dev
am: 0b1782d6b4

Change-Id: I56cbccdc32729b7382893ab448a27d323a1763e7
2019-09-10 16:44:43 -07:00
Mark Renouf
1c25fc531f Removes strong ref to Activity from RequestFinishCallback
This change eliminates the strong reference from
RequestFinishCallback to Activity.

Bug: 139782368
Test: Open then finish an activity within an ongoing app process
      Observe the Activity instance is no longer strongly reachable
      in the app process after onDestroy() completes.

Change-Id: I13e9707e96721a2d491629147337aaedc3473651
2019-09-10 14:08:36 -04:00
Philip P. Moltmann
5ffb16c95f Merge "Do not call into system server with sLock held" 2019-09-10 17:11:56 +00:00
Philip P. Moltmann
9bcc40655e Do not call into system server with sLock held
This is not necessary and causes lock issues.

Fixes: 140536454
Test: atest CtsAppOpsTestCases
Change-Id: I3d1c10f784fd18f82ddfc895ecf6e68711929fba
2019-09-09 23:23:51 +00:00
TreeHugger Robot
2257e8b62d Merge "int userHandle -> int userId" 2019-09-06 18:08:08 +00:00
Bookatz
f56f258495 int userHandle -> int userId
Throughout the codebase, sometimes an integer user ID is called
userId, and sometimes it is called userHandle. Here, we rename the
occurences of "int userHandle" to "int userId" in select files.
Additionally, we add the @UserIdInt annotation in many more places.

This certainly does not cover all uses of userHandle, which is used
widely throughout Android; doing so would be more dangerous and cause
merge conflicts. But at least the core User code can have a consistent
nomenclature.

Bug: 138384792
Test: compiles. presubmit passes.

Change-Id: I9a2684e9bfac637e0476c4b68027008ebb8a160b
2019-09-06 09:26:35 -07:00
Jiyong Park
dc61203d30 Revert "Fix: vendor public libraries are accessible via System.loadLibrary" am: 9c7d8b12b4 am: c93d704df2
am: 2ce280c5d5

Change-Id: Id5d78f11daa7229e8c589c82366112dd4d117c53
2019-09-06 03:54:37 -07:00
Jiyong Park
2ce280c5d5 Revert "Fix: vendor public libraries are accessible via System.loadLibrary" am: 9c7d8b12b4
am: c93d704df2

Change-Id: Iee36c8f242d6fc7b29af0b3cc1811af3e4890e98
2019-09-06 03:41:10 -07:00
Jiyong Park
c93d704df2 Revert "Fix: vendor public libraries are accessible via System.loadLibrary"
am: 9c7d8b12b4

Change-Id: I37e549a8a39bdfd478808c415384d90537cbbe62
2019-09-06 03:27:16 -07:00
Jiyong Park
9c7d8b12b4 Revert "Fix: vendor public libraries are accessible via System.loadLibrary"
This reverts commit cfe38cdb1c.

The CL 8f712189dfc02285573337e2b4ab17678011db14 in libcore project avoids
the need for adding the new paths in LoadedApk. With the CL, a classloader
does not give up even when loader.findLibrary() has failed due to some
paths are not added to it. Instead, the classloader converts the given
libname into a filename (e.g. foo -> libfoo.so) then calls dlopen()
with the filename. The classloader reports failure only when the dlopen()
call has failed. Therefore, manually adding these paths to the classloader
is no longer needed and thus removed.

Bug: 109720125
Test: System.loadLibrary("adsprpc") is successful in Pixel (because
libadsprpc.so is in Pixel's vendor public lib list)
Test: atest cts/tests/tests/jni

Merged-In: I1970eba7e732728699042a36b89571915ec81451
(cherry picked from commit 37131e1ee6)
Change-Id: I1970eba7e732728699042a36b89571915ec81451
2019-09-06 14:02:26 +09:00
Evan Rosky
4c67d2678e Merge changes from topic "unify_window_resize_1"
* changes:
  Unify Window resize (1/N)
  Remove TaskRecord.updateOverrideConfig
2019-09-05 22:28:52 +00:00
Julia Reynolds
5cb8d5a6c3 Address API review feedback
Make methods fully public, add documentation, swap what method is public

Test: make
Fixes: 139833596
Bug: 138589409
Change-Id: If39d6423efedcf8578dc2942274f6fbb341d164a
2019-09-05 16:22:29 +00:00
TreeHugger Robot
a821dabaaa Merge "Revert "Fix: vendor public libraries are accessible via System.loadLibrary"" 2019-09-05 08:56:16 +00:00
Jiyong Park
37131e1ee6 Revert "Fix: vendor public libraries are accessible via System.loadLibrary"
This reverts commit cfe38cdb1c.

The CL 8f712189dfc02285573337e2b4ab17678011db14 in libcore project avoids
the need for adding the new paths in LoadedApk. With the CL, a classloader
does not give up even when loader.findLibrary() has failed due to some
paths are not added to it. Instead, the classloader converts the given
libname into a filename (e.g. foo -> libfoo.so) then calls dlopen()
with the filename. The classloader reports failure only when the dlopen()
call has failed. Therefore, manually adding these paths to the classloader
is no longer needed and thus removed.

Bug: 109720125
Test: System.loadLibrary("adsprpc") is successful in Pixel (because
libadsprpc.so is in Pixel's vendor public lib list)
Test: atest cts/tests/tests/jni

Change-Id: I1970eba7e732728699042a36b89571915ec81451
2019-09-05 08:49:49 +00:00
Pinyao Ting
511160a95f Merge "fixes a security vulnerability in slice provider" into qt-dev am: bc59740fe4
am: 023af61a7b

Change-Id: Ieaa0a16857b87ff99f9661e1d2c3583d36198409
2019-09-04 16:51:16 -07:00
Pinyao Ting
023af61a7b Merge "fixes a security vulnerability in slice provider" into qt-dev
am: bc59740fe4

Change-Id: I4681275fcd275a986c826d59304d9e812340d7be
2019-09-04 16:40:58 -07:00
Chris Tate
6290916b9b Merge "Kill apps outright for API contract violations" 2019-09-04 20:51:19 +00:00
TreeHugger Robot
f70fb1be14 Merge "Add more doc for RoleControllerService.onIsApplicationVisibleForRole()." 2019-09-04 09:24:59 +00:00
TreeHugger Robot
18f86541bf Merge "Add wrapper functions to eventually remove enum logic from callers." 2019-09-03 22:24:52 +00:00
Martin Stjernholm
7a9c6e92f4 Merge "Update path to the new ART APEX." am: 0a4cf715f6 am: ca19446d9a am: b4c1396c5c
am: 9b1711dde0

Change-Id: I0c554d23c02bd871796f22d142144142cd5e7124
2019-09-03 14:50:16 -07:00
Hai Zhang
cd228b9a84 Add more doc for RoleControllerService.onIsApplicationVisibleForRole().
Fixes: 140410946
Test: presubmit
Change-Id: Ib32a6fba238ee10959325c98273ad6e193ea2193
2019-09-03 10:40:31 -07:00
Martin Stjernholm
9b1711dde0 Merge "Update path to the new ART APEX." am: 0a4cf715f6 am: ca19446d9a
am: b4c1396c5c

Change-Id: If93cbcf009d60c35d7292abfcdecfb565965dc17
2019-09-02 04:22:25 -07:00
Martin Stjernholm
b4c1396c5c Merge "Update path to the new ART APEX." am: 0a4cf715f6
am: ca19446d9a

Change-Id: I52cb2b75f65bdcd4aa3e2d2a33bbed79159d7f27
2019-09-02 04:03:53 -07:00
Martin Stjernholm
ca19446d9a Merge "Update path to the new ART APEX."
am: 0a4cf715f6

Change-Id: I7ab8cd227ce571041293880dfaca4e2ebb68e536
2019-09-02 03:44:58 -07:00
Martin Stjernholm
0a4cf715f6 Merge "Update path to the new ART APEX." 2019-09-02 10:28:30 +00:00
TreeHugger Robot
189da4f994 Merge "Move usage stats data to credential encrypted storage." 2019-08-30 22:12:24 +00:00
Evan Rosky
dbe2ce5e82 Unify Window resize (1/N)
This decouples the Split and Pinned stack resize flows. The
current goal is to prepare for a leashed resize implementation
for split-screen. For this to work, it needs to be clear
what actual logic belongs to the various docked resizing modes
vs what is for general stack resize or pinned resize. This
also enables PiP and Split to be worked-on in parallel.

As can be seen, general stack resize is actually not required
because freeform and fullscreen modes use task resize.

Bug: 119687367
Test: go/wm-smoke + related CTS
Change-Id: I9cca1910a18b87dda618235e89f2bdc582086f34
2019-08-30 13:56:09 -07:00
TreeHugger Robot
8e6a69c3a2 Merge "Allow apps to collect which appops were noted" 2019-08-30 18:53:22 +00:00
Mady Mellor
8c209679f5 Merge "qt-r1-bubbles-dev @ build 5835883" 2019-08-30 18:11:37 +00:00
Varun Shah
3a31520250 Move usage stats data to credential encrypted storage.
Move all of the usage stats data from the regular system storage to
the system CE (credential encrypted) storage.

All events being reported while the user is locked will be stored
in memory and will be processed via the handler after the user is
unlocked. All of these events reported will regularly be persisted to
system DE storage to ensure important events are not lost.
Any query requests will be ignored while the user is locked.

Two new usage events have been added: one to indicate the user has been
unlocked and the other to indicate the user has been stopped.

Also updated documentation for APIs in UsageStatsManager to reflect the
new behavior in R when the user is locked.

Bug: 135484470
Test: atest android.app.usage.UsageStatsTest#testDataIsInCe
Test: atest android.app.usage.cts.UsageStatsTest#testUserUnlockedEventExists
Test: atest android.app.usage.cts.UsageStatsTest
Test: atest UsageStatsDatabaseTest
Change-Id: I18da1a9354b6686472972c5f2304e4c19e28307f
2019-08-30 10:44:22 -07:00
Martin Stjernholm
28f0a76486 Update path to the new ART APEX.
Test: atest CtsJniTestCases
Bug: 135753770
Exempt-From-Owner-Approval: Approved internally
Change-Id: Ica35fc7f6adade19160cbb16adf5647d189ecc45
Merged-In: Ica35fc7f6adade19160cbb16adf5647d189ecc45
2019-08-30 17:47:31 +01:00
Aurimas Liutikas
488d37b2d0 Merge "Add missing nullability annotations." into stage-aosp-master am: 85c0a5a2be am: ed5beec21b
am: de0ebb082e

Change-Id: I60c55b6706e8d43121e8b2c7a35efff38668f66b
2019-08-30 08:54:38 -07:00
Aurimas Liutikas
de0ebb082e Merge "Add missing nullability annotations." into stage-aosp-master am: 85c0a5a2be
am: ed5beec21b

Change-Id: I202951d51820be47b9195734601830553215bdd7
2019-08-30 08:43:01 -07:00
Aurimas Liutikas
ed5beec21b Merge "Add missing nullability annotations." into stage-aosp-master
am: 85c0a5a2be

Change-Id: Ic9ea2b9840fbb678bbb6ab77038415581feba918
2019-08-30 08:35:52 -07:00
Philip P. Moltmann
2b08aafc14 Allow apps to collect which appops were noted
If private user data is send to an app the data provider should note an
app-op. This change adds a new API AppOpsManager#setNotedAppOpsCollector
that allows an app to get notified every time such an private data access
happens.

This will allow apps to monitor their own private data usage. Esp. with
big, old apps, distributed teams or 3rd party libraries it might not always
be clear what subsystems access private data.

There are three different situations how private data can be accessed and
an app op is noted:

1. Private data access inside a two-way binder call.
E.g. LocationManager#getLastKnownLocation. When we start a two way
binder transaction, we remember the calling uid via
AppOpsManager#collectNotedAppOps. Then when the data providing code
calls AppOpsManager#noteOp->AppOpsManager#markAppOpNoted the noted
app-op is remembered in
AppOpsManager#sAppOpsNotedInThisBinderTransaction. Then when returning
from the binder call, we add the list of noted app-ops to the
reply-parcel via AppOpsManager#prefixParcelWithAppOpsIfNeeded. On the
calling side we check if there were any app-ops noted in
AppOpsManager#readAndLogNotedAppops and then call the collector while
still in the binder code. This allows the collector e.g. collect a stack
trace which can be used to figure out what app code caused the
private data access.

2. Very complex apps might do permissions checks internal to themself.
I.e. an app notes an op for itself. We detect this case in
AppOpsManager#markAppOpNoted and immediately call the collector similar
to case (1).

3. Sometimes private data is accessed outside of a two-way binder call.
E.g. if an app registers a LocationListener an app-op is noted each time
a new location is send to the app. In this case it is not clear to the
framework which app-action triggered this app-op-note. Hence the data
provider has to describe in a AsyncNotedAppOp object when an why the
access happened. These objects are then send to the system server via
IAppOpsService#noteAsyncOp and then the collector in the app. There are
rare cases where a private data access happens before the app is running
(e.g. when a geo-fence is triggered). In this case we cache a small
amount of AsyncNotedAppOps (in AppOpsService#mUnforwardedAsyncNotedOps)
and deliver them when the app is ready for these events (in
AppOpsManager#setNotedAppOpsCollector).

Test: atest CtsAppOpsTestCases (includes new tests covering this
                                functionality)
Bug: 136505050
Change-Id: I96ded4a8d8d9bcb37a4555d9b1281cb57945ffa9
2019-08-30 08:18:50 -07:00
Aurimas Liutikas
34c56bcf4a Merge "Add missing nullability annotations." 2019-08-30 15:14:37 +00:00
Mady Mellor
06b770cf14 qt-r1-bubbles-dev @ build 5835883
Test: presubmit setup on source branch

Bug: 126945401
Bug: 128932906
Bug: 129158983
Bug: 130237686
Bug: 130250809
Bug: 130442248
Bug: 131267438
Bug: 131609280
Bug: 131692350
Bug: 131849856
Bug: 133444037
Bug: 134064116
Bug: 134064858
Bug: 134070807
Bug: 134077101
Bug: 134090085
Bug: 134155107
Bug: 134423445
Bug: 134512898
Bug: 134514210
Bug: 134514227
Bug: 134734945
Bug: 134960381
Bug: 134989736
Bug: 135214687
Bug: 135280077
Bug: 135472021
Bug: 135475155
Bug: 135487618
Bug: 135488406
Bug: 135518045
Bug: 135633218
Bug: 136034310
Bug: 136150954
Bug: 136199542
Bug: 136538998
Bug: 137201711
Bug: 137213469
Bug: 137214359
Bug: 137214536
Bug: 137233453
Bug: 137876221
Bug: 138301618
Bug: 138445026
Bug: 138659213
Bug: 138749133
Bug: 138799651
Bug: 138801505
Bug: 138941969
Bug: 139002444
Bug: 139025304
Bug: 139816141
Change-Id: Ic271a6a0f0803941dd5a84124dabf4d8c5fcc755
2019-08-29 20:24:52 -07:00
TreeHugger Robot
7ce605ebe9 Merge "Updated onSharedPreferenceChanged listener behavior." 2019-08-30 03:10:08 +00:00
Aurimas Liutikas
1da3bde08d Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.

This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi

Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Merged-In: I109260842cfc25f06e40694997fcbb4afa02c867
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
2019-08-30 00:16:24 +00:00
Aurimas Liutikas
4d1699da48 Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.

This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi

Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
2019-08-29 17:15:44 -07:00
Aurimas Liutikas
00be951a08 Add missing nullability annotations.
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.

This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi

Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Merged-In: I109260842cfc25f06e40694997fcbb4afa02c867
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
2019-08-30 00:14:44 +00:00
Christopher Tate
9fbc5e75b4 Kill apps outright for API contract violations
...rather than relying on in-app code to perform the shutdown.

Bug: 128649910
Test: manual
Test: atest OsHostTests#testForegroundServiceBadNotification
Change-Id: I94d9de50bb03c33666471e3dbd9c721e9278f7cb
2019-08-29 15:35:32 -07:00
TreeHugger Robot
0ac25af13a Merge "Removing @Deprecated && @removed method from KeyguardManager." 2019-08-29 20:32:46 +00:00
TreeHugger Robot
4485bf80df Merge "Make grant origin tracing more ergonomic" 2019-08-29 17:42:04 +00:00
Ian Kasprzak
1a5bb83588 [DO NOT MERGE] Cleanup TEST_MAPPING disables from ag/9285495
- Moved exclude filters to existing stanzas
- Removed new stanzas added w/ filters
- Removed un-needed filters because existing "include-filter"
  already excludes failing tests.

Disabling in preparation for merge to aosp-master (Q release).

Disabling the following tests:
FrameworksCoreTests:android.view.textclassifier.TextClassifierTest#testSuggetsConversationActions_deduplicate
CtsAppTestCases:android.app.cts.ServiceTest#testAppZygoteServices
CtsAppTestCases:android.app.cts.SystemFeaturesTest#testLocationFeatures
CtsProviderTestCases:android.provider.cts.MediaStore_Images_ThumbnailsTest

Test: Forrest
Exempt-From-Owner-Approval: Disabling known failing TEST_MAPPING tests
for AOSP push to Q.

Change-Id: I4dc2408c5bc6d421654f871c5d63d402c1d96d91
2019-08-29 10:38:56 -07:00
Rubin Xu
6762470fc2 Merge "Make DPM.isActivePasswordSufficient() synchronous again" 2019-08-29 12:24:00 +00:00
Raman Tenneti
f997c75d69 [DO NOT MERGE] Disabled the following tests in TEST_MAPPING:
FrameworksCoreTests:android.view.textclassifier.TextClassifierTest#testSuggetsConversationActions_deduplicate
CtsAppTestCases:android.app.cts.ServiceTest#testAppZygoteServices
CtsAppTestCases:android.app.cts.SystemFeaturesTest#testLocationFeatures
CtsProviderTestCases:android.provider.cts.MediaStore_Images_ThumbnailsTest

Disabling in preparation for merge to aosp-master (Q release).

Test: Forrest (atest)
L55600000358896983, L81400000359164936
BUG: 139704630
BUG: 139535570
BUG: 139536812
BUG: 139535125
BUG: 139305203
Change-Id: I9be2efd464fe031a0269fa5a3913ddb4959ba05d
Exempt-From-Owner-Approval: Disabling known failing TEST_MAPPING tests for AOSP push to Q.
2019-08-28 23:48:13 +00:00
Pinyao Ting
a6364d92ed fixes a security vulnerability in slice provider
Bug: 138441555
Test: Manual
Change-Id: Ib1b4fba54ebd3599fe11021d21dc9b09d34e8965
Merged-In: Ib1b4fba54ebd3599fe11021d21dc9b09d34e8965
(cherry picked from commit 2b415a4c44)
2019-08-28 23:45:04 +00:00
George Mount
44846f0c70 Merge "Add test API to change the exit transition timeout." 2019-08-28 21:05:52 +00:00