Flutter Engine
The Flutter Engine
CustomShadowContextImpl.java
Go to the documentation of this file.
1package io.flutter;
2
3import android.content.Context;
4import org.robolectric.annotation.Implementation;
5import org.robolectric.annotation.Implements;
6import org.robolectric.shadows.ShadowContextImpl;
7
8@Implements(className = ShadowContextImpl.CLASS_NAME)
9public class CustomShadowContextImpl extends ShadowContextImpl {
10 public static final String CLASS_NAME = "android.app.ContextImpl";
11
12 @Implementation
13 @Override
14 public final Object getSystemService(String name) {
15 if (name == Context.TEXT_SERVICES_MANAGER_SERVICE) {
16 return null;
17 }
18 return super.getSystemService(name);
19 }
20}
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32