158342 Commits

Author SHA1 Message Date
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
Joe Fernandez
ae80fd42a4 am f5aa6752: am 709df4fa: Merge "docs: Fixes for App Indexing training class" into lmp-docs
* commit 'f5aa675294ef1c622ec369450e2b0bbaa839db6d':
  docs: Fixes for App Indexing training class
2014-12-04 21:06:21 +00: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
Joe Fernandez
f5aa675294 am 709df4fa: Merge "docs: Fixes for App Indexing training class" into lmp-docs
* commit '709df4fa2600d1d2ee2f686097e1c92b52b58d19':
  docs: Fixes for App Indexing training class
2014-12-04 21:00:30 +00:00
Alan Viverette
ebc9f2e773 Update locally cached drawables when constant state changes
Previously we were failing to update references to drawables that had
been pulled from constant state, so we were drawing the wrong ones.

Also fixes button Z translation on press, which was WAY too high.

BUG: 18542282
Change-Id: Ifde7d64e31d31737854cfcbe75777e5b07a06e3a
2014-12-04 12:54:46 -08:00
Joe Fernandez
709df4fa26 Merge "docs: Fixes for App Indexing training class" into lmp-docs 2014-12-04 20:50:49 +00:00
Joe Fernandez
71d58705d8 docs: Fixes for App Indexing training class
b/18244320
b/17982146

Change-Id: Ic095c3c73d09fa2d7f3c08fa47763fa8589683af
2014-12-04 12:49:45 -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
David Friedman
9c28ba76f6 am 47eddc7c: am bf6a4bfb: am 6e043e0c: Merge "Change notes for NDK r10d, to publish to DAC" into lmp-docs
* commit '47eddc7cc98cb99b5820c07109337a1f5ea48c77':
  Change notes for NDK r10d, to publish to DAC
2014-12-04 20:31:32 +00:00
Geoff Mendal
597a75318e am 9ece2e96: (-s ours) Merge "Import translations. DO NOT MERGE" into lmp-sprout-dev
* commit '9ece2e960046a169ac30c4b23119052793c76d98':
  Import translations. DO NOT MERGE
2014-12-04 20:31:29 +00:00
David Friedman
17904f8b9c am 2d2e7bf3: am ed839a76: am 795db65e: Merge "Fixes a typo, in which the word "give" is repeated. Bug 18553334" into lmp-docs
* commit '2d2e7bf33f2e443a650fa29ee646055b231ea380':
  Fixes a typo, in which the word "give" is repeated. Bug 18553334
2014-12-04 20:30:57 +00: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
Justin Harrison
70941f203c Merge "Revert "Revert "Improve fling physics for recents""" into lmp-mr1-dev 2014-12-04 20:05:41 +00:00
Justin Harrison
31d9837284 Revert "Revert "Improve fling physics for recents""
This is now BC-triaged, so reverting the revert.

This reverts commit 3f7dac5a1ccf5d464070c1a067d1d50741bdbd0e.

Change-Id: Iae9ffc74a44918a83d9cd4dfb7011810c770e135
2014-12-04 20:05:21 +00: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
Luan Nguyen
0e597e9224 am 9b5de582: am daab7426: Merge "docs: Update MessageAPI notes to mention the unreliable transmission nature." into lmp-docs
* commit '9b5de582058d73fbc363028eae061979b6a093ee':
  docs: Update MessageAPI notes to mention the unreliable transmission nature.
2014-12-04 19:02:50 +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
Luan Nguyen
9b5de58205 am daab7426: Merge "docs: Update MessageAPI notes to mention the unreliable transmission nature." into lmp-docs
* commit 'daab7426b254b57820f3e556960e9f5b20ba5bc6':
  docs: Update MessageAPI notes to mention the unreliable transmission nature.
2014-12-04 18:55:08 +00:00
Luan Nguyen
daab7426b2 Merge "docs: Update MessageAPI notes to mention the unreliable transmission nature." into lmp-docs 2014-12-04 18:50:44 +00:00
Prerepa Viswanadham
ff5e5db319 Fix BT crash due to unset value for BluetoothGattDescriptor from API user
Validate writeDescriptor and writeCharacteristic methods at API invocation
for non null initialisation.

Bug 18395071

