It is possible that a buggy app breaks the contract and provides
content to be printed in format other than PDF. This was leading
to a crash in the print spooler. This change fixes the crash and
shows a user friendly error message.
bug:17642690
Change-Id: I5a4acb06080a152562655da6851467b3e71d8658
If there's a user restriction on location sharing in a
managed profile, always return empty string for location
providers so that location can be disabled by the admin
even if the primary user has location enabled.
Also fix an incorrect update of the cache. Shouldn't update
the primary user's cache when the caller is the managed profile.
Bug: 17478855
Change-Id: Icab3459ae351c5cfc287e21df6a5ba1df9dfbdb4
It is possible that two providers for the same page are assigned
to two preview views despite temporariliy while rebinding. We were
however releasing the provider from the view which is being bound
if not for the same page which as a result was cancelling rendering
of this page which is provided to another view via another provider.
Hence, having an empty page. Removed the unnecessary code to release
a provider when binding the view - release is happening only if the
view holder is recycled.
bug:17515670
Change-Id: I197438c16cfdb363f521cd1320f154da54eea5f5
Saving to PDF a subset of the pages requires trimming the
undesired pages and when this is done writing the ready doc
to a URI. To write the file to URI we have to obtain it but
it is aquired by the shredding task and never released. Now
we are releasing the document immediately after trimming it.
bug:17631301
Change-Id: I4db7966c65c75f0f14c3cb52fd83b4d8fd5a4687
If the user presses back before the remote print document
update has completed we get a crash. The reason is that
after the update completion we were trying to finish the
activity if we are in a cancelled state but this is not
needed as we aready handled the back key so we will finish.
Handling finish twice was creating the problem as classes
with lifecycles are not designed to be used after being
finished. In particular, we were calling doFinish() twice.
bug:17630561
Change-Id: If418f237a2def7c8e4a072ac8826283f4dd7fc85
When closing the QS panel the alarm did the normal
transformation, regardless whether we were in a
detail state. This lead to the alarm overlapping
with the title.
Bug: 17581501
Change-Id: I0318f6778063af11f388e6c7fe8bbb30105ca246
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
Rather than using announceForAccessibility, which will provide the
wrong experience for Braille users, send a
AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED.
Bug: 17578404
Change-Id: I3e2c465511cf2135f216d01d29319a057ebbfbda
Fixes a bug where the force lock gesture was not available
when an accessibility service was active, but touch exploration
wasn't.
Bug: 17514298
Change-Id: Ib42e28f643559040ad5f24d45456b0a41008c647
Change the listening in CastControllerImpl so that it will always
at least passive discovery when callbacks are added. When discovering
is set this will switch to request discovery. This allows the
status bar to catch disconnect callbacks when QS is not discovering.
Bug: 17555869
Change-Id: Id2a80b98f6c7ca7e6a4d0ff00315d10a109e8259
The spooler communicates with he remote PDF renderer asynchronously.
When print is confirmed we close the renderer, destroy it, and unbind
from its service. If we unbind from the service after the print activiy
is finished we get a crash. The bug was that we did not wait until we
disconnect from the remote renderer before finishing the print activity.
bug:17583115
Change-Id: I55b0135f9c5658b3a4fda2901b8b3bdef044e211
This change fixes several issues in how the display's power state
was coordinated to ensure that the display is not turned on until
the pulse is ready to be shown. It also greatly simplifies the
wakelock logic and makes it completely deterministic instead of
relying on timed delays.
Bug: 17516245
Change-Id: If2b96845a010f2d05c610970257d898f32ccacb7
Instead of clearing the Statusbarwindow buffer in the beginning
we now draw the scrim with mode SRC and therefore a whole screen
of overdraw is saved!
Bug: 17287256
Change-Id: I29f14a2c3d4cb087c422ae6f486d23d7f8ec173b