History log of /frameworks/base/core/java/android/os/Handler.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cb01563d7efa5689abb98fe4e5d8cc86bfc2b6fc 15-Jun-2017 Dianne Hackborn <hackbod@google.com> Work on issue #36891897: Need to ensure foreground services...

...can't hide themselves

Tune the policies for when we tell about apps running in the
background after their services have stopped.

- If it ran while the screen was on, the time we require for it
to be running is much shorter (a couple seconds) as well as the
time we tell about it having run (with another tunable for the
minimum time we tell about this).

- If it has only run while the screen is off and stops a sufficient
amount of time before the screen goes on (currently a second) then
we will not show anything when the screen goes on.

- If it stops when the screen turns on, we will make sure the user
sees about it for a short period of time (currently 5 seconds).

Also includes some improved debug output about handler message
queues.

Test: manual

Change-Id: Iab438410d7182b2dfe4f9c1cce7069b26b34834c
/frameworks/base/core/java/android/os/Handler.java
a38fbf63fd2a29884637a59387643c801ed4f663 14-Mar-2017 Eugene Susla <eugenesusla@google.com> Unbind from service on app killed and dedup association requests

1. Listen to calling package binder death stopping the scanning on that.
2. Don't restart scanning when a request with the same values was made.

Bug: 30932767
Test: 1.:
- Using a test app start scanning and kill the app.
- In debug mode ensure that DeviceDiscoveryService#stopScan gets triggered
2.:
- Start scanning and rotate the device while device chooser is visible
- Ensure no visible loss of state is happening
Change-Id: If126a2c963da90172a956fbd88e6b3dcd7ac8b01
/frameworks/base/core/java/android/os/Handler.java
74cd3de6f4889d54a3da930de5e7ad00b97f03e9 07-Apr-2016 Jeff Sharkey <jsharkey@android.com> Automatically trace messages on shared loopers.

There are a handful of looper threads in the system_process that
are shared by dozens of different internal services. To help track
down what these operations are, tag the processing of each message
with a string that tries describing where it originated from: the
class name of the Handler, and the message number or class name of the
Runnable.

Bug: 28046299
Change-Id: I409ec43fea8daaae4fd70df05d4fed929a7249ae
/frameworks/base/core/java/android/os/Handler.java
9840c07667bb0363c93fb8459e6c08f7e30d5df1 12-Nov-2014 Jeff Brown <jeffbrown@google.com> Make Message.setAsynchronous() public.

There are many cases in real world applications where it is desirable
to continue processing messages on the Looper even when most other
messages have been suspended by a synchronization barrier pending
completion of the next drawing frame on vsync.

Internally the framework is able to mark certain messages as being
independent of these higher level synchronization invariants by
flagging them as asynchronous.

This change exposes the existing function and improves on the
documentation so that it is clearer what is meant by asynchronous.

Bug: 18283959
Change-Id: I775e4c95938123a364b21a9f2c39019bf37e1afd
/frameworks/base/core/java/android/os/Handler.java
cb3ed1dc287ddb9beb7c9186713426f5fba263c3 28-Jun-2014 Dianne Hackborn <hackbod@google.com> Add new sendingUid field to Message.

This tell you where the message came from when it was
delivered through a Messenger.

Change-Id: I86a5f521c8ae919b45872dd76b61e83447f397ab
/frameworks/base/core/java/android/os/Handler.java
a8cf4f2fd1f72e3fa6ded96e1516ea1788fe3a25 20-Dec-2013 David Christie <dnchrist@google.com> Document that Handler.postDelayed uses uptimeMillis() based counting.
-Make it clear that delay may be longer than requested.
-Potentially help developers avoid power bugs (e.g. releasing after delay).
Bug: 12015795

Change-Id: I8034466f6307f64bfcad985948c1dc06872297d3
/frameworks/base/core/java/android/os/Handler.java
1d3b409cd93f803aa7a0bbafa2ac5fa90866bc33 06-Jun-2013 Kristian Monsen <kristianm@google.com> Add javadoc to Handler.Callback.handleMessage

Describing param and return value. There is a public bug for this at:
https://code.google.com/p/android/issues/detail?id=6464

Change-Id: Ia917cd4e047b629e6511bf12a91a5e953da8ae2e
/frameworks/base/core/java/android/os/Handler.java
8b60e4514702edd1eb4b6f2bfc027e04a94369c0 19-Apr-2013 Jeff Brown <jeffbrown@google.com> Fix change of behavior in Looper.quit().

It seems some applications rely on Looper.quit() terminating the
loop immediately without processing all messages. Rather than
risk breaking them, make the safer behavior optional.

Also take care to properly drain the message queue before quitting
so that all of the Message instances are recycled. This may
help release storage sooner in case the Looper doesn't get GC'd
promptly and its remaining queue of undelivered messages sticks
around.

Improve docs on runWithScissors.

Bug: 8596303
Change-Id: I8cbeb6f7a5f6b8e618b5109f87a03defc1486b9f
/frameworks/base/core/java/android/os/Handler.java
4ed8fe75e1dde1a2b9576f3862aecc5a572c56b5 31-Aug-2012 Jeff Brown <jeffbrown@google.com> More improvements to the display manager.

Added more complete support for logical displays with
support for mirroring, rotation and scaling.

Improved the overlay display adapter's touch interactions.

A big change here is that the display manager no longer relies
on a single-threaded model to maintain its synchronization
invariants. Unfortunately we had to change this so as to play
nice with the fact that the window manager wants to own
the surface flinger transaction around display and surface
manipulations. As a result, the display manager has to be able
to update displays from the context of any thread.

It would be nice to make this process more cooperative.
There are already several components competing to perform
surface flinger transactions including the window manager,
display manager, electron beam, overlay display window,
and mouse pointer. They are not manipulating the same surfaces
but they can collide with one another when they make global
changes to the displays.

Change-Id: I04f448594241f2004f6f3d1a81ccd12c566bf296
/frameworks/base/core/java/android/os/Handler.java
c53abc4d42a707caddf7ec9bb7d041125a09dbd7 29-Aug-2012 Jeff Brown <jeffbrown@google.com> Run with scissors.

Add a useful (if somewhat dangerous) method which will help
replace similarly dangerous code patterns in a few different places.

Change-Id: If1295f7ab9652c906ce718d94eb7914d143e1939
/frameworks/base/core/java/android/os/Handler.java
a2910d0abbbe18ba1710dfd4a31af45769632255 25-Aug-2012 Jeff Brown <jeffbrown@google.com> Make it easier to create asynchronous Handlers.

There are potentially very many Handlers owned by services
that should not be blocked by barriers introduced by UI traversals
occurring on the same thread (if that ever happens).
Add some convenience constructors to make it easy to switch
these Handlers over to being async.

Bug: 7057752
Change-Id: I64d9bffe81e7c52ada4cfad4e89d4340153f4688
/frameworks/base/core/java/android/os/Handler.java
109025d778c12d78f8585920447320aaf0f1d2f8 15-Aug-2012 Jeff Brown <jeffbrown@google.com> Make all messages in KeyguardViewMediator asynchronous.

We don't want these messages to get blocked by UI traversals.

Added a convenience for creating Handlers that always send
asynchronous messages.

Change-Id: Id568e87fcb8b169e8c52c5fe1dc76a4a5771570b
/frameworks/base/core/java/android/os/Handler.java
32c8113510b2774f865e8ac763976b90d9db2706 01-May-2012 Jeff Brown <jeffbrown@google.com> Fix Javadoc.

Bug: 6418632
Change-Id: Ib17218c413cbdf26bab19ccd873de33e67dd3397
/frameworks/base/core/java/android/os/Handler.java
ba6be8a62dcdb3ffd210cd36b9af4e3a658eac47 24-Apr-2012 Romain Guy <romainguy@google.com> Prevent WebView from crashing when detached from the window
Bug #6365056

