Rename nativeHoldsLock to holdsLock and make it work on current thread
This change removes a difference between the Android Thread.java file
and OpenJDK 8u121-b13.
Test: make checkbuild, flash, CtsLibcoreTestCases
Bug: 74379469
Change-Id: I5a56771f6cb944c7a985c8fa2001980cf14413f4
diff --git a/ojluni/src/main/java/java/lang/Thread.java b/ojluni/src/main/java/java/lang/Thread.java
index d462033..d7caf60 100644
--- a/ojluni/src/main/java/java/lang/Thread.java
+++ b/ojluni/src/main/java/java/lang/Thread.java
@@ -1489,11 +1489,7 @@
* the specified object.
* @since 1.4
*/
- public static boolean holdsLock(Object obj) {
- return currentThread().nativeHoldsLock(obj);
- }
-
- private native boolean nativeHoldsLock(Object object);
+ public static native boolean holdsLock(Object obj);
private static final StackTraceElement[] EMPTY_STACK_TRACE
= new StackTraceElement[0];