This is a redo of ag/10717946 to keep feature parity with R.
Bug: 182214420
Test: install an app via USB2, disconnect the cable, observe the app
being uninstalled.
Change-Id: I79f34268730ea783c9d64a534417b8460c639c21
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.
bug: 158792096
Test: atest CtsPermission5TestCases
Change-Id: I4e050e78b2361cbf524cc213802e0fef5b487f67
This flag was needed for gating the raw sensor data collection, which is
now moved to somewhere else.
Calling evaluateRotationChangeLocked() before setting
mDesiredRotation = reportedRotation is meaningless since it always
returns -1, so that is also removed.
Test: statsd_testdrive on Redfin
Bug: 186088594
Change-Id: I3389c0df9f0762ad15375edbfb391ba01ac6aa0f
Wires up AttributionSource across the remaining long-tail of
Bluetooth AIDL interfaces, ensuring that developers can accurately
make calls chained back to a specific Context.
Moves "for data delivery" permission checks to happen in a single
location on each interface to ensure they're performed consistently
with the new AttributionSource arguments. Note that "for data
delivery" isn't the best name; it's designed to represent that the
requested action was performed and should result in the relevant
appop being noted for the caller.
This change has the positive side effect of ensuring that all
interfaces are consistently enforcing the BLUETOOTH_CONNECT
permission, even in the case where BLUETOOTH_PRIVILEGED is also
required; this is what ensures that revoking the "Nearby devices"
permission takes effect for all callers.
Additionally, standardizing on enforcing permissions closer to the
AIDL entry point reduces the need for @RequiresPermission annotations
to be carried around inside the Bluetooth stack.
Bug: 183626112
Test: atest BluetoothInstrumentationTests
Change-Id: I8023dda654e325b8bfa2f0cdb994ad63a2b429d4
Before, it called openQuickstep before canSplitScreen, but the later one
is also calling openQuickstep. This caused the recent is pressed twice
to introduce the flakness.
Test: atest WMShellFlickerTests:EnterSplitScreenNotSupportNonResizable
Bug: 182235458
Change-Id: Iba5af5114fd8883b73d78ac34e6f891ee8ca798f
The Receiver could receive ACTION_PACKAGE_FULLY_REMOVED and
ACTION_PACKAGE_DATA_CLEARED broadcast and clean the package data.
The CL has been reverted back since the receiver tries to write
to /data/system_ce/appSearch before user storage has been unlocked.
And this prevents encryption policy from being setup correctly.
Added check and only handle those actions if used is unlocked.
PatchSet 1 is the old version that has been reverted.
Bug: 145759910
Test: atest --rebuild-module-info CtsAppSearchHostTestCases
Test: atest StagedRollbackTest:com.android.tests.rollback.host.StagedRollbackTest#testRollbackDataPolicy -- --abi x86_64
Change-Id: I41dc0501ac227551ae9bf2c59f57accc66adc85f
MODE_SHOW_BOUNCER shouldn't notifyKeyguardAuthenticated, but
MODE_UNLOCK_COLLAPSING should.
Test: use biometric auth right after reboot - goes to bouncer
Test: atest BiometricsUnlockControllerTest
Fixes: 186179437
Change-Id: I3f054a66de9125d8c61a52c2096779500c5012c0