Skip to content

Commit

Permalink
1. Adds ShadowVibrator#addSupportedPrimitives to enable
Browse files Browse the repository at this point in the history
   shadowing of `Vibrator#areAllPrimitivesSupported`.
2. Creates `ShadowVibrator#mHandler` using main looper to avoid getting
   `null` from `Looper#myLooper` in some occasions.
3. Stores `VibrationEffectSegment`s in `ShadowVibrator` and exposes a getter to
   enable verification of `VibrationEffect` created by
   `VibrationEffect#startComposition`.

PiperOrigin-RevId: 413689184
  • Loading branch information
Googler authored and copybara-robolectric committed Dec 3, 2021
1 parent bcb31db commit 2b43260
Show file tree
Hide file tree
Showing 8 changed files with 1,527 additions and 28 deletions.
9 changes: 2 additions & 7 deletions nativeruntime/cpp/CMakeLists.txt
Expand Up @@ -3,11 +3,6 @@ cmake_minimum_required(VERSION 3.10)
# This is needed to ensure that static libraries can be linked into shared libraries.
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

# Building the nativeruntime does not work with GCC due to libstddc++ linker errors.
# TODO: figure out which linker args are needed to build with GCC.
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")

# Some libutils headers require C++17
set (CMAKE_CXX_STANDARD 17)

Expand Down Expand Up @@ -100,6 +95,8 @@ target_link_libraries(androidsqlite
${STATIC_ICUI18N_LIBRARY}
${STATIC_ICUUC_LIBRARY}
${STATIC_ICUDATA_LIBRARY}
-ldl
-lpthread
)

include_directories(${JNI_INCLUDE_DIRS})
Expand Down Expand Up @@ -142,8 +139,6 @@ if (CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
target_link_libraries(nativeruntime
-static-libgcc
-static-libstdc++
-ldl
-lpthread
-Wl,--no-undefined # print an error if there are any undefined symbols
)
endif()

0 comments on commit 2b43260

Please sign in to comment.