diff options
author | Svet Ganov <svetoslavganov@google.com> | 2014-10-24 16:27:38 -0700 |
---|---|---|
committer | Svet Ganov <svetoslavganov@google.com> | 2014-10-24 17:02:32 -0700 |
commit | 99a82437ed8e0537d9a355a124d2bb30aea46ad8 (patch) | |
tree | 2d7e778263ba31f4bbc4528072180d8124d90b98 /core/java/android/widget/AdapterView.java | |
parent | bd6fabe2ae535cf5d31fc7a1952e43ad6e653e2e (diff) | |
download | frameworks_base-99a82437ed8e0537d9a355a124d2bb30aea46ad8.zip frameworks_base-99a82437ed8e0537d9a355a124d2bb30aea46ad8.tar.gz frameworks_base-99a82437ed8e0537d9a355a124d2bb30aea46ad8.tar.bz2 |
Printing from two apps at the same time not working.
When printing from two apps at the same time the second print UI is
getting stuck. There were a couple of issues here:
AdapterView was not notifying for item selection if the data changes
after scheduling a dalayed selection notification and the notification
execution. The code assumed that a layout pass will occur and posponed
the notification after the layout pass but it is not guaranteed that
such a layout pass will occur. Now we delay only if a layout pass is
being scheduled.
Also when binding to the PDF rendering service the print spooler was
using the same intent and as a result two print activites were getting
the same renderer instance while they should get separate ones. Now
we use different data in the intent to ensure we get separate renderer
instances.
Change-Id: I6aa7c7b041957804b4273549dd837a6d70064efc
Diffstat (limited to 'core/java/android/widget/AdapterView.java')
-rw-r--r-- | core/java/android/widget/AdapterView.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/widget/AdapterView.java b/core/java/android/widget/AdapterView.java index 5fa6e60..5e2394c 100644 --- a/core/java/android/widget/AdapterView.java +++ b/core/java/android/widget/AdapterView.java @@ -861,7 +861,8 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup { public void run() { mPendingSelectionNotifier = null; - if (mDataChanged) { + if (mDataChanged && getViewRootImpl() != null + && getViewRootImpl().isLayoutRequested()) { // Data has changed between when this SelectionNotifier was // posted and now. Postpone the notification until the next // layout is complete and we run checkSelectionChanged(). |