Change-Id: I411a57b77981310d8db1f98c67e03b4327c93339
2014-12-04 18:30:03 +00:00
Adam Lesinski
720beef28d Merge "AAPT: Move private attrs to new type for framework" into lmp-mr1-dev 2014-12-04 18:24:41 +00:00
Christoph Studer
391232da08 Merge "Log the state of the notification shade" into lmp-mr1-dev 2014-12-04 18:09:12 +00: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
Lajos Molnar
610e288de6 media: allow full range of Vorbis sampling rates
Bug: 18615604
Change-Id: I51f0c5c81145b94626f2b7e4505b905b63a572bf
2014-12-04 09:50:54 -08:00
RoboErik
7fbcac6a03 Merge "Tweak the behavior of the MediaSessionStack" into lmp-mr1-dev 2014-12-04 17:46:41 +00:00
Justin Harrison
21af21ca07 Merge "Revert "Improve fling physics for recents"" into lmp-mr1-dev 2014-12-04 17:37:55 +00:00
Justin Harrison
3f7dac5a1c Revert "Improve fling physics for recents"
This reverts commit 00d947bda0b9a2ea133dfd7b0e445245a0e2c23c.

Change-Id: I3d6696227a381d232baed8fdbcbe34d3c4976ebe
2014-12-04 17:37:24 +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
smain@google.com
cc10c02b10 am 6c59abc9: am 9db37264: Merge "update L Preview message and disallow crawling /preview" into lmp-docs
* commit '6c59abc947491d8c291413eb29e1669f61059c7a':
  update L Preview message and disallow crawling /preview
2014-12-04 15:20:34 +00:00
Jorim Jaggi
54daab1009 Merge "Improve fling physics for recents" into lmp-mr1-dev 2014-12-04 15:18:18 +00:00
Jorim Jaggi
47faf69cfd Merge "Fix rounded corners in bottom QS panel." into lmp-mr1-dev 2014-12-04 15:17:03 +00:00
smain@google.com
6c59abc947 am 9db37264: Merge "update L Preview message and disallow crawling /preview" into lmp-docs
* commit '9db37264719d022391b67ad39cc274cd9d05bc40':
  update L Preview message and disallow crawling /preview
2014-12-04 15:12:48 +00:00
David Friedman
47eddc7cc9 am bf6a4bfb: am 6e043e0c: Merge "Change notes for NDK r10d, to publish to DAC" into lmp-docs
* commit 'bf6a4bfb20f3b8db3cf4c47fa887d7cc603ce5c4':
  Change notes for NDK r10d, to publish to DAC
2014-12-04 13:35:40 +00:00
Derek Sollenberger
4d9da135ca Merge "Update AndroidPixelRef to prevent VM from cleaning up memory prematurely." into lmp-mr1-dev 2014-12-04 13:04:52 +00:00
Christoph Studer
c9660bdf28 Merge "RankingHelper: Remove STOPSHIP" into lmp-mr1-dev 2014-12-04 12:12:25 +00:00
Benjamin Franz
4b9f8ede4e Ensure that the USER_PRESENT_INTENT is sent to all profiles of the current user.
This intent is needed by Smart Lock agents to check whether a given user is
active on the device.

Bug: 18530771
Change-Id: I5d460cb0cfa8ec4f7952702a3d25d089db78a50f
2014-12-04 11:20:13 +00:00
Deepanshu Gupta
7e168ad04a am 6cbef4bd: am 03af0c42: Merge "Ensure that RandomAccessFile is not leaked." into lmp-dev
* commit '6cbef4bd3e1f16647ab01dc29df9a357d54a85de':
  Ensure that RandomAccessFile is not leaked.
2014-12-04 07:00:19 +00:00
Deepanshu Gupta
302a7cc13a am 4628d51a: am 141c7614: Merge "Fix AnalogClock rendering" into lmp-dev
* commit '4628d51a0d01641ca7fe2cf8403ad551ea6f50ce':
  Fix AnalogClock rendering
2014-12-04 07:00:14 +00:00
Deepanshu Gupta
b2ded18a84 Merge "resolved conflicts for merge of fb30a783 to lmp-mr1-dev" into lmp-mr1-dev 2014-12-04 06:58: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
Geoff Mendal
cc7c68b548 Merge "Import translations. DO NOT MERGE" into lmp-mr1-dev 2014-12-04 05:32:21 +00:00