1. Override WakeupMessage with an implementation that uses
sendEmptyMessageDelayed. This allows us to replace a
6-second sleep with a 150ms wait.
2. Change waitFor()'s polling interval from 100ms to 50ms.
With these changes ConnectivityServiceTest goes from ~9s to ~3s.
Change-Id: Id78aab9cded90a5b17f09d7f437904e179808dd2
Code that uses WakeupMessage uses the AlarmManager. Testing such
code is slow because AlarmManager.MIN_FUTURITY ensures that
alarms must wait at least 5 seconds before firing.
This change makes WakeupMessage's fields protected so that test
code can subclass from it and override schedule() and cancel()
with implementations that do not use AlarmManager, for example
by making schedule() call sendEmptyMessageDelayed and making
cancel() call removeMessages.
Change-Id: I51096b182d9eb87cc7bd46c3c91906f18356b354
Apps making calls into the system server may end up persisting
internal state or making security decisions based on the perceived
success or failure of a call, or the default values returned.
The reality is that if the system process just died, init will be
along shortly to kill all running apps, so we should have no problem
rethrowing the RemoteException as a RuntimeException.
Bug: 27364859
Change-Id: I866a8c3c9682da1de2a31fe8b4ffcc9d7f4d8ba0
Apps making calls into the system server may end up persisting
internal state or making security decisions based on the perceived
success or failure of a call, or the default values returned.
The reality is that if the system process just died, init will be
along shortly to kill all running apps, so we should have no problem
rethrowing the RemoteException as a RuntimeException.
Bug: 27364859
Change-Id: Ife0bcb079636c88d54c44d17eb580409fd79028b
Add test coverage for the Downloads case.
This was a regression to my recent cleanup of RootInfo.
Fixed logic to not exclude basically *everything* when a
directory is in the set of files to be copied.
Bug: 27303346
Change-Id: I4d5608e0d8d95448b027b20107a11a7a5e46d45e
If the texts were the same but one had an ellipsis and the
other didn't, things were not animating nicely.
Bug: 27419215
Change-Id: Iaa9611e1cf60b6fe71113b76f36ab5c24e461961
It allows badging an image regardless of of the user (no
user id parameter). The styling for managed users is applied.
This is useful for new cases where the existing functions
wouldn't badge the icon, but we need it.
Bug: 25192539
Change-Id: I20ca2d7265cbc3a47c050a72ec1843cc0a481c74
This CL fixes a bug in ListView where it might call onClick on an
un-clickable if a new touch arrives before up timeout.
We could actually consider making child position non-changable
but that will change behavior. This seems safer approach.
Bug: 27198796
Change-Id: I7b15d04efa19d1d760a294bd027f3da3aaa3a445