The dump code in PrintSpoolerService was relying on being
called only as a result of "adb shell dumpsys print" which
is apparently wrong. As a result the code was making wrong
assumption about the input arguments.
bug:11046234
Change-Id: Ie38f3cc5f17cac98b808fef6d6bbeaca22a62ef0
First, startTime's default value is -1 and not 0, so use it to test
if the startTime is set. Also, startTime isn't being set when connecting
legacy VPN; this change fixes that too.
Bug: 10985174
Change-Id: Ibf52b8f489b18c96efba501b76aa73e9a9e0e3e8
The activity manager can create a new task under certain
circumstances in resetTargetTaskIfNeededLocked(). In that case the
window manager was not told to create a new task. This fix creates the
task in window manager when it recognizes that there is a new task
required.
Fixes bug 10412588.
Change-Id: Ife9ecfeb7f53f9df5950322c9359c836adc258a2
All background work is going through AsyncTasks, which uses a shared
thread pool. Even with the new ContentProviderClient logic to detect
ANRs, the UI can still appear to be unresponsive for 20 seconds, even
if the user attempted to switch to a different backend. In the worst
case, a backlog of thumbnail requests would end up wedging Loaders
for a long time, since they all share the same THREAD_POOL_EXECUTOR.
This change isolates calls to each provider onto their own thread,
which they're free to wedge and recover from over time.
It also means we no longer need a dedicated thread pool for recents
loading, and can use a simpler Semaphore instead.
Disables thumbnails in recents on svelte devices.
Bug: 10993301, 11014856
Change-Id: I7f8a5bbb5f64437e006cb2c48b7e854136d5c38c
The main problem here was a mistake when turning a single process
structure to a multi-package-process structure with a common
process. When we cloned the original process state, if there were
any services already created for the process for that package, they
would be left with their process pointer still referencing the
original now common process instead of the package-specific process,
allowing the active counts to get bad. Now we switch any of those
processes over to the new package-specific process.
There was also another smaller issue with how ServiceRecord is
associated with a ServiceState -- we could be waiting for an
old ServiceRecord to be destroyed while at the same time creating
a new ServiceRecord for that same service class. These would share
the same ServiceState, so when the old record finally finished
destroying itself it would trample over whatever the new service
is doing.
This is fixed by changing the model to instead of using an "active"
reference count, we have an object identifying the current owner
of the ServiceState. Then when the old ServiceRecord is cleaning
up, we know if it is still the owner at that point.
Also some other small things along the way -- new Log.wtfStack()
method that is convenient, new suite of Slog.wtf methods, fixed
some services to use Slog.wtf when catching exceptions being
returned to the caller so that we actually know about them.
Change-Id: I75674ce38050b6423fd3c6f43d1be172b470741f
1. Sometimes selecting a printer from the full printer list does not
work if the selected printer was not in the initial drop down list
of the print dialog.
The reason was that there is a race. We use loaders in the print
dialog activity and the all printers one. When these loaders are
stopped we stop printer discovery since we do not want to keep this
potentially expensive process on going if the activity is paused
because say the user decide to press home and start playing his
favorite game while the printers dialog is up. As a result the
loader does not get printer updates until it is started.
The loader of the print dialog activity is stopped while the user is
selecting a printer from the all printers activity whose loader is
getting discovered recent printers. Now when the user selects a printer
the loader of the print dialog activity is started but may not get
the latest printers by the time onActivityResult is called with the
selected printer. Now we cache the selected printer id and if the
loader reports it we select that printer.
2. In the print dialog we show only a few of the discovered printers.
If the user selects a printer from the all printers activity that
is not in the initial list we shuffle the adapter data to make sure
the selected printer is in the shown subset. Now if the printers
change, i.e. the printers loader reports new result we were not
respecting the reshuffling made before so the short list of
printers changes yet again.
bug:11034216
Change-Id: I54fe3619e3328b65839d9f4b02309699eae7f8eb
Previously we relied on having a continue stream of sensor
events from which to detect whether the device is moving or
at rest. However, if the sensor HAL is broken in some way
then we might not receive enough sensor events to actually
finish the detection process. When this happens, we'll
just sit there holding a wakelock indefinitely.
Instead of relying on the sensor event stream, post a delayed
message to explicitly finish detection.
Bug: 10769163
Change-Id: Ia2ed66fe5e7c41a8832df76da9104c13554e1398
The strong reference OnClickHandler caused bitmaps in keyguard to be
referenced when keyguard was not visible. This change makes the click
handler a static class with a weak reference to the hostView instance,
allowing those bitmaps to get collected and shaving ~845k off of the
heap size when the keyguard isn't showing.
Issue #10918599 SystemUI should have a round of Svelting
Change-Id: I69de8659ac14c1a4723d082dd3cd394d8b6097f1
Show directory animations coming in from left-side when in RTL
language. Also fix NinePatchDrawable to correctly mirror its padding
when auto-mirrored, and fix InsetDrawable to propagate the layout
direction to the wrapped Drawable.
Bug: 10987190, 11030793
Change-Id: I1213802a07d0c4ced93438df1e6ddf5aed3df677
The user can select all printers from the print dropdown to get to
a search for printers activity where one can filter out the list
of a available printers. We did not have an empty state UI for the
case when the query yields no printers.
bug:11009053
Change-Id: I6b45517b8a7b319992019a1bf65858319a19a0de
Bug: 10918599
Shaves ~1.5MB off of Keyguard creation from usage of an
old-style Alpha animator that would create a draw cache
The animation is unseen due to screen timings, so simply remove it
Also adds a bit of de-jank to the non-svelte case by avoiding
a potential GC_FOR_ALLOC
Change-Id: Id49742d95988f670a44305e4033e7a850d20e675
- Call in all circumstances but only set launchHomeTaskNext for
focused stack. Previous version didn't call handleAppDiedLocked for
non-focused stack.
- Rearrange logic to run down the top task and make sure that all
remaining activities belong to the dying app. Previous version just
looked at the top non-finishing activity and based its behavior on
that.
Fixes bug 11029560.
Change-Id: Ic3a7c873c4c975577d6b390a8955ff41729bdfde
Should fix the array index out of bounds. valueAt() is when we have the
index, not the key.
Bug: 11014210
Change-Id: Icb53fe763782befbd5de1b3df6630b87cda72e84
Glow absorb animation was very slow with high velocity flings. Clamped the velocity
and adjusted constants for start values and duration of absorb animation.
Change-Id: Id2a87814498e05f5f8ceb942dd1d765874461beb
When a wake lock is aquired while executing a binder call and released
in the message handler, AppOps complains about the uid mismatch.
Clear the binder identity before acquiring the wake lock.
Bug: 10627124.
Change-Id: Ibd5babc1ae699bffde1a659562089eb091879106
If two activities are started at the same time the first activity can
add a starting window but never start. In that case there is no event
that will clear the starting window. This change adds a 10 second
timeout for the starting window to be cleared after which it will
clear the starting window automatically.
Fixes bug 10797865.
Change-Id: I1d59c3058c63367ff688d426474e8a6f006b2e0d