Commit 57d402d7 authored by Eric Stevenson's avatar Eric Stevenson Committed by Commit Bot

Android: Refactor JNI method references to use lambdas.

The method references prevent the generated JNI wrapper classes from
being fully inlined.

Bug: 993421
Change-Id: Id4771b73cd28ba462d8cdf950573575ab215f1ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1893990Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Eric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711441}
parent 1a3b5866
......@@ -60,7 +60,7 @@ public class MemoryPressureListener {
*/
@CalledByNative
private static void addNativeCallback() {
addCallback(MemoryPressureListenerJni.get()::onMemoryPressure);
addCallback((pressure) -> MemoryPressureListenerJni.get().onMemoryPressure(pressure));
}
/**
......
......@@ -52,7 +52,7 @@ public class LibraryPrefetcher {
if (coldStart && CommandLine.getInstance().hasSwitch("log-native-library-residency")) {
// LibraryPrefetcherJni.get().periodicallyCollectResidency() sleeps, run it on another
// thread, and not on the thread pool.
new Thread(LibraryPrefetcherJni.get()::periodicallyCollectResidency).start();
new Thread(() -> LibraryPrefetcherJni.get().periodicallyCollectResidency()).start();
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment