History log of /frameworks/base/core/java/android/app/IActivityManager.aidl
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a6d6aab0e0c2cb297cda9ad6a94bbe934ba515f6 19-Apr-2018 Adrian Roos <roosa@google.com> Defer resizing invisible stacks while drag resizing

Works around a source of jank when drag resizing in split
screen mode: instead of immediately resizing the (potentially
numerous) invisible secondary stacks, we defer that until
the user lets go of the handle.

Change-Id: I3b9faa83005fa86185d4e51b2849e3a826b7f6a9
Fixes: 78214347
Test: Open a gazillion (resizeable) tasks. Enter split screen. Drag handle, verify there is no jank
Test: atest RectTest
/frameworks/base/core/java/android/app/IActivityManager.aidl
6a38fca2d81e5d5bc0343c57e4db3629c3a9a619 29-Mar-2018 Winson Chung <winsonc@google.com> Prevent unnecessary reordering of the home stack

- Just cancel the recents animation in-place when handling the home button
to prevent it from being repositioned to the bottom (which stops home)
and then starting it again (which restarts it)

Bug: 74405472
Test: Press home from an app, ensure launcher stop is only called once
Change-Id: Id41aa2f77c01767cc2c35445458b8f2db81200fc
/frameworks/base/core/java/android/app/IActivityManager.aidl
0c1c9cd7f2a343bb7bb9881326d7bb34db2e2fad 25-Mar-2018 Svet Ganov <svetoslavganov@google.com> Add API to query if a UID is active

Test: cts-tradefed run cts-dev -m CtsCameraTestCases

Bug: 72863398

Change-Id: I4bacfd87cac782ef178e9a279cd833b229150ae1
/frameworks/base/core/java/android/app/IActivityManager.aidl
47a65c79c94ac605e3a17e66555f2db7ac05b9d1 15-Feb-2018 Lucas Dupin <dupin@google.com> Hide activities when AOD comes in

Display timeout does not lock the keyguard, which means that
activities won't immediatelly disappear.

We need to factor AOD into to equation to make sure that
the user won't see phantom activities under the status bar
window when the display times out.

Fixes: 73120928
Test: open Settings, wait for display timeout
Test: Wait for display timeout, press power, see launcher
Test: Launch maps, start navigation (FLAG_SHOW_WHEN_LOCKED)
Test: Go to AOD, press power button: activity is occluding keyguard
Test: Press home: bouncer shows up
Test: Unlock: maps goes into pip mode
Test: Go to AOD and back to lock screen: keyguard visible
Test: Expand maps, go to AOD, back to lock screen: maps is occluding keyguard
Change-Id: I9b7512313af2f851d8788ec53de7880bce3bed2c
/frameworks/base/core/java/android/app/IActivityManager.aidl
402de825e7d1e27d34e56d71b6e2ef2e541c986d 22-Mar-2018 Wale Ogunwale <ogunwale@google.com> Don't show unsupported sdk warning in test harness.

Also, added test api AM.alwaysShowUnsupportedCompileSdkWarning
that allows for forec showing the warning for an activity
component running in a test harness.

Change-Id: I72f6a8425cb6adc6060c70b2165aa82b459769f7
Fixes: 75455658
Test: atest CtsActivityManagerDeviceTestCases:PrereleaseSdkTest
/frameworks/base/core/java/android/app/IActivityManager.aidl
15c3e602e9161bd8c98dffff4317e05d999ef246 01-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Removed AMS.updatePersistableUriPermission()"
988234a3437c815f5fdc50c5642e4fcfeb30a0a2 14-Feb-2018 Felipe Leme <felipeal@google.com> Removed AMS.updatePersistableUriPermission()

Bug: 72055774

Test: manual verification
Test: atest CtsAppSecurityHostTestCases:ScopedDirectoryAccessTest#testResetDoNotAskAgain,testResetGranted
Test: atest CtsAppSecurityHostTestCases:ScopedDirectoryAccessTest

Change-Id: I90cd9a79a1caa19989e00dbc1a656469bc3221f9
/frameworks/base/core/java/android/app/IActivityManager.aidl
4d64c093cd785e7a53fafe1aaf796ed734d61a02 22-Feb-2018 Suprabh Shukla <suprabh@google.com> Added an api to query ForcedAppStandby state

Adding an api which apps can query to check if the user has put them
into forced app standby.
An app may want to do this to manage expectations for any jobs or alarms
it schedules. It can also be used as an indication that the user noticed
unreasonable battery consumption attributed to the app.

Test: atest android.app.cts.ActivityManagerTest#testIsBackgroundRestricted

Bug: 73664209
Change-Id: I870f6c852c500769d3bf99d5a9ba3bf4eb1b65f5
/frameworks/base/core/java/android/app/IActivityManager.aidl
5527a50ad4f02fb2b7d57eeb942a6ee3d81b2f38 21-Feb-2018 Wale Ogunwale <ogunwale@google.com> Fixed issue with relaunching activity in the stopped state

- Cycle activity back to the stopped state if relaunched while the
activity is in the stopped state.
- Also, process Activity.recreate() request locally. After the
activity life cycler changes/clean-up we no longer need to request
the relaunch from the server since it is much easier now to cycle
the activity back to its previous state without help from the server
side.

Change-Id: Ie63420361a50d3dee2cbbcc2bbd34f3099c93996
Fixes: 64610483
Test: atest CtsActivityManagerDeviceTestCases:ActivityLifecycleTests
/frameworks/base/core/java/android/app/IActivityManager.aidl
22d92b76bccd6666ea34009310dced62ba79165b 08-Feb-2018 Rajeev Kumar <rajekumar@google.com> Implement atom puller for ProcessMemoryState.

We would like to gather memory metrics of the processes when LMKD kills
a process. By gathering this info we would be able to analyze and improve
system health by potentially reducing memory footprint of the processes
contributing to the memory pressure on the device.

This feature would be available on production builds.

Perf analysis:
On an average getMemoryStateForProcesses method call takes
0.59 milli seconds per process.

To know more about this see: http://go/android-p-memory-metrics

Bug: 72177881
Test: Tested manually
Change-Id: Ice94c2d937a5c84bc205981d99588a30f686ff9b
/frameworks/base/core/java/android/app/IActivityManager.aidl
ce3f5d00f953203442dfbe07841d1c36a4eba00f 15-Feb-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added new AM method: updatePersistableUriPermission()"
7a429721dee97e0fcfc930ed986f9bc8362eb28b 26-Jan-2018 Felipe Leme <felipeal@google.com> Added new AM method: updatePersistableUriPermission()

This method will be used by the DocumentUI's ScopedDirectoryProvider
to update (grant or revoke) Scoped Directory Access permissions.

NOTE: it's currently implemented both on AM and AMS, but the latter will be
replaced by calls to takePersistableUriPermission() or
releasePersistableUriPermission().

Test: manual verification
Test: atest CtsAppSecurityHostTestCases:ScopedDirectoryAccessTest#testResetDoNotAskAgain,testResetGranted
Test: atest CtsAppSecurityHostTestCases:ScopedDirectoryAccessTest

Bug: 63720392
Bug: 72055774

Change-Id: Icd7c8b7756d78fd137ba7b05ab5e35efdfcd19af
/frameworks/base/core/java/android/app/IActivityManager.aidl
04dc5968c0172442b09023afbe81d295f6dac9fb 29-Jan-2018 Jorim Jaggi <jjaggi@google.com> Override all transitions from package start

When launching a notification, often the launch goes into a
service, broadcast or trampoline activity that starts another
activity, for which we loose the ability to control the animation
because we don't provide the activity options anymore.

This CL adds the ability to override all activity launches
originating from a certain package for a couple of seconds, such
that we have the ability to still control the animation from
SystemUI.

Test: go/wm-smoke
Test: Start stopwatch, press home, press notification
Test: atest PendingRemoteAnimationRegistryTest
Change-Id: I4d077c4ac4565f060e849e4b33920d2bf4a80d48
/frameworks/base/core/java/android/app/IActivityManager.aidl
76f0ccb5f1079040b28505e48fe8822b88d474f1 29-Jan-2018 Alison Cichowlas <asc@google.com> Revert "Security model for moving sharesheet to systemui"

This reverts commit 88f3d4dbe1dbc08316d8a9e25edce1ad16fe2eab.

Bug: 72554856
Test: repro instructions in bug
/frameworks/base/core/java/android/app/IActivityManager.aidl
66f0026f3f27e71dfb764df438ce9016d7c5f08d 26-Jan-2018 Winson Chung <winsonc@google.com> Merge changes from topics "reland_recents_animation", " reland_recents_animation"

* changes:
Fix issue with reparenting stacks on displays.
Revert "Revert "4/ Update SysUI shared lib for Recents transition""
Revert "Revert "3/ Add input consumer to capture touches during a Recents transition""
Revert "Revert "2/ Add support for remote Recents animation""
Revert "Revert "1/ Create display content window controller to position stacks in the display""
6b3dd70b1f92b6728396dc36bb263b68eeaebae5 26-Jan-2018 Android Build Merger (Role) <noreply-android-build-merger@google.com> Merge "Merge "ActivityManager: Add support for agents on startup" am: d5cba89b98 am: ebc0afd811" into oc-mr1-dev-plus-aosp
am: 954ba2c6a1

Change-Id: I218eb054ef0da896c72674c597249c6a5120500d
e2d721781fc024cbd9a14929741e5b476242291f 25-Jan-2018 Winson Chung <winsonc@google.com> Revert "Revert "2/ Add support for remote Recents animation""

This reverts commit 9f8518e532e41ba57916afc49bba72bc23ad3eda.

Reason for revert: Testing relanding changes with ag/3515280

Change-Id: I410bd752c815a5b998a719453def01e00a9d47c8
/frameworks/base/core/java/android/app/IActivityManager.aidl
23a0c7a009284d5587839ea87e0e621d06774552 24-Jan-2018 Felipe Leme <felipeal@google.com> Internal Framework changes needed by DocumentUI's ScopedAccessProvider:

- Changed AM.getGrantedUriPermissions() API.
- Made DocumentsContract.PATH_TREE public.

Also fixed related AM methods to use explicit for on some loops.

Bug: 63720392
Test: manual verification

Change-Id: I33bdcb949f4301534bd8467c8018d6f03b4588a4
/frameworks/base/core/java/android/app/IActivityManager.aidl
5b495d54d3831bd1a72309643f724958e814c90c 23-Jan-2018 Andreas Gampe <agampe@google.com> ActivityManager: Add support for agents on startup

Add setAgentApp similar to setDebugApp. If given, attempt to attach the given
agent during handleBindApplication.

The flow needed a slight refactor. It is not possible to do a debuggability
check at setAgentApp time (without checking all installed apps). Instead,
when a ProfilerInfo contains an agent, perform a debuggability check then.
This is consistent with how setDebugApp works.

Expose through the shell command:

cmd activity set-agent-app process agent

Add CTS coverage.

