4473 Commits

Author SHA1 Message Date
Benjamin Franz
fb967585cc Merge "Change the routing path of bluetooth headset connections." into lmp-mr1-dev 2014-12-05 12:04:03 +00:00
Dongwon Kang
9e094efa93 Merge "TIF: handle a race condition when a session is crashed" into lmp-mr1-dev 2014-12-05 04:08:25 +00:00
Filip Gruszczynski
26af8c197c am 26b18771: Merge "Private Window flag to disable touch events in WallpaperService." into lmp-sprout-dev
* commit '26b187711fdf6224e14df465a58f30f510011b49':
  Private Window flag to disable touch events in WallpaperService.
2014-12-05 02:34:26 +00:00
Dongwon Kang
fdce9e541e TIF: handle a race condition when a session is crashed
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
2014-12-05 10:37:14 +09:00
Dianne Hackborn
25d2c2d61b Merge "Fix issue #18593636: Turn on "kill important processes that..." into lmp-mr1-dev 2014-12-05 01:35:21 +00:00
Svetoslav
3a0d878ab5 Ensure all events from a showing window are dispatched.
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
2014-12-05 00:37:38 +00:00
Jinsuk Kim
6074797441 Merge "CEC: Introduce the retry for commands on the new device discovery." into lmp-mr1-dev 2014-12-05 00:05:11 +00:00
Filip Gruszczynski
b8c0694ae8 Private Window flag to disable touch events in WallpaperService.
Change-Id: I18b46340f89cbea0b6daeb1efe9c31656f4e1a5d
2014-12-04 15:02:18 -08:00
Wale Ogunwale
6b54d38a2c Merge "Add support from restoring recent's backup." into lmp-mr1-dev 2014-12-04 21:58:51 +00:00
Dianne Hackborn
57a873fcaa Fix issue #18593636: Turn on "kill important processes that...
...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
2014-12-04 13:58:46 -08:00
Craig Mautner
afca4dba31 Merge "bug fix possible NPE while startProcessLocked()" into lmp-mr1-dev 2014-12-04 21:55:02 +00:00
Craig Mautner
9052862ebb Merge "[ActivityManager] Invalidate last screenshot when activity relaunched" into lmp-mr1-dev 2014-12-04 21:53:42 +00:00
Craig Mautner
799cb73029 Merge "[ActivityManager] Fix race condition in pss collection" into lmp-mr1-dev 2014-12-04 21:52:06 +00:00
Craig Mautner
e0dc40c0f2 Merge "ANR caused by incorrect cleanup in BroadcastQueue." into lmp-mr1-dev 2014-12-04 21:50:46 +00:00
Craig Mautner
c2cae50b83 Merge "Reset killedByAm flag at attachApplicationLocked" into lmp-mr1-dev 2014-12-04 21:45:21 +00:00
Craig Mautner
1289a3b2d3 Merge "[ActivityManager] Fix NPE when start activity" into lmp-mr1-dev 2014-12-04 21:44:39 +00:00
louis_chang
1864a509b0 [ActivityManager] Invalidate last screenshot when activity relaunched
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
2014-12-04 13:35:02 -08:00
younghwan1.kim
bc0975b3af bug fix possible NPE while startProcessLocked()
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
2014-12-04 13:32:41 -08:00
louis_chang
71e737c8e8 [ActivityManager] Fix race condition in pss collection
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
2014-12-04 13:30:12 -08:00
Kazuki Nakayama
8920e1cabb Reset killedByAm flag at attachApplicationLocked
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
2014-12-04 13:28:10 -08:00
louis_chang
cd5d198d7e [ActivityManager] Fix NPE when start activity
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
2014-12-04 13:06:05 -08:00
Wale Ogunwale
18795a2299 Add support from restoring recent's backup.
Bug: 15986349
Change-Id: I899f81d317fcd5277a75db7ba50ecca14112df26
2014-12-04 12:37:53 -08:00
Svetoslav
6e7bf935b4 Merge "Notify accessibility for window changes after an app animation end." into lmp-mr1-dev 2014-12-04 20:29:57 +00:00
Guobin Zhang
53964dac4b ANR caused by incorrect cleanup in BroadcastQueue.
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>
2014-12-04 12:26:53 -08:00
Craig Mautner
224904e01a Merge "Prevent ANR when broadcast receiver is killed" into lmp-mr1-dev 2014-12-04 19:46:20 +00:00
Paul Jensen
efb81b9e96 Merge "Remember to cancel lingering when a network again satsifies a NetworkRequest." into lmp-mr1-dev 2014-12-04 19:27:52 +00:00
Kenji Sugimoto
d088027ff1 Prevent ANR when broadcast receiver is killed
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
2014-12-04 11:02:36 -08:00
Christoph Studer
798c05523b Merge "NoMan: Update effect suppressor on listener remove" into lmp-mr1-dev 2014-12-04 18:08:38 +00:00
Chris Wren
ffc050ad36 Merge "Track active notifications by key, not by reference." into lmp-mr1-dev 2014-12-04 18:02:54 +00:00
RoboErik
7fbcac6a03 Merge "Tweak the behavior of the MediaSessionStack" into lmp-mr1-dev 2014-12-04 17:46:41 +00:00
Benjamin Franz
e8b98925d0 Change the routing path of bluetooth headset connections.
The HeadsetService is now bound directly by the BluetoothManagerService.
The IBinder object related to the HeadsetService is then given back to
the BluetoothHeadset and to the client app. This change makes the
HeadsetService available for managed profile clients.

