summaryrefslogtreecommitdiff
path: root/apex/blobstore/service/java
AgeCommit message (Collapse)Author
2021-06-03Merge "Check only if the app is installed on the other user for blob ↵Sudheer Shanka
access." into sc-dev
2021-06-02Don't attribute a blob to a user if there are leasees from other users.Sudheer Shanka
Bug: 187460239 Test: atest --test-mapping apex/blobstore Change-Id: I5e9c0473e4c058d430ed012a3ca3ee63f3595821
2021-06-01Check only if the app is installed on the other user for blob access.Sudheer Shanka
There isn't a need to require that the app has permission on other user as well. With this change, we are checking the apps existence on other users to limit access such that apps won't be able to access any more data than they would've accessed by having INTERACT_ACROSS_USERS permission and talking to their instances on other users. Bug: 175844032 Test: atest --test-mapping apex/blobstore Change-Id: I6f13e3e7a240d55c02aecf31e10f750b9e4d5702
2021-05-17Merge "Revert "Add API to allow apps with location permission to access data ↵Sudheer Shanka
blobs."" into sc-dev
2021-05-17Revert "Add API to allow apps with location permission to access data blobs."Sudheer Shanka
This reverts commit e0237fa50b43c7eb0892d7988bf1b344597fa091. Reverting based on the feedback from Permissions and privacy team. Bug: 158705914 Test: atest --test-mapping apex/blobstore Change-Id: Id057e8c61dcf9d3d111ab20530a2074083052392
2021-05-10Unhide the storage attribution API with system visibility.Alexander Dorokhine
Bug: 179160886 Test: StorageStatsManagerLocalTest Change-Id: I3a8994e215baff123df65d89d2d71b9e12de2af5
2021-04-22Rename "legacy" stop reasons.Kweku Adams
There are some uses for the "legacy" stop reasons that the public API stop reasons can't cover well. Since we'll be keeping the "legacy" reasons around, renaming them to "internal" to help explain the differentiation. Bug: 141645789 Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/job Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/job Test: atest ContentResolverTest (all) Test: atest CtsJobSchedulerTestCases Test: atest CtsSyncManagerTest Test: atest SyncManagerTest Test: atest SyncOperationTest Test: atest SyncRequestTest Change-Id: I97e40d35b79dbd012216bc22e90d649639614854
2021-04-12Allow certain apps to access blobs across users.Sudheer Shanka
BlobStoreManagerService is updated to store only one copy of any blob on device and to allow apps with new ACCESS_BLOBS_ACROSS_USERS priv permission to access blobs commited by their instances on other users. Bug: 175844032 Test: atest --test-mapping apex/blobstore Change-Id: If6d10d90b17bde33baf9e83eeaae75d09d0b50ae
2021-03-26Add API to allow apps with location permission to access data blobs.Sudheer Shanka
This is a new access mode that apps can use while committing data blobs to specify that only apps with location permission can the data blobs. Bug: 158705914 CTS-Coverage-Bug: 158705914 Test: atest --test-mapping apex/blobstore Change-Id: If69a2ea317719315f782e71a993cec361fef027f
2021-03-22Expose job stop reasons.Kweku Adams
Provide the various reasons a job could be stopped (via onStopJob) so developers can react accordingly. Bug: 171305774 Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/job Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/job Test: atest CtsJobSchedulerTestCases Change-Id: I5a19e74d3924de449cc5e4de27445e25cf8e25f5
2021-03-11Return true in onStartJob.Kweku Adams
Returning true indicates that there is ongoing work. Bug: 148754858 Test: None Change-Id: I31bc4f986803a1462f87779d3f4eb14e10d7f841
2021-01-13Merge "Update language to comply with Android’s inclusive language ↵Sudheer Shanka
guidance." am: 5eb8de6ed7 am: d8d2a05841 am: ed31406794 Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1545505 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Id8a8b2fda3d13f9cb80a9c282b8494ae7a29b629
2021-01-11Update language to comply with Android’s inclusive language guidance.Sudheer Shanka
See https://source.android.com/setup/contribute/respectful-code for reference Test: atest --test-mapping apex/blobstore Change-Id: Ic1db6fadab90667b0c3a383caa9ad60fab7d1f1b
2020-11-17Move UserManagerInternal out of android.osAdam Bookatz
Moving this class out of android.os will reportedly greatly reduce ART overhead. Test: compiles Test: atest FrameworksServicesTests FrameworksCoreTests Bug: 165817914 Exempt-From-Owner-Approval: no-op refactoring Change-Id: I1f3e77120979e2f336e5f42e4ec6e459d6492083
2020-10-16Remove PackageManager.getResourcesForApplicationAsUser APIFelka Chang
To switch another user to do something should create the context of the specified user by using Context.createContextAsUser rather than call *AsUser API directly. Test: make -j droid cts gts vts Test: make -j docs Test: atest SystemUITests \ FrameworksServicesTests:com.android.server.pm Test: atest CtsBlobStoreTestCases Bug: 170928809 Change-Id: Ia9d376b579ef4d88637d51a5fb3947faa71c76ca
2020-09-27Merge "Disable use of RevocableFileDescriptor for blob reads." into ↵Sudheer Shanka
rvc-qpr-dev am: b4289dbe41 am: 641b12e328 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12683844 Change-Id: Ie689ec6ef51e31437ddf0d9c75ec7e5327c20562
2020-09-25Disable use of RevocableFileDescriptor for blob reads.Sudheer Shanka
We are using RevocableFileDescriptor as a precaution to make sure when blobs get deleted, apps are not holding onto those fds and preventing disk space from getting freed but this might not be much of a concern since non-system apps cannot be persistent (so they eventually gets killed) and apps can already fill up disk space if they want and given that we are seeing issues with fuse reads, disabling the use of RevocableFileDescriptor for blob reads. Bug: 162662834 Test: atest --test-mapping apex/blobstore Change-Id: I13a504fac154e2a3cacfb37e83a9cfec4ae80b63
2020-07-14Replace manual creation of StatsEvent objects with their appropriate ↵Salud Lemus
buildStatsEvent() method Currently, Java clients are manually creating the StatsEvent objects which can lead to errors. Now that there is support for pulled atoms for stats-log-api-gen for Java clients, use the appropriate buildStatsEvent method that was auto generated by stats-log-api-gen. Bug: 160368804 Test: Ran `m` and completed successfully Test: Ran `atest statsd_test` and all CTS tests passed Test: Ran `atest UidAtomTests` and all CTS tests passed except for the CTS tests related to a SIM card because the device does not have a SIM card Change-Id: Id229ba5ca94203135a8a5e2607de9844e0432ce1
2020-06-29Merge "Add limits on BlobHandle label and lease expiry strings." into rvc-devSudheer Shanka
2020-06-29Add limits on BlobHandle label and lease expiry strings.Sudheer Shanka
Fixes: 157221032 Test: atest --test-mapping apex/blobstore Change-Id: Ic8eac1d956b60fbcd171c2705d5a151c7d5baf87
2020-06-26Update commit/lease failure reasons for atoms logging.Sudheer Shanka
Bug: 144155167 Bug: 159754450 Test: atest --test-mapping apex/blobstore Change-Id: I2f511e00084f5b28db60a83c3237536181f5eb35
2020-06-25Merge "Ensure expired leases are ignored and deleted." into rvc-devSudheer Shanka
2020-06-25Ensure expired leases are ignored and deleted.Sudheer Shanka
Also, fix the lease validity check. Fixes: 159873312 Test: atest --test-mapping apex/blobstore Change-Id: I174794c6db9e155d08fae884c247d189e077289b
2020-06-24Revoke any open fds when deleting a session/blob.Sudheer Shanka
Fixes: 159832638 Test: atest --test-mapping apex/blobstore Change-Id: I97d97ec2874ace574d6d64c4793a6b374949725e
2020-06-24Add a limit on no. of active sessions, committed/leased blobs.Sudheer Shanka
Bug: 159754450 Test: atest --test-mapping apex/blobstore Change-Id: Ib8a78b8dcf396e452081c8526fb8a9efd9dde039
2020-06-19Delay deleting the blob after the last lease is released.Sudheer Shanka
Bug: 159485704 Test: atest --test-mapping apex/blobstore Change-Id: Iab153ae00107ee35705d7c17a3e51e7308e2e823
2020-06-19Merge "Make usage of revocable fds for reads configurable." into rvc-devSudheer Shanka
2020-06-18Make usage of revocable fds for reads configurable.Sudheer Shanka
Bug: 159374701 Test: atest --test-mapping apex/blobstore Change-Id: If449197938fe457726bb5ec18663cfd7a500eb93
2020-06-16Include blob sizes in blob_store service dump.Sudheer Shanka
+ Correctly synchronize a couple of methods (used for debugging) which were missing the locking. + Log entries deleted during idle maintenance window which happens at most once every 24 hrs. Fixes: 158351456 Test: atest --test-mapping apex/blobstore Change-Id: I5d1a1ffc28b009274d981d1ccdac30092d4c3732
2020-06-15Clear data from failed commits and recommits properly.Sudheer Shanka
+ Make sure randomly generated ids are not -ve. Bug: 158921743 Test: atest --test-mapping apex/blobstore Change-Id: Ic30e60ccf3c2161973ec447b518a2556b45a647a
2020-06-13Merge "Add BlobStore atoms" into rvc-devMichael Wachenschwanz
2020-06-13Add BlobStore atomsMichael Wachenschwanz
Bug: 144155167 Test: atest android.cts.statsd.atom.UidAtomTests Change-Id: I650dfdf6e2f7b6fff29ba6fdf5010a151fd503b5
2020-06-13Merge "Move RevocableFileDescriptor creation outside the locked section." ↵Sudheer Shanka
into rvc-dev
2020-06-10Merge "Log the error when committing the blob fails." into rvc-devSudheer Shanka
2020-06-10Merge "Use blobs expiry time in LeaseInfo if the lease expiry time is 0." ↵Sudheer Shanka
into rvc-dev
2020-06-09Merge "Include size of the blobs in BlobInfo." into rvc-devTreeHugger Robot
2020-06-08Log the error when committing the blob fails.Sudheer Shanka
Bug: 158332607 Test: atest --test-mapping apex/blobstore Change-Id: I5a7cf24b7b3d6a7b33ef18e20f7a0245857f5011
2020-06-05Include size of the blobs in BlobInfo.Sudheer Shanka
Bug: 156671006 Test: manual Change-Id: I1d6eeb16e42e2128244959b4de761a6977b70ca3
2020-06-05Use blobs expiry time in LeaseInfo if the lease expiry time is 0.Sudheer Shanka
Fixes: 158199358 Test: manual Change-Id: If78aca785dd5afb7e3605266e004d9956a1f4ae8
2020-06-04Move RevocableFileDescriptor creation outside the locked section.Sudheer Shanka
If creating the RevocableFileDescriptor while holding the lock gets stuck, it could crash the system. So, take it out of of the locked section. Also, close the underlying fd if RevocableFileDescriptor creation fails. Bug: 157535024 Test: atest --test-mapping apex/blobstore Change-Id: I9948307f7e5cdaa1ac886531cf6e67f5a7dd0547
2020-05-28Persist blobstore session creation time.Sudheer Shanka
This can be used for checking if a session should be considered expired and needs to be deleted. Bug: 147722548 Test: atest --test-mapping apex/blobstore Change-Id: I0f500b2baf71f8104a0a6c233071261f9ba9cc14
2020-05-27Don't allow expired blobs to be accessed.Sudheer Shanka
Bug: 147722548 Test: atest --test-mapping apex/blobstore Change-Id: I7294124ba5ce3dcf42a0e7e9858311b1604ae185
2020-05-26Update a couple of blobstore params to be configurable.Sudheer Shanka
Instead of hardcoding values for IDLE_JOB_PERIOD_MS and SESSION_EXPIRY_TIMEOUT_MS, make them configurable. Bug: 157503601 Test: atest --test-mapping apex/blobstore Change-Id: I4846a98144224873444d4d73b2bedde258992ac4
2020-05-20Update queryBlobsForUser() impl to handle special user ids.Sudheer Shanka
+ Fix blob_store dumpsys to handle "-a" option. Bug: 157088471 Bug: 157165696 Test: atest --test-mapping apex/blobstore Test: manual Change-Id: Ibf3413385bb3227a874027aa542f94084fbcd289
2020-04-22Update config value when the corresponding DeviceConfig prop changes.Sudheer Shanka
Bug: 154690792 Test: manual Change-Id: Ic3ab059540188fe7feb582aa02e9859a222d7445
2020-04-09Keep track of commit times for each blob.Sudheer Shanka
Also, add a commit cool-off period such that any new commits of the same data blob from the same committer will be treated as if they occurred at the earlier commit time. This is to ensure apps don't keep on committing the same blob and prevent deletion of it. Bug: 151378266 Test: atest --test-mapping apex/blobstore Change-Id: I44b3fddbc465b7d6f00f40b299b91d3d84740989
2020-03-27Merge "Ensure waitForIdle() waits until pending messages are handled." into ↵Sudheer Shanka
rvc-dev
2020-03-25Restore existing committer info correctly when a new commit fails.Sudheer Shanka
Fixes: 152425652 Test: atest --test-mapping apex/blobstore Change-Id: Ife0cd417cedce603a907efd5ca261408ef599e9f
2020-03-22Merge "Add BlobStoreManager.getRemainingLeaseQuotaBytes." into rvc-devSudheer Shanka
2020-03-20Add BlobStoreManager.getRemainingLeaseQuotaBytes.Sudheer Shanka
+ Add LimitExceededException which can be used to indicate that an app is doing something that will cause it to violate any limits enforced by the System. Bug: 150239703 Test: atest --test-mapping apex/blobstore Change-Id: I7584d1b8618be546080b0eddb2fe35de2611f9e7