Add an API for priv and system app to register a dump callback with
Incident Service.
Bug: 145924375
Test: Register a callback dumping a string. Capture an incident report
and verify that the customized section exist.
Change-Id: I6fff6c1ee97e25963068d284ba37adce1bb5ec31
Plugging the binder instance that dies. This helps a single
DeathRecipient to listen for multiple binder deaths.
Test: atest FrameworksCoreTests:BinderDeathRecipientTest
Bug: 135633339
Change-Id: I976ee2a138877830885ee1cbbd2b313ecb87aeb3
Added user restrictions to the list of user restrictions that are
applied globally when set on the parent profile DPM instance
by the profile owner of an organization-owned device.
Bug: 147339402
Test: Manual testing with TestDPC
atest com.android.server.pm.UserRestrictionsUtilsTest
atest com.android.server.devicepolicy.DevicePolicyManagerTest
atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testDevicePolicyManagerParentSupport
atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testUserRestrictionsSetOnParentAreEnforced
Change-Id: If991d28a085a1ff08d8376163192972277a5e4b3
Expose system apis / permissions needed by the telephony module to
communicate with the system server for time and time zone detection.
There are also small improvements for @Nullable.
Bug: 147012511
Test: build only
Change-Id: I27e5aa4c594d5fbad0b6f043afb9e910dcba4349
The Process.WIFI_UID constant is referenced by the wifi mainline module & hence
needs to be a formal API constant. There are some other
subsystem uid's like PHONE_UID which are already public constants, so
there is precedence for making these uid's public if necessary?
Bug: 147396785
Test: Compiles
Change-Id: I85008965f9017e208c501c5a349f7e60cc102e0f
Rename android.util.TimestampedValue to android.os to avoid dependency
from android.util onto android.os, which is disallowed by lint.
Bug: 147012511
Test: boot
Merged-In: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
(cherry picked from commit d159015e54)
Previously when FUSE was enabled, we gave all apps requesting
WRITE_MEDIA_STORAGE or install permissions a direct view
to the lower filesystem. This was way too broad for a few reasons:
1) WRITE_MEDIA_STORAGE will be deprecated; holding that permission by
itself shouldn't grant you any special privileges.
2) Installers should only be able to write OBBs
The only other exceptions that are allowed to bypass scoped storage are
the process hosting the DownloadProvider and the process implementing
the MTP server; both of these have legit reasons for writing in
Android/. The way this is currently implemented is by giving these apps
the SDCARD_RW gid, which has write access in the default Android/
sdcardfs view.
Installers will be further scoped down to be only able to access OBB
in a follow-up CL.
Bug: 134706060
Bug: 146490513
Test: DownloadProvider can download
Play + OBBs work
Writing in Android/ through MTP works
Change-Id: Iff8681732d0c1124e24e5347f7dcb64b781c1e8c
Re-uses the code from Parcel to make it consistent with binder IPC exception
stacktrace propagation behavior.
Test: atest AndroidFutureTest
Change-Id: I5c73c42544af5bf964c7b6cd646bcb347e3ae146
The bulk of the work needed to get MediaProvider building against
the "system_current" SDK surface has been slowly merged over the
last few months, and this change makes the last few adjustments.
This adds a new StorageVolumeCallback which is simpler version of
StorageEventListener that simply delivers the changed StorageVolume.
Move DownloadManager logic into a onMediaStoreDownloadsDeleted()
method which hides the implementation details of how the OS connects
with that implementation.
Make local copies of some ExifInterface parsing logic; they could
be added to the androidx version in an unbundled release. Make a
local copy of RedactingFileDescriptor, since it's only needed for
the next few weeks until FUSE is globally enabled.
Bug: 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Ib416eb8724781bdd234c8b7d728dee8b695ad6ac
Rename android.util.TimestampedValue to android.os to avoid dependency
from android.util onto android.os, which is disallowed by lint.
Bug: 147012511
Test: boot
Change-Id: I4b84db03c8ad24bbef63e45d6d15fb306a10364e
We now transform the realpath of /sdcard with FUSE mounts from
/mnt/user/<userid>/emulated/<userid> to
realpath of /storage/emulated/<userid> which is what is expected
without FUSE when matching with VolumeInfo#path.
Test: atest
android.os.storage.cts.StorageManagerTest#testGetExternalUuidForPath
Bug: 135341433
Change-Id: I8ffe8ac7109329d360fe18ce3e6ed227672b77bc
The feature is currently broken in master - so this CL fixes it.
1. Prevent UserManager from destroying storage for precreated users.
2. Modify UMS.getUserIds to exclude precreated users.
3. Remove pre-created users if the system has upgraded.
4. Read permissions during conversion to a "real" user. Permissions should have been granted during the pre-creation. If we cannot read permissions, re-grant them for the user.
Fixes: 143464654
Fixes: 143463955
Test: Repeated subsequent boots; observing logs; boot systrace; applied OTA, verified user cleanup
Change-Id: Ib25eac7c27ec3aea2b2a7eef040651bd06590a2e
(cherry picked from commit debb009a2c)