Class ShadowApplicationSharedMemory
java.lang.Object
org.robolectric.shadows.ShadowApplicationSharedMemory
@Implements(value=com.android.internal.os.ApplicationSharedMemory.class,
isInAndroidSdk=false,
minSdk=36)
public class ShadowApplicationSharedMemory
extends Object
Shadow for
.
ApplicationSharedMemory. This gets initialized in
invalid reference
AndroidTestEnvironment
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static com.android.internal.os.ApplicationSharedMemorycreate()The realcreate()callsFileDescriptor.setInt$, which Robolectric routes throughjdk.internal.access.SharedSecretsand fails withIllegalAccessExceptionon JDK 9+ without an add-opens.protected static longnativeMap(int fd, boolean isMutable) static voidreset()
-
Constructor Details
-
ShadowApplicationSharedMemory
public ShadowApplicationSharedMemory()
-
-
Method Details
-
create
The realcreate()callsFileDescriptor.setInt$, which Robolectric routes throughjdk.internal.access.SharedSecretsand fails withIllegalAccessExceptionon JDK 9+ without an add-opens. Since there is no real shared memory here (nativeMap(int, boolean)is stubbed), build the inert instance directly instead, mirroring the real result soisMapped()staystrue. -
nativeMap
-
reset
-