1 package com.android.settings.testutils.shadow; 2 3 import android.app.Activity; 4 import android.os.UserManager; 5 import com.android.settings.search.DynamicIndexableContentMonitor; 6 import org.robolectric.annotation.Implementation; 7 import org.robolectric.annotation.Implements; 8 import org.robolectric.annotation.RealObject; 9 10 /** 11 * A shadow class of {@link DynamicIndexableContentMonitor}. The real implementation of 12 * {@link DynamicIndexableContentMonitor#register} calls {@link UserManager#isUserUnlocked()}, which 13 * Robolectric has not yet been updated to support, so throws a NoSuchMethodError exception. 14 */ 15 // TODO: Delete this once Robolectric is updated to the latest SDK. 16 @Implements(DynamicIndexableContentMonitor.class) 17 public class ShadowDynamicIndexableContentMonitor { 18 19 @Implementation 20 public void register(Activity activity, int loaderId) { 21 } 22 } 23