diff options
author | Neil Fuller <nfuller@google.com> | 2015-01-07 09:25:41 +0000 |
---|---|---|
committer | Neil Fuller <nfuller@google.com> | 2015-01-07 09:25:41 +0000 |
commit | 3a2414f45502454bdf0a4ff28f50682f72e4f435 (patch) | |
tree | 869aeeb492580fd9046328e617a167e69558756a | |
parent | d0f39dbb37a6c6d32b481067517daae95b360555 (diff) | |
download | libcore-3a2414f45502454bdf0a4ff28f50682f72e4f435.zip libcore-3a2414f45502454bdf0a4ff28f50682f72e4f435.tar.gz libcore-3a2414f45502454bdf0a4ff28f50682f72e4f435.tar.bz2 |
Make some hidden methods final and more obviously private
Bug: https://code.google.com/p/android/issues/detail?id=93714
Change-Id: I986c6af2bf8c54de06c95b2fd0d53709a7c9d573
-rw-r--r-- | libart/src/main/java/java/lang/Thread.java | 8 | ||||
-rw-r--r-- | libart/src/main/java/sun/misc/Unsafe.java | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/libart/src/main/java/java/lang/Thread.java b/libart/src/main/java/java/lang/Thread.java index 852e2cf..7b3666b 100644 --- a/libart/src/main/java/java/lang/Thread.java +++ b/libart/src/main/java/java/lang/Thread.java @@ -1158,7 +1158,7 @@ public class Thread implements Runnable { * * @hide for Unsafe */ - public void unpark() { + public final void unpark$() { synchronized (lock) { switch (parkState) { case ParkState.PREEMPTIVELY_UNPARKED: { @@ -1204,7 +1204,7 @@ public class Thread implements Runnable { * * @hide for Unsafe */ - public void parkFor(long nanos) { + public final void parkFor$(long nanos) { synchronized (lock) { switch (parkState) { case ParkState.PREEMPTIVELY_UNPARKED: { @@ -1260,7 +1260,7 @@ public class Thread implements Runnable { * * @hide for Unsafe */ - public void parkUntil(long time) { + public final void parkUntil$(long time) { synchronized (lock) { /* * Note: This conflates the two time bases of "wall clock" @@ -1281,7 +1281,7 @@ public class Thread implements Runnable { if (delayMillis <= 0) { parkState = ParkState.UNPARKED; } else { - parkFor(delayMillis * NANOS_PER_MILLI); + parkFor$(delayMillis * NANOS_PER_MILLI); } } } diff --git a/libart/src/main/java/sun/misc/Unsafe.java b/libart/src/main/java/sun/misc/Unsafe.java index 6f5f5ee..1f938de 100644 --- a/libart/src/main/java/sun/misc/Unsafe.java +++ b/libart/src/main/java/sun/misc/Unsafe.java @@ -294,9 +294,9 @@ public final class Unsafe { */ public void park(boolean absolute, long time) { if (absolute) { - Thread.currentThread().parkUntil(time); + Thread.currentThread().parkUntil$(time); } else { - Thread.currentThread().parkFor(time); + Thread.currentThread().parkFor$(time); } } @@ -310,7 +310,7 @@ public final class Unsafe { */ public void unpark(Object obj) { if (obj instanceof Thread) { - ((Thread) obj).unpark(); + ((Thread) obj).unpark$(); } else { throw new IllegalArgumentException("valid for Threads only"); } |