History log of /frameworks/base/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a1b79bfd7a15006a93da933695359765e0fee495 24-May-2016 Felipe Leme <felipeal@google.com> Allow apps to bypass Power Save restrictions when launched from a Notification's PendingIntent.

This scenario typically happens when the device is on Doze Mode and a
notification action is triggered from a Wear device.

In a nutshell, the workflow is:

- ProcessRecord has a flag telling whether a process has "whitelist
management" privileges.
- When NotificationManager binds a new NotificationListenerService, it
sets the BIND_ALLOW_WHITELIST_MANAGEMENT flag.
- On bind(), ActiveService asserts that only system apps can set that
flag.
- On computeOomAdjLocked(), ActivityManagerService sets the
ProcessRecord flag if necessary.
- Upon creating a notification, NotificationManager calls AM to mark its
PendingIntents as coming from a notification.
- When PendingIntentRecord sends it to the target, it checks if it's
from a notification and if so calls AM to do the temp whitelist.
- On unbind(), ActiveService removes the ProcessRecord flag if necessary.

Fixes: 28818704

Change-Id: I00d46036a2cbb73f7f733fd35bf0b743a02807a1
/frameworks/base/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
9369efdf6a43d8fa0f82dcae651c76b85a5ea0ad 03-Mar-2016 Dianne Hackborn <hackbod@google.com> Work on issue #24403813: ANR traces are too heavyweight.

Most of the changes here are optional debugging output.

The actual functional changes:

(1) One of the ANR paths was not being dispatched on the activity
manager's handler, so it could execute concurrently with other
ANR collection, conflicting with the ANR file.
(2) Bumped up the timeout for trace collection from 200ms to
1000ms. This should fix problems where some process were not
being included, since once one of the collections times out we
can no longer keep synchronized with anything else after and
could end up with data getting corrupt or blown away.

Change-Id: If6828d2dea1a25cd6d2334a652b1b31654d9062f
/frameworks/base/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
e05db74fd275ea25d10074825a43cc5c7683ae01 17-Feb-2016 Chong Zhang <chz@google.com> Remove AM/WM traces

Change-Id: I75f70ce18bf133527b33d42148c71c3fd1be9311
/frameworks/base/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
2b79af1e8a45776ba57cd38a50afe4a6c2f719aa 11-Feb-2016 Chong Zhang <chz@google.com> Mark activity as visible and not stopped after resume-relaunch.

After a resume-relaunch, the activity is assumed to be in resumed state,
and we'll not run the normal code for resume. But it needs to be marked
visible otherwise it will stuck in invisible state.

Also trade some AM traces for WM traces for further debugging.

bug: 27123118
Change-Id: I50ce5cde29f441115675db54523090ef86d95ea8
/frameworks/base/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
c1f256b40e9dd28124af089d42f620eb7f9d9a44 03-Feb-2016 Robert Carr <racarr@google.com> Logging for 26793431

Enable logging to track down 26793431 in monkey testing.

Bug: 26793431
Change-Id: I7410652e38f0905e61b34339cdf97003d85c0088
/frameworks/base/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
9c165d76010d9f79f5cd71978742a335b6b8d1b4 02-Dec-2015 Svet Ganov <svetoslavganov@google.com> Add optional permission review for legacy apps - framework

For some markets we have to allow the user to review permissions
for legacy apps at runtime despite them not supporting the new
permission model. This is achieved by showing a review UI before
launching any app component. If an update is installed the user
should see a permission review UI for the newly requested
permissions.

To allow distinguishing which permissions need a review we set
a special flag in the permission flags that a review is required.
This flag is set if a runtime permission is granted to a legacy
app and the system does not launch any app components until this
flag is cleared. Since install permissions are shared across all
users the dangerous permissions for legacy apps in review mode
are represented as always granted runtime permissions since the
reivew requirement is on a per user basis.

Whether the build supports permission review for legacy apps is
determined by a build constant allowing us to compile away the
unnecessary code for markets that do not require a permissions
review.

If an app launches an activity in another app that has some
permissions needing review, we launch the permissions review
UI and pass it a pending intent to launch the activity after
the review is completed.

If an app sends a broadcast to another app that has some permissions
needing review, we do not deliver the broadcast and if the sending
app is in the foreground plus the broadcast is explicit (has a
component) we launch the review UI giving it a pending intent to
send the broadcast after the review is completed.

If an app starts a service in another app that has some permissions
needing review, we do not start the service and if the calling app
is in the foreground we launch the review UI and pass it a pending
intent to start the service after the review is completed.

