diff options
-rw-r--r-- | core/java/android/widget/AdapterView.java | 3 | ||||
-rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java | 2 |
2 files changed, 4 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(). diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java b/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java index 85b2490..c73da53 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java +++ b/packages/PrintSpooler/src/com/android/printspooler/model/PageContentRepository.java @@ -24,6 +24,7 @@ import android.content.ServiceConnection; import android.graphics.Bitmap; import android.graphics.Color; import android.graphics.drawable.BitmapDrawable; +import android.net.Uri; import android.os.AsyncTask; import android.os.IBinder; import android.os.ParcelFileDescriptor; @@ -467,6 +468,7 @@ public final class PageContentRepository { protected void onPreExecute() { Intent intent = new Intent(PdfManipulationService.ACTION_GET_RENDERER); intent.setClass(mContext, PdfManipulationService.class); + intent.setData(Uri.fromParts("fake-scheme", String.valueOf(hashCode()), null)); mContext.bindService(intent, AsyncRenderer.this, Context.BIND_AUTO_CREATE); } |