diff options
author | Svetoslav <svetoslavganov@google.com> | 2014-09-22 13:48:41 -0700 |
---|---|---|
committer | Svetoslav <svetoslavganov@google.com> | 2014-09-22 13:48:44 -0700 |
commit | cf3a86b55981313e1fdfafbef89ab5ba7276a862 (patch) | |
tree | cbd15f5ccb98650536bf4108474f2da03f94d73a /packages/PrintSpooler/src/com/android | |
parent | fdb35f0526e63dc4d6882d86029d9beacc6a2d07 (diff) | |
download | frameworks_base-cf3a86b55981313e1fdfafbef89ab5ba7276a862.zip frameworks_base-cf3a86b55981313e1fdfafbef89ab5ba7276a862.tar.gz frameworks_base-cf3a86b55981313e1fdfafbef89ab5ba7276a862.tar.bz2 |
Loosen the constraint for releasing a shared file.
In the spooler we have the renderer reading a file to visualize
content and the app writing a file to produce the content. Since
we have to swap the file under the renderer we have a mutex file
provider that both parties can request, use when released, and
release when required. This enables us to request the file which
closes the renderer and when the renderer is closed ask the app
to write some more pages, then open the renderer, and so on. The
mutex file provider was throwing of a thread that does not own
the file thries to relase it which is not needed, this should be
just a nop.
bug:17607134
Change-Id: Id6a2ce92d70077f57978b95315648faf02c13c68
Diffstat (limited to 'packages/PrintSpooler/src/com/android')
-rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/model/MutexFileProvider.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/PrintSpooler/src/com/android/printspooler/model/MutexFileProvider.java b/packages/PrintSpooler/src/com/android/printspooler/model/MutexFileProvider.java index 1f48638..0df5e3c 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/model/MutexFileProvider.java +++ b/packages/PrintSpooler/src/com/android/printspooler/model/MutexFileProvider.java @@ -93,7 +93,7 @@ public final class MutexFileProvider { public void releaseFile() { synchronized (mLock) { if (mOwnerThread != Thread.currentThread()) { - throw new IllegalStateException("Not acquired"); + return; } if (DEBUG) { |