| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Context.getDataDir() for SDK sandbox incorrectly returns /data volume
path even if the actual storage is on another volume. This CL sets the
correct storage path by checking the uuid from the ApplicationInfo of
the client app and setting it to the same value.
Bug: 229736419
Test: atest
SdkSandboxStorageHostTest#testSdkSharedStorage_DifferentVolumeIsUsable
Change-Id: Ib72ea559363cdeb4b7cfcc2f48ca8ddace96e352
Merged-In: Ib72ea559363cdeb4b7cfcc2f48ca8ddace96e352
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, sandbox cannot call any apis from StorageManager that checks
calling package has same uid as calling uid. This CL fixes that by using
pm.isSameApp() api.
Additionally, since Environment.java fetches the initial application
context, the uid for that does not fall under the sandbox uid range. It
falls under app uid range. We fix the problem by checking for
PROPERTY_NO_APP_DATA_STORAGE flag on the application.
Bug: 228424287
Test: atest CtsSdkSandboxInprocessTests (see ag/17657742)
Change-Id: I8d9fca369cfbed47b40a42a44a40ff73acb712ec
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
For WebView to run in an sdk sandbox process, Context.getDataDir() needs
to return the shared sandbox storage. This CL sets the value in
LoadedApk while binding the application and modifies bindSdkSandbox API
to take in the client app package name to use in the path.
Test: Manual, check that WebView in sandbox tries to access sandbox
shared storage
Bug: 216284889
Change-Id: I1f8bb7e533d155050710866b80047ec849a98f35
|
| |\
| |
| |
| |
| |
| |
| |
| | |
31f779f949 am: 079b5b2e27 am: b5b91ee453
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1993550
Change-Id: I0fe8899299577c8b2b8381e4ea385fd982c74eb7
|
| | |\
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
31f779f949
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1993550
Change-Id: Iebb35e4099506f05f73c59dd689e84e75ae8756d
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Bug: 208676063
Test: manual tests
Change-Id: Ice3b706222aa1f77beadb1b9f4ae93f0d796a0b0
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Bug: 218314884
Bug: 220320098
Test: presubmit
Test: atest PackageManagerShellCommandTest
Test: atest SdkSandboxPermissionTest
Change-Id: I9fb98e0caee75bdaaa35d11d174004505f236799
|
| |/ /
| |
| |
| |
| |
| | |
Bug: 217538016
Test: Inspect /storage for supplemental
Change-Id: Ibd29834b0d611a7313890fe06428cd73021ebf4f
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Note alternatives for getExternalStorageDirectory() and
getExternalStoragePublicDirectory()
Change-Id: Ibb7238e0dfc780a88940507aaf1d5cf4103bbee4
BUG: 194164033
Test: treehugger build
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Android 10 did not support file path operations for apps in
scoped storage. But Android 11 and above do support file path
operations for such apps.
Undeprecate getExternalStorageDirectory() and
getExternalStoragePublicDirectory() to reflect the current level of
support.
BUG: 153562415
Test: m
Change-Id: Ibd93ca07a0c08b11a82b70dca8c2cd7d49600354
(cherry picked from commit 74bf4e682dadfcc5276d36fd2f59f375b6dfd3c2)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Android 10 did not support file path operations for apps in
scoped storage. But Android 11 and above do support file path
operations for such apps.
Fix docs for getExternalStorageDirectory() and
getExternalStoragePublicDirectory() to reflect the current level of support.
BUG: 153562415
Test: m docs
Change-Id: I8bc2a4aa266dbbcc391b415e6209ed6e5d56fe97
|
| |
|
|
|
|
| |
Test: build
Bug: 181350427
Change-Id: I7ad390fa3a11f9bffc5c088d311c1d2af7838a3e
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If OP_NO_ISOLATED_STORAGE app-op is granted it gives apps
legacy-app's access. Update public API for apps to check the
state of legacy external storage access isExternalStorageLegacy()
to respect OP_NO_ISOLATED_STORAGE appop.
Bug: 172934418
Test: android.scopedstorage.cts.device.ScopedStorageDeviceTest#testDefaultNoIsolateStorageFlag
Test: atest CtsScopedStorageHostTest
Change-Id: I5cc2dfabedac57fe4183a586549c979145abcbfb
|
| |/
|
|
|
|
| |
Bug: 161526501
Test: build and format virtual sd card
Change-Id: I320179dd9ca30007e1e5fc9c1e0fb64b9635a186
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
This is a resubmit of ag/12929664 with some APIs excluded that caused
test failures; see bugs 171886397, 171888296, 171864568.
APIs excluded:
Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord;
Landroid/os/Process;->myPpid()I
Landroid/os/SharedMemory;->getFd()I
Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I
Bug: 170729553
Test: Treehugger
Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
|
| |
|
|
|
|
|
|
|
| |
This reverts commit 72f07d6a8a32db4a0dedd7682a0b3385be2b9cd6.
Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397
Bug: 171886397
Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
|
| |
|
|
|
|
|
|
|
|
| |
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
Bug: 170729553
Test: Treehugger
Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
I ran these commands:
cd frameworks/base
grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
's/\@SystemApi[\s\n]+(\@\w+[\s\n]+)?\@TestApi/\@SystemApi\1/gs'
grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
's/\@TestApi[\s\n]+(\@\w+[\s\n]+)?\@SystemApi/\1\@SystemApi/gs'
Bug: 171179806
Test: m checkapi
Change-Id: I772790b783b0a8730b8bf680c9e569a886b8d789
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To speed up recurring ApplicationInfo creation, this caches
the the appInfoFlags/appInfoPrivateFlags at parse time, since
they're immutable at that point. This saves having to calculate
it hundreds of times for all the packages in getInstalledPackages
or similar.
This also saves the base app data directories for the system user,
or user 0, interning the strings since they're shared across
packages with the same volume UUID. A better solution would
cache these paths during boot scan and re-use the strings directly
rather than re-building and relying on interning, but there was
no good mechanism for that.
This decreases string append computation time and compromises
between persistent memory and performance.
This also compacts boolean fields into a bitset, decreasing
the amount persisted in both the object memory and the Parcelable
output.
In combination these changes result in a net decrease in memory
usage, although the difference is neglible, on the order of
~4KB for 181 packages or ~22B a package. The increase in speed is
roughly 2/3rds saved off the total time of generateWithComponents.
An important note is that hideAsParsed/hideAsFinal are now
required to be called because they now calculate the derived
fields to be cached.
Bug: 153656459
Test: atest CrossProfileAppsServiceImplRoboTest
Test: atest PackageManagerComponentLabelIconOverrideTest
Test: atest PackageParserTest
Test: atest UserSystemPackageInstallerTest
Test: atest DexoptUtilsTest
Test: atest com.android.server.pm.parsing
Test: atest PackageInfoUserFieldsTest
Test: atest com.android.server.pm.ScanTests
Test: atest android.content.pm.cts.PackageManagerTest
Change-Id: I977edb9dec720893ccb1ce5b9df33733c408d3c1
|
| |\
| |
| |
| |
| |
| | |
1ed01451ed am: 39d29f922e am: 4a6798c9a9 am: 35a7506d2d
Change-Id: I2b89c355c16f7e313b3a377f3b0280c90dc92cdc
|
| | |\ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For use by DownloadManager.
Bug: 153504419
Test: atest CtsDownloadManagerInstaller
Change-Id: Ifd45ad779087fb5ba3d885d8e648bc24bc8656eb
|
| |\| |
| | |
| | |
| | |
| | |
| | | |
am: 63c1271fbc am: 04ddd8759a am: f63b392570
Change-Id: I36c5448aea94ea91d888e350bbc231e2f902834b
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| | |
To have a way to verify behavior of more directories, mark more
directory getter APIs @TestApi.
Bug: 148664742
Test: atest SysConfigTest#testStageWhitelist
Change-Id: I2d22412935b24ec4c33d8d1b3a7fbb7df4a08841
|
| |\|
| |
| |
| |
| |
| | |
a32954ec22 am: ca6a0f9999 am: 6b39d37d39 am: 3c4a4a4bb3 am: 4d0f93b743
Change-Id: Ifd7eacd036405016177569d0c0eb11083ad4775e
|
| | |
| |
| |
| |
| |
| | |
Bug: 150672994
Test: builds
Change-Id: I90fcbfb8d52e6883c12c7a76765767eaed370afe
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently the flags definition is in MediaProvider, which is an
apex module (updatable), and the flags values are now used in
frameworks/base as well (non-updatable).
Good to have flags definition in the constant component.
Bug: 150593967
Test: atest ExternalStorageHostTest
Test: atest com.android.providers.media
Test: manual
Merged-In: I0b06c068cb3957a7db8af5e14598724f72122736
Change-Id: I0b06c068cb3957a7db8af5e14598724f72122736
(cherry picked from commit 4a989379e84d75e4970c3a7b77a1ea64f2fb59b5)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Scoped Storage status of an app can be changed by using compat flags,
as apps can chose to opt-in/opt out of Scoped Storage using these flags.
See ag/10406320 for more details.
Update documentation of isExternalStorageLegacy() method.
Remove checks around INSTALL_PACKAGES and OP_REQUEST_INSTALL_PACKAGES as
that does not allow legacy external storage.
Remove check for WRITE_MEDIA_STORAGE as its value is now
reflected by OP_LEGACY_STORAGE (ag/10162772)
Bug: 132649864
Test: atest ExternalStorageHostTest
Test: atest com.android.providers.media
Test: manually using StorageTest app
Merged-In: Id53da8f8783455038bad101e6ac50ba66b595012
Change-Id: Id53da8f8783455038bad101e6ac50ba66b595012
(cherry picked from commit f8af82046a52e588b56ca893aaf47de620f4c7ad)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a fix in response to developers' feedback on DP1.
Add Environment API that enables apps to check whether they have All
Files Access special app access. The API encapsulates the actual
mechanics of the check, which are as follows:
* First check MANAGE_EXTERNAL_STORAGE app-op,
if it's allowed, return true. If it's denied (ignored or errored),
return false.
* If the mode is default, then check for MANAGE_EXTERNAL_STORAGE
permission, if it's GRANTED (not just declared), then return true,
else return false.
Also add test.
Test: atest EnvironmentTest # not CTS
Fix: 150115615
Merged-In: I0574827c22960bf8f074313d983f289be7142149
Change-Id: I0574827c22960bf8f074313d983f289be7142149
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a fix in response to developers' feedback on DP1.
Add Environment API that enables apps to check whether they have All
Files Access special app access. The API encapsulates the actual
mechanics of the check, which are as follows:
* First check MANAGE_EXTERNAL_STORAGE app-op,
if it's allowed, return true. If it's denied (ignored or errored),
return false.
* If the mode is default, then check for MANAGE_EXTERNAL_STORAGE
permission, if it's GRANTED (not just declared), then return true,
else return false.
Also add test.
Test: atest EnvironmentTest # not CTS
Fix: 150115615
Change-Id: I0574827c22960bf8f074313d983f289be7142149
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently the flags definition is in MediaProvider, which is an
apex module (updatable), and the flags values are now used in
frameworks/base as well (non-updatable).
Good to have flags definition in the constant component.
Bug: 150593967
Test: atest ExternalStorageHostTest
Test: atest com.android.providers.media
Test: manual
Change-Id: I0b06c068cb3957a7db8af5e14598724f72122736
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Scoped Storage status of an app can be changed by using compat flags,
as apps can chose to opt-in/opt out of Scoped Storage using these flags.
See ag/10406320 for more details.
Update documentation of isExternalStorageLegacy() method.
Remove checks around INSTALL_PACKAGES and OP_REQUEST_INSTALL_PACKAGES as
that does not allow legacy external storage.
Remove check for WRITE_MEDIA_STORAGE as its value is now
reflected by OP_LEGACY_STORAGE (ag/10162772)
Bug: 132649864
Test: atest ExternalStorageHostTest
Test: atest com.android.providers.media
Test: manually using StorageTest app
Change-Id: Id53da8f8783455038bad101e6ac50ba66b595012
|
| |
|
|
|
|
|
|
|
|
| |
as /product may be a symlink to /system/product.
Bug: 147688127
Bug: 147701212
Test: pass android.telecom.cts.BackgroundCallAudioTest on GSI
Change-Id: Ie3588edece1e19ad12bdbf5825b9ff7dfc31cecd
|
| |
|
|
|
|
|
|
| |
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I534e3fd1305e2f4af076986770033478448a665c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An upcoming change will move MediaStore to be within the recently
created MediaProvider APEX. This means that MediaStore will need to
be fully built against @SystemApi, and so this CL adjusts APIs to
support a clean transition:
-- Listing of "recent" storage volumes and scan paths for "internal"
storage is now handled by StorageManager directly, so that partners
retain control over what is deemed recent.
-- StorageVolume now returns the MediaStore volume name and the
filesystem directory where its contents are presented to apps.
-- Conversion of legacy thumbnail "kind" values to dimensions now
happens directly inside MediaStore.
-- PendingParams and PendingSession are completely removed.
-- Contributed media APIs are completely removed.
-- Media for demo users is now surfaced as a unique StorageVolume.
-- Migrate most MediaStore APIs to accept ContentResolver, which
supports easy usage of ContentResolver.wrap().
Bug: 144247087, 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: in-place refactoring
Change-Id: I445528b2779bb37b9f2558e67a3cfc9f60412092
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds initial support for scanning APEX directories looking
for APK, and make them available to the system as normal system APKs.
For now privileged apps and resource overlay are not supported, and the
support will be added in a later CL.
Scanning features are inherited from the partition in which the
preinstalled version of a given APEX module is located.
Supports both flattened and un-flattened APEX configurations.
Bug: 138429615
Test: Compiled a test apex with the Snake app installed in it. Verified
app is correctly scanned and usable. Tried also installing the apex in
/vendor and /product.
Change-Id: I8fb91317da0296567403b2b62babbb71e4b48938
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have getContentUri() for entire collections of items, but we
only have ID-specific overloads for some of the MediaStore classes;
let's get them all added for consistency.
Remove primary/secondary directory logic, which was replaced by
new RELATIVE_PATH column before Q launched.
Bug: 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: trivial API refactoring
Change-Id: Iae4e7fe57adff071c35af459e31223a1fd05fef2
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit is mainly from I7a6a30bf8e8db9f2738594d187bb9148f138b8da, so
test cases and features are mostly same.
We change product_services partition name to "system_ext" because this
partition's purpose changes.
- installing a RRO package for framework from /system_ext/overlay
- installing apps from /system_ext/app
- installing priv-apps from /system_ext/priv-app
- installing permissions from
/system_ext/etc/[default-permissions|permissions|sysconfig]
Bug: 134359158
Test: `mma` under frameworks/base/tests/[libs|privapp]-permissions
adb sync && adb reboot
adb shell cmd package list libraries
=> confirmed com.android.test.libs.system_ext library
adb shell cmd package dump \
com.android.framework.permission.privapp.tests.system_ext
=> confirmed that the package is a priv-app
Change-Id: Ibbccbba64156a7bc464ffb3785fb8fe69ebb973c
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Earlier, this API only used to consider op_legacy_storage
appop to decide whether an app will get legacy storage view
or not but there are few other factors it needs to consider
like whether the app has WRITE_MEDIA_STORAGE permission or
whether app was allowed to be an installer in which case it
will get legacy access.
Bug: 132760141
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Change-Id: I227a171bf40e43e135e1a6dbc819cfad21d91520
|
| |
|
|
|
|
| |
Bug: 131469880
Test: none
Change-Id: I52e009c1ebfc59958d04e5b33a6f4228cdecfcf4
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
-- Update behavior of DownloadManager.setDestinationUri(),
DownloadManager.setDestinationInExternalPublicDir() and
DownloadManager.addCompletedDownload() based on the latest
storage re-design. Essentially, going forward these APIs
will only allow downloading files into package owned dirs
or the top-level Download dir.
-- Allow some system components to specify
MediaColumns.OWNER_PACKAGE_NAME when inserting items into
MediaProvider.
-- Don't copy DownloadManager.COLUMN_TITLE to MediaProvider.
DownloadProvider and MediaProvider have different constraints
around "title" and there isn't really a need to keep these
in sync.
-- Sanity check file download paths hinted by apps.
-- Remove sandbox related logic in DownloadProvider.
Bug: 120879208
Bug: 128630262
Bug: 130797842
Test: manual
Test: atest DownloadProviderTests
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest cts/tests/app/DownloadManagerLegacyTest/src/android/app/cts/DownloadManagerLegacyTest.java
Test: atest cts/tests/app/DownloadManagerApi28Test/src/android/app/cts/DownloadManagerApi28Test.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: If48bc9ecf9ed94412c6c62ce4e5e6a55fff9b789
|
| |/
|
|
|
|
|
|
|
| |
We recently changed the attribute name, and the Environment method
used to test it should also change.
Bug: 130984886
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Change-Id: I8ed7fa9232a646b2f2f280c4b82dbc6d3cf31426
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change makes storage a soft restricted permission. When the
permission is whitelisted for an app then hodlding it allows the
app to access the full SD card as on a P device. If howerver, the
permisison is not whitelisted for an app then holding it allows
accessing the visual/aural collections in media store while the
app would run in its own isolated storage sandbox.
This change also connects the opt in/out application attribute
to how external storage is mounted remocing temporary code. The
attribute was renamed to convey that opting in legacy mode is
not somethung that is desirable or would be available in the long
run.
White at this also fix the default state of app ops for restricted
permissions to avoid allowing ops for non requested restricted
permissions to every UID as component access could skip permission
checks by cannot skip app op checks.
bug:130327036
atest CtsPermission2TestCases
atest CtsPermissionTestCases
atest CtsAppOpsTestCases
atest atest CtsAppSecurityHostTestCases:android.appsecurity.cts.ExternalStorageHostTest
atest CtsAppSecurityHostTestCases:android.appsecurity.cts.PermissionsHostTest
Change-Id: Ibb23cbb6a5c66d9c3823cc13562a1b903b391ffd
|
| |
|
|
|
|
| |
Test: apps don't show as accessing location on start
Fixes: 130187488
Change-Id: Iacd7edbadab64f43229b5d6f8056bb076c4f280c
|
| |
|
|
|
|
|
|
|
| |
It needs to use the same STOPSHIP logic for consistency with the
two other enforcement sites across the OS.
Bug: 129487770
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Change-Id: I7a3fa836e0795912c264aae58a55472ffae3d8c3
|
| |
|
|
|
|
|
|
|
|
|
| |
We're iterating on the design to let apps request via a manifest
flag if they'd like to opt-in or opt-out of storage sandboxing. The
default is to assume that P apps don't allow sandboxing, and that
Q apps do allow sandboxing.
Bug: 129487770
Test: manual
Change-Id: I8fddb35eed412c78622be4ccae57c7b7d2aa1286
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For packages:
android.os
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: I4ece0a3f37f88fc2508cb965092aed7cabc61819
|