The previous version didn't close its FDs for directories, and called
fsync() on the wrong FDs. To make sure a rename() is persisted, we
need to call fsync() on the FD of the parent directory, because file
names are stored in directory entries instead of inodes.
Also removed the need for dedicated native code by calling the Os
class directly.
Fixes: 139302541
Bug: 138866253
Test: presubmit
Change-Id: I67fe98811814acba5158d760766a2ef3b121225a
Optimizes PackageHelper#resolveInstallVolume to aggressively avoid
querying volume storage statistics unless absolutely neeeded.
The previous implementation queries storage data for each volume on the
device before evaluating which volume to select. The new implementation
defers querying storage stats for a given volume until it is absolutely
neccessary.
For example, if the application is already installed to a particular
volume, only that volume needs to be queried for available space.
In addition, querying for available space on a volume is done in two
steps. The first step does not take into account freeable cache; only
if this pessimistic assessment of available space fails do we call
installd to obtain cache information.
Bug: 138450974
Test: atest frameworks/base/core/tests/coretests/src/android/content/pm/PackageHelperTests.java
&& atest cts/tests/tests/os/src/android/os/storage/cts/StorageManagerTest.java
Change-Id: I403318de364d41019cb3d43e93b91cdd06fe1b9c
Adding the device information to the backup will allow us to restore
data which is device specific if it's appropriate to do so (e.g. device
density)
The device specific settings which will be backed up are;
Settings.Secure.DISPLAY_DENSITY_FORCED
Test: atest SettingsProviderTest SettingsBackupTest
Test: Manual - Density changes during SUW when setting is restored
Fixes: 28437818
Change-Id: Ibc3595cdece3f1ccb4fccaff8212c1c3cb5c9756
cancelled.
In the current implementation, when recents animation is cancelled due
to stack order change, window manager replaces the surface with a
snapshot before cancellation. Launcher needs to acquire the snapshot in
order to switch the live tile into snapshot mode, and yet because the
recents animation is cancelled, that snapshot can no longer be acquired
anymore. This change takes care of this "relay" process.
Fixes: 138683199
Test: N/A
Change-Id: I1c11af38c2bdc442e3b45d0b5f0c7e7e37c2b0f0
Now it takes into account, the listView.enabled, layoutParams.enabled and the view.enabled.
This bug resulted in some disabled items to not be presented as disabled to the accessibility service.
Fix: 138560025
Test: CTS ABSListViewTest, ListViewTest, DocumentsUIGoogleTests:RenameDocumentUiTest.
Change-Id: I0493545fbfc46ec80631caf78b8851bddc498775
Introduces two new UserInfo flags:
SYSTEM - refers to the system user, i.e. user 0. Although
UserManagerService already knows which user is the system, this flag
will be useful in other contexts.
FULL - refers to a non-profile human user.
Right now, for every user, one of the following flag combos are true:
SYSTEM (user 0 on a headless-user-0 device)
SYSTEM | FULL (user 0 on a regular device)
FULL (secondary user)
MANAGED_PROFILE (profile users)
Test: Manual verification via "pm list users" of new flags when adding a new user
Test: Manual verification via "pm list users" of new flags for pre-existing users
Test: Later cls will test the functionality as it is introduced
Bug: 134605778
Change-Id: Ife92bfa8a91cc4567d825da8e6a1b3894b088b22
Include the RSS info into the meminfo output of dumpsys and
incident_report.
Bug: 117880513
Test: adb shell dumpsys meminfo
Test: cts-tradefed run cts-dev --module \
CtsIncidentHostTestCases --test \
com.android.server.cts.MemInfoIncidentTest
Change-Id: Id1058e279b7ca6925b59a6a523e0f0d14d830761
This changes the API for generatePackageInfoFromApex in PackageParser
in response to review suggestions made in ag/6701090.
The method is renamed to generatePackageInfo with a PackageParser.Package
parameter (as well as an ApexInfo and flags). The implementation is combined
with the main generatePackageInfo method. Callers are changed to perform
the parsing themselves, including the collection of certificates if
necessary.
Note: the method signature and implementation had already changed since
ag/6701090, so the suggestions from that CL may not apply directly.
Bug: 129261524
Test: atest PackageParserTest
Test: atest CtsStagedInstallHostTestCases
Change-Id: I495539679812110f89d5e3d93f2622ba2dab36c0
The class is abstract and marked as a SystemApi, but there's real
way to use it while compiling against the system_sdk unless the
constructor is also public.
Test: make update-api
Test: make
Bug: 138589409
Change-Id: Id1fe158ec55b299325bfbc16ab1ea33cd53fc123
In preparation of moving the jobscheduler framework code to its
own jar.
Bug: 138793378
Test: dumpsys batterystats -c | grep jbc and make sure the line looks correct
Change-Id: I9938c99e37bd44e522e5f8d8e95772e69d5be492
Instead of creating a new public API that requires developers to call
it, offer to enable transport logging based on the class name.
Bug: 137890034
Test: manual
Change-Id: Iea2a24310bd100be62a5c525108d17bafe7d11ea
ContentProviderOperation has long supported basic operations like
insert(), update(), and delete(), but it was never extended to
support the general-purpose call() method.
This change adds support for call(), including configuration of the
extras Bundle using back-references to other operations. In
addition, the output Bundle from call() can be used for
back-references from other operations.
Clean up how back-references are handled internally; we now store
either a literal value in each slot, or an explicit BackReference
instance which we can "instanceof" check to resolve when needed.
Also add withExceptionAllowed() capability, which can be used to
catch and report the failure of a single operation while allowing
any subsequent operations to proceed. Adds various nullability
annotations to reflect the behavior of all existing logic.
Bug: 131598520
Test: atest android.content.cts.ContentProviderOperationTest
Test: atest android.content.cts.ContentProviderResultTest
Change-Id: I1744bf8fc1ad048aa96460d487c2867c4c81d7b3
No behavior changes. This paves the way for a future CL that is
will be adding a handful of new APIs.
Bug: 131598520
Test: atest android.content.cts.ContentProviderOperationTest
Test: atest android.content.cts.ContentProviderResultTest
Change-Id: I1a6f53e79009ba88b13844a6c8ca8c09e33ee5b2
Bug: 136548098
Test: build, flash, take bugreport from Settings uses API workflow by
default. Turning off the feature flag from Settings uses old bugreport
workflow
Change-Id: I6462fcd77e812420dfeb9d3e5a0a8646745606f2