Fixing a bug where a NetworkRequest's PendingIntent can be sent more
than once when networks are rematched before the intent completes.
Added a small delay before removing the request to give the receiving
client an opportunity to put in its own request. The delay value is
configurable via Settings.Secure.
Bug: 18614074
Change-Id: Iac7c5e5a04f42f2b6794e9e22349cc631bebeab7
When the launch activity behind feature was introduced in
http://ag/502868, we destroy the surfaces of windows associated with
the activity early in the last app window animation step. The causes
issues with activities that might be using the surface and not
prepared to have the surface destroyed from underneath them. We now
let the surface destruction get handled like any other window so all
the components/processes interested in the surface can be in the
right state when the surface is destroyed.
Bug: 18325222
Change-Id: I45e834a07a199b8a9e364f7392db99c871a43280
- Now aggregate number of times each process has crashed and ANRed.
- Now aggregate total number of connectivity changes.
- Now record connectivity changes in the history.
Crash and ANR counts are new entries at the end of "pr" in checkin.
Connectivity change counts is a new entry at the end of "m" in checkin.
Connectivity changes in the history checkin are Ecn and include the
type of connection and its state.
Change-Id: I0c01186446034cf6c3fb97d45f5e3b5c69a0438a
This sends mute keys to the MediaSessionService and handles them
by toggling the appropriate stream. Muting remote playback is still
not supported.
bug:17501993
Change-Id: I18c5b037cde2175acbb64b118dd708514acfd8c9
Before the ActivityManagerService sends an intent or
starts an activity it checks if target user is in
mStartedUsers array.
When removing a non-owner user process the
UserStartedState instance will still be in mStartedUsers
array with mState STOPPING or SHUTDOWN.
This should be checked before sending an intent or start
an activity.
isUserRunningLocked(...) will interpret mState STOPPING
and SHUTDOWN as a non running user.
Bug: 7462778
Change-Id: I1b51bcdb62bdd0f6dbe05dab4d529d4ad40d0d44
This is the revert of ag/572619.
This reverts commit 9261d9d64548f0221de50eb99f3675488a4176a4, reversing
changes made to 32b61ab28f54e5b00f472b2166f9b1100375e4ff.
Bug: 18609055
Bug: 17769720
Change-Id: I122eba200f2071d4e5777ec34c1d04fb567345a8
The user restriction DISALLOW_USB_FILE_TRANSFER has to be respected
when switching USB function set.
Bug: 18532487
Change-Id: I16fda6358027a659e3bfa0c5f3bf6b3918d0bced
In disabled HDMI control mode, TV local device is gone, for which
setting operation is not possible. Does the check against the tv instance
when TV setting update is notified. The settings is picked up when
the control is enabled back, so notification is not lost.
Bug: 18580387
Change-Id: Id8891bfa54d851ec1aff280fc99be8e428f4e0cf
* Inexact alarms no longer coalesce with exact alarms. The motivation here
is that exact alarms are far more likely to be wall-clock aligned, and in
general pulling all alarms toward wall-clock alignment is a bad idea.
* Wakeup times are now fuzzed within the target batch's allowed window
rather than being hard pinned at the start of the window.
Bug 18631821
Change-Id: Iefaf34eee3f2a6546abefc27e177ee2fdcff935f
Added isRemovingAdmin method, so that clients can query if device
admin is currently being removed.
Bug: 17609838
Change-Id: I82547a9eeb228fcf8ac2a6e639ca1a75fa41d161
Currently, TIMS has a logic for handling session crash (binderDied).
However, this can be racy if the client calls an operation right before it gets
ITvInputClient.onSessionReleased() callback. This change handles those request
gracefully without causing a crash in the client side.
Bug: 18612616
Change-Id: I37241e05d53f3cca693e0239fc9ad5dce02fc925
Accessibility services may opt-in to introspect the interactive
windows on the screen. If window introspection is enabled there
is a case where some events from a showing window are received
before the updated window state from the window manager. Now the
window manager sends over the windows before notifying the app
for the focus change.
bug:18625996
Change-Id: Ic481e01efbe12dc92f090f799feeb236672fc7b3
This is a safeguard to only check for changing packages when
re-validating active admins.
1. If package is being removed, only check if it's not being
replaced.
2. If package is changing, only check the changing package that
matches one of the active admins.
3. If package is being added and is a replacement (update), then
check if it affects any matching active admins and verify the
validity of the receivers.
If by any chance some package broadcast was occuring at a time when
an admin was being updated, or the package removed broadcast was
coming in much before the update was registered with package manager
then this will help in avoiding accidental deactivation.
Bug: 18590558
Change-Id: I7f4897e8836f81aa037b8be87d399942ce78b1a2
...have ballooned" for all devices
Actually, this was supposed to be on for all devices, but it was no
longer being run due to changes in the idle maintenance code in L.
So now we run it again. And moved the idle maintenance window to 3am.
Change-Id: I8e90723e1431b82896d261cf90f8bf84f43b0bf2
Symptom:
The task thumbnail is not updated when activity relaunched.
Reproduce Steps:
1. Put device in portrait
2. Launch Calculator
3. Launch Recent App (the Calculator's screenshot is correct)
4. Rotate device to landscape
5. Click Calculator in Recent App to return to Calculator (Calculator has relaunched to landsacpe ui)
6. Launch Recent App again (the Calculator's screenshot is not updated)
Change-Id: I92e951ea2ee215c52ca6e50cf6f9e02deb787bce
In case, process doesn't create well while startingProcessLocked().
There is possibility to make NPE.
Setting app's crash handler needs to be assigned after null check routine.
Change-Id: I67fb6427f72d93f79fed36eb44c47d37eafdac31
Symptom:
There has a race condition that two threads are accessing
the mPendingPssProcesses simultaneously. One of the thread
is collecting the process pss by looping the mPendingPssProcesses.
The other thread is requesting to collect pss of all processes,
which clears mPendingPssProcesses and adding processes back.
Solution:
Avoid race condition by adding synchornized protection.
Change-Id: Ifb090eda9c4a1b8e3fd980fe0171e9dd77773b46
Cherry picked from aosp.
Fixes bug 18593309.
ActivityManager reuses a process record object that killed
by him under some situation. That reused process record inherits
a killedByAm flag unexpectedly.
The killedByAm flag must be reset otherwise ActivityManager can't
judge the process can be killed or not.
Change-Id: If95137d91939cc44882ad2813131bcde0edd0c1b
Cherry picked from aosp.
Fixes bug 18593457.
Symptom:
NPE occurs in line 1184 (resultStack.sendActivityResultLocked)
because resultStack is null.
Root cause:
When starting activity with FLAG_ACTIVITY_FORWARD_RESULT flag,
the resultRecord could be updated, but the resultStack is not
updated as well. In that case, the resultStack is still be
null. The exception will occurs if the activity is not
granted to launch due to permission denied.
Solution:
Update resultStack when resultRecord updates.
Change-Id: I91634e4f713c2e8dbd1a71f358a8fd9beed83ec7
Pulled from aosp.
Fixes bug 18593454.
Two broadcasts could be sent to the same app simultaneously:
one foreground, one background. For example, LOCALE_CHANGED
and PACKAGE_CHANGED are delievered to com.android.vending
at the same time.
1. AMS started new vending process to handle LOCALE_CHANGED.
And set app.curReceiver = LOCALE_CHANGED.
2. Before LOCALE_CHANGED is handled by vending process,
PACKAGE_CHANGED was delievered to vending process too.
AMS set app.curReceiver = PACKAGE_CHANGED. Bad!
3. Vending process finished handling LOCALE_CHANGED.
AMS clear app.curReceiver = NULL. Bad!
And Vending process killed itself without handling
PACKAGE_CHANGED.
4. AMS known vending process has died, but didn't know that
BgBroadcastQueue was still waiting for finish message
for PACKAGE_CHANGED.
At last, BgBroadcastQueue reported ANR for PACKAGE_CHANGED.
This patch adds protection before clearing app.curReceiver,
only set to NULL if the finishing receiver = app.curReceiver
So handleAppDied would know that PACKAGE_CHANGED was not
finished yet, it will abort the broadcast and continue.
Change-Id: Ic4f31b35e21823d4a3c27712391ecbede213a494
Signed-off-by: Guobin Zhang <guobin.zhang@intel.com>
Cherry-picked from aosp
Fixes bug 18613138.
If the process of a BroacastReceiver is dying at the same time
as the system is trying to send an ordered broadcast to the
receiver, the system will try to start the process again. The
BroadcastQueue will store the BroadcastRecord in mPendingBroadcast
to be able to handle it again when the process is awake. A
timeout Message is posted to the handler of the BroadcastQueue.
As part of the shutdown sequence skipCurrentReceiver is called for
the ProcessRecord. This will check if there is a curReceiver set
for the application and make sure to finish the receiver.
Each of the foreground and background BroadcastQueues have their
own handler for managing broadcast timeouts. If the wrong
BroadcastQueue finishes the receiver, the pending timeout Message
will never be cancelled, leading to an ANR report for a receiver
that has already been finished.
Change-Id: I960c0d8f1a8b739b54a8f09f496b32a3498b9e9a