Since we don't need to mark existing jobs as in quota immediately when
the quota status changes, adding a min delay between quota check alarms
will prevent the system from possibly spinning on checking quotas.
Bug: 154444435
Test: atest CtsJobSchedulerTestCases
Test: atest QuotaControllerTest
Change-Id: I5b5efe9c973090c0f413812afc7479f012768c44
Nothing uses this anymore and it is always empty, so clean-up
the code around it so we don't continue to complicate things
with other bounds.
Bug: 151862790
Test: builds/tests pass
Change-Id: Ib7b9247cc0b125ed019680342be7fc5ffb6245de
Car mode may be activated without the user plugging the device into the
car. In this scenario, the user is "interacting" with the device via the
car and so JobScheduler should treat the device as in active use and not
activate JS idle jobs.
Bug: 147846851
Test: atest CtsJobSchedulerTestCases
Change-Id: Ied22ba86b79dac5c5d3db8e646fd5504a9e25645
Dump WindowContainers and their children without hard coding the hierarchy.
Bug: 149672519
Test: open wm trace in winscope
Merged-In: If5a7bd88728054e50aaacee138d9ae78513e94fe
Change-Id: If5a7bd88728054e50aaacee138d9ae78513e94fe
Switch QuotaController to track all of the pending in quota alarms
internally and only set one alarm for the whole group.
Bug: 150156067
Test: atest CountQuotaTrackerTest
Test: atest CtsJobSchedulerTestCases
Test: atest QuotaControllerTest
Change-Id: Ie415ed0c4f224ac8c37110962009c310e6a6a051
ag/9684175 changed mScreenBrightnessSettingMinimum,
mScreenBrightnessSettingMaximum and mScreenBrightnessSettingDefault
to float without changing proto dump and cts.
Bug: 149895022
Exempt-From-Owner-Approval: Minor change to fix CTS test
Test: atest CtsIncidentHostTestCases:com.android.server.cts.IncidentdTest#testIncidentReportDumpExplicit
Change-Id: Ief85ba8299626a3d92fb43db162a1b6864c8eae0
Use the early TaskOrganizer concepts to implement Split-screen
in system-ui.
This includes changes to both FW and SystemUI. The changes to
FW involve removing the use of split-screen specific behavior (like
minimize dock and direct ordering) and also reducing things that
care about primary vs secondary. It also changed ActivityStack
to inherit bounds from parent** when in split-mode so that sysui
only needs to manipulate the tile and/or reparent stacks to
effect their geometry.
This means a lot of layout logic moves to SystemUI. The bulk of
the work done in ActivityStack which is split-screen related is
moved into SplitDisplayLayout. This basically takes a snapshot of
display configuration and manages the sizes of splits and their
snap targets.
Intermediate dragging of divider bar now only moves root task leashes
around rather than talking to WM. This includes position as well
as crop (which used to be stack crop). Once the user releases
the divider bar, it will calculate (based on snaps) the new
root task sizes and update their configurations via
WindowContainerTransaction. Because the interim updates are only
on the leashes, no configuration updates occur until the end.
Entering/Exiting split-mode is now handled by SplitScreentaskOrganizer#
onTaskInfoChanged. This is effectively a state-machine that
looks at the current split task membership vs. previous and then decides
when to move things into/out-of split tasks and how to coordinate with the
DividerView.
Minimized dock is relegated to a purely system-ui concept. To
accomplish this, **the home *stack* is set to the minimizedhomebounds
by systemui. This means that it's relative position to its parent is
negative! This allows us to leave the split sizes constant, have
their children inherit the "actual" split sizes, but keep the
home stack unchanging in its minimized size. We just adjust the crop
negative to reveal it.
IME handling is done through the same mechanism as app-driven IME
animation... only Divider receives the control instead of the app.
This allows synchronized animation of split tasks with IME. To
account for insets, though, when IME is opened, the bottom stack
will be repositioned in WM.
Bug: 133381284
Test: Manual, use split-screen, rotate device, launch unresizable
apps in split, use divider snap to close/maximize apps, etc.
Change-Id: I7133e151a1037c42b275b97857936437a7a6725f
The dynamic battery saver information was not being logged in the
dumpsys, which made debugging an issue harder. Adding the information to
make future debugging easier.
Bug: 142473857
Test: atest android.os.cts.PowerManagerTest
Change-Id: I81cb724efd454f578d99b8abaa4eca3b6bad587a
Revert "Update CTS tests for tile-based split-screen"
Revert submission 9964969-sysui_split_screen
Reason for revert:
- Random SysUI crash (ag/10335781)
- Breaks IME tests with new_insets set to 2
- Crashes SysUI in split screen with new_insets set to 2.
Reverted Changes:
I103f68030: SystemUI Split via TaskOrganizer
If6740b7ee: Connect split-screen things to systemui divider
I44f497e7d: Update CTS tests for tile-based split-screen
Change-Id: Ife6878044ff19905ed97b599d8c67f80cb8e399e
So we can clean up the history when a conversation is deleted
and link to the correct notification settings screen
Test: atest
Bug: 149505730
Change-Id: I0784ae80b0fd0a1c00e9b63dfce1104b274df6ce
Exempt-From-Owner-Approval: impatience
Use the early TaskOrganizer concepts to implement Split-screen
in system-ui.
This includes changes to both FW and SystemUI. The changes to
FW involve removing the use of split-screen specific behavior (like
minimize dock and direct ordering) and also reducing things that
care about primary vs secondary. It also changed ActivityStack
to inherit bounds from parent** when in split-mode so that sysui
only needs to manipulate the tile and/or reparent stacks to
effect their geometry.
This means a lot of layout logic moves to SystemUI. The bulk of
the work done in ActivityStack which is split-screen related is
moved into SplitDisplayLayout. This basically takes a snapshot of
display configuration and manages the sizes of splits and their
snap targets.
Intermediate dragging of divider bar now only moves root task leashes
around rather than talking to WM. This includes position as well
as crop (which used to be stack crop). Once the user releases
the divider bar, it will calculate (based on snaps) the new
root task sizes and update their configurations via
WindowContainerTransaction. Because the interim updates are only
on the leashes, no configuration updates occur until the end.
Entering/Exiting split-mode is now handled by SplitScreentaskOrganizer#
onTaskInfoChanged. This is effectively a state-machine that
looks at the current split task membership vs. previous and then decides
when to move things into/out-of split tasks and how to coordinate with the
DividerView.
Minimized dock is relegated to a purely system-ui concept. To
accomplish this, **the home *stack* is set to the minimizedhomebounds
by systemui. This means that it's relative position to its parent is
negative! This allows us to leave the split sizes constant, have
their children inherit the "actual" split sizes, but keep the
home stack unchanging in its minimized size. We just adjust the crop
negative to reveal it.
IME handling is done through the same mechanism as app-driven IME
animation... only Divider receives the control instead of the app.
This allows synchronized animation of split tasks with IME. To
account for insets, though, when IME is opened, the bottom stack
will be repositioned in WM.
Bug: 133381284
Test: Manual, use split-screen, rotate device, launch unresizable
apps in split, use divider snap to close/maximize apps, etc.
Change-Id: I103f68030a170e2fd3d8f2125b81cf33af412793
Add BluetoothManagerServiceDumpProto for protobuf dumpsys of bluetooth
manager service. Primarily used by incident service to capture an
incident report proto.
Command to invoke (any of the following after lunch and env setup):
$ adb shell dumpsys bluetooth_manager --proto
$ adb shell incident 3050
$ incident_report 3050
Bug: 146085372
Test: Execute the above commands and compare the output against normal
dumpsys
Change-Id: I7ccef334ffeae02316db3afff929998b544972b1
We thought about batching based on constraints when JobScheduler was
first introduced (in Lollipop) but immediately disabled that behavior.
We haven't used the flags since then, and now that we're batching all
jobs that aren't in the ACTIVE bucket, these extra flags are not needed.
Bug: 141645789
Test: atest FrameworksMockingServicesTests:JobSchedulerServiceTest
Test: atest CtsIncidentHostTestCases:JobSchedulerIncidentTest
Change-Id: I8df75007a0c8124ea35c7917a5413310fbdeff79
We weren't using the limits and it's not clear what developers are
supposed to do if they were to ever hit the limits, so it's best to just
remove them altogether.
Bug: 141645789
Test: Android builds
Change-Id: Ib9695dc1af4c94248444a80fe02d284ee0a44559
Add SensorServiceProto for protobuf dumpsys of sensorservice. Primarily
used by incident service to capture an incident report proto.
Also add a gensrc rule to generate cpp headers of frameworks proto to
be used by native services like sensorservice. Added "static" qualifier
to a few generated fields in the header to avoid linker conflict.
Command to invoke (any of the following after lunch and env setup):
$ adb shell dumpsys sensorservice --proto
$ adb shell incident 3053
$ incident_report 3053
Bug: 146086105
Test: Execute the above commands and compare the output against dumpsys
sensorservice
Change-Id: I282ff37bd3e845464d0693d69fc0d82943cc9855
Previously, the radio technology definitions are refered to those
definitions in ServiceState. However, the definitions are
slightly different from the definitions of NETWORK_TYPE_* in
TelephonyManager which will cause the data is misjudged. Revise
to refer to the same definitions.
Bug: 147082857
Test: build
Change-Id: I12fb14a9b7e70d57ce043bfe2880b358eecea872
Can no longer be put off since we need to redo things for task/stack
merge.
Bug: 80414790
Bug: 143460940
Test: Existing tests pass.
Change-Id: Id6c60264220a42c290190e338945f1662a075b6f
Introduces the concept of a DisplayArea, corresponding to an area
on a logical display within which content can be placed.
DisplayAreas can contain more DisplayAreas, WindowTokens and ActivityStacks.
A future CL will expose an API which allows leashing a DisplayArea to transform
all its content simultaneously.
DisplayAreas are managed by a DisplayAreaPolicy, which creates and places the
areas, and decides which area a container is placed in.
This CL introduces the concept, but applies a no-op policy that maintains the
current orderings and does not apply any overrides.
Future work that remains:
- Writing the feature policies
- Adjusting Display & DisplayMetrics if the area is constraining its children.
- Moving the policy into an product-adjustable component
Bug: 147406652
Test: atest WmTests
Change-Id: If6fb1bba3b65ebf7ac9fdf99408c54bf77f602c9
Add internal Vibrator Service state indicates if device is vibrating,
dump the state in Vibrator Service ProtoLog.
Bug: 133457048
Test: "dumpsys vibrator --proto" to verify
Change-Id: Icc1b49430363a9ca7e04e240d8706427d75251ce
Per discussion in go/pip-ctc-strategy, SysUI will not report
default/movements bounds to window manager.
Bug: 141200935
Test: atest PinnedStackTests
Change-Id: Ibdffe18640e167928285fb0efc5c88f82abe18e6
All activity related code is under the wm package,we should move all activity
related proto from activitymanagerservice.proto to windowmanagerservice.proto.
This CL consolidate ActivityRecordProto,AppWindowTokenProto and move to
windowmanagerservice.proto. For TaskRecordProto/TaskProto related will
handle in next step.
Bug: 143460940
Test: atest CtsWindowManagerDeviceTestCases
atest FlickerTests
Change-Id: Icade24069677c1f1a9852dab69da7f1d94340709
1. Background started foreground service shall not have
while-in-use permissions including location, camera and
microphone. Many exemptions have been applied including:
--FGS started by widget.
--FGS started by notification.
--FGS started by IME or other visible app.
--FGS started by ROOT_UID, SYSTEM_UID, NFC_UID.
2. Add a phenotype key KEY_DEFAULT_BACKGROUND_FGS_STARTS_RESTRICTION_ENABLED
to turn on/off this feature (default is on).
3. In dogfood, if a background started FGS with while-in-use permission
(any of location/camera/microphone) run into this restriction, the FGS
will not been granted these permission. we show a toast message to
alert user and ask them to write a bugreport using instruction at
go/r-bg-fgs-restriction. So we can have a statistic how many apps will
be impacted by this feature.
These is a flag Settings.Global.FOREGROUND_SERVICE_STARTS_LOGGING_ENABLED
to turn on/off the toast message (default is on, in dogfood)
Bug: 136219221
Test: atest android.app.cts.ActivityManagerProcessStateTest
atest android.app.cts.ActivityManagerApi29Test.java
atest android.app.cts.ActivityManagerFgsBgStartTest
Change-Id: Ibc8aaa6839a69136f9311bfacdbab9705b31b6a7
Add locus update event to the Usage Stats.
Test: Build and run on a test device with a test app.
Bug: 147594233, 147100454
Change-Id: I1e058ac87244d47719606d8dcfaea2df4bff43d2
Signed-off-by: Yuliya Kamatkova <yuliyak@google.com>
Add protobuf dumpsys of connmetrics. Primarily used by incident service
to capture an incident report proto.
Command to invoke (any of the following after lunch and env setup):
$ adb shell dumpsys contexthub --proto
$ adb shell incident 3051
$ incident_report 3051
Bug: 146086599
Test: $ incident_report 3051, then compare the content with "dumpsys
contexthub"
Change-Id: I6c2ed76a1a17f9bfc60d07e68cd66d5eea00e9b0
Apps can call ActivityManager.getHistoricalProcessExitInfos() to
get the historical process exit reason now.
Also add the below command to support dumping of the information
$ adb shell dumpsys activity exit-info [package name]
Bug: 136036078
Test: atest ApplicationExitInfoTest
Test: atest CtsAppExitTestCases:ActivityManagerAppExitInfoTest
Change-Id: I634f247e42a7e8e4535eedd76cf84089abdf1129
Update JobScheduler to place additional constraints on jobs in the
RESTRICTED bucket:
These jobs can only run when the device is idle, charging, battery is
not low, and on an unmetered network (for connectivity jobs). They do
get one parole session per day where they don't need these additional
constraints met.
Bug: 145551233
Test: atest CtsJobSchedulerTestCases
Change-Id: Ic96841141ed7800295b0b1a54c697a30afc3cd70
Limit apps from calling schedule() and enqueue() to 500 times in a 1
minute window.
Bug: 135764360
Bug: 144363383
Test: atest CtsJobSchedulerTestCases
Change-Id: I141e66b612c296a4a4a9cd7c382cea08d5f61b04