Create a new DeviceConfig entry to replace the prior Settings entry on
which the location ignore settings allowlist is based. This allows us to
allowlist based on attribution tag, and eliminate holes for large
applications.
Test: manual + CTS + GTS
Bug: 187421886
Change-Id: I31e61db79b93e202bd8c66efae1bb5aaf0c88ff5
Introduces DISALLOW_CAMERA_TOGGLE and DISALLOW_MICROPHONE_TOGGLE
which are Device Owner restrictions to prevent the user from
turning off global camera & microphone access on a fully-managed
device.
Test: atest DeviceOwnerTest#testSensorToggleRestriction
Test: atest UserRestrictionsTest
Bug: 184927615
Change-Id: I500f1283689497812bd2df606e35abe6d9d91c61
This capability will be queried by the AudioManager to be used to define
if the device has haptic playback capabilities.
Fix: 187227888
Test: N/A
Change-Id: Idc046d2fee12b3317db25975b29cf96f5f9c41b3
Writes the BatteryUsageStats atoms.proto atoms
based on the current BatteryUsageStats data in BatteryStats.
Does NOT write the past pre-reset snapshot atoms; that is
an adventure for a future cl.
Bug: 184095105
Test: atest BatteryUsageStatsProtoTests
Test: statsd_testdrive <atomId>
Change-Id: I2fc5a983deb58d7d393c0696db2165b124c94dc2
The annotation was removed when adding the constant to the public API,
but it was removed from the public API in favor of Build.isDebuggable() in
a later change.
Add back the @UnsupportedAppUsage annotation that should have been
added back when removing the constant from the public API.
Change-Id: Ic2fda01a8c0e90712a1b7b435443d32f7e226d33
Fixes: 187432390
Test: m
Inlining these constants allow the public api metalava run to depend on
ART's public API rather than the "internal" CorePlatform API, which
prevents picking up unintentional classes (such as annotations) from the
CorePlatform API in the public stubs.
Because these constants get inlined in the API/stubs, and the constants
have been finalized for many years, they can never change. Because they
cannot change, reusing the constant is of limited value. I've added
some comments to point readers to other places the constant is used.
Bug: 154796679
Test: m checkapi
Change-Id: I0b347a2964cfe5a1206145fdc56934727b890469
When installing a non-AB package, if the OS comtains compressed apexes,
we need to allocate space for these apexes so that they can be properly
decompressed on the next reboot.
Test: adb shell cmd recovery install-package /data/ota_package.zip
Change-Id: Ia40d0614e0e724cfb17e91720ec88a15795bd8ee
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
Separate the internal state of AttributionSource from the
class to make it a simple AIDL we can translate automatically
to native - keeping Java and native parts in sync. This
would allow writing a thin native lib for checking attribution
source permissions which would be used to teach camera and
audio about attributions.
Deinfe an AIDL interface for passing around an attribution
source and opr performing permission checker oprations allowing
native and Java permission checks on attribution chains to be
handled. The Java side permission checker functions are in a dedicated
permisison checker service on top of which sits the PermissionChecker.
We expose similar PermissionChecker native APIs sitting on top
of the same remote interface. The nice thing is that we have
native and Java permisison checkers in sync sharing remoting
code and being close in shape.
For now the PermissionChecker in Java is divorced from the
PermissionManager but in T we will consider how to unify them,
either by an extension object on the PermmissionManager or
APIs on the PermissionManager, or another approach, and then
migrate clients off the PermissionChecker APIs.
Sync app ops were not tracked across multiple binder calls which
prevents moving the permission checks in the system server as
this adds one more hop. Now sync ops are propagated backed the
call stack and only the ops for the package are dispatched to
it and the rest are propagated back to the caller, recursively.
bug: 158792096
Test: atest CtsPermission5TestCases
atest CtsAppOps2TestCases
atest CtsPermissionTestCases
atest CtsPermission2TestCases
atest CtsPermission3TestCases
atest CtsPermission4TestCases
atest CtsPermission5TestCases
Change-Id: Ia5cbd2eb20a2da172a5960afdddd7e467f4bcb0d
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