Bug: 69929492
Test: m
Test: m cts
Test: cts-tradefed run commandAndExit cts-dev -m CtsJvmtiAttachingHostTestCases
Change-Id: I65e869debd45e6073f9ab21cb9de9c9deb828a2e
/frameworks/base/core/java/android/app/IActivityManager.aidl
e9d3cc5ad8f55c266ed1ef85fd41da62f4797ecb 25-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "ActivityManager: add API for wifi bug report"
d9e1df58be2882d025aa0585e0258742afad21cb 22-Jan-2018 mukesh agrawal <quiche@google.com> ActivityManager: add API for wifi bug report

Under certain (limited) conditions, we would like to
automatically trigger a bug report to help diagnose
Wifi problems.

The regular bugreport can't be used for this purpose,
as it takes a long time to generate. To support
lightweight auto-bug generation, add a Wifi-specific
bugreport.

Bug: 69934148
Test: manual

Manual test
-----------
- boot walleye
- enable wifi
- connect to googleguest
$ adb root
$ adb shell pkill -f 'wifi@'
- notice "Bug report #1 captured" notification
$ adb pull '/data/user_de/0/com.android.shell/files/bugreports
$ unzip bugreports/*.zip
$ grep "was the duration of 'DUMPSTATE'" bugreport*.txt
-> ------ 1.548s was the duration of 'DUMPSTATE' ------

Change-Id: If657eb8f61b16cefe717c977663438c28f515bd7
/frameworks/base/core/java/android/app/IActivityManager.aidl
88f3d4dbe1dbc08316d8a9e25edce1ad16fe2eab 22-Nov-2017 Geoffrey Pitsch <gpitsch@google.com> Security model for moving sharesheet to systemui

ResolverActivity (still in frameworks) now requests a "permission token"
that it hands to a stubbed system ui activity ChooserActivity.

This permission token allows an app (SysUI) with the signed permission
"START_ACTIVITY_AS_CALLER" to call
ActivityManagerService#startActivityAsCaller. Permission tokens are a
one-time use, limited-time offer.

Test: runtest systemui && manual testing
Bug: 69850752
Change-Id: I3600e1a8ff9eea7397f5f59853423c79b6401f98
/frameworks/base/core/java/android/app/IActivityManager.aidl
f84e2f60fec6f6d2ecfb3b90ddf075101f4b902f 16-Jan-2018 Jorim Jaggi <jjaggi@google.com> Add ability to register remote animation definitions per activity

This introduces a more stable way of setting a remote animation
than using overridePendingTransition: An activity can register
a set of remote animations which is broke down by transition type.
Whenever the activity is involved into such a transition, the
remote animation will be started.

Remote animations take precedence over regular animations, and
prefixOrderIndex in the hierarchy decides precedence within
multiple apps that set remote animation definitions such that
higher apps override lower apps.

Bug: 64674361
Test: go/wm-smoke
Test: Use with launcher
Change-Id: Id300ff62d9f60966ea2609168f6a02860b3de7af
/frameworks/base/core/java/android/app/IActivityManager.aidl
c80c67e7bc96691b6e3700bac49e819ad52db0ae 04-Dec-2017 Lucas Dupin <dupin@google.com> Allow custom keyguard "prompt reason"

Adds the possibility of presenting a custom message on
the keyboard if you're trying to dismiss the keyguard.

This is particularly useful when you're showing the
bouncer because custom authentication (SmarLock)
failed.

Test: launch FLAG_SHOW_WHEN_LOCKED activity and
call KeyguardManager#requestDismissKeyguard
Fixes: 63940122
Change-Id: I0d88c0e59521887efa56d74874062b2b14970e4e
/frameworks/base/core/java/android/app/IActivityManager.aidl
695cf72f26638f051d356abcb4acdc0c1fe3918d 21-Dec-2017 Narayan Kamath <narayan@google.com> Support chained attribution for alarm related WorkSources.

.. those passed down via the AlarmManager.set() variant that takes
a WorkSource. This required a minor re-arrangement of code in
the ActivityManager. We now treat WorkSources as opaque in the
AlarmManager and simply push them down to the AM (and eventually
to BatteryStats) where they are picked apart.

Test: BatteryStatsNoteTest, AlarmManagerTest
Bug: 62390666
Change-Id: I118f1a1d16aafa41b4f401f1a6a3ba4d2d5eca8f
/frameworks/base/core/java/android/app/IActivityManager.aidl
988f66885cce2149c73e1ea12304fb98163d5efc 17-Nov-2017 Jorim Jaggi <jjaggi@google.com> Lock free app animations (4/n): Implement thubmnail

Bug: 64674361
Test: go/wm-smoke
Change-Id: I8f25dae04b69613c93ccb5416c2cda2df6373103
/frameworks/base/core/java/android/app/IActivityManager.aidl
b743b067e51143330de144290fe406a0eb0ea0c5 26-Dec-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Don't record audio if UID is idle - core framework"
b430d8ff06c78c7879eecd5137726d86d2c615d7 16-Dec-2017 Sudheer Shanka <sudheersai@google.com> Merge "Start processes asynchronously in AMS."
f6690100be5c5cd75c64d9a6a0345acff7b754d1 16-Oct-2017 Sudheer Shanka <sudheersai@google.com> Start processes asynchronously in AMS.

Currently, process start is initiated in ActivityManagerService
holding the main lock and this takes ~40ms to complete. As seen
in some of the issues in previous releases, this is one of the
contributors of the lock contention in system_server. This change
tries to address this issue by moving the process start outside
the locked section.

When a process start is required, instead of doing it synchronously,
this request will be posted on a handler thread. On the handler thread,
this process start request will be completed without holding a lock.
If for some reason, we decide the process is not needed anymore before
it is actually started or being started, then AMS does everything as
usual removing the references to the process from internal state except
actually killing the process which will be handled on the handler
thread.

Bug: 68775202
Test: Ran app startup perf tests using forrest, will update the bug with results.
Test: https://docs.google.com/spreadsheets/d/1cW81guRALZXKsN-WZsKyQiCSY-RgkJ2m_M9IfqIquz8
Test: cts-tradefed run singleCommand cts-dev -m CtsActivityManagerDeviceTestCases
Test: cts-tradefed run singleCommand cts-dev -m CtsWindowManagerDeviceTestCases
Test: cts-tradefed run singleCommand cts-dev -m CtsAppTestCases
Test: cts-tradefed run singleCommand cts-dev -m CtsMultiUserHostTestCases
Test: adb shell am instrument -e package com.android.server.am -w \
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Test: adb shell am instrument -e class com.android.server.pm.UserManagerTest -w \
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Test: adb shell am instrument -e package android.content -w \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: cts-tradefed run singleCommand cts-dev -m CtsProviderTestCases
Test: cts-tradefed run singleCommand cts-dev -m CtsContentTestCases -t \
android.content.cts.ContentResolverTest
Test: cts-tradefed run singleCommand cts-dev -m CtsContentTestCases -t \
android.content.cts.ContentProviderTest
Test: cts-tradefed run singleCommand cts-dev -m CtsWebkitTestCases
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideWebViewTests
Test: cts-tradefed run singleCommand cts-dev -m CtsAssistTestCases
Test: make WebViewLoadingTests && make tradefed-all && tradefed.sh \
run template/local_min --template:map test=WebViewLoadingTests
Test: adb shell setprop wrap.com.google.android.apps.maps \
'"LIBC_DEBUG_MALLOC_OPTIONS=backtrace logwrapper"'
&& adb shell dumpsys meminfo --unreachable <PID_OF_APP>
&& check ppid of <APP> is logwrapper's pid.
Test: cts-tradefed run singleCommand cts-dev -m CtsWrapWrapNoDebugTestCases
Test: cts-tradefed run singleCommand cts-dev -m CtsWrapWrapDebugTestCases
Test: cts-tradefed run singleCommand cts-dev -m CtsWrapNoWrapTestCases
Test: cts-tradefed run singleCommand cts-dev -m CtsWrapWrapDebugMallocDebugTestCases
Test: manual

Change-Id: I1fe7ce48cd5a4aadccaf6b3d6fdb5cad3304f1d3
/frameworks/base/core/java/android/app/IActivityManager.aidl
1d99c391ecd30c27be2e8f61aa9ec64546d15d4b 08-Dec-2017 Christopher Tate <ctate@google.com> Cancel alarms & jobs when an app's data is cleared

In the same bit of code, fix a system restore issue: in the
course of setup + restore, we reestablish permission grants and
notification state up front for the to-be-restored app, and
then bring in its data. However, a data wipe is part of the
prologue for that data delivery -- so we were inadvertently
unwinding the permission grants and notification state restore
that we'd just performed. Now, we distinguish the restore flow
from other clear-data operations so we don't unwind that operation.

Finally take the opportunity to elide a lot of copypasta code into
a single predicate-driven implementation.

Bug: 67508896
Bug: 69538432
Test: atest android.app.cts.AlarmManagerTest

Change-Id: I15c912c3c99645599ae9bd6fb7337fa86b4e5757
/frameworks/base/core/java/android/app/IActivityManager.aidl
64fd8c0bdd6d9304562f22ba87a864733b0da183 01-Dec-2017 Tony Mak <tonymak@google.com> Allow caller to specify target to start in setQuietModeEnabled

So, UMS can start the target once user is unlocked.

Test: No secure lock. Try turn off and on work mode by tapping work app.
Test: Have secure lock. Try turn off and on work mode by tapping work app.
Test: Turn off work mode. Reboot. Try to tap on any work app to turn on work mode.

BUG:69926710

Change-Id: Iaaccd5d763f7e36e5a43bad5261f1eb16060f9d6
/frameworks/base/core/java/android/app/IActivityManager.aidl
c59b4f6f8d8b16108e968ee3d6dd9e800c40d05a 30-Nov-2017 Wale Ogunwale <ogunwale@google.com> Don't send userLeaving hint when entering split-screen mode.

If the current activity stack we are resuming is in multi-window mode
and the last resumed activity stack should still be visible, then don't
send userLeaving hint as the activity will still be visible to the user
after onPause is called.
Also, added option to say if recents activity should be shown when
split-screen is activated. starting the recents activity during
CTS testing can cause timing issues since the recents activity might
be started after the activity we are trying to launch adjacent to
split-screen.

Change-Id: Iba1d0749062e7365a207ba1172705b5ab70cb869
Fixes: 69419620
Test: ActivityManagerSplitScreenTests.testNoUserLeaveHintOnMultiWindowModeChanged
/frameworks/base/core/java/android/app/IActivityManager.aidl
e99bc0501a288735d337f2ff64f8fa47f766a59b 20-Nov-2017 Adrian Roos <roosa@google.com> WM: Move WindowManagerPolicy, DisplayFrames and WindowManagerInternal into services

Splits WindowManagerPolicy into a framework and a services part, preventing concepts that are
internal to the window manager from leaking out into the framework.

Test: make droid
Change-Id: I7b6a54f55f76f6fbb5f27090981b8f1d4d8be88b
/frameworks/base/core/java/android/app/IActivityManager.aidl
14ab967eddc1cb2790765564152c250ecf05bcb6 23-Nov-2017 Svet Ganov <svetoslavganov@google.com> Don't record audio if UID is idle - core framework

If a UID is in an idle state we don't allow recording to protect
user's privacy. If the UID is in an idle state we allow recording
but report empty data (all zeros in the byte array) and once
the process goes in an active state we report the real mic data.
This avoids the race between the app being notified aboout its
lifecycle and the audio system being notified about the state
of a UID.

Test: Added - AudioRecordTest#testRecordNoDataForIdleUids
Passing - cts-tradefed run cts-dev -m CtsMediaTestCases
-t android.media.cts.AudioRecordTest

bug:63938985
Change-Id: I15264c5c4b47813ca60280bce30b22b8b1f87eab
/frameworks/base/core/java/android/app/IActivityManager.aidl
e210468aa0adfdd1937b7d5cd424d9c50e69d933 09-Nov-2017 Winson Chung <winsonc@google.com> Move assist data receiver interface to accessible namespace

- Also adding bundle options to pass to the recents component that is
launched through startRecentsActivity()

Bug: 67864419
Test: Everything builds, existing tests pass
Test: go/wm-smoke
Change-Id: Ie9ee472efb132add69b8bc10798dc5214d1fa1e2
/frameworks/base/core/java/android/app/IActivityManager.aidl
84deaa29d4f72f66b645df12048a98a83aaa3fac 02-Nov-2017 Winson Chung <winsonc@google.com> Ensure closeSystemDialogs() is not oneway.

Bug: 68787785
Test: Launch overview with QS down
Change-Id: I136a3d2e45a91abe364027747bca03d4edb454c5
/frameworks/base/core/java/android/app/IActivityManager.aidl
b43a529e5bdc2ec52a2dc1f91bd294423a6d9130 01-Nov-2017 Winson Chung <winsonc@google.com> Merge changes Icb5ea78e,I1cf97299

* changes:
Move more calls to the lib.
Migrating some animation spec logic to shared lib
11e7d7d65051ada66733f9784c9f6e2990abc506 31-Oct-2017 Charles He <qiurui@google.com> Merge "AM: make LockTask truly multi-task-aware."
aa357456902e69c3e56b4ec763069e7f6d6d0cc2 31-Oct-2017 Winson Chung <winsonc@google.com> Move more calls to the lib.

- Move the task stack listener wrapper into the shared lib, along with some
other AM calls.

Bug: 67510855
Test: Launch recents

Change-Id: Icb5ea78ec42d4b76a1c531ce336dd9a3f07a9629
/frameworks/base/core/java/android/app/IActivityManager.aidl
73f6b8a6fc8bf211b8a15b9f4fbccc28c5df6090 31-Oct-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Renamed moveTaskToDockedStack to setTaskWindowingModeSplitScreenPrimary"
a17d0ac384e356a8a53278d207ac8d5ad346b703 30-Oct-2017 Winson Chung <winsonc@google.com> Merge "2/ Add API to start overview activity with assist callbacks"
941dcba6e310e0bafcc1459422e7db01c5b70bb0 30-Oct-2017 Winson Chung <winsonc@google.com> Merge "1/ Refactor out logic to fetch assist data asynchronously"
ff9b4dff6c62f8b6a950edfdd2c136b697c612ad 22-Sep-2017 Charles He <qiurui@google.com> AM: make LockTask truly multi-task-aware.

LockTask was first designed to be single-task only. It was later
expanded to multi-task use cases in a rather flawed manner. Many aspects
of the implementation overlook the implications of more than one locked
tasks, and sometimes completely ignore the LockTask-unaware apps.

For example, LockTask-unaware apps are not registered in
LockTaskController's list of locked tasks, although they can be launched
in LockTask mode as long as they are whitelisted. As a consequence,
these unregistered tasks are not finished when their whitelist
authorization is removed.

In this patch, we make sure LockTask-unaware apps are also registered,
and introduce the notion of a root task, thus providing a genuine
multi-task experience with LockTask.

Bug: 66130096
Bug: 66132035
Test: bit FrameworksServicesTests:com.android.server.am.LockTaskControllerTest
Test: cts-tradefed run cts-dev -m DevicePolicyManager --test com.android.cts.devicepolicy.DeviceOwnerTest#testLockTask_deviceOwnerUser
Test: manual, by using TestDPC > Start kiosk mode
Change-Id: I68a26d2198fa3991f85ae1e7a6acae5981c34db5
/frameworks/base/core/java/android/app/IActivityManager.aidl
bf15587d0d7522aabfbc975738d8fd08aef3c40f 28-Oct-2017 Matthew Ng <ngmatthew@google.com> Renamed moveTaskToDockedStack to setTaskWindowingModeSplitScreenPrimary

Renamed a few functions related to moveTaskToDockedStack to use the new
notion of split screen primary windows instead of docked stack. Most of
the calls that use moveTaskToDockedStack are renamed.

Test: go/wm_smoke
Bug: 68017311
Change-Id: I73df051a9261d213b3415ac132962d91ec632e0a
/frameworks/base/core/java/android/app/IActivityManager.aidl
ec1ef09c23d505f49010fa3ecb85ed19aaa27fee 26-Oct-2017 Winson Chung <winsonc@google.com> 2/ Add API to start overview activity with assist callbacks

- Only the recents component package can launch the overview activity
directly, and if an assist data receiver is provided, then assist data
will be proxied to the caller.

Bug: 67864419
Test: com.android.server.am.RecentTasksTest
Test: com.android.server.am.AssistDataRequesterTest
Test: CtsVoiceInteractionTestCases
Change-Id: Icdd7e6716a84c11e9262ce5453f7d39ae7d8ce77
/frameworks/base/core/java/android/app/IActivityManager.aidl
da2818fe89e7f37ee60169ce653197049db450ea 24-Oct-2017 Winson Chung <winsonc@google.com> 1/ Refactor out logic to fetch assist data asynchronously

- This logic will also be used when the recents component is started to
fetch assist data associated with the current activity.

Bug: 67864419
Test: com.android.server.am.AssistDataRequesterTest
Test: CtsVoiceInteractionTestCases

Change-Id: I4cb3c2536a104d7071bc0a1fd6e31dfc2c0ce8d0
/frameworks/base/core/java/android/app/IActivityManager.aidl
cee763269addef3e71630ccfc76d849fc335c193 05-Sep-2017 Peter Visontay <pvisontay@google.com> Fix some paths (in comments) pointing to old locations of C++ Binder interfaces.

Test: None (comment changes).

Change-Id: I372e38bbb73c9d0a289089b239fa669f130252ba
/frameworks/base/core/java/android/app/IActivityManager.aidl
ab57e18da1b249db29e54ce33ad58117652a7e0d 27-Oct-2017 Charles He <qiurui@google.com> Merge "DPM: introduce setLockTaskFeatures()."
61c9e5a62933a9fe933ce5e6a4343cd0fbd8a532 11-Oct-2017 Winson Chung <winsonc@google.com> 5/Organize and make running tasks code more efficient

- 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
/frameworks/base/core/java/android/app/IActivityManager.aidl
e078db7539da53bac754ac2442dc07a156718417 19-Oct-2017 Charles He <qiurui@google.com> DPM: introduce setLockTaskFeatures().

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
/frameworks/base/core/java/android/app/IActivityManager.aidl
5fa397533fa29254e8a45a05675b2c03756a0ada 04-Oct-2017 Winson Chung <winsonc@google.com> 4/Clean up use of hidden recent task flags

- 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
/frameworks/base/core/java/android/app/IActivityManager.aidl
89be5761bcacfb27bbc63d0e94a86b666f52f294 04-Oct-2017 Wale Ogunwale <ogunwale@google.com> Removed sys-ui's use of static stack ids.

Test: Existing tests pass
Test: go/wm-smoke
Bug: 64146578
Change-Id: Ia74b363358cbae383e74dbc33fdcbb37191f0419
/frameworks/base/core/java/android/app/IActivityManager.aidl
388945c01d4e00701e0157c96390eeac4b307b8a 04-Oct-2017 Wale Ogunwale <ogunwale@google.com> Changed to allow removal of remaining static stack ids from CTS.

Test: Existing tests pass.
Bug: 64146578
Change-Id: Ia9e7c62427f270fe6cbfd60e068f7c2c95133c53
/frameworks/base/core/java/android/app/IActivityManager.aidl
68278568de7479f9fef31517d799c2c254dd1d37 24-Sep-2017 Wale Ogunwale <ogunwale@google.com> HOME_STACK_ID, ASSISTANT_STACK_ID, and RECENTS_STACK_ID be gone!

Replaced usages with ACTIVITY_TYPE_HOME, ACTIVITY_TYPE_ASSISTANT
and ACTIVITY_TYPE_RECENTS.

Test: go/wm-smoke
Test: Existing tests pass.
Bug: 64146578
Change-Id: I62c55c99df86dba8c9ba9d9986049de1b1083234
/frameworks/base/core/java/android/app/IActivityManager.aidl
9f2f7a50ae1332eac4f570fe24f7a2a488844777 20-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Delete unused interface IAM.swapDockedAndFullscreenStack()"
d5efc1fd0d153822bddc0537d0809a33345a9bcf 19-Sep-2017 Wale Ogunwale <ogunwale@google.com> Delete unused interface IAM.swapDockedAndFullscreenStack()

Deleting so I don't have to convert to the new windowing model later.

Test: Existing test pass.
Change-Id: I6adbe11348e3f01f4e32d8b404b6399d5eff7152
/frameworks/base/core/java/android/app/IActivityManager.aidl
67c036b1bad9f81dad809f30ed97751b08520cdd 24-Aug-2017 David Stevens <stevensd@google.com> Handle showWhenLocked on secondary displays

The keyguard has windows on the default display and the remote display
selected by MediaRouter. Keyguard occlusion only applies to the default
display. To make the activity showWhenLocked flag work on secondary
displays, pass the display id of the locked secondary display from the
SystemUi to KeyguardController and make its isKeyguardShowing method
take a displayId.

Test: android.server.cts.ActivityManagerDisplayTests
Test: #testSecondaryDisplayShowWhenLocked
Bug: 64994006
Merged-In: Ib31fc76e9df469e97a59a181f09d457ceed4ef5f
Change-Id: Ib31fc76e9df469e97a59a181f09d457ceed4ef5f
/frameworks/base/core/java/android/app/IActivityManager.aidl
53a39eacc28b8e022499a208ff74b11e260ea204 24-Aug-2017 David Stevens <stevensd@google.com> Handle showWhenLocked on secondary displays

The keyguard has windows on the default display and the remote display
selected by MediaRouter. Keyguard occlusion only applies to the default
display. To make the activity showWhenLocked flag work on secondary
displays, pass the display id of the locked secondary display from the
SystemUi to KeyguardController and make its isKeyguardShowing method
take a displayId.

Test: android.server.cts.ActivityManagerDisplayTests
Test: #testSecondaryDisplayShowWhenLocked
Bug: 64994006
Change-Id: Ib31fc76e9df469e97a59a181f09d457ceed4ef5f
/frameworks/base/core/java/android/app/IActivityManager.aidl
e82e1fad144557803a6eb1df056de1c4997be193 02-Sep-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Adding user forced app standby to alarms"
db6bf66ee3b82edf25874d5dea4e02b0a146fb16 31-Aug-2017 Suprabh Shukla <suprabh@google.com> Adding user forced app standby to alarms

The app op RUN_ANY_IN_BACKGROUND can be set to ignored to indicate that
any alarms for the receiving app will be delayed until the app op is set
to allowed or the app comes into the foreground. Power whitelisted apps
are exempted.

Test: cts-tradefed run cts-dev -m AlarmManagerTestCases

Fixes: 64446607
Change-Id: Ic48b52383ad5ccd726c62769cdca25202d1e3814
/frameworks/base/core/java/android/app/IActivityManager.aidl
e7d2b85068dfda580983a510f60983984c37e7ca 28-Aug-2017 Jorim Jaggi <jjaggi@google.com> Nuke everything obsoleted by task snapshots

Test: go/wm-smoke
Change-Id: If9c9c2e66d97d6a5fa94d0d62ae7459fdde2a9a0
/frameworks/base/core/java/android/app/IActivityManager.aidl
afb458f52cf0adaf5ea98477d0b2795a4a978d9f 25-Aug-2017 Benjamin Franz <bfranz@google.com> Merge "Refactor all lock task related methods into a new class"
a83859ffaa4d339729cbc1a8c114b73c6afedb00 03-Jul-2017 Benjamin Franz <bfranz@google.com> Refactor all lock task related methods into a new class

This simplifies the way lock task mode is called by creating a class
that is fully responsible for managing locked tasks. This enables unit
testing and makes it easier to see where individual calls are coming
from. Feeling is that there are some subtle bugs around synchronization
and expectations on the locked task APIs.

Also added unit tests for the new manager class.

Test: bit
FrameworksServicesTests:com.android.server.am.LockTaskManagerTest
Test: go/wm-smoke
Test: cts-tradefed run cts -m DevicePolicyManager --test
com.android.cts.devicepolicy.DeviceOwnerTest#testLockTask_deviceOwnerUser
Bug: 63909481
Change-Id: I3fa8606778fea5a801c21aebeb231db5a6bee47f
/frameworks/base/core/java/android/app/IActivityManager.aidl
3382ab1fc7cbd45194d502f18e7ea21c2b9a04ca 27-Jul-2017 Wale Ogunwale <ogunwale@google.com> Migrated some windowing methods from StackId to WindowConfiguration

First pass at transitioning away from using stack ids for windowing mode
to WindowConfiguration. Added some TODO that will require the introduction
of applicationType in WindowConfiguration before additional conversation
can be done.

Test: bit FrameworksServicesTests:com.android.server.wm.WindowConfigurationTests
Test: adb shell am instrument -w -e package com.android.server.wm com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Test: go/wm-smoke
Change-Id: I2b315623faa16445a9f942e082089123842cb5a1
/frameworks/base/core/java/android/app/IActivityManager.aidl
4d27b84d9579197875f6fbe2d0ac211b374c5a3a 17-Aug-2017 Jorim Jaggi <jjaggi@google.com> Log reportFullyDrawn into TRON

Test: AppStartTests
Change-Id: I17c511c9c4305c4cb327d52c81d97ad6d6a8c9d3
Fixes: 36093481
/frameworks/base/core/java/android/app/IActivityManager.aidl
94e82d9b0e7ee2e657564e5904b556eeefc1d423 14-Jul-2017 Andrii Kulian <akulian@google.com> DO NOT MERGE ActivityView be gone!

This hidden functionality is no longer support/needed since
we now have multi-window/display. A new view group class
will be added later that uses multi-window to support remaining
functionality of this class.

Test: go/wm-smoke
Change-Id: Ie2fa2de92841d33199da9988741905060dd1ddf4
/frameworks/base/core/java/android/app/IActivityManager.aidl
8d5a505d6a2b448c0f8ffc08098b897526499154 20-Jul-2017 Andrii Kulian <akulian@google.com> Merge changes from topic 'activity_view_v2'

* changes:
VirtualDisplay wrapper with input forwarding
ActivityView be gone!
b1cdb10e7c6c1c41c5a421d996f3bbee581dff36 14-Jul-2017 Andrii Kulian <akulian@google.com> ActivityView be gone!

This hidden functionality is no longer support/needed since
we now have multi-window/display. A new view group class
will be added later that uses multi-window to support remaining
functionality of this class.

Test: go/wm-smoke
Change-Id: Ie2fa2de92841d33199da9988741905060dd1ddf4
/frameworks/base/core/java/android/app/IActivityManager.aidl
8d652f8f7e48370b92314bbd547ddf2d66a1ed4b 12-Apr-2017 Christopher Ferris <cferris@google.com> Implement dumpheap -m.

Adds an option to dumpheap that calls mallocInfo and write the xml produced
to a file.

Bug: 36871013

Test: Run am dumpheap -m <FILE>, am dumpheap -n <FILE>, am dumpheap <FILE>
Test: and verified that they produce the correct data.
Change-Id: Ifb9e878ea621c7cacc3aa6e3a889c414681dee2d
/frameworks/base/core/java/android/app/IActivityManager.aidl
4556b7b8e553bb6a8d1512473704dda52dd1d3e8 07-Jul-2017 Makoto Onuki <omakoto@google.com> Add "-g" option to run GC to "am dumpheap".

Bug: 62144301
Test: manual test
Change-Id: I187e3acc3c3a97e6799192ab10b1bf16c7fee02f
/frameworks/base/core/java/android/app/IActivityManager.aidl
59b9885bc8b781b6312adedd67c2c7c270f9213c 13-Jun-2017 chaviw <chaviw@google.com> Added Activity flags to show on lock screen.

Added two new flags to the Activity to turn the screen on and
show on the lock screen. These can be used instead of the Window flags
LayouParams.FLAG_TURN_SCREEN_ON and LayoutParams.FLAG_SHOW_WHEN_LOCKED
to prevent the double onStart/onResume lifecycle events.

The flags can be set as an attr for the Activity in the AndroidManifest
using android:showWhenLocked="true" and android:turnScreenOn="true".
They can also be set through methods in the Activity class using
setShowWhenLocked(true) and setTurnScreen(true).

Fixes: 36850100
Test: Created sample application, tests/ShowWhenLockedApp, that set the
flags in the manifest and code. Tested multiple scenarios to
launch the Activity with the flags set and unset.
Test: cts-tradefed run commandAndExit cts-dev --module CtsServicesHostTestCases -t android.server.cts.KeyguardTransitionTests
Test: cts-tradefed run commandAndExit cts-dev --module CtsServicesHostTestCases -t android.server.cts.ActivityManagerActivityVisibilityTests
Test: cts-tradefed run commandAndExit cts-dev --module CtsServicesHostTestCases -t android.server.cts.KeyguardTests

Change-Id: I44f0e313df4531d49c7ac56108b6bf80e41fefc1
/frameworks/base/core/java/android/app/IActivityManager.aidl
c981ad5af3df9d76299aeb63232c4369fbf18628 13-Jun-2017 Wale Ogunwale <ogunwale@google.com> Remove visibleBehind functionality

The feature is no longer used by the TV team which was the only
product using it, so removing to reduce code complexity.

Test: go/wm-smoke
Change-Id: I563e30486ec4439f550b5adb94c4c617ea2a346b
/frameworks/base/core/java/android/app/IActivityManager.aidl
3e6e3855ea10c92a0328c360fc8414e85fb3ad61 20-May-2017 Dianne Hackborn <hackbod@google.com> Fix issue #38393543: Not allowed to start service Intent

Turns out there was another path in to the activity manager
to trigger a PendingIntent, which needs to be modified to
now also pass in the whitelist token of that pending intent.

Test: manual
Change-Id: I755ff87db1b782fa6974d404dcb490786053c5e0
/frameworks/base/core/java/android/app/IActivityManager.aidl
983055231b999e450def3e3df377fb4e23420711 06-May-2017 Dianne Hackborn <hackbod@google.com> Fix issue #37360626: Apps can schedule alarms (and other things) with temp whitelist

There is now an IBinder "token" that must be specified when setting
the whitelist duration for an Intent. To have the whitelist supplied,
the caller to send a PendingIntent must pass in the same token. The
PendingIntent and IntentSender classes now internally maintain this token
to pass in when their send() is called.

The big complexity for making this work is we now need to associate this
whitelist token correctly with the actual PendingIntent objects that
applications and other code is getting. To do this, we propagate the
token in the Notification object, and have a new API on Parcel that allows
us to make it available to PendingIntent when it is unmarshalled. And
this allows to deal with PendingIntents appearing in nested bundles, as
we can propagate that information from the original Parcel to the new
Parcel that Bundle keeps to delay unmarshalling.

Test: manual
Change-Id: Idda00490ccfe2be37e4ab21354b9ab7528a52750
/frameworks/base/core/java/android/app/IActivityManager.aidl
f965f4038cfe775bfee973850d62caf3138076c8 05-May-2017 Dianne Hackborn <hackbod@google.com> Fix issue #38037532: Toasts cause apps to become foreground

ForegroundToken is now ImportanceToken, and doesn't actually
cause an app to become foreground (that is not needed for
toasts anyway).

Also improved output and logging -- new logs for changing
in key uid stats, and when force stopping services after a
uid goes idle.

Test: manual

Change-Id: I44dd391bb8d37857be1359f4b7021dc8d2cd0285
/frameworks/base/core/java/android/app/IActivityManager.aidl
fd31f85d0c6f19138d06d565d2b30b59e241a960 27-Apr-2017 Svet Ganov <svetoslavganov@google.com> Implement the rest of autofill importance modes

Test: CTS tests pass; augmented tests to verify new behavior

bug:36171235

Change-Id: Ieff2b8d7e1c3a3eba456deca7bed70c8e29c415e
/frameworks/base/core/java/android/app/IActivityManager.aidl
709904f8003a7122e185cfd32d1209e0e6975b77 25-Apr-2017 Winson Chung <winsonc@google.com> Updating PiP API and documentation.

- Renaming PictureInPictureArgs to PictureInPictureParams, making it
immutable and built with a builder class. In addition, making the
aspect ratio rational.
- Moving the check to get max number of actions to the activity to have
more flexibility going forward
- Also ensures that enterPictureInPictureMode() returns true if the
activity is already in PiP mode.
- Will follow up with CL to remove PictureInPictureArgs and related methods
once this CL drops

Bug: 35765211
Bug: 37638323
Bug: 37637423
Bug: 37636674
Bug: 36342780
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: android.app.cts.PictureInPictureParamsBuilderTest

Change-Id: I54a487d55a59c9ce8ac7bd6c80c61209c8b26224
Signed-off-by: Winson Chung <winsonc@google.com>
/frameworks/base/core/java/android/app/IActivityManager.aidl
1f4e053aef81e38ed905c210687c00d8f8d8bda4 20-Apr-2017 Chad Brubaker <cbrubaker@google.com> Merge "Address API review comments for registerReceiver" into oc-dev
8f40881e3e801e3372a738df29eefdbeea33d706 20-Apr-2017 Sudheer Shanka <sudheersai@google.com> Merge "Revert "Add new api Activity.getStartInitiatedTime."" into oc-dev
6d6015f652f1b7bca129a22b1bd256b990e3ca28 18-Apr-2017 Chad Brubaker <cbrubaker@google.com> Address API review comments for registerReceiver

Bug: 37465538
Test: manual; Verified that Instant Apps can send broadcasts to
receivers still via the changed API.

Change-Id: Ib0f3d0c8ee71234288ccecd07e621554eb9b70ac
/frameworks/base/core/java/android/app/IActivityManager.aidl
55337a831aaa9920ed52d3bc41b80c40591222f8 19-Apr-2017 Sudheer Shanka <sudheersai@google.com> Revert "Add new api Activity.getStartInitiatedTime."

This reverts commit bc308988bdcb76d67c80e85183bcfa8128f73890.

Change-Id: Ieaca7c9ec8b4affbb8ce98ebbcb663a531904bf8
/frameworks/base/core/java/android/app/IActivityManager.aidl
242ba3e997b45ec7ab5f8c40663c9044a13ad31f 15-Apr-2017 Christopher Tate <ctate@google.com> Turn down the preliminary foreground service API

The NotificationManager.startServiceInForeground() experiment is over,
and will not ship as API, so it's time to tidy up and get rid of it.

Bug 36130212
Test: manual

Change-Id: I834d1ce059aa464ff27f69f5e5d3625cc5e61d8a
/frameworks/base/core/java/android/app/IActivityManager.aidl
2359f016e28b0eca5974606013f99bdaef57bc22 15-Apr-2017 Sudheer Shanka <sudheersai@google.com> Merge "Add new api Activity.getStartInitiatedTime." into oc-dev
bc308988bdcb76d67c80e85183bcfa8128f73890 13-Apr-2017 Sudheer Shanka <sudheersai@google.com> Add new api Activity.getStartInitiatedTime.

This api will return the timestamp at which this activity start was last
initiated by the system. Implementation is wip.

Bug: 9058261
Test: cts-tradefed run singleCommand cts-dev -m CtsAppTestCases -t \
android.app.cts.ActivityStartTimeTest

Change-Id: I396458ecefbb09108f414b95f9c0beb6d609a4e1
/frameworks/base/core/java/android/app/IActivityManager.aidl
f66adfd1cd0dd565d7ba497da28a407e69995272 13-Apr-2017 Dianne Hackborn <hackbod@google.com> Add new facility to find out when a PendingIntent is canceled.

This is just an internal API in the platform, not (yet?) available
in the SDK. But it will be useful for system services that want to
clean up state if a pending intent that has been registered with them
is canceled (either explicitly by the app, through the app being
uninstalled, etc).

Also improve the activity manager's dump of pending intents to
organize them by package, making it much easier to read (now that
we have so many active pending intents these days).

Test: ran and booted. no CTS, since no API.

Change-Id: Iad029cfedcd77e87357eca7da1b6ae94451dd981
/frameworks/base/core/java/android/app/IActivityManager.aidl
ad6ab44e15a86c1130eef3b638343d47b5ada0e1 12-Apr-2017 Dianne Hackborn <hackbod@google.com> Merge "Add API to get a uid's current importance." into oc-dev
83249ec4f17494484f7923c90b3800a966fd6da3 12-Apr-2017 Dianne Hackborn <hackbod@google.com> Add API to get a uid's current importance.

This is kind-of useful to go along with monitoring
uid importance changes.

Test: none yet

Change-Id: Ic0f8418955d17ea21d06f49dcd9641bc5f32387b
/frameworks/base/core/java/android/app/IActivityManager.aidl
e7c5ced2119f89b8e8b722b9010e685db8168b69 12-Apr-2017 Charles He <qiurui@google.com> Disallow direct-boot aware activities to bypass work lock

Effectively reverting 89927b3cd96472c478a988d6c731cd09d412a043, which
allowed direct-boot aware activities in the work profile to show before
the profile was unlocked. This causes problems with key eviction
introduced in O. Specifically, many system activities (e.g.
ChooserActivity, activities in Settings, etc.) are marked direct-boot
aware, and therefore can be started while the work profile is locked
with key evicted. Currently they either bypass the keyguard when they
should not, or simply crash due to profile still being locked.

In the future, we need to create a new mechanism to allow activities
such as video calls, alarm clocks, etc. to bypass the work keyguard. It
probably involves checking for something like FLAG_SHOW_WHEN_LOCKED.

Bug: 36961785
Bug: 35708183
Bug: 30296144
Test: manual, by following the steps in the bugs quoted
Test: runtest -c com.android.server.am.ActivityManagerServiceTest frameworks-services
Change-Id: I5ccaaf963f3dd96e4abb785a10aa258b15363178
/frameworks/base/core/java/android/app/IActivityManager.aidl
424b03f75e98c8af4061236ef1dd2785f5608299 04-Apr-2017 Christopher Tate <ctate@google.com> Allow background default container service in a less crashy way

Turns out we run this code during early boot, before the device idle
service has even been constructed yet. Find another way to achieve
the needed service execution.

Bug 36865930
Test: manual

Change-Id: I8e3304f37c3a5ee125b73aef2b7d7c7b387aa200
/frameworks/base/core/java/android/app/IActivityManager.aidl
a47223f99b6b7ade4ae909c458d975eb487062b3 30-Mar-2017 Dianne Hackborn <hackbod@google.com> Implement issue #36590595: Add ability to associated a ClipData with JobInfo

Yum!

Also needed to have a Context.revokeUriPermission() variant that is sane,
so reasonable CTS tests can be written.

Test: new ClipDataJobTest added.

Change-Id: Ia3135ea788a6e32c971bae7dab3a844d0ef4139c
/frameworks/base/core/java/android/app/IActivityManager.aidl
08992ac57e973d6bf32693725ebb341a481e5944 21-Mar-2017 Christopher Tate <ctate@google.com> API refactor: context.startForegroundService()

Rather than require an a-priori Notification be supplied in order to
start a service directly into the foreground state, we adopt a two-stage
compound operation for undertaking ongoing service work even from a
background execution state. Context#startForegroundService() is not
subject to background restrictions, with the requirement that the
service formally enter the foreground state via startForeground() within
5 seconds. If the service does not do so, it is stopped by the OS and
the app is blamed with a service ANR.

We also introduce a new flavor of PendingIntent that starts a service
into this two-stage "promises to call startForeground()" sequence, so
that deferred and second-party launches can take advantage of it.

Bug 36130212
Test: CTS

Change-Id: I96d6b23fcfc27d8fa606827b7d48a093611b2345
(cherry picked from commit 79047c62b58fb0a0ddf28e2b90fe4d17e05bc528)
/frameworks/base/core/java/android/app/IActivityManager.aidl
ec319aba34deb91f89ec4e15004eee62d5f2801c 28-Mar-2017 Tony Mak <tonymak@google.com> Introduce AMS.getLastResumedActivityUserId to fix work profile icon issue

Problem:
Work profile status bar icon feeature is relied on two callbacks
1. onForegroundProfileSwitch (AMS.setResumedActivityLocked)
2. appTransitionStarting (WMS)

We assume callback 1 is always called before 2, but it is not the case.
These two callbacks are triggered by two handlers in two different threads,
and hence race condition happens.

Solution:
Not rely on onForegroundProfileSwitch to update mManagedProfileFocused
flag anymore. Query getLastResumedActivityUserId in appTransitionStarting.
Also, make sure mLastResumedActivity is updated before sending message
to WMS in setResumedActivityLocked.

Test: Start a work app, observe that the work icon is shown.
Test: Start a personal app, observe that work icon is gone.
Test: Dock the work app, tap on it (give it focus), observe that work
icon is shown.
Test: Start a work app, switch user, can see the icon is gone. Switch back,
icon is back.

Bug: 34159089

Change-Id: I2cee141d18e8b7d5607b26dd7a2fd5bc9cd0ebb3
/frameworks/base/core/java/android/app/IActivityManager.aidl
ca3d5434e8bc02a8e95ceef343f734d1d6e4b52a 17-Mar-2017 Naveen Kalla <mrnaveen@google.com> Add API to request Bug Report with a certain title and description

ActivityManagerService will send the details to dumpstate and
BugreportProgressService will get the details from dumpstate and use
that for the notification.

Bug: 33561517
Test: Modify TelephonyMonitor to use this API and ensure that the
notification uses that the title and description sent as arguments
to the API. File a bug using betterBug and ensure that the
information gets populated automatically.

Change-Id: I455f1df2278e5d569dd19c74245a0704dcf5a321
/frameworks/base/core/java/android/app/IActivityManager.aidl
0fe7ce968bc7f0eff64f08e2d51c8b1e6b4a6fc8 22-Feb-2017 Jorim Jaggi <jjaggi@google.com> Add API to disable snapshotting of activities

Test: runtest frameworks-services -c
com.android.server.wm.TaskSnapshotControllerTest
Test: Launch DisableScreenshotsActivity, go to recents, make sure
content is white.
Bug: 31339431

Change-Id: I329925d2fca389e561da3389a67fe888b5bb1033
/frameworks/base/core/java/android/app/IActivityManager.aidl
35e3f53a30588b79e0309fdbeef29a8c18eef65d 17-Mar-2017 Jorim Jaggi <jjaggi@google.com> Also store reduced resolution screenshots

In order to speed up loading time when scrolling through it
in recents. They will be used in recents in the next CL. Also, we
use JPG instead as loading JPG is much faster than PNG.

Test: TaskSnapshotPersisterLoaderTest
Test: TaskSnapshotCacheTest
Bug: 34829962
Change-Id: I4c74b26969ae459bd3b1a42707011a49f425abd9
/frameworks/base/core/java/android/app/IActivityManager.aidl
84a4895c9c1eb7f381d99fb8eb298d8335d4e480 09-Mar-2017 Sudheer Shanka <sudheersai@google.com> Update AMS to wait for network state update if requested by the main thread.

Bug: 27803922
Test: runtest -c com.android.server.am.ActivityManagerServiceTest frameworks-services
runtest -c com.android.server.am.ActivityManagerInternalTest frameworks-services
cts-tradefed run singleCommand cts-dev --module CtsHostsideNetworkTests
and manual
Change-Id: I7d1052b9941c1fae51ff8ab1c9b89dca3919ccd2
/frameworks/base/core/java/android/app/IActivityManager.aidl
dc4796c209c1b604f3dfe0615c04c0fcf69f55c5 08-Mar-2017 Craig Donner <cdonner@google.com> Allow setting a persistent VR thread.

Bug: 36215076
Test: adb shell am instrument -w -e class \
android.os.SetPersistentVrThreadTest \
com.android.frameworks.coretests/\
android.support.test.runner.AndroidJUnitRunner
cts-tradefed run cts -m CtsVrTestCases -t android.vr.cts.VrSetFIFOThreadTest
Change-Id: If2f3a5f1c8593c74ac35964f68dcbe75b4da472e
/frameworks/base/core/java/android/app/IActivityManager.aidl
ebf3a0d57fb940d6a312181a615f9ff0d1d55862 13-Mar-2017 Chad Brubaker <cbrubaker@google.com> Merge changes from topic 'receiver_IA'

* changes:
Enforce visibleToInstantApps for receivers
Only send exposed broadcasts to Instant Apps
642028fccd655d6c9dc8fd0865cd526c694993ab 10-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Replaced auto-fill by autofill to keep it consistent with API style."
640f30a7763b0a4b80c767acb84c740aac04768b 07-Mar-2017 Felipe Leme <felipeal@google.com> Replaced auto-fill by autofill to keep it consistent with API style.

This change will affects 2 types of apps: autofill service implementations
and apps that use autofill APIs.

Since just the former is known to be used at the moment, we're not trying
to keep backward compatibility with the latter.

Bug: 35956626
Test: CtsAutoFillServiceTestCases pass
Test: android.provider.SettingsBackupTest pass

Change-Id: Ia720083508716deae9e887f9faa7ae7c5a82f471
/frameworks/base/core/java/android/app/IActivityManager.aidl
330757dffa8d8de106e2c073eff09bf8238549a5 28-Feb-2017 Matthew Ng <ngmatthew@google.com> Corrects the recents and home stacks position around docked state (1/2)

Since splitting home stack into home and recents, some problems where
the home stack would appear above when home stack is not visible. This
would cause home stack to be below docked stack and think home is
visible when it is not. Then docking an app would minimize the docked
stack and go into a wierd state when recents is resumed/launched.

When docked stack is used, it will verify that recents is created and
avoids seeing home stack as visible when below docked stack with at
least 1 stack in between. Whenever an app is docked, this will make sure
home stack is below recents.

This will fix some parts of the cts tests that use
"adb shell am stack move-task <taskId> 3 true" and avoid glitches with
the docked stack.

The following scenarios were tested:
- Boot and dock and app without starting recents
- Dock after launching an app (when recents already created)
- Toggle dock with "adb shell am stack move-task <taskId> 3 true" and
undocking multiple times
- Dock with long press recents

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
CtsServicesHostTestCases
android.server.cts.ActivityManagerDockedStackTests
Bug: 35351074, 35145587
Change-Id: I6ac25c64f7d1050ea2260631ff4c052fcca3f185
/frameworks/base/core/java/android/app/IActivityManager.aidl
816c83bf037e2284a61ac8e918ff882d162d9321 02-Mar-2017 Chad Brubaker <cbrubaker@google.com> Enforce visibleToInstantApps for receivers

Instant apps can only send broadcasts to receivers that are declared in
the manifest with android:visibleToInstantApps=true or if the app
registers a receiver at runtime using the new methods that take
visibleToInstantApps.

Bug:33350280
Test: Manually sending broadcasts from Instant Apps only goes to
receivers with visibleToInstantApps set to true.
Test: Receiving a broadcast from within the same app does not require
visibleToInstantApps to be set.

Change-Id: I54d79a502ba9c5fd03ede3c09e08afc88fe2775f
/frameworks/base/core/java/android/app/IActivityManager.aidl
85d3998aa39f412f269806114b3e6154ccbee73f 25-Feb-2017 Winson Chung <winsonc@google.com> Prevent PiP movement while the resize animation is running.

- This was causing numerous artifacts when the user starts touching while
transitioning into PiP where the move rects clobber the animating rect.

Bug: 35764922
Test: Try touching the PiP while it is entering or exiting PiP
Change-Id: I5a72b5bea694b01aab401d2bb78a493688a9c655
/frameworks/base/core/java/android/app/IActivityManager.aidl
f764962b0d58008530955b70af1ebf68beb8d4ba 22-Feb-2017 Sudheer Shanka <sudheersai@google.com> Merge "Revert "Ensure network connectivity on app start.""
c9d9407e8ec10a56a4caa3c84122d1c6a1fedaab 22-Feb-2017 Sudheer Shanka <sudheersai@google.com> Revert "Ensure network connectivity on app start."

This reverts commit 27e693158398059d00ff20e60640cb105e255625.

Change-Id: I4c41ce7c1839d3b91931bc8a8f117f32bf6cd381
/frameworks/base/core/java/android/app/IActivityManager.aidl
3cb867326ae9d79cc8035ad9fa6c1d656946692f 14-Feb-2017 Robin Lee <rgl@google.com> Merge "Theme work lock activity with the task primaryColor"
27e693158398059d00ff20e60640cb105e255625 23-Jan-2017 Sudheer Shanka <sudheersai@google.com> Ensure network connectivity on app start.

Bug: 27803922
Test: cts-tradefed run singleCommand cts-dev --module CtsHostsideNetworkTests
Change-Id: Ifd7a52924cd6bbc809c9a3f92d52fe2df09b7fe2
/frameworks/base/core/java/android/app/IActivityManager.aidl
3c82d3d5bfea9b6483ad0264e6956eb5a00a2a4a 19-Jan-2017 Robin Lee <rgl@google.com> Theme work lock activity with the task primaryColor

This involves adding another system RPC, getTaskDescription(taskId)
gated on MANAGE_ACTIVITY_STACKS permission.

Bug: 31001762
Test: runtest -x frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/WorkLockActivityTest.java
Change-Id: Ieb996f7fab5bc79737df570e35733551118118d3
/frameworks/base/core/java/android/app/IActivityManager.aidl
8347163dbb64fb61012c0393163283106a0a351e 13-Dec-2016 Winson Chung <winsonc@google.com> Create a new stack for the assistant activity.

- Add a new stack that is not resized with multiwindow, and
appears above the fullscreen and docked stacks, but below
the pinned stack
- Add a method on VoiceInteractionSession to allow the assistant
to launch activities into this new fullscreen stack.
- Also prevent any activities in the assist stack from the
fetching of the on screen assist data.

Bug: 30999386
Test: android.server.cts.ActivityManagerAssistantStackTests

Change-Id: I22ab7629b5f758cf1e66d7d1c26648af6bc887c9
/frameworks/base/core/java/android/app/IActivityManager.aidl
bab851c7c9dfe6f3d063a1009c4d57cfa2ff005c 04-Feb-2017 Felipe Leme <felipeal@google.com> Refined session management so Save can be automatically called.

This is yet another big refactoring:

- AutoFillManager keeps track of its current AutoFillSession.
- Views call AFM.startSession(View) when they can trigger autofill.
(virtual views can call it as well). At this point, the manager
sets an AutoFillSession, gets the activity token, and passes it to
the service.
- Subsequent calls to AFM.start() will be ignored since the session
is set.
- When the Activity is gone, it calls AFM.finishSession().
- Simlilarly, virtual views could call it as well.
- Added getAutoFillValue() to View.
- Removed AFM.updateAutoFillInput(childId): virtual views should now
call startSession(childId) to start a session, and use the
VirtualViewListener callbacks for updates.
- Change AutoFillValue to use String (which is immutable) instead of
CharSequence for text values.
- Check if view is enabled before auto-filling.
- Removed 'cmd autofill fill' since it would require the appCallback
- Automatically dismiss the snack bar after 30s
- Moved the "don't change autofill value when autofilling" Inception
logic into the service side.
- Etc...

BUG: 34819567
BUG: 33269702
BUG: 31001899

Test: manual verification
Test: CtsAutoFillServiceTestCases passes

Change-Id: I5fad928d4d666701302049d142026a1efa7291cd
/frameworks/base/core/java/android/app/IActivityManager.aidl
340417356d92d0db71d0692344e66886ca795dfd 01-Feb-2017 Dianne Hackborn <hackbod@google.com> Implement issue #30977956: Enable Instrumentation tests for multi-process apps

New android:targetProcess attribute on <instrumentation> allows you to
specify the processes the instrumentation will run in.

This reworks how instrumentation is run in the activity manager to better
formalize its state and semantics, allowing us to keep track of it across
multiple processes. This also clearly defines what happens when multiple
instrumentations are running at the same time, which is useful for writing
CTS tests that test the instrumentation APIs themselves.

Adds a couple new APIs to Instrumentation that helps with the new
situation where instrumentation can run concurrently in multiple processes.

Test: new CTS tests added (textXxxProcessInstrumentation in
ActivityManagerTest.java in cts/tests/app/src)

Change-Id: I2811e6c75bc98d4856045b2f0a45fb24af5d366f
/frameworks/base/core/java/android/app/IActivityManager.aidl
0200d9ea1509089c0c03b7071aa271e3a9b35c11 25-Jan-2017 Felipe Leme <felipeal@google.com> Improved AutoFill Save workflow.

Currently, the onProvideAutoFillStructure() methods can be called
twice: to auto-fill an activity and to save the activity's data
in the service.

The problem with this approach is that when the save workflow is
called, the activity might have been gone. Hence, a proper approach
is to keep the initial AssistStructure data in the system_service
memory, watch for view changes, and then passed the new structure
back to the AutoFillService.

A side effect of this change is that we need another way to determine
if the view is sanitized or not. For "standard" views, that will be
defined based on whether the view content come from a resource or not,
but that logic is not implemented yet (for now, all views will be
considered sanitized, except for TextView passwords). For "custom"
views (such as WebView), this logic is responsibility of the view
implementation, through the newChild() method, which now takes a
flag (whose value could be AUTO_FILL_FLAG_SANITIZED for sanitized
views).

The SaveCallback.onSuccess() method was simplified: it does
not need a list of saved ids anymore the auto-fill UI will not use it
anymore.

Another side effect is that the Save notification is gone - until
it's attached again, it can be test by using:

adb shell cmd autofill save

Finally, hook AutoFillUI on ACTION_CLOSE_SYSTEM_DIALOGS events.

BUG: 33269702
BUG: 31001899
Test: manual verification
Test: CtsAutoFillServiceTestCases passes
Change-Id: I907a7e21d1b3cd1ab6dec3a08d144a52655da46f
/frameworks/base/core/java/android/app/IActivityManager.aidl
132dffbc83b2dd91218a8e82a4df9e4d2da128ac 26-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Animate starting work challenge from work lock"
5d59242c2ec590c5bc57744d4a7ab62890cc76c8 18-Jan-2017 Robin Lee <rgl@google.com> Animate starting work challenge from work lock

Bug: 31001762
Test: adb shell service call trust 6 i32 10 i32 1 && adb shell am start -a com.android.systemui.recents.TOGGLE_RECENTS
Change-Id: Ic6c622c32718bd235eb71704881b853072383dba
/frameworks/base/core/java/android/app/IActivityManager.aidl
24454ca4b86102f8eff6b43a0f73711cbb6d292f 24-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add an 'am crash' shell command"
c3af19a87dc70c321ffcc1e90453bb6f0545aef2 21-Jan-2017 Dianne Hackborn <hackbod@google.com> Optimize bg check flow.

No longer need to look up the application info, target SDK is
explicitly passed in to the check. For the external method, we
change this to just checked to see if background is completely
disabled, which doesn't need a target SDK check (and is the only
thing any of the current clients care about).

Now allow SystemUI to put targets of notification pending intents
on the temporary whitelist when they fire, so developers can avoid
dealing with background restrictions in this case (if the user
interacts with their notification, they will temporarily be
considered in the foreground).

Remove any thoughts of enforing restrictions on registerReceiver(),
so we don't need to deal with target SDK versions there (which can't
be done all that efficiently).

Also bring back the old "allow starts coming from foreground apps"
only for the MODE_IGNORE app op, since it should provide some
better compatibility.

Test: ran them.

Change-Id: Id4ea7f992d12ce4bd8e54f1dbaeb4a460a3dee59
/frameworks/base/core/java/android/app/IActivityManager.aidl
8aa8fe128992f7e47ecbc8588027eaec82012f3a 21-Jan-2017 Christopher Tate <ctate@google.com> Add an 'am crash' shell command

Induce a normal VM crash via adb, because it's quite different from the
effects of 'am kill'.

Test: induced crashes via adb shell using both pid & pkg

Change-Id: I79654afa7c4a70364cfd7d3af3e80a7b0e59b882
/frameworks/base/core/java/android/app/IActivityManager.aidl
961405613c0570e360fecb05c7d72e61f68e4d46 21-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Updating picture-in-picture API."
c2baac059c42765351745f1e2d46b685fe889db7 11-Jan-2017 Winson Chung <winsonc@google.com> Updating picture-in-picture API.

- Consolidating to enterPictureInPictureMode(), the new method will
attempt to put the activity into picture-in-picture mode if the
activity is visible or pausing in a state that would allow us to
pip it. Also consolidate the setting of the PiP aspect ratio and
actions into setPictureInPictureArgs().
- Fixing issue with onPause not completing when moving the
paused activity between stacks while dispatching onPause

Bug: 33692987
Test: android.server.cts.ActivityManagerPinnedStackTests

Change-Id: I3af2365f31a9b95de4a92eae46b77108947b2a49
/frameworks/base/core/java/android/app/IActivityManager.aidl
42a386b7717300bf6d75cbd3b4f7ad00f294be0d 07-Nov-2016 Christopher Tate <ctate@google.com> Enable background restrictions

Apps that target O+ are always subject to background restrictions.
Legacy apps' background restriction is subject to the OP_RUN_IN_BACKGROUND
app op.

Apps with these properties are exempted from background restrictions:
- persistent process
- currently on the idle battery whitelist
- global whitelist for things like bluetooth services

Bug 30953212

Change-Id: Icc19b2fbc05f40dcf8c3fc4abf718c373dc8d4f6
/frameworks/base/core/java/android/app/IActivityManager.aidl
8f3b174d90e3bf2093751fb1a1bd0603adac0222 19-Jan-2017 Adam Lesinski <adamlesinski@google.com> Merge "Teach apps to refresh AppInfos without restarting"
9e83cbbc10014b3ed560b3181f594868cd89f9ae 19-Jan-2017 Chris Tate <ctate@android.com> Revert "Enable background restrictions"

This reverts commit 21f778060badb1e78bffde05e8de7662d275003d.

Change-Id: I65586f9739da84fb32b51b0ea166b8288c41d1b3
/frameworks/base/core/java/android/app/IActivityManager.aidl
21f778060badb1e78bffde05e8de7662d275003d 07-Nov-2016 Christopher Tate <ctate@google.com> Enable background restrictions

Apps that target O+ are always subject to background restrictions.
Legacy apps' background restriction is subject to the OP_RUN_IN_BACKGROUND
app op.

Apps with these properties are exempted from background restrictions:
- persistent process
- currently on the idle battery whitelist
- global whitelist for things like bluetooth services

Bug 30953212

Change-Id: Ib444829a2d222125f64ff19e8218823fa78373f9
/frameworks/base/core/java/android/app/IActivityManager.aidl
fb9d78afb77b1d304b24f470a637244d52a7e1df 05-Jan-2017 Jorim Jaggi <jjaggi@google.com> Add a listener when task snapshots change

Since we start recents before we take the snapshot, we need to add
a mechanism to inform recents about task snapshots changes.

We add a new method to TaskStackChangedListener,
onTaskSnapshotChanged, which gets called whenever a task snapshot
changes. Then, SystemUI registers such a listener and updates the
task thumbnail view for the specific task.

Test: Open app, press recents, make sure thumbnail is up-to-date
Bug: 31339431
Change-Id: I01e81b9cd11886da734da671c68d5732aa51009f
/frameworks/base/core/java/android/app/IActivityManager.aidl
49a4a1dfceeebc4b94022827b7e68cc971689c84 12-Jan-2017 MÃ¥rten Kongstad <marten.kongstad@sonymobile.com> Teach apps to refresh AppInfos without restarting

Teach running applications to refresh already loaded ApplicationInfo
objects without resorting to restarting the application process.

Activities will be scheduled for restart via the regular life-cycle.
This is similar to a configuration change but since ApplicationInfo
changes are too low-level we don't permit apps to opt out.

This change is intended to be used with runtime resource overlays and
split APKs.

Test: Manual - command to update application via ActivityManagerShellCommand
Change-Id: Ice10a1691cced90eee95e3278fd784b8a9206d87
/frameworks/base/core/java/android/app/IActivityManager.aidl
e2c77f903504766102fe545af40c3e4ebcb3adc7 29-Dec-2016 Jorim Jaggi <jjaggi@google.com> Handle content insets for snapshots

Pass information about content insets of a snapshotted task to
SystemUI and use it there to correctly offset the snapshot
when drawing.

Test: Open app, go to recents, make sure app aligns before
and after the animation.
Bug: 31339431
Change-Id: I2ff9bd44534bd8f66b591385da1e1e3aec40b6c5
/frameworks/base/core/java/android/app/IActivityManager.aidl
02886a82d876aa5e31a92444fec70208599c509c 06-Dec-2016 Jorim Jaggi <jjaggi@google.com> Initial implementation of snapshots

All this functionality is hidden behind a flag. If this flag is
active, we disable the regular screenshots.

Instead, we take a screenshot when an app transition for which a
task is disappearing is starting. The screenshot gets stored
into a gralloc buffer. SystemUI uses a new method to retrieve
a snapshot gralloc buffer and then draws it using GraphicBuffer.
createHardwareBitmap().

When starting an existing activity in an existing tasks, or when
bringing an existing tasks to front from recents, we add a new
snapshot starting window. For that, we reuse the existing
starting window, but when creating the window, we use a fake
window that draws the contents of the starting window.

Test: runtest frameworks-services -c
com.android.server.wm.TaskSnapshotControllerTest
Bug: 31339431
Change-Id: If72df07b3e56f30413db5029d0887b8c9665aaf4
/frameworks/base/core/java/android/app/IActivityManager.aidl
e1fe7fa288a34ecaaab390f49ef540edc4a6c52d 16-Dec-2016 Wale Ogunwale <ogunwale@google.com> Added TaskWindowContainerController

For linking TaskRecord in AMS to Task window container in WMS.

Bug: 30060889
Test: bit FrameworksServicesTests:com.android.server.wm.AppWindowContainerControllerTests
Test: bit FrameworksServicesTests:com.android.server.wm.TaskWindowContainerControllerTests
Test: Existing test pass and manual testing.
Change-Id: I16248f3e96e5087ba24198a48a3bd10a12ae76a6
/frameworks/base/core/java/android/app/IActivityManager.aidl
6d553874bed06280766ae24ea605f9bbde3f5a4a 09-Dec-2016 Felipe Leme <felipeal@google.com> YAMAFFR - Yet Another Major AutoFill Framework Refactoring

- Explicitly split View methods into Assist and AutoFill methods, rather
than use an overloaded method that takes flags.
- Simarly, renamed ASSIST_FLAG_SANITIZED_TEXT and
ASSIST_FLAG_NON_SANITIZED_TEXT flags to
AUTO_FILL_FLAG_TYPE_FILL and AUTO_FILL_FLAG_TYPE_SAVE respectively.
- Created a AutoFillUI class to host the auto-fill bar and other UI
affordances.
- Moved the temporary notifications to AutoFillUI (eventually that
class will host the real UI).
- Moved FillData to android.app.view.autofill package.
- Split IAutoFillCallback in 2 (IAutoFillAppCallback and
IAutoFillServerCallback, residing at the app and system_server
respectively), so service cannot fill the app directly (which lets
the framework control the UI).
- Moved assist's IResultReceiver to AutoFillServiceImpl so
system_server can act as a mediator between the AutoFillService
implementation and the app being auto-filled.
- Replaced FillData and FillableInputFields by a bunch of new objects:
- FillResponse contains a group of Datasets, each representing
different values
that can be used to auto-fill an activity (for example, different
user accounts), optional id of fields the service is interested
to save, and an optional bundle for service-side extras.
- Dataset contains a name, Fields, and an optional bundle for
service-side extras.
- Fields contain an AutoFillId (parcelable) and a value (Bundle)
- Changed the temporary notifications to emulate the new workflow:
- Initial notification requests the auto-fill data but do not
auto-fill.
- Once service calls back, a new notification is shown with the
results.
- Then if the user selects a dataset, the activity is auto-filled
with it.
- It also shows a notification to emulate what can be saved.
- Created an VirtualViewDelegate for views that uses a virtual
hierarchy for assist data.
- Added new methods on ViewStructure to add children with virtual ids.
- Added 2 methods on View to support auto-fill:
- autoFill(Bundle) to auto-fill the view.
- getAutoFillType() to return how the view can be auto-filled.
- AutoFillType defines the input fields that support auto-fill:
- Text fields (like EditText)
- Toggle fields (like CheckBox)
- Lists (like RadioGroup)
- AutoFillType can also have a sub-type representing its semantic (for
now only text fields have it, and it's the same as getInputType()).
- etc :-)

Bug: 31001899
Test: manual verification
Change-Id: I2dd2fdedcb3ecd1e4403f9c32fa644cb914e186f
/frameworks/base/core/java/android/app/IActivityManager.aidl
54402aab14deb9f21b0a9b451f80113ab9821b04 10-Jan-2017 Andrew Scull <ascull@google.com> Merge "Evict CE key on request and when work mode is turned off."
45b2070637b9a95b366eee486c6483954f84a767 04-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Added a deprecation warning to AM.requestBugReport()"
d276563b38907647ce70940e1e90603826df6ab4 13-Dec-2016 Andrii Kulian <akulian@google.com> Add positionChildAt method to WindowContainer

Added method to change the position of a child among siblings.
It accepts int value, which can either specify a target position
or POSITION_TOP/POSITION_BOTTOM.
When child is moved to top or bottom, there is an option to also
perform same action on parents. This will effectively move the
entire branch of the hierarchy tree to top/bottom.

Test: bit FrameworksServicesTests:com.android.server.wm.WindowContainerTests
Test: #testPositionChildAt
Test: #testPositionChildAtIncludeParents
Test: #testPositionChildAtInvalid
Test: bit FrameworksServicesTests:com.android.server.wm.TaskStackContainersTests
Test: bit FrameworksServicesTests:com.android.server.wm.TaskStackTests
Change-Id: I6ade787487055f1c9a305afea64270c243196614
/frameworks/base/core/java/android/app/IActivityManager.aidl
85a63bc1a06870b5a86926b0bce94a2bf559e3f0 24-Oct-2016 Andrew Scull <ascull@google.com> Evict CE key on request and when work mode is turned off.

DPMS.lockNow takes a flag which can request the managed profile CE key to
be evicted.

Test: com.android.cts.devicepolicy.ManagedProfileTest#testLockNowWithKeyEviction*
Bug: 31000719
Change-Id: I68f4d6eed4b041c39fd13375f7f284f5d6ac33da
/frameworks/base/core/java/android/app/IActivityManager.aidl
10bb9b56392b5e718c1e0589ad3ce82a98c8f656 20-Dec-2016 Felipe Leme <felipeal@google.com> Added a deprecation warning to AM.requestBugReport()

BUG: 33776167
BUG: 26187278

Test: not needed

Change-Id: I2cfc1a403ad74740e3315bba96f7b124c59c9815
/frameworks/base/core/java/android/app/IActivityManager.aidl
a29eb98d9fba99528f0809c448daf2ddae37de7e 14-Dec-2016 Winson Chung <winsonc@google.com> Adding support for PIP actions.

- Introduced generic RemoteAction to represents an action
that can be made across processes with an icon and text
description based on a Notification action.
- Modified PinnedStackController to ensure that it notifies
the listeners from the source of truth, this ensures that
SysUI is in the right state if killed and re-registers
itself.

Test: Enable menu & minimize in SystemUI tuner.
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testNumPipActions

Change-Id: I5b5d0cf9de3f06b5687337d59cfb91e17355bdb1
Signed-off-by: Winson Chung <winsonc@google.com>
/frameworks/base/core/java/android/app/IActivityManager.aidl
d4f08a007d7b640c0bd046c7a8168fb93491b7e3 13-Dec-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "AutoFill Framework refactoring."
1ca634a544a47193dd9e57f9b3eb3e42ab0dbbf1 29-Nov-2016 Felipe Leme <felipeal@google.com> AutoFill Framework refactoring.

The AutoFill Framework uses the same AssitStructure provided by the Assist API
and so far it was using the same methods as well, both internally and externally
(public API).

Sharing that internal code internally is fine, but the public APIs must distinguish between the 2 cases so they can fill the assist structures accordingly (although the initial implementation still shares the same logic).

This CL also splits the original 'auto-fill' request in 2 types of requests,
which are set by View flags:

- ASSIST_FLAG_SANITIZED_TEXT
- ASSIST_FLAG_NON_SANITIZED_TEXT

It also added new methods and callbacks to handle save requests.

Bug: 31001899
Test: manual verification

Change-Id: I4eb09099dc19a43cb7e053e64d939aed3704b410
/frameworks/base/core/java/android/app/IActivityManager.aidl
6997bf20eeae417f1b9e96d1427fda5775e61771 12-Dec-2016 Sudheer Shanka <sudheersai@google.com> Merge "Add comment in IActivityManager.aidl."
b5c41b786862618b22e532849ddcca48bdc40025 08-Dec-2016 Winson Chung <winsonc@google.com> Adding ability for an app to request auto-enter picture-in-picture.

- If an activity requests that it can auto-enter PIP, then we will trigger
it to enter PIP when the task is effectively being occluded. This does
not affect the activity when the screen is locking, or if it starts new
activities within its own task, or if it finishes itself, or if there is
already a PIP activity.
- Changed setPictureInPictureAspectRatio to also specify the aspect ratio
to use when auto-entering PIP. If the activity is not PIP'ed and has
not requested auto-enter, then the call continues to fail.

Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testAutoEnterPictureInPicture
Test: #testAutoEnterPictureInPictureLaunchActivity
Test: #testAutoEnterPictureInPictureFinish
Test: #testAutoEnterPictureInPictureAspectRatio
Test: #testAutoEnterPictureInPictureOverPip

Change-Id: I6477b6d1f160cf0219d935123bbb505f57ee7a56
/frameworks/base/core/java/android/app/IActivityManager.aidl
04a7a5370c02c21601d3a6ab46749d234ac39cff 02-Dec-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Split home stack into home and recents stack"
ae1ff4f85ffd12ab8a14c610b1474a012536888f 11-Nov-2016 Matthew Ng <ngmatthew@google.com> Split home stack into home and recents stack

Refactored functionality of home stack (HOME_STACK_ID) in the code
base to home stack and recents stack (RECENTS_STACK_ID). Also changed
function and variable names from homeStack to homeOrRecentsStack.

Differentiating home and recents stack will allow readablilty and
managing logic between home and recents stacks. For example, for
multi-window minimized dock state, the home and recents stacks can
be set to different rects where the home stack needs to be a fixed
large size while the recents stack is hidden and the dock stack is
animating to be minimized.

Fixes: 32839371
Test: ./run-test android.server.cts and manually tested split and
rotation
Change-Id: I7603359c2dc20e35924664178634eb761e0367a6
/frameworks/base/core/java/android/app/IActivityManager.aidl
027a33da6f02bcb33aba81eb73e2018c024d0b03 24-Nov-2016 Sudheer Shanka <sudheersai@google.com> Add comment in IActivityManager.aidl.

Bug: 30977067
Test: N/A
Change-Id: Ide7385f5d4493f45d75550c569457865107bf779
/frameworks/base/core/java/android/app/IActivityManager.aidl
241ae10b2189f449e57d8d660235ac56d8fb1b80 03-Nov-2016 Jorim Jaggi <jjaggi@google.com> Add explicit method to dismiss Keyguard

The flag is a bit clunky for most cases, and a method is more
clear.

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
android.server.cts.KeyguardTests

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
android.server.cts.KeyguardLockedTests

Test: runtest systemui -c
com.android.systemui.keyguard.DismissCallbackRegistryTest

Bug: 30961403
Bug: 27422134
Change-Id: I39de90c7cfecd99350a74f72cd76418e337f2b79
/frameworks/base/core/java/android/app/IActivityManager.aidl
ee148f921f9cd53b6e0fa54649aefeb9f2cfa823 15-Nov-2016 Sudheer Shanka <sudheersai@google.com> Remove transaction ids in IActivityManager.aidl.

Bug: 30977067
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test \
android.server.cts
adb shell am instrument -e class \
com.android.server.am.ActivityManagerTest,com.android.server.am.TaskStackChangedListenerTest \
-w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I44c5f756db882e0400727e44264219c873e6bd02
/frameworks/base/core/java/android/app/IActivityManager.aidl
29a5b0d0f1cc7fd6cbfe97c816b8a687d9e438cc 25-Oct-2016 Felipe Leme <felipeal@google.com> Added a callback for AutoFillService.

So far AutoFillService only received the assist data from framework; in
this CL, it also offers a method where the auto-fill provider can send
the auto-fill data back to framework.

The workflow is:

- AFMSI calls a new AM method (requestAutoFillData(), instead
of requestAssistContextExtras()).
- The assist receiver is located in the app, not on system service.
- AM uses a new request type (ASSIST_CONTEXT_AUTOFILL) to request the
assist data to the activity.
- ViewStructure has a new setAutoFillId() method which is used to set an
unique id for the view.
- View uses the accessibility id to implement the auto-fill id.
- When the activity fullfills the request, it creates an IAutoFillCallback
remote object - that will be used to set the auto-fill fields - and
returns it in the assist bundle (using the
VoiceInteractionSession.KEY_AUTO_FILL_CALLBACK key).
- The app-visible AutoFillService class offers an onFillRequest() method,
which contains the assist data and a FillCallback used to handle it.

BUG: 31001899
Test: manually built and ran it

Change-Id: I3d208c14e81022dc96dd03f38bbe25a778b24a67
/frameworks/base/core/java/android/app/IActivityManager.aidl
7075d79cabb3c23540bdcbd07b772705a14e932f 11-Nov-2016 Winson Chung <winsonc@google.com> Merge "Adding API for apps to specify their aspect ratio when entering PIP."
e07641d4fbdd0528c18305213e861a6e1aff4a3b 10-Nov-2016 Dianne Hackborn <hackbod@google.com> Start implementing background restrictions for eph apps.

This implements the additional intended path for checking
allowed background operations, APP_START_MODE_DISABLED, which
doesn't allow an app to launch in the background at all.

Also change the semantics of delivering broadcasts to manifest
receivers to always restrict those, not changing based on
whether the app is currently idle. This is the desired intended
behavior for apps as they explicitly update to work with
bg check.

And now that we have ephemerality associated with the uid state
in the activity manager, we can propagate this through the
relevant callbacks in IUidObserver so things watching these
changes can immediately determine whether they should do their
more aggressive shut down work for the uid rather than having
to walk through all their state looking for package associated
with that uid and whether they should be shut down.

Also remove the "lenient" bg check mode, since that was
just an early experiment that we won't actually use.

Add a new "make-idle" activity manager command to immediately
put a uid into the idle state (if possible) to make it easier
to test.

Test: manually against an eph app
Change-Id: I43a138ff281f69a9251d3f29ab6e13f48cff8ad6
/frameworks/base/core/java/android/app/IActivityManager.aidl
84a3834a0c23c4fee4f909f986ba6975a87c807b 09-Nov-2016 Winson Chung <winsonc@google.com> Adding API for apps to specify their aspect ratio when entering PIP.

Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testEnterPipAspectRatio
Test: #testEnterPipExtremeAspectRatios

Change-Id: I9efba942b9a6451dec07428fe1e428ef4a896867
/frameworks/base/core/java/android/app/IActivityManager.aidl
5614bf5a1ae4522dfc1a041f003cebc9b25c8b93 08-Nov-2016 Dianne Hackborn <hackbod@google.com> Move code for handling uid obs "cutoff" to activity manager

To do this, I had to fix the PROCESS_STATE_NONEXISTENT constant
to be the last value (instead of the special magical -1 value)
so it semantically matches the public importance constants. I
think this is better anyway.

Also this fixes a big problem in the implementation, where we
weren't keeping track of the last proc state per uid...! Duh.

Test: manually ran testUidImportanceListener
Change-Id: Ie3008f824446089840f896885e6033472abb065e
/frameworks/base/core/java/android/app/IActivityManager.aidl
058f1e4468bd54d0ac39fdf81b4df7221b28721a 03-Nov-2016 Dianne Hackborn <hackbod@google.com> Implement system API for monitoring uid importance changes.

Changed the permission for registerUidObserver to be
PACKAGE_USAGE_STATS, which better matches the semantics of this
API and is accessible to system apps.

Test: Added testUidImportanceListener()

Change-Id: Ib47d02bd654fbe399a9c92550c89ecbd38f928dc
/frameworks/base/core/java/android/app/IActivityManager.aidl
fc46e9b643881b7b2ab76854f3a0ac077e9def8d 22-Oct-2016 Sudheer Shanka <sudheersai@google.com> Move IActivityManager to aidl.

Bug: 30977067
Test: Existing tests are passing, dump commands still working.
Change-Id: I9cf81c4d381ebce14a6c701e409cbb269f2ff1fb
/frameworks/base/core/java/android/app/IActivityManager.aidl