Adding MIDI info to USB dumpsys so developers can debug better.
Bug: 229122603
Test: adb shell dumpsys usb
Change-Id: Ic3c7ab21865457b1e1f0f97fdd1827bb0b442481
service.
The camera service needs to know when individual process oom adj scores
are changed in order to address bug #124224342. When two separate
processes are displayed in split screen and focus is switched between
them, both proc states will remain the same while their oom scores
change. This is a problem if both have access to the camera - we want
only one owner of the camera stream at any given time and for the app
in focus to be the one to own it.
This patch adds a new IUidObserver registration level for individual
process oom score changes. In addition a new callback has been added to
IUidObserver to track these changes.
Change-Id: I68d964f474d20f819f54b614a4e314ce00aac8fb
Bug: 124224342
Test: -- ActivityManagerServiceTest
-- ActivityManagerProcessStateTest
-- ActivityManagerFgsBgStartTest
-- UidObserverControllerTest
-- NetworkPolicyManagerServiceTest
-- ShortcutManagerTest2
-- HintManagerServiceTest
-- VibrationSettingsTest
-- CameraEvictionTest#testCamera2AccessCallbackInSplitMode (x100)
UidRecord.CHANGE_PROCSTATE was allocated the value 0, since it is
assumed that if there is any change to a UidRecord it includes a proc
state change. This is a valid assumption, but is not an unusual design
for a bitmask. This change adds a bit specifically for proc state
changes.
At the time of this change, CHANGE_PROCSTATE should always be set.
However the intention is to pre-empt change
I68d964f474d20f819f54b614a4e314ce00aac8fb, which breaks the assumption
that all UidRecord changes will include proc state. To avoid verbosity,
additional constants have been defined which combine the other change
bits with CHANGE_PROCSTATE for external users to reference.
Change-Id: Iae7e6601938d1b3ee5c4c9b339ae06029eb598e6
Bug: 124224342
Test: -- ActivityManagerServiceTest
-- ActivityManagerProcessStateTest
-- ActivityManagerFgsBgStartTest
-- UidObserverControllerTest
-- CtsAppTestCases
For cross-process embedding, there can be activity of other app embedded
in untrusted mode. When it happens, we need to disable all input on the
Task if we are going to play client-driven animation to make sure the
host client can't abuse the animation leash.
Bug: 197364677
Test: atest WmTests:AppTransitionControllerTest
Change-Id: I3e299c0a43ac823b7df6af9d02c7168bd65d3271
This is a step to move the window layout to the client side.
Once the window layout is moved to the client side, when something (such
as configuration) is changed, the server will send MSG_RESIZED to the
client. Before the client reports the new frame to the server, the frame
at the server side might not be up-to-date.
This gives WindowManagerState a signal to decide if it should retry.
Bug: 161810301
Test: presubmit
Change-Id: Idece0f559e7013ff389cbb7aa74d63734c95f64c
While dumpProtoLocked is called, InvalidProtocolBufferException
occurred because types are mismatched between platform side and
module side.
netstats.proto was moved into connectivity module, both the
platform(incident.proto) and the module uses protoc-gen-javastream
to generate the Java classes from it. It should be fine since
platform includes the source of the proto, and jarjar the generated
classess in the module to avoid conflict with platform.
Bug: 218566849
Test: adb shell incident 3001
adb shell dumpsys netstats --proto
atest CtsIncidentHostTestCases:IncidentdTest#testIncidentReportDumpAuto
Change-Id: I4654350a59dc1ca1a925785ad37f34aa7b481235
Merged-In: I4654350a59dc1ca1a925785ad37f34aa7b481235
Refactor existing tests to remove unnecessary mocks and boilerplate code to
cover more of the real behavior. This is prep for adding new tests in another
change to add the new face and fingerprint behavior.
Bug: 217393533
Test: atest AuthBiometricViewTest AuthContainerViewTest
Test: manual (authenticate using test app)
Change-Id: If984d1c07fee98d2d7a20cb0025ad434ad9977f4
This CL allows applications to choose whether to set restricted or
unrestricted keep-clear areas by adding a dedicated SystemApi for
unrestricted keep-clear areas - View#setUnrestrictedKeepClearRects. The
SET_UNRESTRICTED_PREFER_KEEP_CLEAR_AREAS permission is now only checked
for keep-clear areas from that API
Bug: 221094507
Test: atest CtsWindowManagerDeviceTestCases:KeepClearRectsTests
Test: atest WindowStateTests#testUnrestrictedKeepClearAreas
Change-Id: I89ca3149117b4d457c5521d617880870706d7793
Implements API feedback about the safety center constants. Also renames
Safety Hub to Safety Center
Fixes: 215301946
Test: build
Change-Id: Ie07e8fc3ae7371e94d23ac6dfa9a446ef92da074
Added enable_recents_screenshot to windowmanager proto file so it can be
used when testing. The test will read back this value to make sure it's
set before proceeding with taking a task snapshot.
Test: atest SnapshotTaskTests --rerun-until-failure 10
Fixes: 219750596
Change-Id: Ibd66c5f4d46e5102dbe0763f7b0b7cbcfb90a798
By default activity embedding should be restricted, and apps have to
opt in explicitly to allow other hosts to embed them. An app can
declare a list of known trusted embedding host certificates in
AndroidManifest for individual activities or entire application.
Alternatively, an app can allow embedding by all hosts in untrusted
mode. In this case interactions and operations that the client host
can perform on the embedded container will be limited to prevent
tapjacking and overlay attacks.
Bug: 197364677
Test: ActivityEmbeddingCrossUidTests
Change-Id: I78c303237fdc77bdf55bd74580ac0b19c8de622b
* changes:
Add API to configure LPS maintenance mode behavior
Add TestApi to force Low Power Standby to be active
Add TestApi wakelock flag to have system acquire wakelock
Allowlist active voice interaction session from Low Power Standby
Introduce Low Power Standby API and wakelock restrictions
Allows CTS tests to test power restrictions that disable wakelocks
without the system suspending (since system-wakelocks are exempt).
Bug: 190822356
Test: atest LowPowerStandbyTest
Change-Id: I91f44ae93480be992151d845175606fb66ecb127
If a voice interaction session is started, then it should be allowed to
use the network & wakelocks unrestricted while it is ongoing, since it
is direct user interaction.
Bug: 190822356
Test: atest LowPowerStandbyControllerTest PowerManagerServiceTest
Test: With reference VIS: adb shell cmd voiceinteraction show
To verify allowlist/wakelock state: adb shell dumpsys power
Change-Id: I63cd0cf2e97b574ba8fa6c6caa8f046cce2bb821
In Low Power Standby, additional restrictions are placed on apps that
are in a process state of FOREGROUND_SERVICE or less important
during standby (while the device is non-interactive):
- Wakelocks are disabled
- Network access is blocked
During doze maintenance windows the restrictions are lifted temporarily.
This change introduces the APIs for Low Power Standby, as well as
the wakelock restrictions.
This feature is targeting TVs. To prevent Low Power Standby from being
enabled on other devices, the feature is guarded by the config flag
config_lowPowerStandbySupported.
Bug: 190822356
Test: atest LowPowerStandbyControllerTest PowerManagerServiceTest
Ignore-AOSP-First: New permission only added internally for now.
Change-Id: Ia40f8a0fc4b366860af58ad76c988f93a5d41936
This refactoring will let us have alternative implementations for the
state of microphone/camera. It also seperates the storage of the other
feature that is known as the "Sensor mute" so that the reuse of this
service doesn't get too convoluted.
Also extract the persitable state from the state implementation so that
alternative implementations can resuse the persistence code.
Some smaller changes:
* Start the sensor use dailog as user 0 always since system UI requires
user 0
* Use SystemClock.elapsedRealTime() instead of network time since it's
guaranteed to my monotonic. This will also change that intervals used in
telemetry aren't going to measure time the device is powered off.
Ignore-AOSP-First: New OWNERS file
Test: atest CtsSensorPrivacyTestCases SensorPrivacyServiceMockingTest
Bug: 200649586
Change-Id: I4c23c2509d7d1bdf49360fc9bbadb79ccd451dcc
Currently minimal task size is calculated from the default display in
RootWindowContainer and used for all resizeable tasks; instead we should calculate this from per-Display
context to extend for additional displays.
Test: DisplayContentTests
Bug: 191434136
Change-Id: Ib9397de5570c0b17651c4ccfcb30bee836f684e8
This method returns the total amount of time the battery was
discharging during the current battery session.
Also, fixing time units used in BatteryStats tests: they are
supposed to be microseconds, not milliseconds.
Bug: 214407774
Test: atest FrameworksCoreTests:BatteryChargeCalculatorTest
Change-Id: I5b64a6bd8a577b558b90cb60a1db8c3774121921
The frame number at the server side is not used anymore since BLAST.
Bug: 161810301
Test: presubmit
Change-Id: I01c6fb0750799aa94766f2582ce6ac031c9426cf
This change adds two systemApis to UsbPortStatus viz.,
a. getUsbDataStatus: Allows caller to infer whether USB data is enabled.
b. getPowerBrickStatus: Allows caller to infer whether a power brick
is connected to the USB port.
The change also adds enableUsbDataWhileDocked systemApi to UsbPort to
enable Usb data momentarily.
Bug: 211677613
Bug: 213312081
Test: Manually tested on tablet
CTS-Coverage-Bug: 215019881
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: Ib7521f0f04b7f8e3e58dc253b28072d3631f21a7