Bug: 16968338
Change-Id: I016d1837e4f987c0fab1fc2c64cb06eb91b24d87
2014-12-04 16:57:25 +00:00
Christoph Studer
c9660bdf28 Merge "RankingHelper: Remove STOPSHIP" into lmp-mr1-dev 2014-12-04 12:12:25 +00:00
Jinsuk Kim
f164739510 Merge "CEC: Generate hotplug events upon adding listener" into lmp-mr1-dev 2014-12-04 06:40:01 +00:00
Vinit Deshpande
31bd422085 Merge "Remove notification for SoftAP turned on" into lmp-mr1-dev 2014-12-04 06:21:30 +00:00
Jinsuk Kim
3cd30516ad CEC: Generate hotplug events upon adding listener
CEC HAL does not report initial connection state of the HDMI port
but does it only when the state is updated. For the listeners which
want to get the initial state of the ports, this CL generates
hotplug event per each port when a new listener is added.

Bug: 18488079

Change-Id: I6915a96e3c14ee0db1bfb6912ab77d3ea1bd2f07
2014-12-04 15:16:57 +09:00
Yuncheol Heo
46350382ee CEC: Introduce the retry for commands on the new device discovery.
- ChromeCast needs some preparation time to work properly after it
  reboots.

Bug: 18489614
Change-Id: I74ff05820c3bda84e2f042fb91bf510ab9444e55
2014-12-04 14:55:08 +09:00
Erik Kline
9261d9d645 Merge "Remove CONNECTIVITY_CHANGE_DELAY and friends." into lmp-mr1-dev 2014-12-04 03:14:02 +00:00
Svetoslav
75b55d0846 Notify accessibility for window changes after an app animation end.
Accessibility layer keeps track of the introspectable windows. These
windows are received from the window manager which computes them after
an interesting window transition. The window manager was not sending
the windows to the accessibiltiy manager after an app animation is
completed and as a result the window location reported to accessibility
service was wrong which also resulted in wrong visible to user state
for the nodes in the window.

bug:18517058

Change-Id: I21d65a4e0c0dff9474f7cc47ea819ace5ac1e465
2014-12-03 16:26:47 -08:00
Cheuksan Wang
109ec376da Merge "new SMS/MMS carrier app API" into lmp-mr1-dev 2014-12-04 00:19:06 +00:00
Winson Chung
ba1307b2b4 Merge changes Ib255e49f,Ifc33cdf7 into lmp-mr1-dev
* changes:
  Ensuring that the alpha and translation animation durations are the same. (Bug 18609321)
  Fix crash when user is both scrolling and tabbing through Recents. (Bug 18552776)
2014-12-04 00:07:57 +00:00
Winson Chung
b255e49fe4 Ensuring that the alpha and translation animation durations are the same. (Bug 18609321) 2014-12-03 13:45:36 -08:00
Dianne Hackborn
281f36f548 Merge "Fix issue #18607384: Run fstrim after every system update" into lmp-mr1-dev 2014-12-03 21:06:55 +00:00
Dianne Hackborn
8b22252a6c Fix issue #18607384: Run fstrim after every system update
Change-Id: I06f4c0b9e6834a8c8bd85710dfd9fa16471b6ad2
2014-12-03 12:44:48 -08:00
Chris Wren
6054e61476 Track active notifications by key, not by reference.
Updates can change the reference without changing the key,
leaving the manager confused about which notification is active.

Fix applies to tracking active sound, vibrate, and lights.

Bug: 18369462
Change-Id: I0f606e6ef441737364795ba6feede1a7e5681191
2014-12-03 13:29:58 -05:00
Winson Chung
de9848c641 Merge "Initial changes to add callback on task stack changes. (Bug 17672056, Bug 18291345)" into lmp-mr1-dev 2014-12-03 18:10:38 +00:00
Paul Jensen
f805ba7dcc Merge "Retry failed network validation every 10 minutes." into lmp-mr1-dev 2014-12-03 18:04:30 +00:00
Dianne Hackborn
ef44c0514d Merge "Work on issue #18572506: AppOps in-memory state is invalid after..." into lmp-mr1-dev 2014-12-03 18:03:27 +00:00
Dianne Hackborn
7b7c58b384 Work on issue #18572506: AppOps in-memory state is invalid after...
...uninstalling updates to a system app

Things seem to be working fine, however we were not as aggressive at
writing out the current state in this case as we probably should be.

Also introduce more features to the appops command, which are useful
for testing this.

Change-Id: I177a9cc0e16e98b76fee0d052d742e06842bb3f9
2014-12-03 10:01:14 -08:00
Paul Jensen
7bd8eaf568 Retry failed network validation every 10 minutes.
This allows for better recovery from ISP outages.

bug:18489123
Change-Id: Iefffe870bd6b7c19827fdbc323024a600a6025f9
2014-12-03 11:06:14 -05:00
Christoph Studer
85374052e3 RankingHelper: Remove STOPSHIP
Remove obsolete debugging code that was marked STOPSHIP.

Bug: 17919719
Change-Id: I025410c191960382486456c9edd7675a14f0fa4b
2014-12-03 15:12:02 +01:00