If an app binds to a service in another app that has some permissions
needing review, we schedule the binding but do not spin the target
service's process and we launch the review UI and pass it a callback
to invoke after the review is completed which spins the service
process and completes the binding.

If an app requests a content provider in another app that has some
permissions needing review we do not return the provider and if
the calling app is in the foreground we show the review UI.

Change-Id: I550f5ff6cadc46a98a1d1a7b8415eca551203acf
/frameworks/base/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
0fc365c1455ebd4064474d27774f41cfcd8e1cb5 26-May-2015 Wale Ogunwale <ogunwale@google.com> Converted more AMS Log calls to use ActivityManagerDebugConfig

Bug: 21276405
Change-Id: I90d47b1b28f716e650df7f4377ed7cdd30b46ec8
/frameworks/base/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
d23e0d6901935588f9472bd7073fea0009581e9b 16-May-2015 Dianne Hackborn <hackbod@google.com> Update power manager to track uid state like netstats.

To follow the correct semantics for when restricts due to
device idle can be applied, power manager need to know about
uid process states like net policy so that it can allow
wake locks from apps that are in the foreground.

Since this is being added to a second place, I reworked things
so that the activity manager now keeps track of per-uid process
states and allows apps to register to listen to those, rather
than having to track lower-level process states and transform
them into an overall uid state. Both net policy and power
manager use this new facility.

Change-Id: I77359164c40d0f36fe1ef296dd9f9c3062431148
/frameworks/base/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
e0570201f59342ef02412ece2f179ef42441a032 13-May-2015 Craig Mautner <cmautner@google.com> Lock top task if whitelisting arrives after start.

If the DevicePolicyManagerService updates the whitelist after a task
in the whitelist has started then the task won't have started locked.

When the updated whitelist arrives this change automatically locks the
topmost task if it is in the whitelist.

Also more locktask debugging.

Fixes bug 21031298.

Change-Id: I2494af6f2819ca91bc01abc5decb3d1adc088226
/frameworks/base/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
85757fceb727f76e42956aec67b1152231ab4ee9 03-Apr-2015 Amith Yamasani <yamasani@google.com> Turn off a debug flag

Change-Id: I5d7edc2838341754dd092410e6e21787a3454834
/frameworks/base/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
b0ff32245cb6b51e43dd3ee40b86d683c62de2b9 04-Mar-2015 Amith Yamasani <yamasani@google.com> Throttle jobs for idle apps

First pass at delaying jobs from apps that are idle.

TODO: Throttle syncs
TODO: Provide a periodic point at which apps are checked for idleness.

Apps that switch to foreground process state are tracked by UsageStats
as an INTERACTION event that affects the last-used timestamp.

JobScheduler's logic for when an app is ready is trumped by the idleness
of the app, and only if the battery is not charging. When charging state
changes, we update the idle state of all the tracked jobs.

android package is whitelisted.

Bug: 20066058
Change-Id: I0a0acb517b100a5c7b11e3f435f4141375f3451f
/frameworks/base/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
ee006da858459e91666ae53432659e934c8a8dbd 30-Mar-2015 Wale Ogunwale <ogunwale@google.com> Converted more log points in AMS to use ActivityManagerDebugConfig.

Change-Id: I59e777de30e2e9a3c7d086dc634129cd19135fab
/frameworks/base/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
3ab9a27e3d612efef6a046d4df7880803df1eef9 16-Mar-2015 Wale Ogunwale <ogunwale@google.com> Convert some log points to in AMS to use ActivityManagerDebugConfig class.

Change-Id: I02154b0e1c2c64af840848fd6def054342922efa
/frameworks/base/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
e23149f1555303940d212b742707518b7f9f84ab 07-Mar-2015 Wale Ogunwale <ogunwale@google.com> Converted some AMS log points to use ActivityManagerDebugConfig.

Change-Id: I0563bafd29ae0bbe596ed8c06fcc573b5ead50b7
/frameworks/base/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java
d57969f6ec38c7633ca65bcd5bdd766cd972cfe4 16-Nov-2014 Wale Ogunwale <ogunwale@google.com> Made AM package debug log more configurable.

* Added class ActivityManagerDebugConfig.java for housing all debug
log configuration for activity manager package.
* Added ability for using default activity manager log tag or class
specified tag string which is very helpful during debugging.
* Added ability to prepend log category name to log tag that can
also be useful during debugging.
* Converted BroadcastQueue.java and ActiveService.java to use the
new log class. Other classes in the package will be gradually
converted.

Change-Id: I0e4b343da75cb2e539b5ad5f0f79f6bc7af46d7b
/frameworks/base/services/core/java/com/android/server/am/ActivityManagerDebugConfig.java