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
These information are needed to isolate apps data directory.
Only normal app zygote forks require these info, as
- system process - Does not need data isolation
- app zygote - It's for generating isolated process, so don't need
access apps data.
webview zygote - Similar to isolated process, don't need to access
apps data.
Bug: 143937733
Test: Able to see the package name, volume uuid, and inode nuber
for each visible package in zygote
Change-Id: I281e113d2a13d103c8967b37a06b639c5a5a8ff8
Expose @hide APIs referenced by ParceledListSlice/
BaseParceledListSlice as public APIs.
ParceledListSlice will not be made a stable API
in Android R. Thus, allow it to be copied into
modules that need it by ensuring it does not use
any @hide APIs.
Bug: 145317012
Test: compiles
Change-Id: Ife85b66005ba22b03c09bf9446661368dea31945
The intro text says PowerManager is discouraged, and almost
all the available wakelock options have long been deprecated.
Given that, I think it makes sense to remove most of that
intro and just point devs to FLAG_KEEP_SCREEN_ON instead.
Staged to:
go/dac-stage/reference/android/os/PowerManager
Test: make ds-docs
Bug: 145699347
Change-Id: I517366903f3d9743166d7edaddc08471af0803d9
With the newly added flag for Settings developer options, which is now
used to change the state of FUSE, PROP_FUSE now acts as the snapshot
feature flag for the current boot.
Also, on a reboot PROP_FUSE_SNAPSHOT was always set to PROP_FUSE or
the default value (false) if PROP_FUSE is not set.
Since PROP_FUSE now replaces PROP_FUSE_SNAPSHOT, it always needs to be
set to some value after a reboot. PROP_FUSE is initialised to the default
value (false) only once, after that it takes value from the latest
changed flag.
Bug: 145391093
Test: Manual (adb shell ls /sdcard works)
Test: atest AdoptableHostTest
Change-Id: I3abb8690a50f542b2567c495ef9942a643be457d
FULL and PROFILE user types now have their default restrictions
delineated in UserTypeFactory. The restrictions for these user types can
be customized in config_user_types, along with the other user type
customization.
Note: even though FULL user types can now be customized, the only
supported customization is user restrictions. Moreover, new FULL user
types cannot be defined.
This cl also has the following repercussions:
-When a user is created (but not yet started), the applied restrictions
are not propagated as an update (prior to this, the restrictions for new
users - other than guest - were set via setUserRestriction, which did
more than just store the data). When the user is started, the
restrictions will still be propagated.
-When a user is created via adb, its default restrictions are applied.
Previously this was not the case except for guest users.
-When an Admin user is created/set, it is now the callers responsibility to
adjust its restrictions. UserManager will no longer automatically remove
the DISALLOW_SMS/DISALLOW_OUTGOING_CALLS restrictions for Admins.
Also note that Restricted Users have additional hardcoded restrictions,
indepent of this cl.
Test: atest UserManagerServiceUserTypeTest
Test: atest UserManagerTest
Bug: 142482943
Bug: 143491938
Change-Id: Idfec610da871aea2bc7109d11d1eb9a957e080a4
Exposed the @hide constants from BatteryStats used in
BatteryStatsManager as @SystemApi.
Bug: 146009681
Test: Compiles
Change-Id: If1c798181b4c160453c7775bd6bb779b9e81a6ee
Test: boot the system, see log entries like this:
4030 E Binder : Outgoing transactions from this process must be FLAG_ONEWAY
Change-Id: Ie1b3c76ec08aecc706a5edc5a6d2b4b946895ed9
Test: Java in process API still work correctly - tested locally with test app + adb overrides.
Test: atest com.android.internal.os
Test: atest com.android.server.am
Bug: 145743810
Change-Id: I6645a7ec767400cd579207f0eed1e6e7136c8a6f
Merged-In: I6645a7ec767400cd579207f0eed1e6e7136c8a6f
Test: Java in process API still work correctly - tested locally with test app + adb overrides.
Test: atest com.android.internal.os
Test: atest com.android.server.am
Bug: 145743810
Change-Id: I6645a7ec767400cd579207f0eed1e6e7136c8a6f
As we are elimating the Binder notifications for the sysprop update for
atrace, we no longer have a callback that can be used to read the new
value of the enabled tags.
@CritivalNative calls are very fast (25 ns) so the overhead of always
going to native code to read the tags is negligible.
Test: flash & boot
Test: adb shell su root atrace -t 10 ss
Test: adb shell su root atrace -t 10 wm
Bug: 137366208
This is a cherry-pick of 9fd210224a
Change-Id: I1a07fefd751ee28ca9a632a3d78a2925e8827b9c
Merged-In: I1a07fefd751ee28ca9a632a3d78a2925e8827b9c
There is no way to recover the FUSE filesystem once the MediaProvider
process has died; the kernel and userspace are out of sync at that
point, and libfuse will return -EIO on all requests.
Now when the process dies, tell StoragemanagerService that it needs to
reset all volumes for a user. Since we currently don't have a way to do
this for one user, just call through to H_RESET. This can be optimized
later. This also means we no longer need to keep a hold of the FUSE fd
in system_server; just pass it along directly when we start a session.
Bug: 137890172
Test: atest AdoptableHostTest
Change-Id: I2e6952ccece6bf2945b4ed81c70330b278554d13
As we are elimating the Binder notifications for the sysprop update for
atrace, we no longer have a callback that can be used to read the new
value of the enabled tags.
@CritivalNative calls are very fast (25 ns) so the overhead of always
going to native code to read the tags is negligible.
Test: flash & boot
Test: adb shell su root atrace -t 10 ss
Test: adb shell su root atrace -t 10 wm
Bug: 137366208
Change-Id: I1a07fefd751ee28ca9a632a3d78a2925e8827b9c
* changes:
statsd: Allow wifi mainline module to log its metrics
wifi-services-srcs: Stop using KeyValueListParser from android.internal
WifiNetworkSuggestion: Don't store packageName/uid
WifiAwareManager: Add requestMacAddresses @hide API
UserManager: Add StringDef for all restrictionKey values
WifiActivityEnergyInfo: Use time values for energy calculation
Based on API council feedback for the recently added
hasUserRestrictionForUser API.
Bug: 144924593
Test: Compiles
Change-Id: Ib78c334d48a57c2e97f8f1b29d7d663d3eb2f1c1
This implementation continue to uses libbinder, as opposed to
libbinder_ndk.
We also move many (but not all) statsd aidl files from
frameworks/base/core into the apex.
Test: m -j128 && bit statsd_test:*
Change-Id: I95f06e937e50c1e2a638163b13587682402956a7