WebView enqueues a functor in the hardware renderer to handle
animations and this functor is called at a later time by the
hardware renderer. However, the functor was not removed from
the queue when WebView was removed from the window. This could
cause the hardware renderer to attempt to execute an invalid
functor and lead to a crash.

Change-Id: I9d38e80f3fdc5e29d4d0cdfa1e893c251a954508
/frameworks/base/core/java/android/os/Handler.java
0f85ce3837633a03460a61405087a5d28a4bf955 16-Feb-2012 Jeff Brown <jeffbrown@google.com> Improve MessageQueue sync barrier implementation.

Instead of acquiring and releasing a barrier using an up/down
counter, we post a message to the queue that represents the
barrier. This is a more natural representation of the barrier
and better matches what we want to do with it: stall messages
behind the barrier in the queue while allowing messages earlier
in the queue to run as usual.

Refactored the MessageQueue a little bit to simplify the quit
logic and to better encapsulate the invariant that all
messages within the queue must have a valid target. Messages
without targets are used to represent barriers.

Bug: 5721047
Change-Id: Id297d9995474b5e3f17d24e302c58168e0a00394
/frameworks/base/core/java/android/os/Handler.java
588d8560b3fabcbc0d90c63f386b2fa0d56643de 04-Aug-2011 Kristian Monsen <kristianm@google.com> Fix for bug 5115066 Handler override of toString() hides derived class name

Dynamically getting the class name.

Change-Id: I3140bee67ee2e5a1790e53cf4dfc240d3bb25218
/frameworks/base/core/java/android/os/Handler.java
466ed24810d329add4f9200edf8c1918a3e80716 22-Jul-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5061083: Handler.removeCallbacksAndMessages...

...implementation doesn't match documentation

Fix the documentation.

Change-Id: I995b88e0f510973eb7d815ae895059e325c30e10
/frameworks/base/core/java/android/os/Handler.java
f9284695e8c10dad4daf3d2c84f607483bcb56ca 14-Jul-2011 Romain Guy <romainguy@google.com> Add new ViewDebug APIs to profile the event queue.

Change-Id: I225bf288780b0244f459316e2765cfa29cd22c89
/frameworks/base/core/java/android/os/Handler.java
42855149750fb848b0d743cf0e5f204a05be2f07 10-Sep-2010 Chris Palmer <palmer@google.com> Correct the PackageManager.checkSignatures documentation.

Make the documentation match the current behavior since change ID
Ibdeff170bd386d723f774136b18e0ad59d9cdabb.

Change-Id: I9d24800ba98f14cb278f029cdf37a086394d1747
/frameworks/base/core/java/android/os/Handler.java
333b8cba996c8ebb8ca55ebfc5cc536bdd64af94 26-Aug-2010 Brad Fitzpatrick <bradfitz@android.com> SharedPreferences$Editor.startCommit()

Adds a fire-and-forget save method (startCommit) to the
SharedPreferences.Editor, which is the way most people use it anyway.

This commit adds the implementation. The previous commit added the
interface and docs:

previous change: Idf9934b445da1fb72b79f0192218b47c0a7f5a34
git commit: edf32d01316bd3432c023f17747461b08ae36375

In addition, this change:

-- adds a generic "runPendingWorkFinishers" mechanism to
ActivityThread to wait on async operations that are still
in flight and use it for this.

-- ties runPendingWorkFinishers into Activity.onPause,
BroadcastReceiver, and Service.

-- makes sSharedPreferences keyed on name, not File, to avoid
unnnecessary allocations

-- documents and guarantees what thread
OnSharedPreferenceChangeListener callbacks run on

-- makes a few things in frameworks/base use startCommit(), notably
Preference.java (which was ignoring the return value anyway)

Change-Id: I1c8db60ad45643226fe6d246d3e513eeb7bd0ebd
/frameworks/base/core/java/android/os/Handler.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/os/Handler.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/os/Handler.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/core/java/android/os/Handler.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/os/Handler.java