PLATFORM_SEPOLICY_VERSION will be the latest version in system's
compatibility matrix. This change adds a function
getPlatformSepolicyVersion, which ultimately gets
PLATFORM_SEPOLICY_VERSION, just like getSepolicyVersion for vendor.
This will be used from the SELinux CTS.
Bug: 186596569
Test: atest CtsSecurityHostTestCases:android.security.cts.SELinuxNeverallowRulesTest
Change-Id: Ic7863ece9413b9a6a4a91ff42d3121935823fe8b
Converting a transcode fd to the original fd might fail for the more
common reason that the fd is already original.
Now, we log as DEBUG instead of WARNING
Test: m
Bug: 186672282
Change-Id: Ifd0b3cef901ae1c2f467ace06dca590dff8ffb04
which has been superceded by AggegateBatteryConsumer
Bug: 186006876
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Test: Use BatteryStatsViewer to verify that it's still functional
Change-Id: I2e4fe36ff310b6d68923fcecdfd22ce865b1f32d
as opposed to SystemBatteryConsumers, which will be removed
in a follow-up CL
Bug: 186006876
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Change-Id: Ie4166217be211d92293c2a107762801a7d3c206f
Document when, on a managed device or profile, the DPC can
read hardware identifiers, and when it must use the new
enrollment-specific ID.
Bug: 172636282
Test: m docs
Change-Id: I783725853d0654d49518a38d8d8d04b3ca7e3ab0
Several years ago ParcelFileDescriptor.parseMode() was fixed to match
the behavior of fopen(), since developers expect consistent behavior
between managed and native code. FileUtilsTest.testTranslateMode()
verifies that all these modes are correctly translated.
However, this unintentionally changed the behavior of
ContentResolver.openOutputStream(), which only sends the 'w' mode
to the remote process. Developers expect this API to behave like
the FileOutputStream constructor, which always truncates the file
unless opened with the append mode.
Since some remote providers may not be prepared to handle the 't'
mode, this change carefully uses Os.ftruncate() to restore this
expected behavior in all cases.
For other APIs that return opened files, this strategy is applied
to restore the original behavior, but only when the target SDK of
the app is expecting this truncation to take place. The reason for
this is that moving forward our goal should always enable
ContentInterface APIs to be a transparent conversation between apps
without attempting to alter the behavior. Apps talking with older
providers can apply the Os.ftruncate() logic themselves, if
desired, once they target Android Q or higher.
Bug: 157888856, 180680924
Test: atest CtsContentTestCases:ContentResolverTest
Change-Id: Iacec49164c4ce3891db0270635e9f458dea7becd
Exposing more data loader states as per
go/incremental-crash-reports-1-pager.
BUG: 184844615
Test: atest service.incremental_test
Test: atest android.cts.statsdatom.incremental.AppErrorAtomTests
Change-Id: I532513453411b2ccdb21311d0bc3dee0641837db
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
This is being done in preparation for a switch of BatteryStats.dumpLocked
from BatteryStatsHelper to BatteryUsageStats
Bug: 162380414
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Change-Id: Ia8bf02116517c77f008b85c2012f68353b39c044
Also remove streaming health status reporting which could cause
startable state change because it is also not needed any more.
BUG: 171920377
Test: builds
Change-Id: I7284e7a63df79da7dbf3d16ff64302b3d1ce1348