- Add resource for recents component which can be overridden in an overlay
- Allow the static recents component access to APIs which would otherwise
require privileged permissions
- Remove some unused TV recents code
Bug: 67864419
Test: com.android.server.am.RecentTasksTest
Test: #testNotRecentsComponent_denyApiAccess
Test: #testRecentsComponent_allowApiAccessWithoutPermissions
Change-Id: Ia4939b7d443a6058ab4bb41d8c194eb4611cbf80
- Move running task code from stack/supervisor into its own class
- Reduce work to calculate running tasks. Instead of creating RunningTaskInfo
for every single task and then limiting to the requested set, calculate
the set and then create the infos.
- Consolidate calculation of number of running activities in a task between
the RecentTaskInfo and the RunningTaskInfo
- Remove unused flag argument, adding another method to instead filter the
collection of running tasks to exclude certain activity types and windowing
modes. This allows us to fetch only the last running task in SystemUI and
not have additional logic on our side.
Bug: 34270611
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/am/RunningTasksTest.java
Change-Id: Iaba7487cea0545f69739da7cd3095b500a0df6fc
With OC-MR1, for Android Go, we're considering the definition of
"low RAM" to be <= 1GB of RAM. So we update the definition in
this documentation. Additionally, we remove the comments about
screen resolution, as various devices might make trade-offs in
terms of modem stack carveout vs. screen resolution, and those
don't concern us as much as just the total amount of RAM.
Bug: 68277942
Test: None. This is a documentation change.
Change-Id: Ib02024a3e543f8fec11a1735de32ec58278db6e4
Moving to the proto/.../server directory since PowerManagerService is in
com.android.server.
Extracting enums from other components into their own files.
Bug: 65750826
Bug: 65750806
Test: flash device and check incident.proto output
Change-Id: Ib91b7c08142fa66adf18b6e85106d4cbb5adf660
Everything is now moved out of the pm command except for
the various install commands. I am going to hold of on
those since they require doing some resolution with the
current implementations in the package manager to make
sure they match and behave identically to the implementations
currently in the pm command. But other than that, everything
in pm is now just redirecting over to "cmd package".
Also fix up some of the dumpsys output of a few other sevices
when asking to print the data for a particular package, so
the "pm dump" command gives a little more sane result.
Test: manual
Change-Id: I139e06e560203b72243d7eea9543c2240db0f8f8
On devices with multiple active networks, or rapidly switching
between networks, we need an API to tell jobs explicitly which
network to use. (For example, the default route could meet all
job criteria, but we could have changed the default network by the
time we spun up the JobService.)
This also paves the way for us choosing to run jobs over
non-default networks.
Test: verified via DownloadManager
Bug: 64133169
Change-Id: Ic8d654707e39236c8da85a5e172161ac39e5f0b3
Manage the standby bucket in AppStandbyController
Default implementation of bucketing based on simple timeout:
ACTIVE, if recently used
12 hrs to move to WORKING_SET
2 days to move to FREQUENT
7 days to move to RARE
(subject to change)
RARE bucket equates to the old "idle" or "inactive" state for
an app.
Bug: 63527785
Test: AppStandbyControllerTests.java
Change-Id: I970d7afcdf47c31a9413da8fd4852066a13676a2
- Ensure IllegalArgException is thrown when invalid maxNum of recents
is requested.
Bug: 68215720
Test: android.app.cts.ActivityManagerTest
Test: #testGetRecentTasks
Change-Id: Idaccc97c609e3deede455fb285801e8cc56a02f9
Binding a slice that lives in the same process would lead to a
deadlock since we'd sleep the main thread while waiting for it
to decrease the CountdownLatch. Now we're checking if we're
already in the main looper and only posting when necessary.
Test: run code in ag/3082570
Change-Id: Id7c4f9dd8d84bf0e513606cbe07bf87750c567e4
Add new DPM APIs to control which SystemUI features are enabled during
LockTask mode:
* setLockTaskFeatures()
* getLockTaskFeatures()
* int flags representing various configurable SystemUI features
Bug: 65813398
Test: bit FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest
Test: bit FrameworksServicesTests:com.android.server.am.LockTaskControllerTest
Test: cts-tradefed run cts-dev --module DevicePolicyManager -t com.android.cts.devicepolicy.DeviceOwnerTest#testLockTask_deviceOwnerUser
Change-Id: I0ee3cf6dbe2234ec29d1384195dadc0f290aa73b
Fix: 67497358
Test: wait for cts test in the following cl. For unitest:
runtest -x services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
Add setTime and setTimeZone API in devicepolicymanager.
Add unitest for each API.
Following design doc: https://docs.google.com/document/d/1NV93mr2CT157S_haru1QbKo9HLeP9iPM9eMiGfVmfCM/edit
Change-Id: I188c27b0b99137b6f01e42ae1ad49356ce0a81b2
Depreciated the TaskDescription constructor when passing a bitmap and
added constructors to support passing drawable resource ID. Passing
drawable IDs allow users to use drawables such as AdaptiveIcons
instead of creating and passing a bitmap. Later SystemUI checks for
either bitmap, file name or resource ID to get a drawable to display.
Test: run-test CtsActivityManagerDeviceTestCases android.server.am
.TaskDescriptionTest
Change-Id: Ib944687249acf9fb6bbf9a9a109930cc04539e14
Fixes: 36298959
Wallpaper would have the wrong placement during
first frame because it would be center aligned
in a surface that's not big enough.
Also removed old OpenGl implementation, in favor of new
hardware accelerated canvas.
Change-Id: Ic9c9eaa817e1f6494aa5431d8278f2c28b2c45a9
Fixes: 66926914
Test: set wallpapaer with different offsets, orientations and devices
* changes:
Remove events bus code from task loading code.
Pull out TaskStackListener into its own class.
Remove unused recents fast-toggle/paging code.
This new API allows any activity to be launched into LockTask mode, as
if the package of the activity has declared "lockTaskMode =
if_whitelisted" in its manifest.
The lockTaskLaunchMode logic is also moved from TaskRecord to
ActivityRecord, in order to accommodate the new path from
ActivityOptions.
Bug: 66124180
Test: cts-tradefed run cts-dev --module DevicePolicyManager -t com.android.cts.devicepolicy.DeviceOwnerTest#testLockTask_deviceOwnerUser
Test: bit FrameworksServicesTests:com.android.server.am.LockTaskControllerTest
Test: manual, with TestDPC's kiosk mode
Change-Id: I786bf194ed20a212bbad1f3cdb9394cc77aa4d77
- Remove flags to control which recent tasks are returned -- they are now
trimmed with the expected behaviour when the task list is modified.
- Remove unused logic related to force-resetting a task based on inactive
time.
- Remove SysUI logic related to excluded recent tasks since it is already
handled
- Clean up task list subsetting now that returned list is guaranteed to
only be visible tasks
- Only use AM interface to fetch recent tasks instead of through AM
Bug: 34270611
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java
Change-Id: I3f60ce507563152b5704c63985af621b02d0e7c8
- Remove all code related to last-stack-active-time, quiet profile task
handling, and visible task range filtering
- Remove the notion of firstActiveTime since that was only used to filter
tasks in SystemUI, also convert lastActiveTime to elapsed real time since
it is only used in the system to order active tasks, and in SystemUI as
a part of the TaskKey for caching purposes (it is no longer used to
determine the last visible task based on time)
Bug: 34270611
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java
Change-Id: I44d494a521f60f302e0976fcf33490fe837f7cdb
Prevent KEYCODE_VOICE_ASSIST from being sent
to the apps. Move the key handling logic from
interceptKeyBeforeDispatching to
interceptKeyBeforeQueueing for KEYCODE_ASSIST
and KEYCODE_VOICE_ASSIST.
Allow the launch of assistant with KEYCODE_ASSIST
Remove dead link from the docs.
Test: bit CtsViewTestCases:.KeyEventInterceptTest
Bug: 64776073
Change-Id: I6ab596ffb0448923d71da3fc93ccdd26de8d517f
Canonicalize for backup and canonicalize and uncanonicalize for restore
(see comment).
Test: Set custom notification sound, make backup, remove notification
sound from device (from Ringtones and make sure to update media content
provider), restore => Observe default instead of random number. Do the
same without removing the sound and observe restores successfully.
Test: runtest systemui-notification
Bug: 66444697
(cherry picked from commit c27bb6ad34)
Change-Id: I32c186d0d7479b01f6cc67cce9bc5cb66264a064
And clarify some other descriptions, particularly getAllPendingJobs().
Bug: 19536175
Test: m offline-sdk-docs
Change-Id: I769eb8eb7bdca77f6f143c0d18a3beccc183d5dc
We add a new StatusBarManager flag to disable the global actions dialog
(a.k.a. the power button menu), which is required in certain kiosk mode
scenarios.
Bug: 65813398
Test: runtest systemui
Test: manual, by using a modified version of TestDPC and
DevicePolicyManagerService
Change-Id: Ib7da2f4837281e98e558afcc30be8bae6f2e179a