diff options
Diffstat (limited to 'core/java/android/os/Looper.java')
| -rw-r--r-- | core/java/android/os/Looper.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/os/Looper.java b/core/java/android/os/Looper.java index 38f4d5e..363a1bf 100644 --- a/core/java/android/os/Looper.java +++ b/core/java/android/os/Looper.java @@ -192,6 +192,14 @@ public final class Looper { } /** + * Returns true if the current thread is this looper's thread. + * @hide + */ + public boolean isCurrentThread() { + return Thread.currentThread() == mThread; + } + + /** * Quits the looper. * * Causes the {@link #loop} method to terminate as soon as possible. |
